refactor: abstract away update confirmation dialog

... so that we can avoid code duplication.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-10-14 14:22:13 -03:00
parent 9e17ff884f
commit 08d008a5aa
4 changed files with 31 additions and 32 deletions

View File

@ -6,6 +6,8 @@
/* Helpers */
enum class InstanceNameChange { ShouldChange, ShouldKeep };
[[nodiscard]] InstanceNameChange askForChangingInstanceName(QWidget* parent, const QString& old_name, const QString& new_name);
enum class ShouldUpdate { Update, SkipUpdating, Cancel };
[[nodiscard]] ShouldUpdate askIfShouldUpdate(QWidget* parent, QString original_version_name);
struct InstanceName {
public: