Skip to content

Commit 9bb0cff

Browse files
committed
Astyle formatting.
1 parent de0dd0a commit 9bb0cff

4 files changed

Lines changed: 25 additions & 19 deletions

File tree

‎gui/applicationdialog.cpp‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,15 @@ QString ApplicationDialog::GetPath()
109109

110110
void ApplicationDialog::Ok()
111111
{
112-
if (mName->text().isEmpty() || mPath->text().isEmpty()) {
112+
if (mName->text().isEmpty() || mPath->text().isEmpty())
113+
{
113114
QMessageBox msgBox;
114115
msgBox.setText("You must specify a name and a path for the application!");
115116
msgBox.exec();
116-
} else {
117-
accept();
117+
}
118+
else
119+
{
120+
accept();
118121
}
119122
}
120123

‎gui/applicationlist.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ void ApplicationList::SetApplicationType(const int index,
100100

101101
void ApplicationList::AddApplicationType(const QString &name, const QString &path)
102102
{
103-
if (name.isEmpty() || path.isEmpty()) {
103+
if (name.isEmpty() || path.isEmpty())
104+
{
104105
return;
105106
}
106107

‎gui/mainwindow.cpp‎

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ Settings MainWindow::GetCppcheckSettings()
197197
result._security = true;
198198
result._jobs = mSettings.value(tr("Check threads"), 1).toInt();
199199

200-
if (result._jobs <= 0) {
200+
if (result._jobs <= 0)
201+
{
201202
result._jobs = 1;
202203
}
203204

@@ -335,17 +336,17 @@ void MainWindow::About()
335336
//TODO make a "GetVersionNumber" function to core cppcheck
336337
CppCheckExecutor exec;
337338
CppCheck check(exec);
338-
const char *argv[] = {"","--version"};
339+
const char *argv[] = {"", "--version"};
339340
QString version = check.parseFromArgs(2, argv).c_str();
340-
version.replace("Cppcheck ","");
341-
342-
QMessageBox msgBox;
343-
msgBox.setWindowTitle(tr("About..."));
344-
msgBox.setText(QString("Cppcheck - A tool for static C/C++ code analysis.\nVersion %1\n\n" \
345-
"This program is licensed under the terms\n" \
346-
"of the GNU General Public License version 3\n" \
347-
"Available online under:\n" \
348-
"http://www.gnu.org/licenses/gpl-3.0.html\n\nSee AUTHORS file for the list of developers." \
349-
).arg(version));
350-
msgBox.exec();
341+
version.replace("Cppcheck ", "");
342+
343+
QMessageBox msgBox;
344+
msgBox.setWindowTitle(tr("About..."));
345+
msgBox.setText(QString("Cppcheck - A tool for static C/C++ code analysis.\nVersion %1\n\n" \
346+
"This program is licensed under the terms\n" \
347+
"of the GNU General Public License version 3\n" \
348+
"Available online under:\n" \
349+
"http://www.gnu.org/licenses/gpl-3.0.html\n\nSee AUTHORS file for the list of developers." \
350+
).arg(version));
351+
msgBox.exec();
351352
}

‎gui/settingsdialog.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ SettingsDialog::SettingsDialog(QSettings &programSettings, ApplicationList &list
6868
//Number of jobs
6969
QHBoxLayout *jobsLayout = new QHBoxLayout();
7070
mJobs = new QLineEdit(programSettings.value(tr("Check threads"), 1).toString());
71-
mJobs->setValidator(new QIntValidator(1,9999,this));
71+
mJobs->setValidator(new QIntValidator(1, 9999, this));
7272

7373
jobsLayout->addWidget(new QLabel(tr("Number of threads: ")));
7474
jobsLayout->addWidget(mJobs);
@@ -174,7 +174,8 @@ void SettingsDialog::SaveSettings()
174174
void SettingsDialog::SaveCheckboxValues()
175175
{
176176
int jobs = mJobs->text().toInt();
177-
if (jobs <= 0) {
177+
if (jobs <= 0)
178+
{
178179
jobs = 1;
179180
}
180181

0 commit comments

Comments
 (0)