Skip to content

Commit cacd7d3

Browse files
committed
selfcheck
1 parent fef1277 commit cacd7d3

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

gui/threaddetails.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ThreadDetails::~ThreadDetails()
1818
delete mUi;
1919
}
2020

21-
void ThreadDetails::threadDetailsUpdated(QMap<int, CheckThread::Details> threadDetails)
21+
void ThreadDetails::threadDetailsUpdated(const QMap<int, CheckThread::Details>& threadDetails)
2222
{
2323
QString text("Thread\tStart time\tFile\n");
2424
for (const auto& td: threadDetails) {

gui/threaddetails.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ThreadDetails : public QWidget
2222
}
2323

2424
public slots:
25-
void threadDetailsUpdated(QMap<int, CheckThread::Details> threadDetails);
25+
void threadDetailsUpdated(const QMap<int, CheckThread::Details>& threadDetails);
2626

2727
private:
2828
static ThreadDetails* mInstance;

gui/threadhandler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,14 @@ void ThreadHandler::setCheckStartTime(QDateTime checkStartTime)
328328

329329
// cppcheck-suppress passedByValueCallback
330330
// NOLINTNEXTLINE(performance-unnecessary-value-param)
331-
void ThreadHandler::startCheck(CheckThread::Details details)
331+
void ThreadHandler::startCheck(const CheckThread::Details& details)
332332
{
333333
mThreadDetails[details.threadIndex] = details;
334334
emitThreadDetailsUpdated();
335335
}
336336

337337
// NOLINTNEXTLINE(performance-unnecessary-value-param)
338-
void ThreadHandler::finishCheck(CheckThread::Details details)
338+
void ThreadHandler::finishCheck(const CheckThread::Details& details)
339339
{
340340
mThreadDetails.remove(details.threadIndex);
341341
emitThreadDetailsUpdated();

gui/threadhandler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,13 @@ public slots:
213213
* @brief Slot threads use to signal this class that it started checking a file
214214
* @param details Details about what file is being checked and by what thread
215215
*/
216-
void startCheck(CheckThread::Details details);
216+
void startCheck(const CheckThread::Details& details);
217217

218218
/**
219219
* @brief Slot threads use to signal this class that it finish checking a file
220220
* @param details Details about what file finished being checked and by what thread
221221
*/
222-
void finishCheck(CheckThread::Details details);
222+
void finishCheck(const CheckThread::Details& details);
223223

224224
protected slots:
225225
/**

gui/threadresult.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void ThreadResult::reportOut(const std::string &outmsg, Color /*c*/)
3535
}
3636

3737
// NOLINTNEXTLINE(performance-unnecessary-value-param)
38-
void ThreadResult::finishCheck(CheckThread::Details details)
38+
void ThreadResult::finishCheck(const CheckThread::Details& details)
3939
{
4040
std::lock_guard<std::mutex> locker(mutex);
4141

gui/threadresult.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ public slots:
9191
* @brief Slot threads use to signal this class that it finish checking a file
9292
* @param details Details about what file finished being checked and by what thread
9393
*/
94-
void finishCheck(CheckThread::Details details);
94+
void finishCheck(const CheckThread::Details& details);
9595

9696
signals:
9797
/**
98-
* @brief Progress signal
99-
* @param value Current progress
100-
* @param description Description of the current stage
98+
* @brief Files checked progress
99+
* @param value Current progress (0 - PROGRESS_MAX)
100+
* @param description Description of the current stage (example: 13/45 files checked)
101101
*/
102102
// NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) - caused by generated MOC code
103103
void progress(int value, const QString& description);

0 commit comments

Comments
 (0)