Commit 4e5c3eb7 authored by David Faure's avatar David Faure

ErrorOverlay: fix dialogs being disabled by the mainwindow

Testcase: open "jump to folder", cancel, restart akonadi,
reopen the dialog, it was disabled.

This happened because disabling the window actually disables
the child dialog too, so the saved state for the dialog was
"disabled". The fix is to save the "explicitly disabled" state
rather than isDisabled(). Thanks to Volker for helping me figure
this out.

Differential Revision:
parent cfe10794
......@@ -94,7 +94,7 @@ ErrorOverlay::ErrorOverlay(QWidget *baseWidget, QWidget *parent)
sInstanceOverlay->baseWidgets.append(qMakePair(mBaseWidget, QPointer<QWidget>(this)));
connect(baseWidget, &QObject::destroyed, this, &QObject::deleteLater);
mPreviousState = mBaseWidget->isEnabled();
mPreviousState = !mBaseWidget->testAttribute(Qt::WA_ForceDisabled);
......@@ -220,7 +220,7 @@ void ErrorOverlay::serverStateChanged(ServerManager::State state)
if (!mBaseWidgetIsParent) {
mPreviousState = mBaseWidget->isEnabled();
mPreviousState = !mBaseWidget->testAttribute(Qt::WA_ForceDisabled);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment