Cleaned up messages, made some more descriptive, made some nicer.
This commit is contained in:
parent
9689e5cea7
commit
137fe7e3c0
@ -24,7 +24,7 @@ void LaunchController::executeTask()
|
|||||||
{
|
{
|
||||||
if (!m_instance)
|
if (!m_instance)
|
||||||
{
|
{
|
||||||
emitFailed(tr("No instance specified"));
|
emitFailed(tr("No instance specified!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ void LaunchController::login()
|
|||||||
// if no account is selected, we bail
|
// if no account is selected, we bail
|
||||||
if (!account.get())
|
if (!account.get())
|
||||||
{
|
{
|
||||||
emitFailed(tr("No account selected for launch"));
|
emitFailed(tr("No account selected for launch."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ void LaunchController::launchInstance()
|
|||||||
|
|
||||||
if(!m_instance->reloadSettings())
|
if(!m_instance->reloadSettings())
|
||||||
{
|
{
|
||||||
QMessageBox::critical(m_parentWidget, tr("Error"), tr("Couldn't load the instance profile."));
|
QMessageBox::critical(m_parentWidget, tr("Error!"), tr("Couldn't load the instance profile."));
|
||||||
emitFailed(tr("Couldn't load the instance profile."));
|
emitFailed(tr("Couldn't load the instance profile."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -232,8 +232,8 @@ void LaunchController::readyForLaunch()
|
|||||||
if (!m_profiler->check(&error))
|
if (!m_profiler->check(&error))
|
||||||
{
|
{
|
||||||
m_launcher->abort();
|
m_launcher->abort();
|
||||||
QMessageBox::critical(m_parentWidget, tr("Error"), tr("Couldn't start profiler: %1").arg(error));
|
QMessageBox::critical(m_parentWidget, tr("Error!"), tr("Couldn't start profiler: %1").arg(error));
|
||||||
emitFailed("Profiler startup failed");
|
emitFailed("Profiler startup failed!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BaseProfiler *profilerInstance = m_profiler->createProfiler(m_launcher->instance(), this);
|
BaseProfiler *profilerInstance = m_profiler->createProfiler(m_launcher->instance(), this);
|
||||||
@ -244,7 +244,7 @@ void LaunchController::readyForLaunch()
|
|||||||
msg.setText(tr("The game launch is delayed until you press the "
|
msg.setText(tr("The game launch is delayed until you press the "
|
||||||
"button. This is the right time to setup the profiler, as the "
|
"button. This is the right time to setup the profiler, as the "
|
||||||
"profiler server is running now.\n\n%1").arg(message));
|
"profiler server is running now.\n\n%1").arg(message));
|
||||||
msg.setWindowTitle(tr("Waiting"));
|
msg.setWindowTitle(tr("Waiting."));
|
||||||
msg.setIcon(QMessageBox::Information);
|
msg.setIcon(QMessageBox::Information);
|
||||||
msg.addButton(tr("Launch"), QMessageBox::AcceptRole);
|
msg.addButton(tr("Launch"), QMessageBox::AcceptRole);
|
||||||
msg.setModal(true);
|
msg.setModal(true);
|
||||||
@ -261,7 +261,7 @@ void LaunchController::readyForLaunch()
|
|||||||
msg.setModal(true);
|
msg.setModal(true);
|
||||||
msg.exec();
|
msg.exec();
|
||||||
m_launcher->abort();
|
m_launcher->abort();
|
||||||
emitFailed("Profiler startup failed");
|
emitFailed("Profiler startup failed!");
|
||||||
});
|
});
|
||||||
profilerInstance->beginProfiling(m_launcher);
|
profilerInstance->beginProfiling(m_launcher);
|
||||||
}
|
}
|
||||||
|
@ -157,23 +157,23 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
|
|||||||
// --help
|
// --help
|
||||||
parser.addSwitch("help");
|
parser.addSwitch("help");
|
||||||
parser.addShortOpt("help", 'h');
|
parser.addShortOpt("help", 'h');
|
||||||
parser.addDocumentation("help", "display this help and exit.");
|
parser.addDocumentation("help", "Display this help and exit.");
|
||||||
// --version
|
// --version
|
||||||
parser.addSwitch("version");
|
parser.addSwitch("version");
|
||||||
parser.addShortOpt("version", 'V');
|
parser.addShortOpt("version", 'V');
|
||||||
parser.addDocumentation("version", "display program version and exit.");
|
parser.addDocumentation("version", "Display program version and exit.");
|
||||||
// --dir
|
// --dir
|
||||||
parser.addOption("dir");
|
parser.addOption("dir");
|
||||||
parser.addShortOpt("dir", 'd');
|
parser.addShortOpt("dir", 'd');
|
||||||
parser.addDocumentation("dir", "use the supplied folder as MultiMC root instead of "
|
parser.addDocumentation("dir", "Use the supplied folder as MultiMC root instead of "
|
||||||
"the binary location (use '.' for current)");
|
"the binary location (use '.' for current)");
|
||||||
// --launch
|
// --launch
|
||||||
parser.addOption("launch");
|
parser.addOption("launch");
|
||||||
parser.addShortOpt("launch", 'l');
|
parser.addShortOpt("launch", 'l');
|
||||||
parser.addDocumentation("launch", "launch the specified instance (by instance ID)");
|
parser.addDocumentation("launch", "Launch the specified instance (by instance ID)");
|
||||||
// --alive
|
// --alive
|
||||||
parser.addSwitch("alive");
|
parser.addSwitch("alive");
|
||||||
parser.addDocumentation("alive", "write a small '" + liveCheckFile + "' file after MultiMC starts");
|
parser.addDocumentation("alive", "Write a small '" + liveCheckFile + "' file after MultiMC starts");
|
||||||
|
|
||||||
// parse the arguments
|
// parse the arguments
|
||||||
try
|
try
|
||||||
@ -382,7 +382,7 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
|
|||||||
auto payload = appID.toString().toUtf8();
|
auto payload = appID.toString().toUtf8();
|
||||||
if(check.write(payload) != payload.size())
|
if(check.write(payload) != payload.size())
|
||||||
{
|
{
|
||||||
qWarning() << "Could not write into" << liveCheckFile;
|
qWarning() << "Could not write into" << liveCheckFile << "!";
|
||||||
check.remove();
|
check.remove();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -600,12 +600,12 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
|
|||||||
{
|
{
|
||||||
auto InstDirSetting = m_settings->getSetting("InstanceDir");
|
auto InstDirSetting = m_settings->getSetting("InstanceDir");
|
||||||
// instance path: check for problems with '!' in instance path and warn the user in the log
|
// instance path: check for problems with '!' in instance path and warn the user in the log
|
||||||
// and rememer that we have to show him a dialog when the gui starts (if it does so)
|
// and remember that we have to show him a dialog when the gui starts (if it does so)
|
||||||
QString instDir = InstDirSetting->get().toString();
|
QString instDir = InstDirSetting->get().toString();
|
||||||
qDebug() << "Instance path : " << instDir;
|
qDebug() << "Instance path : " << instDir;
|
||||||
if (FS::checkProblemticPathJava(QDir(instDir)))
|
if (FS::checkProblemticPathJava(QDir(instDir)))
|
||||||
{
|
{
|
||||||
qWarning() << "Your instance path contains \'!\' and this is known to cause java problems";
|
qWarning() << "Your instance path contains \'!\' and this is known to cause java problems!";
|
||||||
}
|
}
|
||||||
m_instances.reset(new InstanceList(m_settings, instDir, this));
|
m_instances.reset(new InstanceList(m_settings, instDir, this));
|
||||||
connect(InstDirSetting.get(), &Setting::SettingChanged, m_instances.get(), &InstanceList::on_InstFolderChanged);
|
connect(InstDirSetting.get(), &Setting::SettingChanged, m_instances.get(), &InstanceList::on_InstFolderChanged);
|
||||||
@ -947,7 +947,7 @@ bool MultiMC::launch(InstancePtr instance, bool online, BaseProfilerFactory *pro
|
|||||||
{
|
{
|
||||||
if(m_updateRunning)
|
if(m_updateRunning)
|
||||||
{
|
{
|
||||||
qDebug() << "Cannot launch instances while an update is running.";
|
qDebug() << "Cannot launch instances while an update is running. Please try again when updates are completed.";
|
||||||
}
|
}
|
||||||
else if(instance->canLaunch())
|
else if(instance->canLaunch())
|
||||||
{
|
{
|
||||||
@ -996,7 +996,7 @@ bool MultiMC::kill(InstancePtr instance)
|
|||||||
{
|
{
|
||||||
if (!instance->isRunning())
|
if (!instance->isRunning())
|
||||||
{
|
{
|
||||||
qWarning() << "Attempted to kill instance" << instance->id() << "which isn't running.";
|
qWarning() << "Attempted to kill instance" << instance->id() << ", which isn't running.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
auto & extras = m_instanceExtras[instance->id()];
|
auto & extras = m_instanceExtras[instance->id()];
|
||||||
|
Loading…
Reference in New Issue
Block a user