diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-10-27 13:00:36 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-10-27 13:00:36 +0100 |
commit | 2eb26c170920d28213b71e549d5dac4663febb14 (patch) | |
tree | 8df5223ac114d758c2112a8fc787992175556418 /src/gui/image | |
parent | 49ddae28e0dcd1c59dd5d742cffedd5290d1224a (diff) | |
parent | 81998b4e8e440076bd22a9164f0a93481c0e597a (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
src/gui/text/qfontdatabase.cpp
Change-Id: I6ac1f55faa22b8e7b591386fb67f0333d0ea443d
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qiconloader.cpp | 1 | ||||
-rw-r--r-- | src/gui/image/qimagereader.cpp | 23 | ||||
-rw-r--r-- | src/gui/image/qimagewriter.cpp | 17 |
3 files changed, 26 insertions, 15 deletions
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index 750e253dee..06491f1155 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -223,6 +223,7 @@ QIconTheme::QIconTheme(const QString &themeName) // Parent themes provide fallbacks for missing icons m_parents = indexReader.value( QLatin1String("Icon Theme/Inherits")).toStringList(); + m_parents.removeAll(QString()); // Ensure a default platform fallback for all themes if (m_parents.isEmpty()) { diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index e847a45a85..ad84b0a091 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -877,15 +877,22 @@ QString QImageReader::fileName() const /*! \since 4.2 - This is an image format specific function that sets the quality - level of the image to \a quality. For image formats that do not - support setting the quality, this value is ignored. + Sets the quality setting of the image format to \a quality. - The value range of \a quality depends on the image format. For - example, the "jpeg" format supports a quality range from 0 (low - quality, high compression) to 100 (high quality, low compression). + Some image formats, in particular lossy ones, entail a tradeoff between a) + visual quality of the resulting image, and b) decoding execution time. + This function sets the level of that tradeoff for image formats that + support it. - \sa quality() + In case of scaled image reading, the quality setting may also influence the + tradeoff level between visual quality and execution speed of the scaling + algorithm. + + The value range of \a quality depends on the image format. For example, + the "jpeg" format supports a quality range from 0 (low visual quality) to + 100 (high visual quality). + + \sa quality() setScaledSize() */ void QImageReader::setQuality(int quality) { @@ -895,7 +902,7 @@ void QImageReader::setQuality(int quality) /*! \since 4.2 - Returns the quality level of the image. + Returns the quality setting of the image format. \sa setQuality() */ diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp index d172d4008f..fa261df1a5 100644 --- a/src/gui/image/qimagewriter.cpp +++ b/src/gui/image/qimagewriter.cpp @@ -434,13 +434,16 @@ QString QImageWriter::fileName() const } /*! - This is an image format specific function that sets the quality - level of the image to \a quality. For image formats that do not - support setting the quality, this value is ignored. + Sets the quality setting of the image format to \a quality. - The value range of \a quality depends on the image format. For - example, the "jpeg" format supports a quality range from 0 (low - quality, high compression) to 100 (high quality, low compression). + Some image formats, in particular lossy ones, entail a tradeoff between a) + visual quality of the resulting image, and b) encoding execution time and + compression level. This function sets the level of that tradeoff for image + formats that support it. For other formats, this value is ignored. + + The value range of \a quality depends on the image format. For example, + the "jpeg" format supports a quality range from 0 (low visual quality, high + compression) to 100 (high visual quality, low compression). \sa quality() */ @@ -450,7 +453,7 @@ void QImageWriter::setQuality(int quality) } /*! - Returns the quality level of the image. + Returns the quality setting of the image format. \sa setQuality() */ |