summaryrefslogtreecommitdiffstats
path: root/application/themes
diff options
context:
space:
mode:
authorCharles Milette <me@charlesmilette.net>2018-05-19 19:18:26 -0400
committerCharles Milette <me@charlesmilette.net>2018-05-19 19:18:26 -0400
commit72c0002b45215466e06cd901fe95d9493d659ab2 (patch)
tree03a56f2da0f1ed34a219941060ec2100aedf1ac6 /application/themes
parentb9fd381eee2f7c87e7645046b26dd552dc3cae5c (diff)
downloadMultiMC-72c0002b45215466e06cd901fe95d9493d659ab2.tar
MultiMC-72c0002b45215466e06cd901fe95d9493d659ab2.tar.gz
MultiMC-72c0002b45215466e06cd901fe95d9493d659ab2.tar.lz
MultiMC-72c0002b45215466e06cd901fe95d9493d659ab2.tar.xz
MultiMC-72c0002b45215466e06cd901fe95d9493d659ab2.zip
Catch C++ exceptions by const reference
Fixes #2277
Diffstat (limited to 'application/themes')
-rw-r--r--application/themes/CustomTheme.cpp8
1 files changed, 4 insertions, 4 deletions
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;
}