Skip to content

Commit c8222a7

Browse files
committed
use QString in Details struct
1 parent c8f5695 commit c8222a7

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

gui/checkthread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void CheckThread::run()
148148
const std::string& fname = file->spath();
149149
qDebug() << "Checking file" << QString::fromStdString(fname);
150150

151-
const Details details{ mThreadIndex, fname, QTime::currentTime(), };
151+
const Details details{ mThreadIndex, QString::fromStdString(fname), QTime::currentTime(), };
152152
emit startCheck(details);
153153

154154
cppcheck.check(*file);
@@ -166,7 +166,7 @@ void CheckThread::run()
166166
const std::string& fname = fileSettings->filename();
167167
qDebug() << "Checking file" << QString::fromStdString(fname);
168168

169-
const Details details{ mThreadIndex, fname, QTime::currentTime(), };
169+
const Details details{ mThreadIndex, QString::fromStdString(fname), QTime::currentTime(), };
170170
emit startCheck(details);
171171

172172
cppcheck.check(*file);

gui/checkthread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CheckThread : public QThread {
5353
public:
5454
struct Details {
5555
int threadIndex;
56-
std::string file;
56+
QString file;
5757
QTime startTime;
5858
};
5959

gui/threadhandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ QString ThreadHandler::buildThreadDetailsText() const
350350
result += QString("Thread %1 (%2): %3\n")
351351
.arg(details.second.threadIndex)
352352
.arg(details.second.startTime.toString(Qt::TextDate))
353-
.arg(QString::fromStdString(details.second.file));
353+
.arg(details.second.file);
354354
}
355355

356356
return result;

gui/threadresult.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void ThreadResult::finishCheck(CheckThread::Details details)
4040
{
4141
std::lock_guard<std::mutex> locker(mutex);
4242

43-
mProgress += QFile(QString::fromStdString(details.file)).size();
43+
mProgress += QFile(details.file).size();
4444
mFilesChecked++;
4545

4646
if (mMaxProgress > 0) {

0 commit comments

Comments
 (0)