Astyle fixes.
This commit is contained in:
parent
4644f8b841
commit
23b816f43b
|
@ -36,7 +36,7 @@ void ApplicationList::LoadSettings(QSettings &programSettings)
|
||||||
QStringList paths = programSettings.value(tr("Application paths"), QStringList()).toStringList();
|
QStringList paths = programSettings.value(tr("Application paths"), QStringList()).toStringList();
|
||||||
if (names.size() == paths.size())
|
if (names.size() == paths.size())
|
||||||
{
|
{
|
||||||
for (int i = 0;i < names.size();i++)
|
for (int i = 0; i < names.size(); i++)
|
||||||
{
|
{
|
||||||
AddApplicationType(names[i], paths[i]);
|
AddApplicationType(names[i], paths[i]);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ void ApplicationList::SaveSettings(QSettings &programSettings)
|
||||||
QStringList names;
|
QStringList names;
|
||||||
QStringList paths;
|
QStringList paths;
|
||||||
|
|
||||||
for (int i = 0;i < GetApplicationCount();i++)
|
for (int i = 0; i < GetApplicationCount(); i++)
|
||||||
{
|
{
|
||||||
names << GetApplicationName(i);
|
names << GetApplicationName(i);
|
||||||
paths << GetApplicationPath(i);
|
paths << GetApplicationPath(i);
|
||||||
|
@ -128,7 +128,7 @@ void ApplicationList::MoveFirst(const int index)
|
||||||
void ApplicationList::Copy(ApplicationList &list)
|
void ApplicationList::Copy(ApplicationList &list)
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
for (int i = 0;i < list.GetApplicationCount();i++)
|
for (int i = 0; i < list.GetApplicationCount(); i++)
|
||||||
{
|
{
|
||||||
AddApplicationType(list.GetApplicationName(i), list.GetApplicationPath(i));
|
AddApplicationType(list.GetApplicationName(i), list.GetApplicationPath(i));
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ public:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
QString Path;
|
QString Path;
|
||||||
}ApplicationType;
|
} ApplicationType;
|
||||||
|
|
||||||
ApplicationList();
|
ApplicationList();
|
||||||
virtual ~ApplicationList();
|
virtual ~ApplicationList();
|
||||||
|
|
|
@ -108,7 +108,7 @@ void ResultsTree::AddErrorItem(const QString &file,
|
||||||
item->setData(QVariant(data));
|
item->setData(QVariant(data));
|
||||||
|
|
||||||
//Add backtrace files as children
|
//Add backtrace files as children
|
||||||
for (int i = 1;i < files.size() && i < lines.size();i++)
|
for (int i = 1; i < files.size() && i < lines.size(); i++)
|
||||||
{
|
{
|
||||||
AddBacktraceFiles(item,
|
AddBacktraceFiles(item,
|
||||||
StripPath(files[i], false),
|
StripPath(files[i], false),
|
||||||
|
@ -204,7 +204,7 @@ void ResultsTree::Clear()
|
||||||
|
|
||||||
void ResultsTree::LoadSettings()
|
void ResultsTree::LoadSettings()
|
||||||
{
|
{
|
||||||
for (int i = 0;i < mModel.columnCount();i++)
|
for (int i = 0; i < mModel.columnCount(); i++)
|
||||||
{
|
{
|
||||||
//mFileTree.columnWidth(i);
|
//mFileTree.columnWidth(i);
|
||||||
QString temp = QString(tr("Result column %1 width")).arg(i);
|
QString temp = QString(tr("Result column %1 width")).arg(i);
|
||||||
|
@ -218,7 +218,7 @@ void ResultsTree::LoadSettings()
|
||||||
|
|
||||||
void ResultsTree::SaveSettings()
|
void ResultsTree::SaveSettings()
|
||||||
{
|
{
|
||||||
for (int i = 0;i < mModel.columnCount();i++)
|
for (int i = 0; i < mModel.columnCount(); i++)
|
||||||
{
|
{
|
||||||
QString temp = QString(tr("Result column %1 width")).arg(i);
|
QString temp = QString(tr("Result column %1 width")).arg(i);
|
||||||
mSettings.setValue(temp, columnWidth(i));
|
mSettings.setValue(temp, columnWidth(i));
|
||||||
|
@ -241,7 +241,7 @@ void ResultsTree::RefreshTree()
|
||||||
//Get the amount of files in the tree
|
//Get the amount of files in the tree
|
||||||
int filecount = mModel.rowCount();
|
int filecount = mModel.rowCount();
|
||||||
|
|
||||||
for (int i = 0;i < filecount;i++)
|
for (int i = 0; i < filecount; i++)
|
||||||
{
|
{
|
||||||
//Get file i
|
//Get file i
|
||||||
QStandardItem *file = mModel.item(i, 0);
|
QStandardItem *file = mModel.item(i, 0);
|
||||||
|
@ -256,7 +256,7 @@ void ResultsTree::RefreshTree()
|
||||||
//By default it shouldn't be visible
|
//By default it shouldn't be visible
|
||||||
bool show = false;
|
bool show = false;
|
||||||
|
|
||||||
for (int j = 0;j < errorcount;j++)
|
for (int j = 0; j < errorcount; j++)
|
||||||
{
|
{
|
||||||
//Get the error itself
|
//Get the error itself
|
||||||
QStandardItem *child = file->child(j, 0);
|
QStandardItem *child = file->child(j, 0);
|
||||||
|
@ -346,7 +346,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
|
||||||
if (mContextItem && mApplications.GetApplicationCount() > 0 && mContextItem->parent())
|
if (mContextItem && mApplications.GetApplicationCount() > 0 && mContextItem->parent())
|
||||||
{
|
{
|
||||||
//Go through all applications and add them to the context menu
|
//Go through all applications and add them to the context menu
|
||||||
for (int i = 0;i < mApplications.GetApplicationCount();i++)
|
for (int i = 0; i < mApplications.GetApplicationCount(); i++)
|
||||||
{
|
{
|
||||||
//Create an action for the application
|
//Create an action for the application
|
||||||
QAction *start = new QAction(mApplications.GetApplicationName(i), &menu);
|
QAction *start = new QAction(mApplications.GetApplicationName(i), &menu);
|
||||||
|
@ -393,7 +393,7 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
|
||||||
if (mContextItem && mApplications.GetApplicationCount() > 0 && mContextItem->parent())
|
if (mContextItem && mApplications.GetApplicationCount() > 0 && mContextItem->parent())
|
||||||
{
|
{
|
||||||
//Disconnect all signals
|
//Disconnect all signals
|
||||||
for (int i = 0;i < actions.size();i++)
|
for (int i = 0; i < actions.size(); i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
disconnect(actions[i], SIGNAL(triggered()), signalMapper, SLOT(map()));
|
disconnect(actions[i], SIGNAL(triggered()), signalMapper, SLOT(map()));
|
||||||
|
@ -537,7 +537,7 @@ void ResultsTree::SaveResults(Report *report)
|
||||||
{
|
{
|
||||||
report->WriteHeader();
|
report->WriteHeader();
|
||||||
|
|
||||||
for (int i = 0;i < mModel.rowCount();i++)
|
for (int i = 0; i < mModel.rowCount(); i++)
|
||||||
{
|
{
|
||||||
QStandardItem *item = mModel.item(i, 0);
|
QStandardItem *item = mModel.item(i, 0);
|
||||||
SaveErrors(report, item);
|
SaveErrors(report, item);
|
||||||
|
@ -555,7 +555,7 @@ void ResultsTree::SaveErrors(Report *report, QStandardItem *item)
|
||||||
|
|
||||||
//qDebug() << item->text() << "has" << item->rowCount() << "errors";
|
//qDebug() << item->text() << "has" << item->rowCount() << "errors";
|
||||||
|
|
||||||
for (int i = 0;i < item->rowCount();i++)
|
for (int i = 0; i < item->rowCount(); i++)
|
||||||
{
|
{
|
||||||
QStandardItem *error = item->child(i, 0);
|
QStandardItem *error = item->child(i, 0);
|
||||||
|
|
||||||
|
@ -666,7 +666,7 @@ void ResultsTree::RefreshFilePaths(QStandardItem *item)
|
||||||
bool updated = false;
|
bool updated = false;
|
||||||
|
|
||||||
//Loop through all errors within this file
|
//Loop through all errors within this file
|
||||||
for (int i = 0;i < item->rowCount();i++)
|
for (int i = 0; i < item->rowCount(); i++)
|
||||||
{
|
{
|
||||||
//Get error i
|
//Get error i
|
||||||
QStandardItem *error = item->child(i, 0);
|
QStandardItem *error = item->child(i, 0);
|
||||||
|
@ -697,7 +697,7 @@ void ResultsTree::RefreshFilePaths(QStandardItem *item)
|
||||||
if (error->rowCount() <= files.size() - 1)
|
if (error->rowCount() <= files.size() - 1)
|
||||||
{
|
{
|
||||||
//Loop through all files within the error
|
//Loop through all files within the error
|
||||||
for (int j = 0;j < error->rowCount();j++)
|
for (int j = 0; j < error->rowCount(); j++)
|
||||||
{
|
{
|
||||||
//Get file
|
//Get file
|
||||||
QStandardItem *file = error->child(j, 0);
|
QStandardItem *file = error->child(j, 0);
|
||||||
|
@ -725,7 +725,7 @@ void ResultsTree::RefreshFilePaths()
|
||||||
qDebug("Refreshing file paths");
|
qDebug("Refreshing file paths");
|
||||||
|
|
||||||
//Go through all file items (these are parent items that contain the errors)
|
//Go through all file items (these are parent items that contain the errors)
|
||||||
for (int i = 0;i < mModel.rowCount();i++)
|
for (int i = 0; i < mModel.rowCount(); i++)
|
||||||
{
|
{
|
||||||
RefreshFilePaths(mModel.item(i, 0));
|
RefreshFilePaths(mModel.item(i, 0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ void ThreadHandler::Check(Settings settings, bool recheck)
|
||||||
mRunningThreadCount = mResults.GetFileCount();
|
mRunningThreadCount = mResults.GetFileCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0;i < mRunningThreadCount;i++)
|
for (int i = 0; i < mRunningThreadCount; i++)
|
||||||
{
|
{
|
||||||
mThreads[i]->Check(settings);
|
mThreads[i]->Check(settings);
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ void ThreadHandler::SetThreadCount(const int count)
|
||||||
//Remove unused old threads
|
//Remove unused old threads
|
||||||
RemoveThreads();
|
RemoveThreads();
|
||||||
//Create new threads
|
//Create new threads
|
||||||
for (int i = mThreads.size();i < count;i++)
|
for (int i = mThreads.size(); i < count; i++)
|
||||||
{
|
{
|
||||||
mThreads << new CheckThread(mResults);
|
mThreads << new CheckThread(mResults);
|
||||||
connect(mThreads.last(), SIGNAL(Done()),
|
connect(mThreads.last(), SIGNAL(Done()),
|
||||||
|
@ -104,7 +104,7 @@ void ThreadHandler::SetThreadCount(const int count)
|
||||||
|
|
||||||
void ThreadHandler::RemoveThreads()
|
void ThreadHandler::RemoveThreads()
|
||||||
{
|
{
|
||||||
for (int i = 0;i < mThreads.size();i++)
|
for (int i = 0; i < mThreads.size(); i++)
|
||||||
{
|
{
|
||||||
mThreads[i]->terminate();
|
mThreads[i]->terminate();
|
||||||
disconnect(mThreads.last(), SIGNAL(Done()),
|
disconnect(mThreads.last(), SIGNAL(Done()),
|
||||||
|
@ -129,7 +129,7 @@ void ThreadHandler::ThreadDone()
|
||||||
|
|
||||||
void ThreadHandler::Stop()
|
void ThreadHandler::Stop()
|
||||||
{
|
{
|
||||||
for (int i = 0;i < mThreads.size();i++)
|
for (int i = 0; i < mThreads.size(); i++)
|
||||||
{
|
{
|
||||||
mThreads[i]->stop();
|
mThreads[i]->stop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue