From 1a269824274e7cddb59d646548049846bcb36cdc Mon Sep 17 00:00:00 2001 From: Jekyll Wu Date: Sat, 1 Sep 2012 11:47:44 +0800 Subject: [PATCH] "#ifdef(XYZ)" -> "#if defined(XYZ)" Use one form consistently in all code --- src/ColorSchemeManager.cpp | 2 +- src/ProcessInfo.cpp | 8 ++++---- src/Pty.cpp | 2 +- src/main.cpp | 4 ++-- src/tests/DBusTest.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ColorSchemeManager.cpp b/src/ColorSchemeManager.cpp index 6463380dc..b6258fc08 100644 --- a/src/ColorSchemeManager.cpp +++ b/src/ColorSchemeManager.cpp @@ -156,7 +156,7 @@ bool KDE3ColorSchemeReader::readTitleLine(const QString& line, ColorScheme* sche ColorSchemeManager::ColorSchemeManager() : _haveLoadedAll(false) { -#ifdef Q_WS_X11 +#if defined(Q_WS_X11) // Allow looking up colors in the X11 color database QColor::setAllowX11ColorNames(true); #endif diff --git a/src/ProcessInfo.cpp b/src/ProcessInfo.cpp index 4be81d40a..aba138e40 100644 --- a/src/ProcessInfo.cpp +++ b/src/ProcessInfo.cpp @@ -48,10 +48,10 @@ #if defined(Q_OS_MAC) #include #include -#ifdef HAVE_SYS_PROC_INFO_H +#if defined(HAVE_SYS_PROC_INFO_H) #include #endif -#ifdef HAVE_SYS_PROC_H +#if defined(HAVE_SYS_PROC_H) #include #endif #include @@ -946,7 +946,7 @@ private: }; #endif -#ifdef Q_OS_SOLARIS +#if defined(Q_OS_SOLARIS) // The procfs structure definition requires off_t to be // 32 bits, which only applies if FILE_OFFSET_BITS=32. // Futz around here to get it to compile regardless, @@ -1180,7 +1180,7 @@ QString SSHProcessInfo::format(const QString& input) const ProcessInfo* ProcessInfo::newInstance(int aPid, bool enableEnvironmentRead) { -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) return new LinuxProcessInfo(aPid, enableEnvironmentRead); #elif defined(Q_OS_SOLARIS) return new SolarisProcessInfo(aPid, enableEnvironmentRead); diff --git a/src/Pty.cpp b/src/Pty.cpp index 4b696c780..9b5c6d54b 100644 --- a/src/Pty.cpp +++ b/src/Pty.cpp @@ -134,7 +134,7 @@ bool Pty::flowControlEnabled() const void Pty::setUtf8Mode(bool enable) { -#ifdef IUTF8 // XXX not a reasonable place to check it. +#if defined(IUTF8) // XXX not a reasonable place to check it. _utf8 = enable; if (pty()->masterFd() >= 0) { diff --git a/src/main.cpp b/src/main.cpp index c67d2a380..9cd176254 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -98,7 +98,7 @@ bool shouldUseNewProcess() QStringList qtProblematicOptions; qtProblematicOptions << "session" << "name" << "reverse" << "stylesheet" << "graphicssystem"; -#ifdef Q_WS_X11 +#if defined(Q_WS_X11) qtProblematicOptions << "display" << "visual"; #endif foreach(const QString& option, qtProblematicOptions) { @@ -111,7 +111,7 @@ bool shouldUseNewProcess() const KCmdLineArgs* kdeArgs = KCmdLineArgs::parsedArgs("kde"); QStringList kdeProblematicOptions; kdeProblematicOptions << "config" << "style"; -#ifdef Q_WS_X11 +#if defined(Q_WS_X11) kdeProblematicOptions << "waitforwm"; #endif foreach(const QString& option, kdeProblematicOptions) { diff --git a/src/tests/DBusTest.cpp b/src/tests/DBusTest.cpp index dbfdcd280..729df8bf3 100644 --- a/src/tests/DBusTest.cpp +++ b/src/tests/DBusTest.cpp @@ -53,7 +53,7 @@ void DBusTest::initTestCase() kFatal() << "Unable to exec a new Konsole : " << result; // Wait for above Konsole to finish starting -#ifdef HAVE_USLEEP +#if defined(HAVE_USLEEP) usleep(5 * 1000); #else sleep(5);