From c593492d1678a2ec08f1bfffcb572459b3bc6c00 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 26 Sep 2018 15:39:35 +0200 Subject: Modernize the "animation" feature Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d Reviewed-by: Edward Welbourne Reviewed-by: Oswald Buddenhagen --- src/gui/animation/qguivariantanimation.cpp | 4 ---- src/gui/gui.pro | 2 +- src/gui/kernel/qguiapplication.cpp | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src/gui') diff --git a/src/gui/animation/qguivariantanimation.cpp b/src/gui/animation/qguivariantanimation.cpp index b72764e048..a5b6d8b95c 100644 --- a/src/gui/animation/qguivariantanimation.cpp +++ b/src/gui/animation/qguivariantanimation.cpp @@ -38,8 +38,6 @@ ****************************************************************************/ #include -#ifndef QT_NO_ANIMATION - #include #include #include @@ -90,5 +88,3 @@ static void qUnregisterGuiGetInterpolator() Q_DESTRUCTOR_FUNCTION(qUnregisterGuiGetInterpolator) QT_END_NAMESPACE - -#endif //QT_NO_ANIMATION diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 759d6f3cbf..06c9cd3939 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -45,7 +45,7 @@ include(painting/painting.pri) include(util/util.pri) include(math3d/math3d.pri) include(opengl/opengl.pri) -include(animation/animation.pri) +qtConfig(animation): include(animation/animation.pri) include(itemmodels/itemmodels.pri) include(vulkan/vulkan.pri) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index e81c88cc71..193712a7a7 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -204,7 +204,7 @@ QInputDeviceManager *QGuiApplicationPrivate::m_inputDeviceManager = 0; static qreal fontSmoothingGamma = 1.7; extern void qRegisterGuiVariant(); -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) extern void qRegisterGuiGetInterpolator(); #endif @@ -1517,7 +1517,7 @@ void QGuiApplicationPrivate::init() // trigger registering of QVariant's GUI types qRegisterGuiVariant(); -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) // trigger registering of animation interpolators qRegisterGuiGetInterpolator(); #endif -- cgit v1.2.3 From 3eebadc1734463afa469dcd08eab8c5d2557dec6 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Fri, 28 Sep 2018 11:40:10 +0200 Subject: Modernize the "mimetype" feature Change-Id: I9b67c2cbc0891a38ece18d521c86fbc7344dce7a Reviewed-by: Edward Welbourne Reviewed-by: Oswald Buddenhagen --- src/gui/image/qicon.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 32fa9e75ac..635fdc3a68 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -47,8 +47,10 @@ #include "private/qiconloader_p.h" #include "qpainter.h" #include "qfileinfo.h" +#if QT_CONFIG(mimetype) #include #include +#endif #include "qpixmapcache.h" #include "qvariant.h" #include "qcache.h" @@ -1079,10 +1081,10 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State QFileInfo info(fileName); QIconEngine *engine = iconEngineFromSuffix(fileName, info.suffix()); -#ifndef QT_NO_MIMETYPE +#if QT_CONFIG(mimetype) if (!engine) engine = iconEngineFromSuffix(fileName, QMimeDatabase().mimeTypeForFile(info).preferredSuffix()); -#endif // !QT_NO_MIMETYPE +#endif // mimetype d = new QIconPrivate(engine ? engine : new QPixmapIconEngine); } -- cgit v1.2.3