From 6131f79e4efe60c344547cf4448ec633f1972576 Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Fri, 22 Mar 2013 14:47:22 -0300 Subject: QNX: Code cleanup: normalize 'if' macro usage Always use "if defined" instead of "ifdef". The same is valid for "ifndef" macros Change-Id: I8e8f65e36dc636c10b3d656ce9a89ab3a664a80b Reviewed-by: Kevin Krammer Reviewed-by: Thomas McGuire --- src/plugins/platforms/qnx/qqnxabstractnavigator.cpp | 2 +- src/plugins/platforms/qnx/qqnxbpseventfilter.cpp | 2 +- src/plugins/platforms/qnx/qqnxbuffer.cpp | 2 +- src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp | 2 +- src/plugins/platforms/qnx/qqnxclipboard.cpp | 4 ++-- src/plugins/platforms/qnx/qqnxclipboard.h | 2 +- src/plugins/platforms/qnx/qqnxcursor.cpp | 4 ++-- src/plugins/platforms/qnx/qqnxcursor.h | 2 +- src/plugins/platforms/qnx/qqnxfiledialoghelper.cpp | 2 +- src/plugins/platforms/qnx/qqnxglcontext.cpp | 2 +- src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp | 4 ++-- src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp | 2 +- src/plugins/platforms/qnx/qqnxintegration.cpp | 2 +- src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp | 2 +- src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp | 2 +- src/plugins/platforms/qnx/qqnxnavigatorpps.cpp | 2 +- src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp | 2 +- src/plugins/platforms/qnx/qqnxrootwindow.cpp | 2 +- src/plugins/platforms/qnx/qqnxscreen.cpp | 2 +- src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp | 2 +- src/plugins/platforms/qnx/qqnxscreeneventthread.cpp | 2 +- src/plugins/platforms/qnx/qqnxtheme.cpp | 4 ++-- src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp | 2 +- src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp | 2 +- src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h | 6 +++--- src/plugins/platforms/qnx/qqnxwindow.cpp | 12 ++++++------ src/plugins/platforms/qnx/qqnxwindow.h | 8 ++++---- 27 files changed, 41 insertions(+), 41 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp b/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp index 08da98d690..5a94bff14e 100644 --- a/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp +++ b/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp @@ -44,7 +44,7 @@ #include #include -#ifdef QQNXNAVIGATOR_DEBUG +#if defined(QQNXNAVIGATOR_DEBUG) #define qNavigatorDebug qDebug #else #define qNavigatorDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp b/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp index 765853e392..d94d3c092a 100644 --- a/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp +++ b/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp @@ -53,7 +53,7 @@ #include #include -#ifdef QQNXBPSEVENTFILTER_DEBUG +#if defined(QQNXBPSEVENTFILTER_DEBUG) #define qBpsEventFilterDebug qDebug #else #define qBpsEventFilterDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxbuffer.cpp b/src/plugins/platforms/qnx/qqnxbuffer.cpp index 9007af7f70..c5e99a2001 100644 --- a/src/plugins/platforms/qnx/qqnxbuffer.cpp +++ b/src/plugins/platforms/qnx/qqnxbuffer.cpp @@ -46,7 +46,7 @@ #include #include -#ifdef QQNXBUFFER_DEBUG +#if defined(QQNXBUFFER_DEBUG) #define qBufferDebug qDebug #else #define qBufferDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp index 152b732556..2f531efd8b 100644 --- a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp +++ b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp @@ -49,7 +49,7 @@ #include #include -#ifdef QQNXBUTTON_DEBUG +#if defined(QQNXBUTTON_DEBUG) #define qButtonDebug qDebug #else #define qButtonDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxclipboard.cpp b/src/plugins/platforms/qnx/qqnxclipboard.cpp index 8286febd35..dfd1345eed 100644 --- a/src/plugins/platforms/qnx/qqnxclipboard.cpp +++ b/src/plugins/platforms/qnx/qqnxclipboard.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#ifndef QT_NO_CLIPBOARD +#if !defined(QT_NO_CLIPBOARD) #include "qqnxclipboard.h" @@ -53,7 +53,7 @@ #include #include -#ifdef QQNXCLIPBOARD_DEBUG +#if defined(QQNXCLIPBOARD_DEBUG) #define qClipboardDebug qDebug #else #define qClipboardDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxclipboard.h b/src/plugins/platforms/qnx/qqnxclipboard.h index e069355adc..561b57299e 100644 --- a/src/plugins/platforms/qnx/qqnxclipboard.h +++ b/src/plugins/platforms/qnx/qqnxclipboard.h @@ -44,7 +44,7 @@ #include -#ifndef QT_NO_CLIPBOARD +#if !defined(QT_NO_CLIPBOARD) #include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxcursor.cpp b/src/plugins/platforms/qnx/qqnxcursor.cpp index 4fdff666d7..3cf857bb27 100644 --- a/src/plugins/platforms/qnx/qqnxcursor.cpp +++ b/src/plugins/platforms/qnx/qqnxcursor.cpp @@ -43,7 +43,7 @@ #include -#ifdef QQNXCURSOR_DEBUG +#if defined(QQNXCURSOR_DEBUG) #define qCursorDebug qDebug #else #define qCursorDebug QT_NO_QDEBUG_MACRO @@ -55,7 +55,7 @@ QQnxCursor::QQnxCursor() { } -#ifndef QT_NO_CURSOR +#if !defined(QT_NO_CURSOR) void QQnxCursor::changeCursor(QCursor *windowCursor, QWindow *window) { Q_UNUSED(windowCursor); diff --git a/src/plugins/platforms/qnx/qqnxcursor.h b/src/plugins/platforms/qnx/qqnxcursor.h index 5d6a8b2c30..b62c299040 100644 --- a/src/plugins/platforms/qnx/qqnxcursor.h +++ b/src/plugins/platforms/qnx/qqnxcursor.h @@ -51,7 +51,7 @@ class QQnxCursor : public QPlatformCursor public: QQnxCursor(); -#ifndef QT_NO_CURSOR +#if !defined(QT_NO_CURSOR) void changeCursor(QCursor *windowCursor, QWindow *window); #endif void setPos(const QPoint &pos); diff --git a/src/plugins/platforms/qnx/qqnxfiledialoghelper.cpp b/src/plugins/platforms/qnx/qqnxfiledialoghelper.cpp index 79d7c7d9ca..0325a33268 100644 --- a/src/plugins/platforms/qnx/qqnxfiledialoghelper.cpp +++ b/src/plugins/platforms/qnx/qqnxfiledialoghelper.cpp @@ -51,7 +51,7 @@ #include #include -#ifdef QQNXFILEDIALOGHELPER_DEBUG +#if defined(QQNXFILEDIALOGHELPER_DEBUG) #define qFileDialogHelperDebug qDebug #else #define qFileDialogHelperDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp index 1c2ec23fa9..f77bb73614 100644 --- a/src/plugins/platforms/qnx/qqnxglcontext.cpp +++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp @@ -50,7 +50,7 @@ #include #include -#ifdef QQNXGLCONTEXT_DEBUG +#if defined(QQNXGLCONTEXT_DEBUG) #define qGLContextDebug qDebug #else #define qGLContextDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp index 0d8f430c73..97a361158e 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp +++ b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp @@ -61,13 +61,13 @@ #include #include -#ifdef QQNXINPUTCONTEXT_IMF_EVENT_DEBUG +#if defined(QQNXINPUTCONTEXT_IMF_EVENT_DEBUG) #define qInputContextIMFEventDebug qDebug #else #define qInputContextIMFEventDebug QT_NO_QDEBUG_MACRO #endif -#ifdef QQNXINPUTCONTEXT_DEBUG +#if defined(QQNXINPUTCONTEXT_DEBUG) #define qInputContextDebug qDebug #else #define qInputContextDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp b/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp index 71b925357a..f444d34b5e 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp +++ b/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp @@ -47,7 +47,7 @@ #include #include -#ifdef QQNXINPUTCONTEXT_DEBUG +#if defined(QQNXINPUTCONTEXT_DEBUG) #define qInputContextDebug qDebug #else #define qInputContextDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index 2d5c2e54e7..5ea4fef698 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -96,7 +96,7 @@ #include -#ifdef QQNXINTEGRATION_DEBUG +#if defined(QQNXINTEGRATION_DEBUG) #define qIntegrationDebug qDebug #else #define qIntegrationDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp index d561482b47..30dbb330d7 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp @@ -45,7 +45,7 @@ #include #include -#ifdef QQNXNAVIGATOREVENTHANDLER_DEBUG +#if defined(QQNXNAVIGATOREVENTHANDLER_DEBUG) #define qNavigatorEventHandlerDebug qDebug #else #define qNavigatorEventHandlerDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp index 9fa8294815..640944fb45 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp @@ -55,7 +55,7 @@ #include #include -#ifdef QQNXNAVIGATOREVENTNOTIFIER_DEBUG +#if defined(QQNXNAVIGATOREVENTNOTIFIER_DEBUG) #define qNavigatorEventNotifierDebug qDebug #else #define qNavigatorEventNotifierDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp index 92a94e0a39..1656ab029b 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp @@ -44,7 +44,7 @@ #include #include -#ifdef QQNXNAVIGATOR_DEBUG +#if defined(QQNXNAVIGATOR_DEBUG) #define qNavigatorDebug qDebug #else #define qNavigatorDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp index 47a72f173b..7204e5bce9 100644 --- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp +++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp @@ -46,7 +46,7 @@ #include -#ifdef QQNXRASTERBACKINGSTORE_DEBUG +#if defined(QQNXRASTERBACKINGSTORE_DEBUG) #define qRasterBackingStoreDebug qDebug #else #define qRasterBackingStoreDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxrootwindow.cpp b/src/plugins/platforms/qnx/qqnxrootwindow.cpp index b01d468647..198801a832 100644 --- a/src/plugins/platforms/qnx/qqnxrootwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxrootwindow.cpp @@ -46,7 +46,7 @@ #include #include -#ifdef QQNXROOTWINDOW_DEBUG +#if defined(QQNXROOTWINDOW_DEBUG) #define qRootWindowDebug qDebug #else #define qRootWindowDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp index f9efbde40c..7614abdc6a 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.cpp +++ b/src/plugins/platforms/qnx/qqnxscreen.cpp @@ -49,7 +49,7 @@ #include -#ifdef QQNXSCREEN_DEBUG +#if defined(QQNXSCREEN_DEBUG) #define qScreenDebug qDebug #else #define qScreenDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp index 2d3c7608bf..57cfdc5eb6 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp @@ -50,7 +50,7 @@ #include #include -#ifdef QQNXSCREENEVENT_DEBUG +#if defined(QQNXSCREENEVENT_DEBUG) #define qScreenEventDebug qDebug #else #define qScreenEventDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp b/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp index 8f262a7083..f3f660bc03 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp @@ -49,7 +49,7 @@ #include -#ifdef QQNXSCREENEVENTTHREAD_DEBUG +#if defined(QQNXSCREENEVENTTHREAD_DEBUG) #define qScreenEventThreadDebug qDebug #else #define qScreenEventThreadDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxtheme.cpp b/src/plugins/platforms/qnx/qqnxtheme.cpp index e8e9e39388..733b7223b6 100644 --- a/src/plugins/platforms/qnx/qqnxtheme.cpp +++ b/src/plugins/platforms/qnx/qqnxtheme.cpp @@ -80,10 +80,10 @@ QPlatformDialogHelper *QQnxTheme::createPlatformDialogHelper(DialogType type) co case QPlatformTheme::FileDialog: return new QQnxFileDialogHelper(m_integration); #endif -#ifndef QT_NO_COLORDIALOG +#if !defined(QT_NO_COLORDIALOG) case QPlatformTheme::ColorDialog: #endif -#ifndef QT_NO_FONTDIALOG +#if !defined(QT_NO_FONTDIALOG) case QPlatformTheme::FontDialog: #endif default: diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp index 3d2f49aa6c..11eb4a5082 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp @@ -47,7 +47,7 @@ #include #include -#ifdef QQNXVIRTUALKEYBOARD_DEBUG +#if defined(QQNXVIRTUALKEYBOARD_DEBUG) #define qVirtualKeyboardDebug qDebug #else #define qVirtualKeyboardDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp index ab912927bb..e810b47c22 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp @@ -56,7 +56,7 @@ #include #include -#ifdef QQNXVIRTUALKEYBOARD_DEBUG +#if defined(QQNXVIRTUALKEYBOARD_DEBUG) #define qVirtualKeyboardDebug qDebug #else #define qVirtualKeyboardDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h index eb41b2efd0..6048868b08 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef VIRTUALKEYBOARDPPS_H_ -#define VIRTUALKEYBOARDPPS_H_ +#ifndef VIRTUALKEYBOARDPPS_H +#define VIRTUALKEYBOARDPPS_H #include "qqnxabstractvirtualkeyboard.h" @@ -97,4 +97,4 @@ private: static const size_t ms_bufferSize; }; -#endif /* VIRTUALKEYBOARDPPS_H_ */ +#endif // VIRTUALKEYBOARDPPS_H diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 51435a1e55..f1bebee9b2 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qqnxwindow.h" -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) #include "qqnxglcontext.h" #endif #include "qqnxintegration.h" @@ -53,12 +53,12 @@ #include -#ifdef Q_OS_BLACKBERRY +#if defined(Q_OS_BLACKBERRY) #include #include #endif -#ifdef QQNXWINDOW_DEBUG +#if defined(QQNXWINDOW_DEBUG) #define qWindowDebug qDebug #else #define qWindowDebug QT_NO_QDEBUG_MACRO @@ -72,7 +72,7 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context) m_window(0), m_currentBufferIndex(-1), m_previousBufferIndex(-1), -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) m_platformOpenGLContext(0), #endif m_screen(0), @@ -353,7 +353,7 @@ void QQnxWindow::setBufferSize(const QSize &size) // Create window buffers if they do not exist if (m_bufferSize.isEmpty()) { -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) // Get pixel format from EGL config if using OpenGL; // otherwise inherit pixel format of window's screen if (m_platformOpenGLContext != 0) { @@ -666,7 +666,7 @@ void QQnxWindow::gainedFocus() QWindowSystemInterface::handleWindowActivated(window()); } -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) void QQnxWindow::setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext) { // This function does not take ownership of the platform gl context. diff --git a/src/plugins/platforms/qnx/qqnxwindow.h b/src/plugins/platforms/qnx/qqnxwindow.h index ad136227e3..4a327fd54b 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.h +++ b/src/plugins/platforms/qnx/qqnxwindow.h @@ -49,7 +49,7 @@ #include #include -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) #include #endif @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE // all surfaces double buffered #define MAX_BUFFER_COUNT 2 -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) class QQnxGLContext; #endif class QQnxScreen; @@ -108,7 +108,7 @@ public: QQnxScreen *screen() const { return m_screen; } const QList& children() const { return m_childWindows; } -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) void setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext); QQnxGLContext *platformOpenGLContext() const { return m_platformOpenGLContext; } #endif @@ -144,7 +144,7 @@ private: QRegion m_previousDirty; QRegion m_scrolled; -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) QQnxGLContext *m_platformOpenGLContext; #endif QQnxScreen *m_screen; -- cgit v1.2.3