From 8684b0ee193936903573861311364d42a07369b1 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Fri, 21 Jun 2024 20:29:00 +0100 Subject: [PATCH] Apply clang-format --- src/main.cpp | 13 +++++++------ src/maindialog.cpp | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index a59c436..250f591 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4,9 +4,9 @@ #include #include -static void initLocale(QTranslator* qtTranslator, QTranslator* translator) +static void initLocale(QTranslator *qtTranslator, QTranslator *translator) { - QApplication* app = qApp; + QApplication *app = qApp; #if PROJECT_TRANSLATION_TEST_ENABLED QLocale locale(QLocale(PROJECT_TRANSLATION_TEST_LANGUAGE)); QLocale::setDefault(locale); @@ -14,7 +14,7 @@ static void initLocale(QTranslator* qtTranslator, QTranslator* translator) QLocale locale = QLocale::system(); #endif // Qt translations (buttons text and the like) - QString translationsPath = QLibraryInfo::path(QLibraryInfo::TranslationsPath); + QString translationsPath = QLibraryInfo::path(QLibraryInfo::TranslationsPath); QString translationsFileName = QStringLiteral("qt_") + locale.name(); if (qtTranslator->load(translationsFileName, translationsPath)) @@ -30,7 +30,8 @@ static void initLocale(QTranslator* qtTranslator, QTranslator* translator) if (!isLoaded) { // "/usr/share//translations isLoaded = translator->load(translationsFileName, - QStringLiteral(PROJECT_DATA_DIR) + QStringLiteral("/translations")); + QStringLiteral(PROJECT_DATA_DIR) + + QStringLiteral("/translations")); } app->installTranslator(translator); } @@ -47,9 +48,9 @@ int main(int argc, char *argv[]) w.show(); // Make work the window icon also when the application is not (yet) installed - QString iconSuffix = QString("%1%2%3").arg("/", PROJECT_APPSTREAM_ID, QStringLiteral(".svg")); + QString iconSuffix = QString("%1%2%3").arg("/", PROJECT_APPSTREAM_ID, QStringLiteral(".svg")); QString icoLocalPath = QCoreApplication::applicationDirPath() + iconSuffix; - QString icoSysPath = QStringLiteral(PROJECT_ICON_SYSTEM_PATH) + iconSuffix; + QString icoSysPath = QStringLiteral(PROJECT_ICON_SYSTEM_PATH) + iconSuffix; QIcon appIcon = QIcon(icoLocalPath); if (appIcon.isNull()) diff --git a/src/maindialog.cpp b/src/maindialog.cpp index dec94dd..96f19ca 100644 --- a/src/maindialog.cpp +++ b/src/maindialog.cpp @@ -26,7 +26,7 @@ MainDialog::MainDialog(QWidget *parent) : QDialog(parent), ui(new Ui::MainDialog std::string config_file = config_dir + "/rc.xml"; initConfig(config_file); - QObject::connect(ui->buttonBox, &QDialogButtonBox::clicked, [&] (QAbstractButton *button) { + QObject::connect(ui->buttonBox, &QDialogButtonBox::clicked, [&](QAbstractButton *button) { if (ui->buttonBox->standardButton(button) == QDialogButtonBox::Apply) { onApply(); }