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
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:
}
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;
}