mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
parent
cab5edb721
commit
a0e41a11de
4 changed files with 47 additions and 21 deletions
|
@ -759,7 +759,6 @@ void Application::processParams(const QBtCommandLineParameters ¶ms)
|
|||
}
|
||||
|
||||
int Application::exec()
|
||||
try
|
||||
{
|
||||
#if !defined(DISABLE_WEBUI) && defined(DISABLE_GUI)
|
||||
const QString loadingStr = tr("WebUI will be started shortly after internal preparations. Please wait...");
|
||||
|
@ -928,21 +927,6 @@ try
|
|||
|
||||
return BaseApplication::exec();
|
||||
}
|
||||
catch (const RuntimeError &err)
|
||||
{
|
||||
#ifdef DISABLE_GUI
|
||||
fprintf(stderr, "%s", qPrintable(err.message()));
|
||||
#else
|
||||
QMessageBox msgBox;
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setText(QCoreApplication::translate("Application", "Application failed to start."));
|
||||
msgBox.setInformativeText(err.message());
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(Utils::Gui::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
#endif
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
bool Application::isRunning()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue