diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/MultiMC.cpp | 2 | ||||
-rw-r--r-- | application/UpdateController.cpp | 2 | ||||
-rw-r--r-- | application/dialogs/ExportInstanceDialog.cpp | 2 | ||||
-rw-r--r-- | application/dialogs/UpdateDialog.cpp | 2 | ||||
-rw-r--r-- | application/pages/instance/ServersPage.cpp | 4 | ||||
-rw-r--r-- | application/pages/instance/VersionPage.cpp | 6 | ||||
-rw-r--r-- | application/themes/CustomTheme.cpp | 8 |
7 files changed, 13 insertions, 13 deletions
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp index 4236fbcf..e7e6d337 100644 --- a/application/MultiMC.cpp +++ b/application/MultiMC.cpp @@ -174,7 +174,7 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv) { args = parser.parse(arguments()); } - catch (ParsingError e) + catch (const ParsingError &e) { std::cerr << "CommandLineError: " << e.what() << std::endl; std::cerr << "Try '%1 -h' to get help on MultiMC's command line parameters." diff --git a/application/UpdateController.cpp b/application/UpdateController.cpp index 8df5b3fc..733e365f 100644 --- a/application/UpdateController.cpp +++ b/application/UpdateController.cpp @@ -331,7 +331,7 @@ void UpdateController::installUpdates() break; } } - catch(Exception e) + catch (const Exception &e) { qWarning() << "Couldn't read the" << liveCheckFile << "file!"; startFailed = true; diff --git a/application/dialogs/ExportInstanceDialog.cpp b/application/dialogs/ExportInstanceDialog.cpp index 0e19b758..9029ca50 100644 --- a/application/dialogs/ExportInstanceDialog.cpp +++ b/application/dialogs/ExportInstanceDialog.cpp @@ -479,7 +479,7 @@ void ExportInstanceDialog::savePackIgnore() { FS::write(filename, data); } - catch (Exception & e) + catch (const Exception &e) { qWarning() << e.cause(); } diff --git a/application/dialogs/UpdateDialog.cpp b/application/dialogs/UpdateDialog.cpp index 30c7173d..754338c6 100644 --- a/application/dialogs/UpdateDialog.cpp +++ b/application/dialogs/UpdateDialog.cpp @@ -135,7 +135,7 @@ QString reprocessCommits(QByteArray json) result += QObject::tr("<p>You can <a href=\"%1\">look at the changes on github</a>.</p>").arg(diff_url); return result; } - catch (JSONValidationError & e) + catch (const JSONValidationError &e) { qWarning() << "Got an unparseable commit log from github:" << e.what(); qDebug() << json; diff --git a/application/pages/instance/ServersPage.cpp b/application/pages/instance/ServersPage.cpp index f7ddc7da..1612ce09 100644 --- a/application/pages/instance/ServersPage.cpp +++ b/application/pages/instance/ServersPage.cpp @@ -109,7 +109,7 @@ static std::unique_ptr <nbt::tag_compound> parseServersDat(const QString& filena return std::move(pair.second); } - catch(...) + catch (...) { return nullptr; } @@ -125,7 +125,7 @@ static bool serializeServerDat(const QString& filename, nbt::tag_compound * leve FS::write(filename, val); return true; } - catch(...) + catch (...) { return false; } diff --git a/application/pages/instance/VersionPage.cpp b/application/pages/instance/VersionPage.cpp index 00ae0a7e..981cbd8c 100644 --- a/application/pages/instance/VersionPage.cpp +++ b/application/pages/instance/VersionPage.cpp @@ -200,7 +200,7 @@ bool VersionPage::reloadComponentList() m_profile->reload(Net::Mode::Online); return true; } - catch (Exception &e) + catch (const Exception &e) { QMessageBox::critical(this, tr("Error"), e.cause()); return false; @@ -269,7 +269,7 @@ void VersionPage::on_moveUpBtn_clicked() { m_profile->move(currentRow(), ComponentList::MoveUp); } - catch (Exception &e) + catch (const Exception &e) { QMessageBox::critical(this, tr("Error"), e.cause()); } @@ -282,7 +282,7 @@ void VersionPage::on_moveDownBtn_clicked() { m_profile->move(currentRow(), ComponentList::MoveDown); } - catch (Exception &e) + catch (const Exception &e) { QMessageBox::critical(this, tr("Error"), e.cause()); } diff --git a/application/themes/CustomTheme.cpp b/application/themes/CustomTheme.cpp index a6c7bf8c..28e8c5c0 100644 --- a/application/themes/CustomTheme.cpp +++ b/application/themes/CustomTheme.cpp @@ -66,7 +66,7 @@ static bool readThemeJson(const QString &path, QPalette &palette, double &fadeAm fadeAmount = Json::ensureDouble(colorsRoot, "fadeAmount", 0.5, "fade amount"); } - catch(Exception e) + catch (const Exception &e) { qWarning() << "Couldn't load theme json: " << e.cause(); return false; @@ -117,7 +117,7 @@ static bool writeThemeJson(const QString &path, const QPalette &palette, double Json::write(rootObj, path); return true; } - catch (Exception e) + catch (const Exception &e) { qWarning() << "Failed to write theme json to" << path; return false; @@ -171,7 +171,7 @@ CustomTheme::CustomTheme(ITheme* baseTheme, QString folder) // TODO: validate css? m_styleSheet = QString::fromUtf8(FS::read(cssFilePath)); } - catch(Exception e) + catch (const Exception &e) { qWarning() << "Couldn't load css:" << e.cause() << "from" << cssFilePath; m_styleSheet = baseTheme->appStyleSheet(); @@ -185,7 +185,7 @@ CustomTheme::CustomTheme(ITheme* baseTheme, QString folder) { FS::write(cssFilePath, m_styleSheet.toUtf8()); } - catch(Exception e) + catch (const Exception &e) { qWarning() << "Couldn't write css:" << e.cause() << "to" << cssFilePath; } |