diff options
Diffstat (limited to 'src/widgets/widgets/qstatusbar.cpp')
-rw-r--r-- | src/widgets/widgets/qstatusbar.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/widgets/widgets/qstatusbar.cpp b/src/widgets/widgets/qstatusbar.cpp index c3b66cb64b..4635b73a81 100644 --- a/src/widgets/widgets/qstatusbar.cpp +++ b/src/widgets/widgets/qstatusbar.cpp @@ -47,7 +47,9 @@ #include "qtimer.h" #include "qstyle.h" #include "qstyleoption.h" +#if QT_CONFIG(sizegrip) #include "qsizegrip.h" +#endif #if QT_CONFIG(mainwindow) #include "qmainwindow.h" #endif @@ -81,7 +83,7 @@ public: QBoxLayout * box; QTimer * timer; -#ifndef QT_NO_SIZEGRIP +#if QT_CONFIG(sizegrip) QSizeGrip * resizer; bool showSizeGrip; #endif @@ -103,7 +105,7 @@ public: return i; } -#ifndef QT_NO_SIZEGRIP +#if QT_CONFIG(sizegrip) void tryToShowSizeGrip() { if (!showSizeGrip) @@ -129,7 +131,7 @@ QRect QStatusBarPrivate::messageRect() const int left = 6; int right = q->width() - 12; -#ifndef QT_NO_SIZEGRIP +#if QT_CONFIG(sizegrip) if (resizer && resizer->isVisible()) { if (rtl) left = resizer->x() + resizer->width(); @@ -234,7 +236,7 @@ QStatusBar::QStatusBar(QWidget * parent) d->box = 0; d->timer = 0; -#ifndef QT_NO_SIZEGRIP +#if QT_CONFIG(sizegrip) d->resizer = 0; setSizeGripEnabled(true); // causes reformat() #else @@ -431,7 +433,7 @@ void QStatusBar::removeWidget(QWidget *widget) bool QStatusBar::isSizeGripEnabled() const { -#ifdef QT_NO_SIZEGRIP +#if !QT_CONFIG(sizegrip) return false; #else Q_D(const QStatusBar); @@ -441,7 +443,7 @@ bool QStatusBar::isSizeGripEnabled() const void QStatusBar::setSizeGripEnabled(bool enabled) { -#ifdef QT_NO_SIZEGRIP +#if !QT_CONFIG(sizegrip) Q_UNUSED(enabled); #else Q_D(QStatusBar); @@ -477,7 +479,7 @@ void QStatusBar::reformat() delete d->box; QBoxLayout *vbox; -#ifndef QT_NO_SIZEGRIP +#if QT_CONFIG(sizegrip) if (d->resizer) { d->box = new QHBoxLayout(this); d->box->setMargin(0); @@ -518,7 +520,7 @@ void QStatusBar::reformat() int itemH = qMin(qSmartMinSize(item->w).height(), item->w->maximumHeight()); maxH = qMax(maxH, itemH); } -#ifndef QT_NO_SIZEGRIP +#if QT_CONFIG(sizegrip) if (d->resizer) { maxH = qMax(maxH, d->resizer->sizeHint().height()); d->box->addSpacing(1); @@ -649,7 +651,7 @@ void QStatusBar::hideOrShow() */ void QStatusBar::showEvent(QShowEvent *) { -#ifndef QT_NO_SIZEGRIP +#if QT_CONFIG(sizegrip) Q_D(QStatusBar); if (d->resizer && d->showSizeGrip) d->tryToShowSizeGrip(); @@ -722,7 +724,7 @@ bool QStatusBar::event(QEvent *e) maxH = qMax(maxH, itemH); } -#ifndef QT_NO_SIZEGRIP +#if QT_CONFIG(sizegrip) if (d->resizer) maxH = qMax(maxH, d->resizer->sizeHint().height()); #endif |