Skip to content

Commit 1c2c758

Browse files
committed
Minor cleanup
1 parent 82c4fd9 commit 1c2c758

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

mainwindow.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838

3939
#include <chrono>
4040

41-
#include "../Timer.h"
42-
4341
using namespace std::chrono_literals;
4442

4543
MainWindow::MainWindow(QWidget *parent)
@@ -193,7 +191,6 @@ void MainWindow::listServices()
193191

194192
void MainWindow::processNonSystemdServices()
195193
{
196-
ScopedTimer timer("processNonSystemdServices");
197194
const auto list = cmd.getOut("/sbin/service --status-all", true).trimmed().split("\n");
198195
QRegularExpression re("dpkg-.*$");
199196
services.reserve(list.size());
@@ -204,7 +201,7 @@ void MainWindow::processNonSystemdServices()
204201

205202
for (const auto &item : list) {
206203
const QString trimmedItem = item.trimmed();
207-
if (trimmedItem.contains(re) || item.section(sectionDelimiter, 1) == debian) {
204+
if (item.section(sectionDelimiter, 1) == debian || trimmedItem.contains(re)) {
208205
continue;
209206
}
210207

@@ -227,7 +224,6 @@ void MainWindow::processSystemdServices()
227224

228225
void MainWindow::processSystemdActiveInactiveServices(QStringList &names)
229226
{
230-
ScopedTimer timer("processSystemdActiveInactiveServices");
231227
const auto list = cmd.getOut("systemctl list-units --type=service --all -o json").trimmed();
232228
auto doc = QJsonDocument::fromJson(list.toUtf8());
233229
if (!doc.isArray()) {
@@ -272,7 +268,6 @@ void MainWindow::processSystemdActiveInactiveServices(QStringList &names)
272268

273269
void MainWindow::processSystemdMaskedServices(QStringList &names)
274270
{
275-
ScopedTimer timer("processSystemdMaskedServices");
276271
const auto masked = cmd.getOut("systemctl list-unit-files --type=service --state=masked -o json").trimmed();
277272
auto doc = QJsonDocument::fromJson(masked.toUtf8());
278273
if (!doc.isArray()) {

0 commit comments

Comments
 (0)