diff options
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qfusionstyle.cpp | 1 | ||||
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 22 | ||||
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 7 | ||||
-rw-r--r-- | src/widgets/styles/qwindowsstyle.cpp | 2 | ||||
-rw-r--r-- | src/widgets/styles/qwindowsstyle_p_p.h | 1 |
5 files changed, 13 insertions, 20 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 6d722c680b..f87542ffa8 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -40,7 +40,6 @@ #include <qpushbutton.h> #include <qpainter.h> #include <qdir.h> -#include <qhash.h> #include <qstyleoption.h> #include <qapplication.h> #include <qmainwindow.h> diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 67970ba33d..50c8fd7ed8 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -93,18 +93,6 @@ QT_USE_NAMESPACE -namespace { -class AutoReleasePool -{ -public: - AutoReleasePool(): pool([[NSAutoreleasePool alloc] init]) {} - ~AutoReleasePool() { [pool release]; } - -private: - NSAutoreleasePool *pool; -}; -} - @interface QT_MANGLE_NAMESPACE(NotificationReceiver) : NSObject { QMacStylePrivate *mPrivate; } @@ -1753,7 +1741,7 @@ QMacStylePrivate::QMacStylePrivate() QMacStylePrivate::~QMacStylePrivate() { - AutoReleasePool pool; + QMacAutoReleasePool pool; Q_FOREACH (NSView *b, cocoaControls) [b release]; } @@ -2135,7 +2123,7 @@ QMacStyle::QMacStyle() : QCommonStyle(*new QMacStylePrivate) { Q_D(QMacStyle); - AutoReleasePool pool; + QMacAutoReleasePool pool; d->receiver = [[NotificationReceiver alloc] initWithPrivate:d]; NotificationReceiver *receiver = static_cast<NotificationReceiver *>(d->receiver); @@ -2152,7 +2140,7 @@ QMacStyle::QMacStyle() QMacStyle::~QMacStyle() { Q_D(QMacStyle); - AutoReleasePool pool; + QMacAutoReleasePool pool; [reinterpret_cast<NSScroller*>(d->nsscroller) release]; @@ -2169,7 +2157,7 @@ QMacStyle::~QMacStyle() */ QPixmap QMacStylePrivate::generateBackgroundPattern() const { - AutoReleasePool pool; + QMacAutoReleasePool pool; QPixmap px(4, 4); QMacCGContext cg(&px); HIThemeSetFill(kThemeBrushDialogBackgroundActive, 0, cg, kHIThemeOrientationNormal); @@ -2767,7 +2755,7 @@ QPalette QMacStyle::standardPalette() const int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w, QStyleHintReturn *hret) const { - AutoReleasePool pool; + QMacAutoReleasePool pool; SInt32 ret = 0; switch (sh) { diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index ae7accf7d0..40b8aaae9a 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -2393,6 +2393,13 @@ static bool unstylable(const QWidget *w) return true; } #endif + +#ifndef QT_NO_TABBAR + if (w->metaObject() == &QWidget::staticMetaObject + && qobject_cast<const QTabBar*>(w->parentWidget())) + return true; // The moving tab of a QTabBar +#endif + return false; } diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index 14af5ede39..db8a649931 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -1796,7 +1796,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai QColor left, right; //Titlebar gradient - if (widget && widget->isWindow()) { + if (opt->state & QStyle::State_Window) { floating = true; if (active) { left = d->activeCaptionColor; diff --git a/src/widgets/styles/qwindowsstyle_p_p.h b/src/widgets/styles/qwindowsstyle_p_p.h index f1a4a390e1..3d1206b369 100644 --- a/src/widgets/styles/qwindowsstyle_p_p.h +++ b/src/widgets/styles/qwindowsstyle_p_p.h @@ -50,7 +50,6 @@ #ifndef QT_NO_STYLE_WINDOWS #include <qlist.h> -#include <qhash.h> QT_BEGIN_NAMESPACE |