diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-08-07 00:14:45 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-10 22:00:43 +0200 |
commit | 4fa544c8cd28907958e2f18e960d54ce0e0770d9 (patch) | |
tree | 2f1bf50853ba49f776b5bc7027ef03257b27e625 | |
parent | 146b7a9c8bf4ca93488099a19853ca3a47df08cd (diff) |
QtWidgets: use new qEnvironmentVariableIs{Empty,Set}()
Incidentally, this patch shows that Qt isn't consistent in how it
treats empty environment variables used as flags, but that is something
for a separate commit. This patch aims to be behaviour-preserving.
Change-Id: I5390cda314858762b76384291373a6f0167d323a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp | 2 | ||||
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp index 3b61f5f49f..e88ef92b82 100644 --- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp @@ -2113,7 +2113,7 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs( lastCalculationUsedSimplex[orientation] = false; #endif - static bool simplificationEnabled = qgetenv("QT_ANCHORLAYOUT_NO_SIMPLIFICATION").isEmpty(); + static bool simplificationEnabled = qEnvironmentVariableIsEmpty("QT_ANCHORLAYOUT_NO_SIMPLIFICATION"); // Reset the nominal sizes of each anchor based on the current item sizes refreshAllSizeHints(orientation); diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index ced29c8465..ef4a743324 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -1064,10 +1064,10 @@ static QAquaWidgetSize qt_aqua_guess_size(const QWidget *widg, QSize large, QSiz } #ifndef QT_NO_MAINWINDOW - if (qobject_cast<QDockWidget *>(widg->window()) || !qgetenv("QWIDGET_ALL_SMALL").isNull()) { + if (qobject_cast<QDockWidget *>(widg->window()) || qEnvironmentVariableIsSet("QWIDGET_ALL_SMALL")) { //if (small.width() != -1 || small.height() != -1) return QAquaSizeSmall; - } else if (!qgetenv("QWIDGET_ALL_MINI").isNull()) { + } else if (qEnvironmentVariableIsSet("QWIDGET_ALL_MINI")) { return QAquaSizeMini; } #endif @@ -1126,9 +1126,9 @@ QAquaWidgetSize QMacStylePrivate::aquaSizeConstrain(const QStyleOption *option, if (!widg) { if (insz) *insz = QSize(); - if (!qgetenv("QWIDGET_ALL_SMALL").isNull()) + if (qEnvironmentVariableIsSet("QWIDGET_ALL_SMALL")) return QAquaSizeSmall; - if (!qgetenv("QWIDGET_ALL_MINI").isNull()) + if (qEnvironmentVariableIsSet("QWIDGET_ALL_MINI")) return QAquaSizeMini; return QAquaSizeUnknown; } |