Windows: Fix compilation with -qtnamespace

Change-Id: Ib006d74299d65e5872a5a524eaa937e127306ec7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Kai Koehne 2012-01-30 11:26:27 +01:00 committed by Qt by Nokia
parent ef63b7befd
commit 20beb5ff53
11 changed files with 38 additions and 13 deletions

View File

@ -42,14 +42,14 @@
#include "qelapsedtimer.h"
#include <windows.h>
// Result of QueryPerformanceFrequency, 0 indicates that the high resolution timer is unavailable
static quint64 counterFrequency = 0;
typedef ULONGLONG (WINAPI *PtrGetTickCount64)(void);
static PtrGetTickCount64 ptrGetTickCount64 = 0;
QT_BEGIN_NAMESPACE
// Result of QueryPerformanceFrequency, 0 indicates that the high resolution timer is unavailable
static quint64 counterFrequency = 0;
static void resolveLibs()
{
static bool done = false;

View File

@ -205,6 +205,8 @@ HB_Error QFreetypeFace::getPointInOutline(HB_Glyph glyph, int flags, hb_uint32 p
return HB_Err_Ok;
}
extern QByteArray qt_fontdata_from_index(int);
/*
* One font file can contain more than one font (bold/italic for example)
* find the right one and return it.
@ -232,7 +234,6 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
QFile file(QString::fromUtf8(face_id.filename));
if (face_id.filename.startsWith(":qmemoryfonts/")) {
// from qfontdatabase.cpp
extern QByteArray qt_fontdata_from_index(int);
QByteArray idx = face_id.filename;
idx.remove(0, 14); // remove ':qmemoryfonts/'
bool ok = false;

View File

@ -56,6 +56,8 @@
#include <ft2build.h>
#include FT_TRUETYPE_TABLES_H
QT_BEGIN_NAMESPACE
#define SimplifiedChineseCsbBit 18
#define TraditionalChineseCsbBit 20
#define JapaneseCsbBit 17
@ -322,9 +324,10 @@ void QBasicFontDatabase::releaseHandle(void *handle)
delete file;
}
extern FT_Library qt_getFreetype();
QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByteArray &file)
{
extern FT_Library qt_getFreetype();
FT_Library library = qt_getFreetype();
int index = 0;
@ -425,3 +428,5 @@ QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByt
} while (index < numFaces);
return families;
}
QT_END_NAMESPACE

View File

@ -46,6 +46,8 @@
#include <QtCore/QByteArray>
#include <QtCore/QString>
QT_BEGIN_NAMESPACE
struct FontFile
{
QString fileName;
@ -66,4 +68,6 @@ public:
static QSupportedWritingSystems determineWritingSystemsFromTrueTypeBits(quint32 unicodeRange[4], quint32 codePageRange[2]);
};
QT_END_NAMESPACE
#endif // QBASICFONTDATABASE_H

View File

@ -45,6 +45,9 @@
#include "qtwindowsglobal.h"
#include <QtGui/QPlatformAccessibility>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
class QWindowsAccessibility : public QPlatformAccessibility
{
public:
@ -58,4 +61,7 @@ public:
*/
};
QT_END_NAMESPACE
QT_END_HEADER
#endif // QWINDOWSACCESSIBILITY_H

View File

@ -89,8 +89,6 @@ QT_BEGIN_NAMESPACE
// common DC for all fonts
QT_BEGIN_NAMESPACE
typedef BOOL (WINAPI *PtrGetCharWidthI)(HDC, UINT, UINT, LPWORD, LPINT);
static PtrGetCharWidthI ptrGetCharWidthI = 0;
static bool resolvedGetCharWidthI = false;

View File

@ -159,10 +159,10 @@ QWindowsScreen::QWindowsScreen(const QWindowsScreenData &data) :
{
}
Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0);
QPixmap QWindowsScreen::grabWindow(WId window, int x, int y, int width, int height) const
{
Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0);
if (QWindowsContext::verboseIntegration)
qDebug() << __FUNCTION__ << window << x << y << width << height;
RECT r;

View File

@ -47,6 +47,8 @@
#include <private/qpaintengine_alpha_p.h>
#include <private/qprinterinfo_p.h>
QT_BEGIN_NAMESPACE
QWindowsPrinterSupport::QWindowsPrinterSupport()
: QPlatformPrinterSupport()
{
@ -100,3 +102,5 @@ QList<QPrinterInfo> QWindowsPrinterSupport::availablePrinters()
{
return mPrinterList;
}
QT_END_NAMESPACE

View File

@ -45,6 +45,8 @@
#include <QtCore/QList>
#include <QtPrintSupport/QPlatformPrinterSupport>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
class QWin32PrintEngine;
@ -65,4 +67,7 @@ private:
QPrinter::PrinterMode mCurrentMode;
};
QT_END_NAMESPACE
QT_END_HEADER
#endif // WINDOWSPRINTERSUPPORT_H

View File

@ -318,10 +318,10 @@ bool QVistaHelper::setDWMTitleBar(TitleBarChangeType type)
return value;
}
Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &);
void QVistaHelper::drawTitleBar(QPainter *painter)
{
Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &);
Q_ASSERT(backButton_);
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
QBackingStore *backingStore = backButton_->backingStore();

View File

@ -52,8 +52,6 @@
# include <commctrl.h>
# include <objbase.h>
Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon);
#elif defined(Q_WS_MAC)
# include <private/qt_cocoa_helpers_mac_p.h>
#endif
@ -73,6 +71,10 @@ Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon);
QT_BEGIN_NAMESPACE
#if defined (Q_OS_WIN)
Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon);
#endif
/*!
\class QFileIconProvider