diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 0064615a..bb45fc87 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -23,7 +23,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 - name: Install dependencies (linux) - run: sudo apt install ninja-build extra-cmake-modules libicecc-dev + run: sudo apt install ninja-build extra-cmake-modules libicecc-dev pandoc - uses: actions/checkout@v4 - name: Configure CMake @@ -32,5 +32,7 @@ jobs: run: cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - name: Build - # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Docs + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target manpage diff --git a/.gitignore b/.gitignore index c6035840..aa5c3597 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,9 @@ icemon *.BASE.* *.LOCAL.* *.REMOTE.* + +# Others +# ------ +.clangd +.vscode +build*/* diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f7cd0b2..2cea7d2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ include(CheckCXXCompilerFlag) include(CheckCXXSourceCompiles) include(GNUInstallDirs) include(CheckIncludeFileCXX) +include(FindPackageHandleStandardArgs) include(FeatureSummary) include(ECMInstallIcons) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 8138dfe0..cfe3ec50 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,25 +1,25 @@ # It's not possible to install the docbook right now (Qt-only project) #add_subdirectory(icemon) -find_program(ASCIIDOC asciidoc) -find_program(A2X a2x) +find_program(pandoc_EXECUTABLE pandoc) +find_package_handle_standard_args(pandoc + REQUIRED_VARS + pandoc_EXECUTABLE +) +mark_as_advanced(pandoc_EXECUTABLE) +set_package_properties(pandoc PROPERTIES + TYPE REQUIRED + DESCRIPTION "A universal document converter. Used for generating manpages." + URL "https://pandoc.org/" +) -if(NOT ASCIIDOC OR NOT A2X) - message(WARNING "Could not find asciidoc or a2x, manual page will not be generated.") -else() - add_custom_target(manpage ALL) +if (pandoc_FOUND) + add_custom_target(manpage) add_custom_command( TARGET manpage - COMMAND ${ASCIIDOC} -a revnumber=${PROJECT_VERSION} -d manpage -b docbook - -o ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml ${CMAKE_CURRENT_SOURCE_DIR}/icemon.adoc - MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/icemon.adoc - BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml) - add_custom_command( - TARGET manpage - COMMAND ${A2X} --doctype manpage --format manpage - ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml + COMMAND ${pandoc_EXECUTABLE} -s -t man ${CMAKE_CURRENT_SOURCE_DIR}/icemon.md + -o ${CMAKE_CURRENT_BINARY_DIR}/icemon.1 + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/icemon.md BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/icemon.1) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/icemon.1 diff --git a/doc/icemon.adoc b/doc/icemon.adoc deleted file mode 100644 index 7a233892..00000000 --- a/doc/icemon.adoc +++ /dev/null @@ -1,54 +0,0 @@ -ICEMON(1) -========= -:doctype: manpage -:man source: icemon -:man version: {revnumber} -:man manual: Icemon User's Manual - - -Name ----- -icemon - Icecream network monitor - - -Synopsis --------- -*icemon* _OPTION_ - - -Description ------------ -Icemon is a graphical application to view an Icecream compile network and monitor its traffic. - - - -Options -------- - -*-h, --help*:: - Print help message and exit. - -*-n, --netname* _net-name_:: - The name of the Icecream network `icemon` should connect to. - -*-s, --scheduler* _host-name_:: - The hostname of the Icecream scheduler `icemon` should connect to. - - - -See Also --------- -ifdef::env-github[] -link:https://github.com/icecc/icecream/tree/master/doc/icecream.adoc[icecream(7)] -link:https://github.com/icecc/icecream/tree/master/doc/icecc-scheduler.adoc[icecc-scheduler(1)] -link:https://github.com/icecc/icecream/tree/master/doc/iceccd.adoc[iceccd(1)] -endif::[] - -ifndef::env-github[] -icecream(7), icecc-scheduler(1), iceccd(1) -endif::[] - - -Website -------- -Project home: https://github.com/icecc/icemon diff --git a/doc/icemon.md b/doc/icemon.md new file mode 100644 index 00000000..1e202840 --- /dev/null +++ b/doc/icemon.md @@ -0,0 +1,36 @@ +% ICEMON(1) Icemon User Manuals + +# icemon(1) + +## Name + +`icemon` — Icecream network monitor + +## Synopsis + +**icemon** *OPTION* + +## Description + +Icemon is a graphical application to view an Icecream compile network and monitor its traffic. + +## Options + +- **-h, --help** + Print help message and exit. + +- **-n, --netname** *net-name* + The name of the Icecream network `icemon` should connect to. + +- **-s, --scheduler** *host-name* + The hostname of the Icecream scheduler `icemon` should connect to. + +## See Also + +- (icecream(7)) +- (icecc-scheduler(1)) +- (iceccd(1)) + +## Website + +Project home: diff --git a/src/hostinfo.h b/src/hostinfo.h index 684d5d64..98b8bd0a 100644 --- a/src/hostinfo.h +++ b/src/hostinfo.h @@ -57,7 +57,7 @@ class HostInfo void setNoRemote(bool noRemote) { mNoRemote = noRemote; } bool noRemote() const { return mNoRemote; } - typedef QMap StatsMap; + using StatsMap = QMap; void updateFromStatsMap(const StatsMap &stats); static void initColorTable(); @@ -122,7 +122,7 @@ class HostInfoManager HostInfo *find(unsigned int hostid) const; - typedef QMap HostMap; + using HostMap = QMap; HostMap hostMap() const; diff --git a/src/icecreammonitor.cc b/src/icecreammonitor.cc index 17b4ac25..75fa487d 100644 --- a/src/icecreammonitor.cc +++ b/src/icecreammonitor.cc @@ -53,10 +53,6 @@ using namespace std; IcecreamMonitor::IcecreamMonitor(HostInfoManager *manager, QObject *parent) : Monitor(manager, parent) - , m_scheduler(nullptr) - , m_discover(nullptr) - , m_fd_notify(nullptr) - , m_fd_type(QSocketNotifier::Exception) { setupDebug(); checkScheduler(); @@ -221,7 +217,7 @@ bool IcecreamMonitor::handle_activity() void IcecreamMonitor::handle_getcs(Msg *_m) { - MonGetCSMsg *m = dynamic_cast(_m); + auto *m = dynamic_cast(_m); assert(m); if (!m) { return; @@ -238,7 +234,7 @@ void IcecreamMonitor::handle_getcs(Msg *_m) void IcecreamMonitor::handle_local_begin(Msg *_m) { - MonLocalJobBeginMsg *m = dynamic_cast(_m); + auto *m = dynamic_cast(_m); assert(m); if (!m) { return; @@ -253,7 +249,7 @@ void IcecreamMonitor::handle_local_begin(Msg *_m) void IcecreamMonitor::handle_local_done(Msg *_m) { - JobLocalDoneMsg *m = dynamic_cast(_m); + auto *m = dynamic_cast(_m); assert(m); if (!m) { return; @@ -278,7 +274,7 @@ void IcecreamMonitor::handle_local_done(Msg *_m) void IcecreamMonitor::handle_stats(Msg *_m) { - MonStatsMsg *m = dynamic_cast(_m); + auto *m = dynamic_cast(_m); assert(m); if (!m) { return; @@ -306,7 +302,7 @@ void IcecreamMonitor::handle_stats(Msg *_m) void IcecreamMonitor::handle_job_begin(Msg *_m) { - MonJobBeginMsg *m = dynamic_cast(_m); + auto *m = dynamic_cast(_m); assert(m); if (!m) { return; @@ -332,7 +328,7 @@ void IcecreamMonitor::handle_job_begin(Msg *_m) void IcecreamMonitor::handle_job_done(Msg *_m) { - MonJobDoneMsg *m = dynamic_cast(_m); + auto *m = dynamic_cast(_m); assert(m); if (!m) { return; diff --git a/src/icecreammonitor.h b/src/icecreammonitor.h index 3bf14dcf..c504ea19 100644 --- a/src/icecreammonitor.h +++ b/src/icecreammonitor.h @@ -63,11 +63,11 @@ private slots: void handle_local_done(Msg *m); JobList m_rememberedJobs; - MsgChannel *m_scheduler; + MsgChannel *m_scheduler{nullptr}; - DiscoverSched *m_discover; - QSocketNotifier *m_fd_notify; - QSocketNotifier::Type m_fd_type; + DiscoverSched *m_discover{nullptr}; + QSocketNotifier *m_fd_notify{nullptr}; + QSocketNotifier::Type m_fd_type{QSocketNotifier::Exception}; }; #endif // ICEMON_ICECREAMMONITOR_H diff --git a/src/job.cc b/src/job.cc index dda3a636..eab231e9 100644 --- a/src/job.cc +++ b/src/job.cc @@ -28,20 +28,8 @@ Job::Job(unsigned int id, unsigned int client, const QString &filename, const QString &lang) : id(id) , fileName(filename) - , server(0) , client(client) , lang(lang) - , state(WaitingForCS) - , startTime{} - , real_msec(0) - , user_msec(0) - , sys_msec(0) - , pfaults(0) - , exitcode(0) - , in_compressed(0) - , in_uncompressed(0) - , out_compressed(0) - , out_uncompressed(0) { } diff --git a/src/job.h b/src/job.h index 41458333..7654275b 100644 --- a/src/job.h +++ b/src/job.h @@ -47,23 +47,23 @@ class Job unsigned int id; QString fileName; - unsigned int server; + unsigned int server{0}; unsigned int client; QString lang; - State state; - time_t startTime; + State state{WaitingForCS}; + time_t startTime{}; - unsigned int real_msec; /* real time it used */ - unsigned int user_msec; /* user time used */ - unsigned int sys_msec; /* system time used */ - unsigned int pfaults; /* page faults */ + unsigned int real_msec{0}; /* real time it used */ + unsigned int user_msec{0}; /* user time used */ + unsigned int sys_msec{0}; /* system time used */ + unsigned int pfaults{0}; /* page faults */ - int exitcode; /* exit code */ + int exitcode{0}; /* exit code */ - unsigned int in_compressed; - unsigned int in_uncompressed; - unsigned int out_compressed; - unsigned int out_uncompressed; + unsigned int in_compressed{0}; + unsigned int in_uncompressed{0}; + unsigned int out_compressed{0}; + unsigned int out_uncompressed{0}; }; QDebug operator<<(QDebug dbg, const Job &job); @@ -76,7 +76,7 @@ class IdleJob : Job() { state = Job::Idle; } }; -typedef QMap JobList; +using JobList = QMap; #endif // vim:ts=4:sw=4:noet diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 84c2af50..1eca3075 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -30,8 +30,6 @@ #include "statusview.h" #include "statusviewfactory.h" -#include "utils.h" - #include #include #include @@ -49,20 +47,14 @@ namespace { struct PlatformStat { - PlatformStat() - : jobs(0) - , maxJobs(0) {} - - unsigned int jobs; - unsigned int maxJobs; + unsigned int jobs{0}; + unsigned int maxJobs{0}; }; } MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) - , m_view(nullptr) - , m_systemTrayIcon(nullptr) { QIcon appIcon = QIcon(); appIcon.addFile(QStringLiteral(":/images/128-apps-icemon.png"), QSize(128, 128)); @@ -94,7 +86,7 @@ MainWindow::MainWindow(QWidget *parent) connect(action, &QAction::triggered, this, &MainWindow::updateSystemTrayVisible); m_showInSystemTrayAction = action; - QMenu *systrayMenu = new QMenu(this); + auto *systrayMenu = new QMenu(this); QAction *quitAction = systrayMenu->addAction(tr("&Quit"), this, SLOT(quit()), tr("Ctrl+Q")); quitAction->setIcon(QIcon::fromTheme(QStringLiteral("application-exit"))); quitAction->setMenuRole(QAction::QuitRole); diff --git a/src/mainwindow.h b/src/mainwindow.h index 43c497d0..7d941aa2 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -84,8 +84,8 @@ private slots: HostInfoManager *m_hostInfoManager; QPointer m_monitor; - StatusView *m_view; - QSystemTrayIcon* m_systemTrayIcon; + StatusView *m_view{nullptr}; + QSystemTrayIcon* m_systemTrayIcon{nullptr}; QLabel *m_schedStatusWidget; QLabel *m_jobStatsWidget; diff --git a/src/models/joblistmodel.cc b/src/models/joblistmodel.cc index 5b871493..08a7690e 100644 --- a/src/models/joblistmodel.cc +++ b/src/models/joblistmodel.cc @@ -31,7 +31,6 @@ #include #include -#include static QString formatByteSize(unsigned int value) { @@ -79,11 +78,7 @@ static QString trimFilePath(const QString &filePath, int numberOfFilePathParts) JobListModel::JobListModel(QObject *parent) : QAbstractListModel(parent) - , m_numberOfFilePathParts(2) - , m_expireDuration(-1) , m_expireTimer(new QTimer(this)) - , m_jobType(AllJobs) - , m_hostId(0) { connect(m_expireTimer, SIGNAL(timeout()), this, SLOT(slotExpireFinishedJobs())); diff --git a/src/models/joblistmodel.h b/src/models/joblistmodel.h index 65d5d212..48c4e54f 100644 --- a/src/models/joblistmodel.h +++ b/src/models/joblistmodel.h @@ -109,7 +109,7 @@ private Q_SLOTS: * the complete file path is displayed else .../partN/.../part1/fileName. * Default is 2. */ - int m_numberOfFilePathParts; + int m_numberOfFilePathParts{2}; /** * The number of seconds after which finished jobs should be expired. @@ -118,7 +118,7 @@ private Q_SLOTS: * - > 0 after some seconds. * Default is -1. */ - int m_expireDuration; + int m_expireDuration{-1}; struct FinishedJob { @@ -134,8 +134,8 @@ private Q_SLOTS: FinishedJobs m_finishedJobs; QTimer *m_expireTimer; - JobType m_jobType; - unsigned int m_hostId; + JobType m_jobType{AllJobs}; + unsigned int m_hostId{0}; }; class JobListSortFilterProxyModel diff --git a/src/monitor.cc b/src/monitor.cc index 8b78c0d5..7b0f5605 100644 --- a/src/monitor.cc +++ b/src/monitor.cc @@ -25,8 +25,6 @@ Monitor::Monitor(HostInfoManager *manager, QObject *parent) : QObject(parent) , m_hostInfoManager(manager) - , m_currentSchedport(0) - , m_schedulerState(Offline) { } diff --git a/src/monitor.h b/src/monitor.h index 90050dcd..708cecc3 100644 --- a/src/monitor.h +++ b/src/monitor.h @@ -77,8 +77,8 @@ public HostInfoManager *m_hostInfoManager; QByteArray m_currentNetname; QByteArray m_currentSchedname; - uint m_currentSchedport; - SchedulerState m_schedulerState; + uint m_currentSchedport{0}; + SchedulerState m_schedulerState{Offline}; }; #endif // ICEMON_MONITOR_H diff --git a/src/statusview.cc b/src/statusview.cc index da242d65..0d0527bb 100644 --- a/src/statusview.cc +++ b/src/statusview.cc @@ -25,14 +25,12 @@ #include "hostinfo.h" #include "job.h" -#include "utils.h" #include #include StatusView::StatusView(QObject *parent) : QObject(parent) - , m_paused(false) { } diff --git a/src/statusview.h b/src/statusview.h index b80ad9b0..524f9845 100644 --- a/src/statusview.h +++ b/src/statusview.h @@ -86,7 +86,7 @@ protected Q_SLOTS: private: QPointer m_monitor; - bool m_paused; + bool m_paused{false}; }; #endif diff --git a/src/views/detailedhostview.cc b/src/views/detailedhostview.cc index 197c23f5..8299e226 100644 --- a/src/views/detailedhostview.cc +++ b/src/views/detailedhostview.cc @@ -150,7 +150,7 @@ void DetailedHostView::createKnownHosts() void DetailedHostView::slotNodeActivated() { - const unsigned int hostid = mHostListView->currentIndex().data(HostListModel::HostIdRole).value(); + const auto hostid = mHostListView->currentIndex().data(HostListModel::HostIdRole).value(); if (!hostid) return; mLocalJobsModel->setHostId(hostid); diff --git a/src/views/flowtableview.cc b/src/views/flowtableview.cc index b0b47204..4d1864e2 100644 --- a/src/views/flowtableview.cc +++ b/src/views/flowtableview.cc @@ -30,7 +30,6 @@ ProgressWidget::ProgressWidget(HostInfo *info, StatusView *statusView, QWidget * : QWidget(parent) , m_hostInfo(info) , m_statusView(statusView) - , m_isVirgin(true) { setAutoFillBackground(false); setAttribute(Qt::WA_OpaquePaintEvent); @@ -123,7 +122,7 @@ void FlowTableView::update(const Job &job) jobStateItem->setFlags(Qt::ItemIsEnabled); } - if (ProgressWidget * progressWidget = static_cast(m_widget->cellWidget(serverRow, 2))) { + if (auto * progressWidget = static_cast(m_widget->cellWidget(serverRow, 2))) { progressWidget->setCurrentJob(job); } @@ -180,7 +179,7 @@ void FlowTableView::checkNode(unsigned int hostId) } HostInfo *hostInfo = hostInfoManager()->hostMap().value(hostId); - QTableWidgetItem *widgetItem = new QTableWidgetItem(hostInfoText(hostInfo)); + auto *widgetItem = new QTableWidgetItem(hostInfoText(hostInfo)); widgetItem->setIcon(QIcon(QStringLiteral(":/images/icemonnode.png"))); widgetItem->setToolTip(hostInfo->toolTip()); widgetItem->setBackground(hostInfo->color()); diff --git a/src/views/flowtableview.h b/src/views/flowtableview.h index 789698e0..30ff9d7d 100644 --- a/src/views/flowtableview.h +++ b/src/views/flowtableview.h @@ -31,7 +31,7 @@ class Job; -typedef QHash HostIdRowMap; +using HostIdRowMap = QHash; class ProgressWidget : public QWidget @@ -50,7 +50,7 @@ class ProgressWidget StatusView *m_statusView; Job m_currentJob; QImage m_backingStore; - bool m_isVirgin; + bool m_isVirgin{true}; }; class FlowTableView diff --git a/src/views/ganttstatusview.cc b/src/views/ganttstatusview.cc index 5faef0d2..cf18df9a 100644 --- a/src/views/ganttstatusview.cc +++ b/src/views/ganttstatusview.cc @@ -63,7 +63,7 @@ GanttConfigDialog::GanttConfigDialog(QWidget *parent) buttonLayout->addStretch(1); - QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this); + auto *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this); buttonLayout->addWidget(buttonBox); connect(buttonBox, SIGNAL(rejected()), SLOT(hide())); @@ -79,7 +79,6 @@ bool GanttConfigDialog::isTimeScaleVisible() GanttTimeScaleWidget::GanttTimeScaleWidget(QWidget *parent) : QWidget(parent) - , mPixelsPerSecond(40) { QPalette pal = palette(); pal.setColor(backgroundRole(), Qt::white); @@ -130,8 +129,6 @@ void GanttTimeScaleWidget::paintEvent(QPaintEvent *pe) GanttProgress::GanttProgress(StatusView *statusView, QWidget *parent) : QWidget(parent) , mStatusView(statusView) - , mClock(0) - , mIsFree(true) { QPalette pal = palette(); pal.setColor(backgroundRole(), Qt::white); diff --git a/src/views/ganttstatusview.h b/src/views/ganttstatusview.h index b8b41432..257e9ee8 100644 --- a/src/views/ganttstatusview.h +++ b/src/views/ganttstatusview.h @@ -64,7 +64,7 @@ class GanttTimeScaleWidget void paintEvent(QPaintEvent *e) override; private: - int mPixelsPerSecond; + int mPixelsPerSecond{40}; }; class GanttProgress @@ -114,9 +114,9 @@ public slots: QList m_jobs; - int mClock; + int mClock{0}; - bool mIsFree; + bool mIsFree{true}; }; class GanttStatusView @@ -163,17 +163,17 @@ private slots: GanttTimeScaleWidget *mTimeScale; using SlotList = QList; - typedef QMap NodeMap; + using NodeMap = QMap; NodeMap mNodeMap; - typedef QMap AgeMap; + using AgeMap = QMap; AgeMap mAgeMap; - typedef QMap JobMap; + using JobMap = QMap; JobMap mJobMap; - typedef QMap NodeLayoutMap; + using NodeLayoutMap = QMap; NodeLayoutMap mNodeLayouts; - typedef QMap NodeRowMap; + using NodeRowMap = QMap; NodeRowMap mNodeRows; - typedef QMap NodeLabelMap; + using NodeLabelMap = QMap; NodeLabelMap mNodeLabels; QTimer *m_progressTimer; QTimer *m_ageTimer; diff --git a/src/views/starview.cc b/src/views/starview.cc index 436c7b38..8aaaa848 100644 --- a/src/views/starview.cc +++ b/src/views/starview.cc @@ -54,7 +54,7 @@ StarViewConfigDialog::StarViewConfigDialog(QWidget *parent) QBoxLayout *topLayout = new QVBoxLayout(this); - QLabel *label = new QLabel(tr("Number of nodes per ring:")); + auto *label = new QLabel(tr("Number of nodes per ring:")); topLayout->addWidget(label); QBoxLayout *nodesLayout = new QHBoxLayout(); @@ -87,7 +87,7 @@ StarViewConfigDialog::StarViewConfigDialog(QWidget *parent) hline->setFrameShadow(QFrame::Sunken); topLayout->addWidget(hline); - QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this); + auto *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this); topLayout->addWidget(buttonBox); connect(mSuppressDomainName, SIGNAL(toggled(bool)), diff --git a/src/views/summaryview.cc b/src/views/summaryview.cc index 72e2474e..d0bf9ca4 100644 --- a/src/views/summaryview.cc +++ b/src/views/summaryview.cc @@ -60,12 +60,7 @@ class SummaryViewScrollArea //////////////////////////////////////////////////////////////////////////////// SummaryViewItem::SummaryViewItem(unsigned int hostid, QWidget *parent, SummaryView *view, QGridLayout *layout) - : m_jobCount(0) - , m_totalJobsLength(0.0f) - , m_finishedJobCount(0) - , m_totalRequestedJobsLength(0.0f) - , m_requestedJobCount(0) - , m_view(view) + : m_view(view) { const int row = layout->rowCount(); const QColor nodeColor = view->hostInfoManager()->hostColor(hostid); diff --git a/src/views/summaryview.h b/src/views/summaryview.h index 1e39cf67..224e2863 100644 --- a/src/views/summaryview.h +++ b/src/views/summaryview.h @@ -48,26 +48,21 @@ class SummaryViewItem struct JobHandler { - JobHandler() - : stateWidget(nullptr) - , sourceLabel(nullptr) - , stateLabel(nullptr) {} - - QFrame *stateWidget; - QLabel *sourceLabel; - QLabel *stateLabel; + QFrame *stateWidget{nullptr}; + QLabel *sourceLabel{nullptr}; + QLabel *stateLabel{nullptr}; QString currentFile; }; QLabel *m_speedLabel; QLabel *m_jobsLabel; - int m_jobCount; - double m_totalJobsLength; - int m_finishedJobCount; + int m_jobCount{0}; + double m_totalJobsLength{0.0f}; + int m_finishedJobCount{0}; - double m_totalRequestedJobsLength; - int m_requestedJobCount; + double m_totalRequestedJobsLength{0.0f}; + int m_requestedJobCount{0}; SummaryView *m_view;