summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/image.pri2
-rw-r--r--src/gui/image/qbitmap.cpp2
-rw-r--r--src/gui/image/qicon.cpp32
-rw-r--r--src/gui/image/qiconengine.cpp4
-rw-r--r--src/gui/image/qimage.cpp11
-rw-r--r--src/gui/image/qimagereader.cpp2
-rw-r--r--src/gui/image/qimagewriter.cpp2
-rw-r--r--src/gui/image/qmovie.cpp4
-rw-r--r--src/gui/image/qpicture.cpp6
-rw-r--r--src/gui/image/qpixmap.cpp4
-rw-r--r--src/gui/image/qpixmap_mac.cpp11
-rw-r--r--src/gui/image/qpixmapcache.cpp3
-rw-r--r--src/gui/image/qpixmapfilter.cpp8
-rw-r--r--src/gui/image/qpnghandler.cpp2
-rw-r--r--src/gui/image/qppmhandler.cpp2
15 files changed, 40 insertions, 55 deletions
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index 1010f7f..0970385 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -92,7 +92,7 @@ SOURCES += \
SOURCES += image/qpnghandler.cpp
contains(QT_CONFIG, system-png) {
- unix:LIBS += -lpng
+ unix:LIBS_PRIVATE += -lpng
win32:LIBS += libpng.lib
} else {
!isEqual(QT_ARCH, i386):!isEqual(QT_ARCH, x86_64):DEFINES += PNG_NO_ASSEMBLER_CODE
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index 5827dc1..e239022 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
\class QBitmap
\brief The QBitmap class provides monochrome (1-bit depth) pixmaps.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
The QBitmap class is a monochrome off-screen paint device used
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 0d854d0..5a88e29 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -445,9 +445,9 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loaderV2,
\brief The QIcon class provides scalable icons in different modes
and states.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \mainclass
+
A QIcon can generate smaller, larger, active, and disabled pixmaps
from the set of pixmaps it is given. Such pixmaps are used by Qt
@@ -871,7 +871,7 @@ QList<QSize> QIcon::availableSizes(Mode mode, State state) const
\since 4.6
Sets the search paths for icon themes to \a paths.
- \sa themeSearchPaths(), fromTheme()
+ \sa themeSearchPaths(), fromTheme(), setThemeName()
*/
void QIcon::setThemeSearchPaths(const QStringList &paths)
{
@@ -893,7 +893,7 @@ void QIcon::setThemeSearchPaths(const QStringList &paths)
On Mac the default search path will search in the
[Contents/Resources/icons] part of the application bundle.
- \sa setThemeSearchPaths(), fromTheme()
+ \sa setThemeSearchPaths(), fromTheme(), setThemeName()
*/
QStringList QIcon::themeSearchPaths()
{
@@ -903,16 +903,17 @@ QStringList QIcon::themeSearchPaths()
/*!
\since 4.6
- Sets the current icon theme.
+ Sets the current icon theme to \a name.
- The name should correspond to a directory name in the
- current \ themeSearchPath() containing an index.theme
- file describing it's contents..
+ The \a name should correspond to a directory name in the
+ current themeSearchPath() containing an index.theme
+ file describing it's contents.
+ \sa themeSearchPaths(), themeName()
*/
-void QIcon::setThemeName(const QString &path)
+void QIcon::setThemeName(const QString &name)
{
- QIconLoader::instance()->setThemeName(path);
+ QIconLoader::instance()->setThemeName(name);
}
/*!
@@ -923,7 +924,8 @@ void QIcon::setThemeName(const QString &path)
On X11, the current icon theme depends on your desktop
settings. On other platforms it is not set by default.
- \sa themeSearchPaths(), fromTheme(), hasThemeIcon()
+ \sa setThemeName(), themeSearchPaths(), fromTheme(),
+ hasThemeIcon()
*/
QString QIcon::themeName()
{
@@ -960,7 +962,7 @@ QString QIcon::themeName()
compliant theme in one of your themeSearchPaths() and set the
appropriate themeName().
- \sa themeName(), themeSearchPaths()
+ \sa themeName(), setThemeName(), themeSearchPaths()
*/
QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
{
@@ -994,10 +996,10 @@ QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
/*!
\since 4.6
- Returns true if there is an icon available for a \a name in the current
- icon theme, otherwise returns false.
+ Returns true if there is an icon available for \a name in the
+ current icon theme, otherwise returns false.
- \sa themeSearchPaths(), fromTheme()
+ \sa themeSearchPaths(), fromTheme(), setThemeName()
*/
bool QIcon::hasThemeIcon(const QString &name)
{
diff --git a/src/gui/image/qiconengine.cpp b/src/gui/image/qiconengine.cpp
index 8e39607..930834d 100644
--- a/src/gui/image/qiconengine.cpp
+++ b/src/gui/image/qiconengine.cpp
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
\brief The QIconEngine class provides an abstract base class for QIcon renderers.
- \ingroup multimedia
+ \ingroup painting
\bold {Use QIconEngineV2 instead.}
@@ -144,7 +144,7 @@ void QIconEngine::addFile(const QString &/*fileName*/, const QSize &/*size*/, QI
\brief The QIconEngineV2 class provides an abstract base class for QIcon renderers.
- \ingroup multimedia
+ \ingroup painting
\since 4.3
An icon engine renders \l{QIcon}s. With icon engines, you can
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 5e635d6..86e27bd 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -61,11 +61,7 @@
#include <qhash.h>
-#ifdef QT_RASTER_IMAGEENGINE
#include <private/qpaintengine_raster_p.h>
-#else
-#include <qpaintengine.h>
-#endif
#include <private/qimage_p.h>
@@ -343,9 +339,9 @@ bool QImageData::checkForAlphaPixels() const
/*!
\class QImage
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \mainclass
+
\reentrant
\brief The QImage class provides a hardware-independent image
@@ -5254,11 +5250,10 @@ QPaintEngine *QImage::paintEngine() const
if (!d)
return 0;
-#ifdef QT_RASTER_IMAGEENGINE
if (!d->paintEngine) {
d->paintEngine = new QRasterPaintEngine(const_cast<QImage *>(this));
}
-#endif
+
return d->paintEngine;
}
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 06c8f21..b127de7 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -47,7 +47,7 @@
for reading images from files or other devices.
\reentrant
- \ingroup multimedia
+ \ingroup painting
\ingroup io
The most common way to read images is through QImage and QPixmap's
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index c734169..1f06493 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -45,7 +45,7 @@
for writing images to files or other devices.
\reentrant
- \ingroup multimedia
+ \ingroup painting
\ingroup io
QImageWriter supports setting format specific options, such as the
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp
index 2265e7b..179e6bb 100644
--- a/src/gui/image/qmovie.cpp
+++ b/src/gui/image/qmovie.cpp
@@ -45,7 +45,7 @@
\brief The QMovie class is a convenience class for playing movies
with QImageReader.
- \ingroup multimedia
+ \ingroup painting
First, create a QMovie object by passing either the name of a file or a
pointer to a QIODevice containing an animated image format to QMovie's
@@ -356,7 +356,7 @@ QFrameInfo QMoviePrivate::infoForFrame(int frameNumber)
reader = new QImageReader(device, format);
else
reader = new QImageReader(absoluteFilePath, format);
- reader->canRead(); // Provoke a device->open() call
+ (void)reader->canRead(); // Provoke a device->open() call
reader->device()->seek(initialDevicePos);
reader->setBackgroundColor(bgColor);
reader->setScaledSize(scaledSize);
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index 2dcb9c7..1136a97 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -69,9 +69,9 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
\brief The QPicture class is a paint device that records and
replays QPainter commands.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \mainclass
+
A picture serializes painter commands to an IO device in a
platform-independent format. They are sometimes referred to as meta-files.
@@ -1303,7 +1303,7 @@ QList<QByteArray> QPicture::outputFormats()
\brief The QPictureIO class contains parameters for loading and
saving pictures.
- \ingroup multimedia
+ \ingroup painting
\ingroup io
QPictureIO contains a QIODevice object that is used for picture data
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 8259c6f..79b1f17 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1565,9 +1565,9 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
\brief The QPixmap class is an off-screen image representation
that can be used as a paint device.
- \ingroup multimedia
+ \ingroup painting
\ingroup shared
- \mainclass
+
Qt provides four classes for handling image data: QImage, QPixmap,
QBitmap and QPicture. QImage is designed and optimized for I/O,
diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp
index 8c911bb..5959da1 100644
--- a/src/gui/image/qpixmap_mac.cpp
+++ b/src/gui/image/qpixmap_mac.cpp
@@ -38,7 +38,6 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//#define QT_RASTER_PAINTENGINE
#include "qpixmap.h"
#include "qimage.h"
@@ -52,9 +51,6 @@
#include <private/qdrawhelper_p.h>
#include <private/qpixmap_mac_p.h>
#include <private/qpixmap_raster_p.h>
-#ifdef QT_RASTER_PAINTENGINE
-# include <private/qpaintengine_raster_p.h>
-#endif
#include <private/qpaintengine_mac_p.h>
#include <private/qt_mac_p.h>
#include <private/qt_cocoa_helpers_mac_p.h>
@@ -1098,14 +1094,7 @@ QPaintEngine* QMacPixmapData::paintEngine() const
{
if (!pengine) {
QMacPixmapData *that = const_cast<QMacPixmapData*>(this);
-#ifdef QT_RASTER_PAINTENGINE
- if (qgetenv("QT_MAC_USE_COREGRAPHICS").isNull())
- that->pengine = new QRasterPaintEngine();
- else
- that->pengine = new QCoreGraphicsPaintEngine();
-#else
that->pengine = new QCoreGraphicsPaintEngine();
-#endif
}
return pengine;
}
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 5f0564e..b8d6ac1 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -51,8 +51,7 @@ QT_BEGIN_NAMESPACE
\brief The QPixmapCache class provides an application-wide cache for pixmaps.
- \ingroup environment
- \ingroup multimedia
+ \ingroup painting
This class is a tool for optimized drawing with QPixmap. You can
use it to store temporary pixmaps that are expensive to generate
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index cd80b10..968ecd7 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -65,7 +65,7 @@ public:
/*!
\class QPixmapFilter
\since 4.5
- \ingroup multimedia
+ \ingroup painting
\brief The QPixmapFilter class provides the basic functionality for
pixmap filter classes. Pixmap filter can be for example colorize or blur.
@@ -172,7 +172,7 @@ QRectF QPixmapFilter::boundingRectFor(const QRectF &rect) const
/*!
\class QPixmapConvolutionFilter
\since 4.5
- \ingroup multimedia
+ \ingroup painting
\brief The QPixmapConvolutionFilter class provides convolution
filtering for pixmaps.
@@ -517,7 +517,7 @@ static void grayscale(const QImage &image, QImage &dest, const QRect& rect = QRe
/*!
\class QPixmapColorizeFilter
\since 4.5
- \ingroup multimedia
+ \ingroup painting
\brief The QPixmapColorizeFilter class provides colorizing
filtering for pixmaps.
@@ -641,7 +641,7 @@ public:
/*!
\class QPixmapDropShadowFilter
\since 4.5
- \ingroup multimedia
+ \ingroup painting
\brief The QPixmapDropShadowFilter class is a convenience class
for drawing pixmaps with drop shadows.
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index e3475d6..64bc5d3 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -956,7 +956,7 @@ QVariant QPngHandler::option(ImageOption option) const
void QPngHandler::setOption(ImageOption option, const QVariant &value)
{
if (option == Gamma)
- d->gamma = value.toDouble();
+ d->gamma = value.toFloat();
else if (option == Quality)
d->quality = value.toInt();
else if (option == Description)
diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp
index 77ccb48..ed8f4c1 100644
--- a/src/gui/image/qppmhandler.cpp
+++ b/src/gui/image/qppmhandler.cpp
@@ -80,7 +80,7 @@ static int read_pbm_int(QIODevice *d)
else if (isspace((uchar) c))
continue;
else if (c == '#')
- d->readLine(buf, buflen);
+ (void)d->readLine(buf, buflen);
else
break;
}