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 <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
This commit is contained in:
Rafael Roquetto 2013-03-22 14:47:22 -03:00 committed by The Qt Project
parent 17159b4500
commit 6131f79e4e
27 changed files with 41 additions and 41 deletions

View File

@ -44,7 +44,7 @@
#include <QDebug>
#include <QUrl>
#ifdef QQNXNAVIGATOR_DEBUG
#if defined(QQNXNAVIGATOR_DEBUG)
#define qNavigatorDebug qDebug
#else
#define qNavigatorDebug QT_NO_QDEBUG_MACRO

View File

@ -53,7 +53,7 @@
#include <bps/navigator.h>
#include <bps/screen.h>
#ifdef QQNXBPSEVENTFILTER_DEBUG
#if defined(QQNXBPSEVENTFILTER_DEBUG)
#define qBpsEventFilterDebug qDebug
#else
#define qBpsEventFilterDebug QT_NO_QDEBUG_MACRO

View File

@ -46,7 +46,7 @@
#include <errno.h>
#include <sys/mman.h>
#ifdef QQNXBUFFER_DEBUG
#if defined(QQNXBUFFER_DEBUG)
#define qBufferDebug qDebug
#else
#define qBufferDebug QT_NO_QDEBUG_MACRO

View File

@ -49,7 +49,7 @@
#include <QtCore/QSocketNotifier>
#include <QtCore/private/qcore_unix_p.h>
#ifdef QQNXBUTTON_DEBUG
#if defined(QQNXBUTTON_DEBUG)
#define qButtonDebug qDebug
#else
#define qButtonDebug QT_NO_QDEBUG_MACRO

View File

@ -39,7 +39,7 @@
**
****************************************************************************/
#ifndef QT_NO_CLIPBOARD
#if !defined(QT_NO_CLIPBOARD)
#include "qqnxclipboard.h"
@ -53,7 +53,7 @@
#include <clipboard/clipboard.h>
#include <errno.h>
#ifdef QQNXCLIPBOARD_DEBUG
#if defined(QQNXCLIPBOARD_DEBUG)
#define qClipboardDebug qDebug
#else
#define qClipboardDebug QT_NO_QDEBUG_MACRO

View File

@ -44,7 +44,7 @@
#include <QtCore/qglobal.h>
#ifndef QT_NO_CLIPBOARD
#if !defined(QT_NO_CLIPBOARD)
#include <qpa/qplatformclipboard.h>
QT_BEGIN_NAMESPACE

View File

@ -43,7 +43,7 @@
#include <QtCore/QDebug>
#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);

View File

@ -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);

View File

@ -51,7 +51,7 @@
#include <QTimer>
#include <QWindow>
#ifdef QQNXFILEDIALOGHELPER_DEBUG
#if defined(QQNXFILEDIALOGHELPER_DEBUG)
#define qFileDialogHelperDebug qDebug
#else
#define qFileDialogHelperDebug QT_NO_QDEBUG_MACRO

View File

@ -50,7 +50,7 @@
#include <QtGui/QOpenGLContext>
#include <QtGui/QScreen>
#ifdef QQNXGLCONTEXT_DEBUG
#if defined(QQNXGLCONTEXT_DEBUG)
#define qGLContextDebug qDebug
#else
#define qGLContextDebug QT_NO_QDEBUG_MACRO

View File

@ -61,13 +61,13 @@
#include <process.h>
#include <sys/keycodes.h>
#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

View File

@ -47,7 +47,7 @@
#include <QtCore/QDebug>
#include <QtGui/QGuiApplication>
#ifdef QQNXINPUTCONTEXT_DEBUG
#if defined(QQNXINPUTCONTEXT_DEBUG)
#define qInputContextDebug qDebug
#else
#define qInputContextDebug QT_NO_QDEBUG_MACRO

View File

@ -96,7 +96,7 @@
#include <errno.h>
#ifdef QQNXINTEGRATION_DEBUG
#if defined(QQNXINTEGRATION_DEBUG)
#define qIntegrationDebug qDebug
#else
#define qIntegrationDebug QT_NO_QDEBUG_MACRO

View File

@ -45,7 +45,7 @@
#include <QGuiApplication>
#include <qpa/qwindowsysteminterface.h>
#ifdef QQNXNAVIGATOREVENTHANDLER_DEBUG
#if defined(QQNXNAVIGATOREVENTHANDLER_DEBUG)
#define qNavigatorEventHandlerDebug qDebug
#else
#define qNavigatorEventHandlerDebug QT_NO_QDEBUG_MACRO

View File

@ -55,7 +55,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifdef QQNXNAVIGATOREVENTNOTIFIER_DEBUG
#if defined(QQNXNAVIGATOREVENTNOTIFIER_DEBUG)
#define qNavigatorEventNotifierDebug qDebug
#else
#define qNavigatorEventNotifierDebug QT_NO_QDEBUG_MACRO

View File

@ -44,7 +44,7 @@
#include <QDebug>
#include <private/qcore_unix_p.h>
#ifdef QQNXNAVIGATOR_DEBUG
#if defined(QQNXNAVIGATOR_DEBUG)
#define qNavigatorDebug qDebug
#else
#define qNavigatorDebug QT_NO_QDEBUG_MACRO

View File

@ -46,7 +46,7 @@
#include <errno.h>
#ifdef QQNXRASTERBACKINGSTORE_DEBUG
#if defined(QQNXRASTERBACKINGSTORE_DEBUG)
#define qRasterBackingStoreDebug qDebug
#else
#define qRasterBackingStoreDebug QT_NO_QDEBUG_MACRO

View File

@ -46,7 +46,7 @@
#include <QtCore/QUuid>
#include <QtCore/QDebug>
#ifdef QQNXROOTWINDOW_DEBUG
#if defined(QQNXROOTWINDOW_DEBUG)
#define qRootWindowDebug qDebug
#else
#define qRootWindowDebug QT_NO_QDEBUG_MACRO

View File

@ -49,7 +49,7 @@
#include <errno.h>
#ifdef QQNXSCREEN_DEBUG
#if defined(QQNXSCREEN_DEBUG)
#define qScreenDebug qDebug
#else
#define qScreenDebug QT_NO_QDEBUG_MACRO

View File

@ -50,7 +50,7 @@
#include <errno.h>
#include <sys/keycodes.h>
#ifdef QQNXSCREENEVENT_DEBUG
#if defined(QQNXSCREENEVENT_DEBUG)
#define qScreenEventDebug qDebug
#else
#define qScreenEventDebug QT_NO_QDEBUG_MACRO

View File

@ -49,7 +49,7 @@
#include <cctype>
#ifdef QQNXSCREENEVENTTHREAD_DEBUG
#if defined(QQNXSCREENEVENTTHREAD_DEBUG)
#define qScreenEventThreadDebug qDebug
#else
#define qScreenEventThreadDebug QT_NO_QDEBUG_MACRO

View File

@ -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:

View File

@ -47,7 +47,7 @@
#include <bps/locale.h>
#include <bps/virtualkeyboard.h>
#ifdef QQNXVIRTUALKEYBOARD_DEBUG
#if defined(QQNXVIRTUALKEYBOARD_DEBUG)
#define qVirtualKeyboardDebug qDebug
#else
#define qVirtualKeyboardDebug QT_NO_QDEBUG_MACRO

View File

@ -56,7 +56,7 @@
#include <sys/types.h>
#include <unistd.h>
#ifdef QQNXVIRTUALKEYBOARD_DEBUG
#if defined(QQNXVIRTUALKEYBOARD_DEBUG)
#define qVirtualKeyboardDebug qDebug
#else
#define qVirtualKeyboardDebug QT_NO_QDEBUG_MACRO

View File

@ -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

View File

@ -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 <errno.h>
#ifdef Q_OS_BLACKBERRY
#if defined(Q_OS_BLACKBERRY)
#include <sys/pps.h>
#include <bps/navigator.h>
#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.

View File

@ -49,7 +49,7 @@
#include <QtGui/QImage>
#include <QtCore/QMutex>
#ifndef QT_NO_OPENGL
#if !defined(QT_NO_OPENGL)
#include <EGL/egl.h>
#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<QQnxWindow*>& 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;