mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
SyncLogDialog: Do not delete SyncLogDialog after close.
Keep one instance for the lifetime of the generalsettings widget.
This commit is contained in:
parent
afd081f40b
commit
a8eb913535
2 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue