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 <joerg.bornemann@digia.com>
This commit is contained in:
Friedemann Kleint 2013-01-14 11:22:54 +01:00 committed by The Qt Project
parent dc131e3a53
commit 273713b81f
2 changed files with 7 additions and 1 deletions

View File

@ -315,6 +315,12 @@ QVistaHelper::VistaState QVistaHelper::vistaState()
return cachedVistaState; return cachedVistaState;
} }
void QVistaHelper::disconnectBackButton()
{
if (backButton_) // Leave QStyleSheetStyle's connections on destroyed() intact.
backButton_->disconnect(SIGNAL(clicked()));
}
QColor QVistaHelper::basicWindowFrameColor() QColor QVistaHelper::basicWindowFrameColor()
{ {
DWORD rgb; DWORD rgb;

View File

@ -95,7 +95,7 @@ public:
void resizeEvent(QResizeEvent *event); void resizeEvent(QResizeEvent *event);
void paintEvent(QPaintEvent *event); void paintEvent(QPaintEvent *event);
QVistaBackButton *backButton() const { return backButton_; } QVistaBackButton *backButton() const { return backButton_; }
void disconnectBackButton() { if (backButton_) backButton_->disconnect(); } void disconnectBackButton();
void hideBackButton() { if (backButton_) backButton_->hide(); } void hideBackButton() { if (backButton_) backButton_->hide(); }
QColor basicWindowFrameColor(); QColor basicWindowFrameColor();
enum VistaState { VistaAero, VistaBasic, Classic, Dirty }; enum VistaState { VistaAero, VistaBasic, Classic, Dirty };