3838
3939#include < chrono>
4040
41- #include " ../Timer.h"
42-
4341using namespace std ::chrono_literals;
4442
4543MainWindow::MainWindow (QWidget *parent)
@@ -193,7 +191,6 @@ void MainWindow::listServices()
193191
194192void 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
228225void 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
273269void 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