diff options
author | Tasuku Suzuki <tasuku.suzuki@nokia.com> | 2012-05-29 10:21:13 +0900 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-09 11:18:17 +0200 |
commit | d04e06dc3279bd812d5a060c3f045b84ea345f35 (patch) | |
tree | a6022b61cfe388c31b7a3d654aeb80137b3ffb48 /src/gui | |
parent | 5b0273fc7a27785b6079a3b39681c3db22926742 (diff) |
Remove Library dependency on Settings
made QLibraryInfo available with QT_NO_SETTINGS.
QKdeTheme is removed when QT_NO_SETTINGS is defined.
Change-Id: I63d619bb305e6c23985d9ea50c72d39a697b7a4b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qicon.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qplatformintegrationfactory.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qplatformthemefactory.cpp | 6 | ||||
-rw-r--r-- | src/gui/text/qfontengine_qpf.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qplatformfontdatabase.cpp | 2 |
5 files changed, 8 insertions, 12 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 9cfc8476aa..3916672c85 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -826,7 +826,7 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State if (fileName.isEmpty()) return; if (!d) { -#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) +#ifndef QT_NO_LIBRARY QFileInfo info(fileName); QString suffix = info.suffix(); if (!suffix.isEmpty()) { @@ -1085,7 +1085,7 @@ QDataStream &operator>>(QDataStream &s, QIcon &icon) QIconEngine *engine = new QIconLoaderEngine(); icon.d->engine = engine; engine->read(s); -#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) +#ifndef QT_NO_LIBRARY } else { const int index = loader()->indexOf(key); if (index != -1) { diff --git a/src/gui/kernel/qplatformintegrationfactory.cpp b/src/gui/kernel/qplatformintegrationfactory.cpp index 886f50bdc6..d1860da126 100644 --- a/src/gui/kernel/qplatformintegrationfactory.cpp +++ b/src/gui/kernel/qplatformintegrationfactory.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE -#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) +#ifndef QT_NO_LIBRARY Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QPlatformIntegrationFactoryInterface_iid, QLatin1String("/platforms"), Qt::CaseInsensitive)) Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, @@ -62,7 +62,7 @@ QPlatformIntegration *QPlatformIntegrationFactory::create(const QString& key, co QStringList paramList = key.split(QLatin1Char(':')); const QString platform = paramList.takeFirst().toLower(); -#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) +#ifndef QT_NO_LIBRARY // Try loading the plugin from platformPluginPath first: if (!platformPluginPath.isEmpty()) { QCoreApplication::addLibraryPath(platformPluginPath); @@ -84,7 +84,7 @@ QPlatformIntegration *QPlatformIntegrationFactory::create(const QString& key, co QStringList QPlatformIntegrationFactory::keys(const QString &platformPluginPath) { -#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) +#ifndef QT_NO_LIBRARY QStringList list; if (!platformPluginPath.isEmpty()) { QCoreApplication::addLibraryPath(platformPluginPath); diff --git a/src/gui/kernel/qplatformthemefactory.cpp b/src/gui/kernel/qplatformthemefactory.cpp index cc203991db..031e3e1b39 100644 --- a/src/gui/kernel/qplatformthemefactory.cpp +++ b/src/gui/kernel/qplatformthemefactory.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE -#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) +#ifndef QT_NO_LIBRARY Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QPlatformThemeFactoryInterface_iid, QLatin1String("/platformthemes"), Qt::CaseInsensitive)) Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, @@ -62,7 +62,7 @@ QPlatformTheme *QPlatformThemeFactory::create(const QString& key, const QString QStringList paramList = key.split(QLatin1Char(':')); const QString platform = paramList.takeFirst().toLower(); -#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) +#ifndef QT_NO_LIBRARY // Try loading the plugin from platformPluginPath first: if (!platformPluginPath.isEmpty()) { QCoreApplication::addLibraryPath(platformPluginPath); @@ -83,7 +83,7 @@ QPlatformTheme *QPlatformThemeFactory::create(const QString& key, const QString */ QStringList QPlatformThemeFactory::keys(const QString &platformPluginPath) { -#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) +#ifndef QT_NO_LIBRARY QStringList list; if (!platformPluginPath.isEmpty()) { diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp index 23f263b0bd..3299dc1e0d 100644 --- a/src/gui/text/qfontengine_qpf.cpp +++ b/src/gui/text/qfontengine_qpf.cpp @@ -449,9 +449,7 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng freetype = QFreetypeFace::getFace(face_id); if (!freetype) { QString newPath = -#ifndef QT_NO_SETTINGS QLibraryInfo::location(QLibraryInfo::LibrariesPath) + -#endif QLatin1String("/fonts/") + QFileInfo(QFile::decodeName(face_id.filename)).fileName(); face_id.filename = QFile::encodeName(newPath); diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp index 7e2b890483..a101165aad 100644 --- a/src/gui/text/qplatformfontdatabase.cpp +++ b/src/gui/text/qplatformfontdatabase.cpp @@ -353,10 +353,8 @@ QString QPlatformFontDatabase::fontDir() const { QString fontpath = QString::fromLocal8Bit(qgetenv("QT_QPA_FONTDIR")); if (fontpath.isEmpty()) { -#ifndef QT_NO_SETTINGS fontpath = QLibraryInfo::location(QLibraryInfo::LibrariesPath); fontpath += QLatin1String("/fonts"); -#endif } return fontpath; |