From c64629f601802c24ede7176c963fade86b23a76d Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Thu, 5 Mar 2026 08:05:36 +0100 Subject: [PATCH 1/7] clang-tidy: modernize-use-auto --- src/icecreammonitor.cc | 12 ++++++------ src/mainwindow.cc | 2 +- src/views/detailedhostview.cc | 2 +- src/views/flowtableview.cc | 4 ++-- src/views/ganttstatusview.cc | 2 +- src/views/starview.cc | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/icecreammonitor.cc b/src/icecreammonitor.cc index 17b4ac2..55d4155 100644 --- a/src/icecreammonitor.cc +++ b/src/icecreammonitor.cc @@ -221,7 +221,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 +238,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 +253,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 +278,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 +306,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 +332,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/mainwindow.cc b/src/mainwindow.cc index 84c2af5..36e03db 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -94,7 +94,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/views/detailedhostview.cc b/src/views/detailedhostview.cc index 197c23f..8299e22 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 b0b4720..291d208 100644 --- a/src/views/flowtableview.cc +++ b/src/views/flowtableview.cc @@ -123,7 +123,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 +180,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/ganttstatusview.cc b/src/views/ganttstatusview.cc index 5faef0d..161fb29 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())); diff --git a/src/views/starview.cc b/src/views/starview.cc index 436c7b3..8aaaa84 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)), From cebd6a233f0f84fae99ce3fc48ce160eaafafda2 Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Thu, 5 Mar 2026 08:09:25 +0100 Subject: [PATCH 2/7] clang-tidy: modernize-use-using --- src/hostinfo.h | 4 ++-- src/job.h | 2 +- src/views/flowtableview.h | 2 +- src/views/ganttstatusview.h | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/hostinfo.h b/src/hostinfo.h index 684d5d6..98b8bd0 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/job.h b/src/job.h index 4145833..0d03d9b 100644 --- a/src/job.h +++ b/src/job.h @@ -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/views/flowtableview.h b/src/views/flowtableview.h index 789698e..127a30a 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 diff --git a/src/views/ganttstatusview.h b/src/views/ganttstatusview.h index b8b4143..af11d5b 100644 --- a/src/views/ganttstatusview.h +++ b/src/views/ganttstatusview.h @@ -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; From 2207af4f18903e6facb69513eba3b56198a109a4 Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Thu, 5 Mar 2026 08:13:03 +0100 Subject: [PATCH 3/7] Update .gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index c603584..aa5c359 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,9 @@ icemon *.BASE.* *.LOCAL.* *.REMOTE.* + +# Others +# ------ +.clangd +.vscode +build*/* From 5c756a7a3c10a9bb808412bfeae0afb78b0ec447 Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Thu, 5 Mar 2026 08:17:30 +0100 Subject: [PATCH 4/7] clang-tidy: modernize-use-default-member-init --- src/icecreammonitor.cc | 4 ---- src/icecreammonitor.h | 8 ++++---- src/job.cc | 12 ------------ src/job.h | 24 ++++++++++++------------ src/mainwindow.cc | 10 ++-------- src/mainwindow.h | 4 ++-- src/models/joblistmodel.cc | 4 ---- src/models/joblistmodel.h | 8 ++++---- src/monitor.cc | 2 -- src/monitor.h | 4 ++-- src/statusview.cc | 1 - src/statusview.h | 2 +- src/views/flowtableview.cc | 1 - src/views/flowtableview.h | 2 +- src/views/ganttstatusview.cc | 3 --- src/views/ganttstatusview.h | 6 +++--- src/views/summaryview.cc | 7 +------ src/views/summaryview.h | 21 ++++++++------------- 18 files changed, 40 insertions(+), 83 deletions(-) diff --git a/src/icecreammonitor.cc b/src/icecreammonitor.cc index 55d4155..75fa487 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(); diff --git a/src/icecreammonitor.h b/src/icecreammonitor.h index 3bf14dc..c504ea1 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 dda3a63..eab231e 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 0d03d9b..7654275 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); diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 36e03db..52e2787 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -49,20 +49,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)); diff --git a/src/mainwindow.h b/src/mainwindow.h index 43c497d..7d941aa 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 5b87149..8083677 100644 --- a/src/models/joblistmodel.cc +++ b/src/models/joblistmodel.cc @@ -79,11 +79,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 65d5d21..48c4e54 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 8b78c0d..7b0f560 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 90050dc..708cecc 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 da242d6..013fbc4 100644 --- a/src/statusview.cc +++ b/src/statusview.cc @@ -32,7 +32,6 @@ StatusView::StatusView(QObject *parent) : QObject(parent) - , m_paused(false) { } diff --git a/src/statusview.h b/src/statusview.h index b80ad9b..524f984 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/flowtableview.cc b/src/views/flowtableview.cc index 291d208..4d1864e 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); diff --git a/src/views/flowtableview.h b/src/views/flowtableview.h index 127a30a..30ff9d7 100644 --- a/src/views/flowtableview.h +++ b/src/views/flowtableview.h @@ -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 161fb29..cf18df9 100644 --- a/src/views/ganttstatusview.cc +++ b/src/views/ganttstatusview.cc @@ -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 af11d5b..257e9ee 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 diff --git a/src/views/summaryview.cc b/src/views/summaryview.cc index 72e2474..d0bf9ca 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 1e39cf6..224e286 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; From 320a0430a5528f7e63e3d51450e263cf47a7d23f Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Thu, 5 Mar 2026 08:18:12 +0100 Subject: [PATCH 5/7] clangd: Fix unused includes warnings --- src/mainwindow.cc | 2 -- src/models/joblistmodel.cc | 1 - src/statusview.cc | 1 - 3 files changed, 4 deletions(-) diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 52e2787..1eca307 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 diff --git a/src/models/joblistmodel.cc b/src/models/joblistmodel.cc index 8083677..08a7690 100644 --- a/src/models/joblistmodel.cc +++ b/src/models/joblistmodel.cc @@ -31,7 +31,6 @@ #include #include -#include static QString formatByteSize(unsigned int value) { diff --git a/src/statusview.cc b/src/statusview.cc index 013fbc4..0d0527b 100644 --- a/src/statusview.cc +++ b/src/statusview.cc @@ -25,7 +25,6 @@ #include "hostinfo.h" #include "job.h" -#include "utils.h" #include #include From 29dc41164b6e49290e4fc888b66cb93f9fe43e5e Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Thu, 5 Mar 2026 08:50:23 +0100 Subject: [PATCH 6/7] doc: Use pandoc to generate manpage Let's use use much less dependencies to generate a manpage (just pandoc and a few dependencies) instead of the archaic asciidoc framework. And also let's use more widely known Markdown as input format. --- CMakeLists.txt | 1 + doc/CMakeLists.txt | 32 +++++++++++++-------------- doc/icemon.adoc | 54 ---------------------------------------------- doc/icemon.md | 36 +++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 70 deletions(-) delete mode 100644 doc/icemon.adoc create mode 100644 doc/icemon.md diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f7cd0b..2cea7d2 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 8138dfe..cfe3ec5 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 7a23389..0000000 --- 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 0000000..1e20284 --- /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: From 73d2fdd4ba4ba9f8118d4489e831b775de8e0a5b Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Thu, 5 Mar 2026 08:52:32 +0100 Subject: [PATCH 7/7] workflows: Add docs building to CI --- .github/workflows/cmake-single-platform.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 0064615..bb45fc8 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