OSDN Git Service

remove unused internal build functionality
authorIvailo Monev <xakepa10@gmail.com>
Wed, 25 Nov 2020 22:26:39 +0000 (22:26 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 25 Nov 2020 22:26:39 +0000 (22:26 +0000)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/itemviews/qtableview.cpp
src/gui/itemviews/qtableview_p.h
src/gui/kernel/qapplication.cpp

index 5ac8a33..70afbd4 100644 (file)
@@ -537,47 +537,6 @@ void QSpanCollection::updateRemovedColumns(int start, int end)
     qDeleteAll(toBeDeleted);
 }
 
-#ifdef QT_BUILD_INTERNAL
-/*!
-  \internal
-  Checks whether the span index structure is self-consistent, and consistent with the spans list.
-*/
-bool QSpanCollection::checkConsistency() const
-{
-    for (Index::const_iterator it_y = index.begin(); it_y != index.end(); ++it_y) {
-        int y = -it_y.key();
-        const SubIndex &subIndex = it_y.value();
-        for (SubIndex::const_iterator it = subIndex.begin(); it != subIndex.end(); ++it) {
-            int x = -it.key();
-            Span *span = it.value();
-            if (!spans.contains(span) || span->left() != x
-                || y < span->top() || y > span->bottom())
-                return false;
-        }
-    }
-
-    foreach (const Span *span, spans) {
-        if (span->width() < 1 || span->height() < 1
-            || (span->width() == 1 && span->height() == 1))
-            return false;
-        for (int y = span->top(); y <= span->bottom(); ++y) {
-            Index::const_iterator it_y = index.find(-y);
-            if (it_y == index.end()) {
-                if (y == span->top())
-                    return false;
-                else
-                    continue;
-            }
-            const SubIndex &subIndex = it_y.value();
-            SubIndex::const_iterator it = subIndex.find(-span->left());
-            if (it == subIndex.end() || it.value() != span)
-                return false;
-        }
-    }
-    return true;
-}
-#endif
-
 class QTableCornerButton : public QAbstractButton
 {
     Q_OBJECT
index 31ee5fe..1be5145 100644 (file)
@@ -104,10 +104,6 @@ public:
     void updateRemovedRows(int start, int end);
     void updateRemovedColumns(int start, int end);
 
-#ifdef QT_BUILD_INTERNAL
-    bool checkConsistency() const;
-#endif
-
     typedef QLinkedList<Span *> SpanList;
     SpanList spans; //lists of all spans
 private:
index 57d74fe..1076b7a 100644 (file)
@@ -1026,31 +1026,21 @@ QStyle *QApplication::style()
     }
 
     if (!QApplicationPrivate::app_style) {
-        // Compile-time search for default style
-        //
         QString style;
-#ifdef QT_BUILD_INTERNAL
-        static const QString envStyle = QString::fromLocal8Bit(qgetenv("QT_STYLE_OVERRIDE"));
-#endif
         if (!QApplicationPrivate::styleOverride.isEmpty()) {
             style = QApplicationPrivate::styleOverride;
-#ifdef QT_BUILD_INTERNAL
-        } else if (!envStyle.isEmpty()) {
-            style = envStyle;
-#endif
         } else {
             style = QApplicationPrivate::desktopStyleKey();
         }
 
-        QStyle *&app_style = QApplicationPrivate::app_style;
-        app_style = QStyleFactory::create(style);
-        if (!app_style) {
+        QApplicationPrivate::app_style = QStyleFactory::create(style);
+        if (!QApplicationPrivate::app_style) {
             foreach (const QString &style, QStyleFactory::keys()) {
-                if ((app_style = QStyleFactory::create(style)))
+                if ((QApplicationPrivate::app_style = QStyleFactory::create(style)))
                     break;
             }
         }
-        if (!app_style) {
+        if (!QApplicationPrivate::app_style) {
             Q_ASSERT(!"No styles available!");
             return 0;
         }