diff --git a/gui/applicationdialog.cpp b/gui/applicationdialog.cpp index 97a73cd54..fab9dbdf7 100644 --- a/gui/applicationdialog.cpp +++ b/gui/applicationdialog.cpp @@ -109,12 +109,15 @@ QString ApplicationDialog::GetPath() void ApplicationDialog::Ok() { - if (mName->text().isEmpty() || mPath->text().isEmpty()) { + if (mName->text().isEmpty() || mPath->text().isEmpty()) + { QMessageBox msgBox; msgBox.setText("You must specify a name and a path for the application!"); msgBox.exec(); - } else { - accept(); + } + else + { + accept(); } } diff --git a/gui/applicationlist.cpp b/gui/applicationlist.cpp index 4accf7c47..3bc08f635 100644 --- a/gui/applicationlist.cpp +++ b/gui/applicationlist.cpp @@ -100,7 +100,8 @@ void ApplicationList::SetApplicationType(const int index, void ApplicationList::AddApplicationType(const QString &name, const QString &path) { - if (name.isEmpty() || path.isEmpty()) { + if (name.isEmpty() || path.isEmpty()) + { return; } diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 23f39600e..42b96dc61 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -197,7 +197,8 @@ Settings MainWindow::GetCppcheckSettings() result._security = true; result._jobs = mSettings.value(tr("Check threads"), 1).toInt(); - if (result._jobs <= 0) { + if (result._jobs <= 0) + { result._jobs = 1; } @@ -335,17 +336,17 @@ void MainWindow::About() //TODO make a "GetVersionNumber" function to core cppcheck CppCheckExecutor exec; CppCheck check(exec); - const char *argv[] = {"","--version"}; + const char *argv[] = {"", "--version"}; QString version = check.parseFromArgs(2, argv).c_str(); - version.replace("Cppcheck ",""); + version.replace("Cppcheck ", ""); - QMessageBox msgBox; - msgBox.setWindowTitle(tr("About...")); - msgBox.setText(QString("Cppcheck - A tool for static C/C++ code analysis.\nVersion %1\n\n" \ - "This program is licensed under the terms\n" \ - "of the GNU General Public License version 3\n" \ - "Available online under:\n" \ - "http://www.gnu.org/licenses/gpl-3.0.html\n\nSee AUTHORS file for the list of developers." \ - ).arg(version)); - msgBox.exec(); + QMessageBox msgBox; + msgBox.setWindowTitle(tr("About...")); + msgBox.setText(QString("Cppcheck - A tool for static C/C++ code analysis.\nVersion %1\n\n" \ + "This program is licensed under the terms\n" \ + "of the GNU General Public License version 3\n" \ + "Available online under:\n" \ + "http://www.gnu.org/licenses/gpl-3.0.html\n\nSee AUTHORS file for the list of developers." \ + ).arg(version)); + msgBox.exec(); } diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp index 6d6f8cfc6..f9d6a3af4 100644 --- a/gui/settingsdialog.cpp +++ b/gui/settingsdialog.cpp @@ -68,7 +68,7 @@ SettingsDialog::SettingsDialog(QSettings &programSettings, ApplicationList &list //Number of jobs QHBoxLayout *jobsLayout = new QHBoxLayout(); mJobs = new QLineEdit(programSettings.value(tr("Check threads"), 1).toString()); - mJobs->setValidator(new QIntValidator(1,9999,this)); + mJobs->setValidator(new QIntValidator(1, 9999, this)); jobsLayout->addWidget(new QLabel(tr("Number of threads: "))); jobsLayout->addWidget(mJobs); @@ -174,7 +174,8 @@ void SettingsDialog::SaveSettings() void SettingsDialog::SaveCheckboxValues() { int jobs = mJobs->text().toInt(); - if (jobs <= 0) { + if (jobs <= 0) + { jobs = 1; }