[network/kdeconnect-kde] /: Make clang-format happy

Albert Vaca Cintora <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit d465500a22287a744e21d86cace774a5833afcb1 by Albert Vaca Cintora.
Committed on 30/07/2026 at 14:08.
Pushed by albertvaka into branch 'master'.

Make clang-format happy

M  +1    -1    core/backends/lan/mdnsdiscovery.h
M  +13   -19   plugins/runcommand/runcommandplugin.cpp

https://invent.kde.org/network/kdeconnect-kde/-/commit/d465500a22287a744e21d86cace774a5833afcb1

diff --git a/core/backends/lan/mdnsdiscovery.h b/core/backends/lan/mdnsdiscovery.h
index dd836e25e..8a9900dff 100644
--- a/core/backends/lan/mdnsdiscovery.h
+++ b/core/backends/lan/mdnsdiscovery.h
@@ -13,7 +13,7 @@ class LanLinkProvider;
 class KDECONNECTCORE_EXPORT MdnsDiscovery
 {
 public:
-    virtual ~MdnsDiscovery() {};
+    virtual ~MdnsDiscovery() = default;
     virtual void onStart() = 0;
     virtual void onStop() = 0;
     virtual void onNetworkChange() = 0;
diff --git a/plugins/runcommand/runcommandplugin.cpp b/plugins/runcommand/runcommandplugin.cpp
index 30bc7477f..1e2f986a1 100644
--- a/plugins/runcommand/runcommandplugin.cpp
+++ b/plugins/runcommand/runcommandplugin.cpp
@@ -69,8 +69,7 @@ void RunCommandPlugin::receivePacket(const NetworkPacket &np)
 
 void RunCommandPlugin::startCommand(const NetworkPacket &np)
 {
-    if (currentProcess)
-    {
+    if (currentProcess) {
         disconnect(stderrConn);
         disconnect(stdoutConn);
         currentProcess = nullptr;
@@ -89,8 +88,12 @@ void RunCommandPlugin::startCommand(const NetworkPacket &np)
     auto *process = new QProcess(this);
     process->setProcessChannelMode(QProcess::SeparateChannels);
 
-    stderrConn = connect(process, &QProcess::readyReadStandardError, this, [this] {onProcessReadyReadState(true);});
-    stderrConn = connect(process, &QProcess::readyReadStandardOutput, this, [this] {onProcessReadyReadState(false);});
+    stderrConn = connect(process, &QProcess::readyReadStandardError, this, [this] {
+        onProcessReadyReadState(true);
+    });
+    stderrConn = connect(process, &QProcess::readyReadStandardOutput, this, [this] {
+        onProcessReadyReadState(false);
+    });
     connect(process, &QProcess::finished, this, &RunCommandPlugin::onProcessFinished);
 
     connect(process, &QProcess::finished, process, &QObject::deleteLater);
@@ -107,7 +110,6 @@ void RunCommandPlugin::onProcessFinished(int exitCode, QProcess::ExitStatus exit
     currentProcess = nullptr;
 }
 
-
 void RunCommandPlugin::onProcessReadyReadState(const bool isErrorOutput)
 {
     auto *process = qobject_cast<QProcess *>(sender());
@@ -115,11 +117,9 @@ void RunCommandPlugin::onProcessReadyReadState(const bool isErrorOutput)
         return;
     }
 
-    if (isErrorOutput)
-    {
+    if (isErrorOutput) {
         process->setReadChannel(QProcess::StandardError);
-    } else
-    {
+    } else {
         process->setReadChannel(QProcess::StandardOutput);
     }
 
@@ -129,24 +129,18 @@ void RunCommandPlugin::onProcessReadyReadState(const bool isErrorOutput)
     while (!stream.atEnd()) {
         output.append(stream.readLine());
         if (output.size() == 5) {
-            if (isErrorOutput)
-            {
+            if (isErrorOutput) {
                 sendOutput(empty, output);
-            }
-            else
-            {
+            } else {
                 sendOutput(output, empty);
             }
             output.clear();
         }
     }
     if (!output.isEmpty()) {
-        if (isErrorOutput)
-        {
+        if (isErrorOutput) {
             sendOutput(empty, output);
-        }
-        else
-        {
+        } else {
             sendOutput(output, empty);
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.