MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / askForChangingInstanceName

Function askForChangingInstanceName

launcher/InstanceTask.cpp:9–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <QPushButton>
8
9InstanceNameChange askForChangingInstanceName(QWidget* parent, const QString& old_name, const QString& new_name)
10{
11 auto dialog =
12 CustomMessageBox::selectable(parent, QObject::tr("Change instance name"),
13 QObject::tr("The instance's name seems to include the old version. Would you like to update it?\n\n"
14 "Old name: %1\n"
15 "New name: %2")
16 .arg(old_name, new_name),
17 QMessageBox::Question, QMessageBox::No | QMessageBox::Yes);
18 auto result = dialog->exec();
19
20 if (result == QMessageBox::Yes)
21 return InstanceNameChange::ShouldChange;
22 return InstanceNameChange::ShouldKeep;
23}
24
25ShouldUpdate askIfShouldUpdate(QWidget* parent, QString original_version_name)
26{

Callers 1

createInstanceMethod · 0.85

Calls 2

selectableFunction · 0.85
execMethod · 0.45

Tested by

no test coverage detected