diff options
author | Jonathan Liu <net147@gmail.com> | 2012-12-29 12:18:09 +1100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-12-29 20:21:19 +0100 |
commit | 70855469ce1fe82e1bba6b88d32a97081a70d7d1 (patch) | |
tree | e8acd58272a13084415d9d14e93ce633aa33df7e | |
parent | fe5a989b5c972e83a3545ba2aaac07bd2de539aa (diff) |
Define QT_WA if using Qt 5
Qt 5 always uses Unicode so define QT_WA to always select the Unicode
path if using Qt 5.
Change-Id: Ib0f0f403180442278728201c64cc79c284e2cb93
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r-- | qtbrowserplugin/src/qtbrowserplugin_win.cpp | 4 | ||||
-rw-r--r-- | qtlockedfile/src/qtlockedfile_win.cpp | 4 | ||||
-rw-r--r-- | qtsingleapplication/src/qtlockedfile_win.cpp | 4 | ||||
-rw-r--r-- | qtwinmigrate/src/qmfcapp.cpp | 4 | ||||
-rw-r--r-- | qtwinmigrate/src/qwinhost.cpp | 4 | ||||
-rw-r--r-- | qtwinmigrate/src/qwinwidget.cpp | 4 |
6 files changed, 24 insertions, 0 deletions
diff --git a/qtbrowserplugin/src/qtbrowserplugin_win.cpp b/qtbrowserplugin/src/qtbrowserplugin_win.cpp index 5aa5709..2cffa6a 100644 --- a/qtbrowserplugin/src/qtbrowserplugin_win.cpp +++ b/qtbrowserplugin/src/qtbrowserplugin_win.cpp @@ -46,6 +46,10 @@ #include <windows.h> #include "qtnpapi.h" +#if QT_VERSION >= 0x050000 +#define QT_WA(unicode, ansi) unicode +#endif + static HHOOK hhook = 0; static bool ownsqapp = false; Q_GUI_EXPORT int qt_translateKeyCode(int); diff --git a/qtlockedfile/src/qtlockedfile_win.cpp b/qtlockedfile/src/qtlockedfile_win.cpp index d9bcd44..e9c9904 100644 --- a/qtlockedfile/src/qtlockedfile_win.cpp +++ b/qtlockedfile/src/qtlockedfile_win.cpp @@ -42,6 +42,10 @@ #include <qt_windows.h> #include <QFileInfo> +#if QT_VERSION >= 0x050000 +#define QT_WA(unicode, ansi) unicode +#endif + #define MUTEX_PREFIX "QtLockedFile mutex " // Maximum number of concurrent read locks. Must not be greater than MAXIMUM_WAIT_OBJECTS #define MAX_READERS MAXIMUM_WAIT_OBJECTS diff --git a/qtsingleapplication/src/qtlockedfile_win.cpp b/qtsingleapplication/src/qtlockedfile_win.cpp index d9bcd44..2300ae6 100644 --- a/qtsingleapplication/src/qtlockedfile_win.cpp +++ b/qtsingleapplication/src/qtlockedfile_win.cpp @@ -46,6 +46,10 @@ // Maximum number of concurrent read locks. Must not be greater than MAXIMUM_WAIT_OBJECTS #define MAX_READERS MAXIMUM_WAIT_OBJECTS +#if QT_VERSION >= 0x050000 +#define QT_WA(unicode, ansi) unicode +#endif + Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate) { if (mutexname.isEmpty()) { diff --git a/qtwinmigrate/src/qmfcapp.cpp b/qtwinmigrate/src/qmfcapp.cpp index 8bdd263..5ec52bd 100644 --- a/qtwinmigrate/src/qmfcapp.cpp +++ b/qtwinmigrate/src/qmfcapp.cpp @@ -66,6 +66,10 @@ char **QMfcApp::mfc_argv = 0; int QMfcApp::mfc_argc = 0; #endif +#if QT_VERSION >= 0x050000 +#define QT_WA(unicode, ansi) unicode +#endif + /*! \class QMfcApp qmfcapp.h \brief The QMfcApp class provides merging of the MFC and Qt event loops. diff --git a/qtwinmigrate/src/qwinhost.cpp b/qtwinmigrate/src/qwinhost.cpp index f521dcf..fc2082d 100644 --- a/qtwinmigrate/src/qwinhost.cpp +++ b/qtwinmigrate/src/qwinhost.cpp @@ -49,6 +49,10 @@ #include <QEvent> #include <qt_windows.h> +#if QT_VERSION >= 0x050000 +#define QT_WA(unicode, ansi) unicode +#endif + /*! \class QWinHost qwinhost.h \brief The QWinHost class provides an API to use native Win32 diff --git a/qtwinmigrate/src/qwinwidget.cpp b/qtwinmigrate/src/qwinwidget.cpp index 0dd54d1..a3786b4 100644 --- a/qtwinmigrate/src/qwinwidget.cpp +++ b/qtwinmigrate/src/qwinwidget.cpp @@ -60,6 +60,10 @@ #include <qt_windows.h> +#if QT_VERSION >= 0x050000 +#define QT_WA(unicode, ansi) unicode +#endif + /*! \class QWinWidget qwinwidget.h \brief The QWinWidget class is a Qt widget that can be child of a |