Astyle formatting.

This commit is contained in:
Vesa Pikki 2009-03-22 15:15:16 +02:00
parent adbdb4acc3
commit f04bdccee4
5 changed files with 23 additions and 22 deletions

View File

@ -84,7 +84,7 @@ void MainWindow::SaveSettings()
void MainWindow::DoCheckFiles(QFileDialog::FileMode mode) void MainWindow::DoCheckFiles(QFileDialog::FileMode mode)
{ {
QFileDialog dialog(this); QFileDialog dialog(this);
dialog.setDirectory(QDir(mSettings.value(tr("Check path"),"").toString())); dialog.setDirectory(QDir(mSettings.value(tr("Check path"), "").toString()));
dialog.setFileMode(mode); dialog.setFileMode(mode);
if (dialog.exec()) if (dialog.exec())
@ -93,7 +93,7 @@ void MainWindow::DoCheckFiles(QFileDialog::FileMode mode)
QStringList fileNames; QStringList fileNames;
QString selection; QString selection;
foreach(selection,selected) foreach(selection, selected)
{ {
fileNames << RemoveUnacceptedFiles(GetFilesRecursively(selection)); fileNames << RemoveUnacceptedFiles(GetFilesRecursively(selection));
} }

View File

@ -26,7 +26,7 @@ ResultsTree::ResultsTree(QSettings &settings) :
{ {
setModel(&mModel); setModel(&mModel);
QStringList labels; QStringList labels;
labels << tr("severity")<<tr("Line") << tr("Message"); labels << tr("severity") << tr("Line") << tr("Message");
mModel.setHorizontalHeaderLabels(labels); mModel.setHorizontalHeaderLabels(labels);
LoadSettings(); LoadSettings();

View File

@ -42,11 +42,11 @@ public:
virtual ~SettingsDialog(); virtual ~SettingsDialog();
void SaveCheckboxValues(); void SaveCheckboxValues();
protected: protected:
/** /**
* @brief Load saved values * @brief Load saved values
* Loads dialog size and column widths. * Loads dialog size and column widths.
* *
*/ */
void SaveSettings(); void SaveSettings();
/** /**
@ -64,14 +64,14 @@ protected:
*/ */
void SaveCheckboxValue(QCheckBox *box, const QString &name); void SaveCheckboxValue(QCheckBox *box, const QString &name);
/** /**
* @brief Add a new checkbox to layout * @brief Add a new checkbox to layout
* *
* @param layout layout to add to * @param layout layout to add to
* @param label label for the checkbox * @param label label for the checkbox
* @param settings QSettings name for default value * @param settings QSettings name for default value
* @return newly created QCheckBox * @return newly created QCheckBox
*/ */
QCheckBox* AddCheckbox(QVBoxLayout *layout, QCheckBox* AddCheckbox(QVBoxLayout *layout,
const QString &label, const QString &label,
const QString &settings, const QString &settings,
@ -143,7 +143,7 @@ protected:
/** /**
* @brief Settings * @brief Settings
* *
*/ */

View File

@ -40,9 +40,10 @@ void ThreadHandler::SetFiles(const QStringList &files)
{ {
mResults.SetFiles(files); mResults.SetFiles(files);
QString file; QString file;
qDebug()<<"Files to check:"; qDebug() << "Files to check:";
foreach(file,files) { foreach(file, files)
qDebug()<<file; {
qDebug() << file;
} }
} }

View File

@ -63,7 +63,7 @@ private:
void run() void run()
{ {
TEST_CASE(testautovar); TEST_CASE(testautovar);
TEST_CASE(testautovararray); TEST_CASE(testautovararray);
} }
@ -76,7 +76,7 @@ private:
"res=&num;"); "res=&num;");
ASSERT_EQUALS(std::string("[test.cpp:3]: (error) Wrong assignement of an auto-variable to an effective parameter of a function\n"), errout.str()); ASSERT_EQUALS(std::string("[test.cpp:3]: (error) Wrong assignement of an auto-variable to an effective parameter of a function\n"), errout.str());
} }
void testautovararray() void testautovararray()
{ {
check("void func1(int* arr[2])\n" check("void func1(int* arr[2])\n"
"{\n" "{\n"