[Pkg-owncloud-commits] [owncloud-client] 54/484: SyncLogDialog: Do not delete SyncLogDialog after close.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:11 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit a8eb913535131e34282da0979bd25a0471db459b
Author: Klaas Freitag <freitag at owncloud.com>
Date: Wed Oct 7 18:59:48 2015 +0200
SyncLogDialog: Do not delete SyncLogDialog after close.
Keep one instance for the lifetime of the generalsettings widget.
---
src/gui/generalsettings.cpp | 8 ++++++--
src/gui/synclogdialog.cpp | 1 -
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp
index 515a7de..9a745e2 100644
--- a/src/gui/generalsettings.cpp
+++ b/src/gui/generalsettings.cpp
@@ -100,6 +100,7 @@ GeneralSettings::GeneralSettings(QWidget *parent) :
GeneralSettings::~GeneralSettings()
{
delete _ui;
+ delete _syncLogDialog;
}
QSize GeneralSettings::sizeHint() const {
@@ -157,9 +158,12 @@ void GeneralSettings::slotToggleOptionalDesktopNotifications(bool enable)
void GeneralSettings::slotOpenSyncLog()
{
+ // the protocolwidget is connected to the ProgressDispatcher ot collect
+ // notifications also in case the logwindow is not visible. It is passed
+ // here to the LogDialog constructor which is not destroyed once created
+ // except in the destructor here.
if (_syncLogDialog.isNull()) {
- _syncLogDialog = new SyncLogDialog(this, _protocolWidget);
- _syncLogDialog->setAttribute( Qt::WA_DeleteOnClose, true );
+ _syncLogDialog = new SyncLogDialog(0, _protocolWidget);
_syncLogDialog->open();
} else {
ownCloudGui::raiseDialog(_syncLogDialog);
diff --git a/src/gui/synclogdialog.cpp b/src/gui/synclogdialog.cpp
index d7b8720..d6e2c8b 100644
--- a/src/gui/synclogdialog.cpp
+++ b/src/gui/synclogdialog.cpp
@@ -30,7 +30,6 @@ SyncLogDialog::SyncLogDialog(QWidget *parent, ProtocolWidget *protoWidget) :
QDialog(parent),
_ui(new Ui::SyncLogDialog)
{
- setAttribute(Qt::WA_DeleteOnClose);
setObjectName("SyncLogDialog"); // required as group for saveGeometry call
_ui->setupUi(this);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list