summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2016-01-06 12:18:40 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2016-02-08 10:40:33 +0000
commit4fb7eb0da74798205f5cac693c921065492fa33e (patch)
tree2082182e4b640ef9233d1bd9108caccd30a5edb7 /src/gui/image
parent21861e6fd1fcd1e4642f3d4c06ee7181d2c81778 (diff)
Drop most "#ifndef QT_NO_LIBRARY"
As we can load plugins without QLibrary now, we don't have to #ifdef out the code that does so anymore. Change-Id: I1dc20216830a882dbd5a1b431183407e6b19c837 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qicon.cpp7
-rw-r--r--src/gui/image/qiconloader.cpp4
-rw-r--r--src/gui/image/qpicture.cpp2
-rw-r--r--src/gui/image/qpictureformatplugin.cpp4
-rw-r--r--src/gui/image/qpictureformatplugin.h4
5 files changed, 4 insertions, 17 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 0c716a89ff..62feaa92f9 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -529,7 +529,6 @@ void QPixmapIconEngine::virtual_hook(int id, void *data)
}
}
-#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QIconEngineFactoryInterface_iid, QLatin1String("/iconengines"), Qt::CaseInsensitive))
@@ -537,8 +536,6 @@ QFactoryLoader *qt_iconEngineFactoryLoader()
{
return loader();
}
-#endif
-
/*!
@@ -1015,7 +1012,6 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State
return;
detach();
if (!d) {
-#ifndef QT_NO_LIBRARY
QFileInfo info(fileName);
QString suffix = info.suffix();
if (!suffix.isEmpty()) {
@@ -1030,7 +1026,6 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State
}
}
}
-#endif
// ...then fall back to the default engine
if (!d) {
d = new QIconPrivate;
@@ -1330,7 +1325,6 @@ QDataStream &operator>>(QDataStream &s, QIcon &icon)
QIconEngine *engine = new QIconLoaderEngine();
icon.d->engine = engine;
engine->read(s);
-#ifndef QT_NO_LIBRARY
} else {
const int index = loader()->indexOf(key);
if (index != -1) {
@@ -1342,7 +1336,6 @@ QDataStream &operator>>(QDataStream &s, QIcon &icon)
} // factory
} // instance
} // index
-#endif
}
} else if (s.version() == QDataStream::Qt_4_2) {
icon = QIcon();
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
index be032e498b..8cc1dfa7d0 100644
--- a/src/gui/image/qiconloader.cpp
+++ b/src/gui/image/qiconloader.cpp
@@ -94,9 +94,7 @@ static inline QStringList systemIconSearchPaths()
return QStringList();
}
-#ifndef QT_NO_LIBRARY
extern QFactoryLoader *qt_iconEngineFactoryLoader(); // qicon.cpp
-#endif
void QIconLoader::ensureInitialized()
{
@@ -109,10 +107,8 @@ void QIconLoader::ensureInitialized()
if (m_systemTheme.isEmpty())
m_systemTheme = fallbackTheme();
-#ifndef QT_NO_LIBRARY
if (qt_iconEngineFactoryLoader()->keyMap().key(QLatin1String("svg"), -1) != -1)
m_supportsSvg = true;
-#endif //QT_NO_LIBRARY
}
}
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index 21bdfeff34..7506e2e1a9 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -1414,7 +1414,6 @@ Q_GLOBAL_STATIC(QPHList, pictureHandlers)
void qt_init_picture_plugins()
{
-#ifndef QT_NO_LIBRARY
typedef QMultiMap<int, QString> PluginKeyMap;
typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator;
@@ -1429,7 +1428,6 @@ void qt_init_picture_plugins()
if (QPictureFormatPlugin *format = qobject_cast<QPictureFormatPlugin*>(loader.instance(it.key())))
format->installIOHandler(it.value());
}
-#endif
}
static void cleanup()
diff --git a/src/gui/image/qpictureformatplugin.cpp b/src/gui/image/qpictureformatplugin.cpp
index ece9a791f0..ef57ad720f 100644
--- a/src/gui/image/qpictureformatplugin.cpp
+++ b/src/gui/image/qpictureformatplugin.cpp
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qpictureformatplugin.h"
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_PICTURE)
+#if !defined(QT_NO_PICTURE)
#include "qpicture.h"
QT_BEGIN_NAMESPACE
@@ -130,6 +130,6 @@ bool QPictureFormatPlugin::savePicture(const QString &format, const QString &fil
return false;
}
-#endif // QT_NO_LIBRARY || QT_NO_PICTURE
+#endif // QT_NO_PICTURE
QT_END_NAMESPACE
diff --git a/src/gui/image/qpictureformatplugin.h b/src/gui/image/qpictureformatplugin.h
index 5f8477b117..003ccac116 100644
--- a/src/gui/image/qpictureformatplugin.h
+++ b/src/gui/image/qpictureformatplugin.h
@@ -46,7 +46,7 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_PICTURE)
+#if !defined(QT_NO_PICTURE)
class QPicture;
class QImage;
@@ -68,7 +68,7 @@ public:
};
-#endif // QT_NO_LIBRARY || QT_NO_PICTURE
+#endif // QT_NO_PICTURE
QT_END_NAMESPACE