diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-05-18 14:31:07 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-05-18 14:31:07 (GMT) |
commit | f3988241faa59596c1702b31e7bec9538f33ee79 (patch) | |
tree | 39cc06b8455545cd1fd754c44838afcc3a0bdaac /src/gui/dialogs | |
parent | 7e4d4474d10cb17047d95e3a4820388468c74507 (diff) | |
parent | 5c25207628fbcc94e92b129ac7660af14613ad85 (diff) | |
download | Qt-f3988241faa59596c1702b31e7bec9538f33ee79.zip Qt-f3988241faa59596c1702b31e7bec9538f33ee79.tar.gz Qt-f3988241faa59596c1702b31e7bec9538f33ee79.tar.bz2 |
Merge commit 'origin/4.5'
Conflicts:
src/corelib/kernel/qobject.cpp
src/corelib/kernel/qobject_p.h
src/network/access/qhttpnetworkconnection.cpp
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qwizard.cpp | 4 | ||||
-rw-r--r-- | src/gui/dialogs/qwizard_win.cpp | 5 | ||||
-rw-r--r-- | src/gui/dialogs/qwizard_win_p.h | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/dialogs/qwizard.cpp b/src/gui/dialogs/qwizard.cpp index 2c29ebf..b2ed983 100644 --- a/src/gui/dialogs/qwizard.cpp +++ b/src/gui/dialogs/qwizard.cpp @@ -1469,7 +1469,7 @@ void QWizardPrivate::handleAeroStyleChange() return; // prevent recursion inHandleAeroStyleChange = true; - vistaHelper->backButton()->disconnect(); + vistaHelper->disconnectBackButton(); q->removeEventFilter(vistaHelper); if (isVistaThemeEnabled()) { @@ -1495,7 +1495,7 @@ void QWizardPrivate::handleAeroStyleChange() q->setMouseTracking(true); // ### original value possibly different q->unsetCursor(); // ### ditto antiFlickerWidget->move(0, 0); - vistaHelper->backButton()->hide(); + vistaHelper->hideBackButton(); vistaHelper->setTitleBarIconAndCaptionVisible(true); } diff --git a/src/gui/dialogs/qwizard_win.cpp b/src/gui/dialogs/qwizard_win.cpp index 64696de..8aad4af 100644 --- a/src/gui/dialogs/qwizard_win.cpp +++ b/src/gui/dialogs/qwizard_win.cpp @@ -239,9 +239,11 @@ void QVistaBackButton::paintEvent(QPaintEvent *) QVistaHelper::QVistaHelper(QWizard *wizard) : pressed(false) , wizard(wizard) + , backButton_(0) { is_vista = resolveSymbols(); - backButton_ = new QVistaBackButton(wizard); + if (is_vista) + backButton_ = new QVistaBackButton(wizard); } QVistaHelper::~QVistaHelper() @@ -310,6 +312,7 @@ void QVistaHelper::drawTitleBar(QPainter *painter) QRect(0, 0, wizard->width(), titleBarSize() + topOffset()), painter->paintEngine()->getDC()); + Q_ASSERT(backButton_); const int btnTop = backButton_->mapToParent(QPoint()).y(); const int btnHeight = backButton_->size().height(); const int verticalCenter = (btnTop + btnHeight / 2); diff --git a/src/gui/dialogs/qwizard_win_p.h b/src/gui/dialogs/qwizard_win_p.h index cbb3b17..148be26 100644 --- a/src/gui/dialogs/qwizard_win_p.h +++ b/src/gui/dialogs/qwizard_win_p.h @@ -94,6 +94,8 @@ public: void resizeEvent(QResizeEvent *event); void paintEvent(QPaintEvent *event); QVistaBackButton *backButton() const { return backButton_; } + void disconnectBackButton() { if (backButton_) backButton_->disconnect(); } + void hideBackButton() { if (backButton_) backButton_->hide(); } void setWindowPosHack(); QColor basicWindowFrameColor(); enum VistaState { VistaAero, VistaBasic, Classic, Dirty }; |