[go: up one dir, main page]

Skip to content

Commit

Permalink
Define QT_WA if using Qt 5
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
net147 authored and Friedemann Kleint committed Dec 29, 2012
1 parent fe5a989 commit 7085546
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qtbrowserplugin/src/qtbrowserplugin_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions qtlockedfile/src/qtlockedfile_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions qtsingleapplication/src/qtlockedfile_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
4 changes: 4 additions & 0 deletions qtwinmigrate/src/qmfcapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions qtwinmigrate/src/qwinhost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions qtwinmigrate/src/qwinwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7085546

Please sign in to comment.