summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp12
-rw-r--r--src/svg/doc/qtsvg.qdocconf8
-rw-r--r--src/svg/qsvggenerator.cpp4
3 files changed, 13 insertions, 11 deletions
diff --git a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
index 902e59d..6d84df1 100644
--- a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
+++ b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
@@ -180,11 +180,13 @@ QPixmap QSvgIconEngine::pixmap(const QSize &size, QIcon::Mode mode,
renderer.render(&p);
p.end();
pm = QPixmap::fromImage(img);
- QStyleOption opt(0);
- opt.palette = QApplication::palette();
- QPixmap generated = QApplication::style()->generatedIconPixmap(mode, pm, &opt);
- if (!generated.isNull())
- pm = generated;
+ if (qobject_cast<QApplication *>(QCoreApplication::instance())) {
+ QStyleOption opt(0);
+ opt.palette = QGuiApplication::palette();
+ QPixmap generated = QApplication::style()->generatedIconPixmap(mode, pm, &opt);
+ if (!generated.isNull())
+ pm = generated;
+ }
if (!pm.isNull())
QPixmapCache::insert(pmckey, pm);
diff --git a/src/svg/doc/qtsvg.qdocconf b/src/svg/doc/qtsvg.qdocconf
index 2758128..88fd510 100644
--- a/src/svg/doc/qtsvg.qdocconf
+++ b/src/svg/doc/qtsvg.qdocconf
@@ -4,7 +4,7 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtSvg
description = Qt SVG Reference Documentation
url = http://qt-project.org/doc/qtsvg
-version = 5.0.0
+version = 5.0.1
qhp.projects = QtSvg
@@ -14,9 +14,9 @@ qhp.QtSvg.virtualFolder = qtsvg
qhp.QtSvg.indexTitle = Qt SVG
qhp.QtSvg.indexRoot =
-qhp.QtSvg.filterAttributes = qtsvg 5.0.0 qtrefdoc
-qhp.QtSvg.customFilters.Qt.name = QtSvg 5.0.0
-qhp.QtSvg.customFilters.Qt.filterAttributes = qtsvg 5.0.0
+qhp.QtSvg.filterAttributes = qtsvg 5.0.1 qtrefdoc
+qhp.QtSvg.customFilters.Qt.name = QtSvg 5.0.1
+qhp.QtSvg.customFilters.Qt.filterAttributes = qtsvg 5.0.1
qhp.QtSvg.subprojects = classes
qhp.QtSvg.subprojects.classes.title = C++ Classes
qhp.QtSvg.subprojects.classes.indexTitle = Qt SVG C++ Classes
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp
index 47f760b..74efc65 100644
--- a/src/svg/qsvggenerator.cpp
+++ b/src/svg/qsvggenerator.cpp
@@ -175,7 +175,7 @@ public:
void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode);
void drawTextItem(const QPointF &pt, const QTextItem &item);
void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
- Qt::ImageConversionFlag = Qt::AutoColor);
+ Qt::ImageConversionFlags flags = Qt::AutoColor);
QPaintEngine::Type type() const { return QPaintEngine::SVG; }
@@ -907,7 +907,7 @@ void QSvgPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm,
void QSvgPaintEngine::drawImage(const QRectF &r, const QImage &image,
const QRectF &sr,
- Qt::ImageConversionFlag flags)
+ Qt::ImageConversionFlags flags)
{
//Q_D(QSvgPaintEngine);