Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2020-10-07 14:29:26 +0300
committerHannah von Reth <hannah.vonreth@owncloud.com>2020-10-07 14:29:26 +0300
commitbffd69a4def27587e82505215c2a92b99c6ba4d6 (patch)
treeb2cbac5f16fa119d98377c1b4bcf40cc8a7b590e /src/gui/owncloudgui.cpp
parent3ef9835f8bed0ca36e67dd79abed10acba63f77d (diff)
parent1d54b9e543ada1acc8e7705579fef352b40ecda5 (diff)
Merge branch '2.7' into master
Diffstat (limited to 'src/gui/owncloudgui.cpp')
-rw-r--r--src/gui/owncloudgui.cpp32
1 files changed, 8 insertions, 24 deletions
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp
index 76768ea97..1d8663abe 100644
--- a/src/gui/owncloudgui.cpp
+++ b/src/gui/owncloudgui.cpp
@@ -27,6 +27,7 @@
#include "accountstate.h"
#include "openfilemanager.h"
#include "accountmanager.h"
+#include "aboutdialog.h"
#include "common/syncjournalfilerecord.h"
#include "creds/abstractcredentials.h"
@@ -49,7 +50,6 @@ ownCloudGui::ownCloudGui(Application *parent)
: QObject(parent)
, _tray(new Systray(this))
, _settingsDialog(new SettingsDialog(this))
- , _logBrowser(nullptr)
, _recentActionsMenu(nullptr)
, _app(parent)
{
@@ -1018,18 +1018,14 @@ void ownCloudGui::slotShutdown()
// those do delete on close
_settingsDialog->close();
- if (!_logBrowser.isNull())
- _logBrowser->deleteLater();
}
void ownCloudGui::slotToggleLogBrowser()
{
- if (_logBrowser.isNull()) {
- // init the log browser.
- _logBrowser = new LogBrowser(settingsDialog());
- }
- _logBrowser->open();
- raiseDialog(_logBrowser);
+ auto logBrowser = new LogBrowser(settingsDialog());
+ logBrowser->setAttribute(Qt::WA_DeleteOnClose);
+ logBrowser->open();
+ raiseDialog(logBrowser);
}
void ownCloudGui::slotOpenOwnCloud()
@@ -1141,21 +1137,9 @@ void ownCloudGui::slotRemoveDestroyedShareDialogs()
void ownCloudGui::slotAbout()
{
- const QString title = tr("About %1").arg(Theme::instance()->appNameGUI());
- QMessageBox *msgBox = new QMessageBox(this->_settingsDialog);
-#ifdef Q_OS_MAC
- // From Qt doc: "On macOS, the window title is ignored (as required by the macOS Guidelines)."
- msgBox->setText(title);
-#else
- msgBox->setWindowTitle(title);
-#endif
- msgBox->setAttribute(Qt::WA_DeleteOnClose, true);
- msgBox->setTextFormat(Qt::RichText);
- msgBox->setTextInteractionFlags(Qt::TextBrowserInteraction);
- msgBox->setInformativeText(QStringLiteral("<qt>%1</qt>").arg(Theme::instance()->about()));
- msgBox->setStandardButtons(QMessageBox::Ok);
- msgBox->setIconPixmap(Theme::instance()->applicationIcon().pixmap(qApp->primaryScreen()->availableSize().width() / 4));
- msgBox->show();
+ auto about = new AboutDialog(_settingsDialog);
+ about->setAttribute(Qt::WA_DeleteOnClose);
+ about->open();
}