OSDN Git Service

remove QT_NO_SETTINGS and QT_NO_COMPRESS definitions checks unrelated to bootstrap
authorIvailo Monev <xakepa10@laimg.moc>
Wed, 18 Dec 2019 21:05:36 +0000 (21:05 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Wed, 18 Dec 2019 21:05:36 +0000 (21:05 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/global/qconfig.h.cmake
src/gui/image/qicon.cpp
src/gui/styles/qstylefactory.cpp
src/tools/rcc/rcc.cpp
src/tools/uic/cpp/cppwriteicondata.cpp

index bd640d2..ea26bed 100644 (file)
 #define QT_NO_GLIB
 #define QT_NO_ICONV
 
-/* Qt build specs */
-#define QT_KATIE
-#cmakedefine QT_VISIBILITY_AVAILABLE
-#cmakedefine QT_LARGEFILE_SUPPORT ${QT_LARGEFILE_SUPPORT}
-#cmakedefine QT_POINTER_SIZE ${QT_POINTER_SIZE}
-
-// not supported, used to bootstrap
+// Not supported, used to bootstrap
 #cmakedefine QT_NO_QOBJECT
 #cmakedefine QT_NO_COMPRESS
 #cmakedefine QT_NO_THREAD
 #cmakedefine QT_NO_STANDARDPATHS
 #cmakedefine QT_NO_SETTINGS
 
+/* Build specs */
+#define QT_KATIE
+#cmakedefine QT_VISIBILITY_AVAILABLE
+#cmakedefine QT_LARGEFILE_SUPPORT ${QT_LARGEFILE_SUPPORT}
+#cmakedefine QT_POINTER_SIZE ${QT_POINTER_SIZE}
+
 #cmakedefine QT_NO_USING_NAMESPACE
 #cmakedefine QT_NO_ACCESSIBILITY
 #cmakedefine QT_NO_ACTION
index 6ded0e9..20278c8 100644 (file)
@@ -744,7 +744,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)
+#if !defined (QT_NO_LIBRARY)
         QFileInfo info(fileName);
         QString suffix = info.suffix();
         if (!suffix.isEmpty()) {
@@ -977,7 +977,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)
+#if !defined (QT_NO_LIBRARY)
     } else if (QIconEngineFactoryInterface *factory = qobject_cast<QIconEngineFactoryInterface*>(iconloader()->instance(key))) {
         if (QIconEngine *engine= factory->create()) {
             icon.d = new QIconPrivate;
index 4db6507..13e2e0d 100644 (file)
@@ -117,7 +117,7 @@ QStyle *QStyleFactory::create(const QString& key)
     else
 #endif
     { } // Keep these here - they make the #ifdefery above work
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#if !defined(QT_NO_LIBRARY)
     if(!ret) {
         if (QStyleFactoryInterface *factory = qobject_cast<QStyleFactoryInterface*>(stylesloader()->instance(style)))
             ret = factory->create(style);
@@ -136,7 +136,7 @@ QStyle *QStyleFactory::create(const QString& key)
 */
 QStringList QStyleFactory::keys()
 {
-#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+#if !defined(QT_NO_LIBRARY)
     QStringList list = stylesloader()->keys();
 #else
     QStringList list;
index 9243972..de0dd53 100644 (file)
@@ -226,7 +226,6 @@ qint64 RCCFileInfo::writeDataBlob(RCCResourceLibrary &lib, qint64 offset,
     }
     QByteArray data = file.readAll();
 
-#ifndef QT_NO_COMPRESS
     // Check if compression is useful for this file
     if (m_compressLevel != 0 && data.size() != 0) {
         QByteArray compressed =
@@ -238,7 +237,6 @@ qint64 RCCFileInfo::writeDataBlob(RCCResourceLibrary &lib, qint64 offset,
             m_flags |= Compressed;
         }
     }
-#endif // QT_NO_COMPRESS
 
     // some info
     if (text) {
index 660e4e9..c054801 100644 (file)
@@ -76,7 +76,6 @@ static QByteArray transformImageData(const QString &data)
 
 static QByteArray unzipXPM(const QString &data, ulong& length)
 {
-#ifndef QT_NO_COMPRESS
     const int lengthOffset = 4;
     QByteArray ba(lengthOffset, ' ');
 
@@ -88,11 +87,6 @@ static QByteArray unzipXPM(const QString &data, ulong& length)
     ba[3] = (length & 0x000000ff);
     ba.append(transformImageData(data));
     return qUncompress(ba);
-#else
-    Q_UNUSED(data);
-    Q_UNUSED(length);
-    return QByteArray();
-#endif
 }