[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [atcore] src/core: Use #if defined() in place of #ifdef
From:       Chris Rizzitello <null () kde ! org>
Date:       2018-08-30 20:07:25
Message-ID: E1fvTDx-0007AO-5O () code ! kde ! org
[Download RAW message or body]

Git commit 207ddbf462f7fb3fb8afeed7c7d336fbf43540f8 by Chris Rizzitello.
Committed on 30/08/2018 at 20:06.
Pushed by rizzitello into branch 'master'.

Use #if defined() in place of #ifdef

M  +3    -3    src/core/atcore.cpp

https://commits.kde.org/atcore/207ddbf462f7fb3fb8afeed7c7d336fbf43540f8

diff --git a/src/core/atcore.cpp b/src/core/atcore.cpp
index 6a07625..25b55bd 100644
--- a/src/core/atcore.cpp
+++ b/src/core/atcore.cpp
@@ -781,18 +781,18 @@ void AtCore::sdCardPrintStatus()
 =

 void AtCore::disableResetOnConnect(const QString &port)
 {
-#ifdef Q_OS_UNIX
+#if defined(Q_OS_UNIX)
 //should work on all unix'
     QProcess process;
     QStringList args({QStringLiteral("-F/dev/%1").arg(port), QStringLitera=
l("-hupcl")});
     process.start(QStringLiteral("stty"), args);
     process.waitForFinished(500);
 =

-    connect(&process, &QProcess::errorOccurred, this, [this, &process] {
+    connect(&process, &QProcess::errorOccurred, this, [&process] {
         qCDebug(ATCORE_CORE) << "Stty Error:" << process.errorString();
     });
 =

-#elif Q_OS_WIN
+#elif defined(Q_OS_WIN)
     //TODO: Disable hangup on windows.
 #endif
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic