Skip to content

Commit 4c623c1

Browse files
committed
Add threadDetailsUpdated to ThreadDetails widget
1 parent 50da21c commit 4c623c1

4 files changed

Lines changed: 21 additions & 2 deletions

File tree

gui/threaddetails.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ ThreadDetails::ThreadDetails(QWidget *parent)
66
, ui(new Ui::ThreadDetails)
77
{
88
ui->setupUi(this);
9+
ui->detailsBox->setReadOnly(true);
910
}
1011

1112
ThreadDetails::~ThreadDetails()
1213
{
1314
delete ui;
1415
}
16+
17+
void ThreadDetails::threadDetailsUpdated(const QString &text)
18+
{
19+
ui->detailsBox->setText(text);
20+
}

gui/threaddetails.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ class ThreadDetails : public QWidget
1515
explicit ThreadDetails(QWidget *parent = nullptr);
1616
~ThreadDetails();
1717

18+
public slots:
19+
void threadDetailsUpdated(const QString &text);
20+
1821
private:
1922
Ui::ThreadDetails *ui;
2023
};

gui/threadhandler.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,13 @@ void ThreadHandler::setCheckStartTime(QDateTime checkStartTime)
330330
void ThreadHandler::startCheck(CheckThread::Details details)
331331
{
332332
mThreadDetails[details.index] = details;
333-
emit threadDetailsUpdated(buildThreadDetailsText());
333+
emitThreadDetailsUpdated();
334334
}
335335

336336
void ThreadHandler::finishCheck(CheckThread::Details details)
337337
{
338338
mThreadDetails.erase(details.index);
339-
emit threadDetailsUpdated(buildThreadDetailsText());
339+
emitThreadDetailsUpdated();
340340
}
341341

342342
QString ThreadHandler::buildThreadDetailsText() const
@@ -352,3 +352,8 @@ QString ThreadHandler::buildThreadDetailsText() const
352352

353353
return result;
354354
}
355+
356+
void ThreadHandler::emitThreadDetailsUpdated()
357+
{
358+
emit threadDetailsUpdated(buildThreadDetailsText());
359+
}

gui/threadhandler.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ class ThreadHandler : public QObject {
178178
*/
179179
void setCheckStartTime(QDateTime checkStartTime);
180180

181+
/**
182+
* @brief Emit the threadDetailsUpdated signal
183+
*/
184+
void emitThreadDetailsUpdated();
185+
181186
signals:
182187
/**
183188
* @brief Signal that all threads are done

0 commit comments

Comments
 (0)