From 273713b81f5e580748c281c17e08e8b3e2e8ee70 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 14 Jan 2013 11:22:54 +0100 Subject: [PATCH] Fix QVistaHelper::disconnectBackButton(). Restrict disconnect() to the clicked() signal, leaving connections to destroyed() (as used by QStyleSheetStyle) intact. Task-number: QTBUG-20292 Change-Id: I7471b4d1262ec0684e4446b5c17513717c502749 Reviewed-by: Joerg Bornemann --- src/widgets/dialogs/qwizard_win.cpp | 6 ++++++ src/widgets/dialogs/qwizard_win_p.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp index 45484b906b..ef41ca32e8 100644 --- a/src/widgets/dialogs/qwizard_win.cpp +++ b/src/widgets/dialogs/qwizard_win.cpp @@ -315,6 +315,12 @@ QVistaHelper::VistaState QVistaHelper::vistaState() return cachedVistaState; } +void QVistaHelper::disconnectBackButton() +{ + if (backButton_) // Leave QStyleSheetStyle's connections on destroyed() intact. + backButton_->disconnect(SIGNAL(clicked())); +} + QColor QVistaHelper::basicWindowFrameColor() { DWORD rgb; diff --git a/src/widgets/dialogs/qwizard_win_p.h b/src/widgets/dialogs/qwizard_win_p.h index 4dbb71f94b..11dd1f2824 100644 --- a/src/widgets/dialogs/qwizard_win_p.h +++ b/src/widgets/dialogs/qwizard_win_p.h @@ -95,7 +95,7 @@ public: void resizeEvent(QResizeEvent *event); void paintEvent(QPaintEvent *event); QVistaBackButton *backButton() const { return backButton_; } - void disconnectBackButton() { if (backButton_) backButton_->disconnect(); } + void disconnectBackButton(); void hideBackButton() { if (backButton_) backButton_->hide(); } QColor basicWindowFrameColor(); enum VistaState { VistaAero, VistaBasic, Classic, Dirty };