diff options
author | Fabian Müller <fmueller@owncloud.com> | 2022-02-15 15:03:42 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-02-16 15:25:15 +0300 |
commit | 6de55a580753b589c8d8fb19621bf65098549ce2 (patch) | |
tree | 0258093de038c9b9ffb00a0d5ee887b5b640518a /src/gui/updateurldialog.h | |
parent | d2374e510250ef2bfcd03e4ccdc51eec278f29f6 (diff) |
Move initialization into named constructor
Not only does that make using the class easier by fixing the DRY problem, but it also makes sure the dialogs look the same no matter how they are initialized.
Another such named constructor will be added later for the new wizard.
Diffstat (limited to 'src/gui/updateurldialog.h')
-rw-r--r-- | src/gui/updateurldialog.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/updateurldialog.h b/src/gui/updateurldialog.h index c8204b6c7..c8a0d6f96 100644 --- a/src/gui/updateurldialog.h +++ b/src/gui/updateurldialog.h @@ -14,6 +14,8 @@ #pragma once +#include "account.h" + #include <QMessageBox> #include <QUrl> #include <QWidget> @@ -30,6 +32,9 @@ class UpdateUrlDialog : public QMessageBox { Q_OBJECT public: + static UpdateUrlDialog *fromAccount(AccountPtr account, const QUrl &newUrl, QWidget *parent = nullptr); + +private: explicit UpdateUrlDialog(const QString &title, const QString &content, const QUrl &oldUrl, const QUrl &newUrl, QWidget *parent = nullptr); private: |