@@ -105,8 +105,9 @@ int CheckThread::executeCommand(std::string exe, std::vector<std::string> args,
105105}
106106
107107
108- CheckThread::CheckThread (ThreadResult &result) :
109- mResult(result)
108+ CheckThread::CheckThread (ThreadResult &result, int threadIndex)
109+ : mResult(result)
110+ , mThreadIndex(threadIndex)
110111{}
111112
112113void CheckThread::setSettings (const Settings &settings, std::shared_ptr<Suppressions> supprs)
@@ -147,9 +148,14 @@ void CheckThread::run()
147148 while (file && mState == Running) {
148149 const std::string& fname = file->spath ();
149150 qDebug () << " Checking file" << QString::fromStdString (fname);
151+
152+ const Details details{ mThreadIndex , QString::fromStdString (fname), QTime::currentTime (), };
153+ emit startCheck (details);
154+
150155 cppcheck.check (*file);
151156 runAddonsAndTools (mSettings , nullptr , QString::fromStdString (fname));
152- emit fileChecked (QString::fromStdString (fname));
157+
158+ emit finishCheck (details);
153159
154160 if (mState == Running)
155161 mResult .getNextFile (file);
@@ -160,9 +166,15 @@ void CheckThread::run()
160166 while (fileSettings && mState == Running) {
161167 const std::string& fname = fileSettings->filename ();
162168 qDebug () << " Checking file" << QString::fromStdString (fname);
163- cppcheck.check (*fileSettings);
169+
170+ const Details details{ mThreadIndex , QString::fromStdString (fname), QTime::currentTime (), };
171+ emit startCheck (details);
172+
173+ cppcheck.check (*file);
164174 runAddonsAndTools (mSettings , fileSettings, QString::fromStdString (fname));
165- emit fileChecked (QString::fromStdString (fname));
175+
176+ emit finishCheck (details);
177+
166178
167179 if (mState == Running)
168180 mResult .getNextFileSettings (fileSettings);
@@ -486,3 +498,4 @@ QString CheckThread::clangTidyCmd()
486498
487499 return QString ();
488500}
501+
0 commit comments