summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/egl/egl.pri24
-rw-r--r--src/gui/egl/qegl_stub.cpp1
-rw-r--r--src/gui/egl/qeglproperties_stub.cpp7
-rw-r--r--src/gui/image/qimage.cpp6
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
-rw-r--r--src/gui/kernel/qkeymapper_p.h63
-rw-r--r--src/gui/painting/qmemrotate_p.h16
-rw-r--r--src/gui/painting/qpaintengine.h3
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h2
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp3
-rw-r--r--src/gui/text/qfontdatabase.cpp4
-rw-r--r--src/gui/text/qfontsubset.cpp27
-rw-r--r--src/gui/text/qlinecontrol.cpp10
-rw-r--r--src/gui/text/qtextlayout.cpp21
-rw-r--r--src/gui/text/text.pri117
15 files changed, 28 insertions, 279 deletions
diff --git a/src/gui/egl/egl.pri b/src/gui/egl/egl.pri
index ec23da3312..b13c43e371 100644
--- a/src/gui/egl/egl.pri
+++ b/src/gui/egl/egl.pri
@@ -24,19 +24,13 @@ contains(QT_CONFIG, egl): {
wince*: SOURCES += egl/qegl_wince.cpp
- unix {
- qpa {
- SOURCES += egl/qegl_qpa.cpp
- } else {
- symbian {
- SOURCES += egl/qegl_symbian.cpp
- } else {
- SOURCES += egl/qegl_x11.cpp
- }
- }
- }
-} else:symbian {
- DEFINES += QT_NO_EGL
- SOURCES += egl/qegl_stub.cpp
- SOURCES += egl/qeglproperties_stub.cpp
+ symbian {
+ SOURCES += egl/qegl_symbian.cpp
+ } else {
+ SOURCES += egl/qegl_qpa.cpp
+ }
+} else:symbian: {
+ DEFINES += QT_NO_EGL
+ SOURCES += egl/qegl_stub.cpp
+ SOURCES += egl/qeglproperties_stub.cpp
}
diff --git a/src/gui/egl/qegl_stub.cpp b/src/gui/egl/qegl_stub.cpp
index b86f4dc2c0..783393c148 100644
--- a/src/gui/egl/qegl_stub.cpp
+++ b/src/gui/egl/qegl_stub.cpp
@@ -41,7 +41,6 @@
#include <QtGui/qpaintdevice.h>
#include <QtGui/qpixmap.h>
-#include <QtGui/qwidget.h>
#include <QtCore/qdebug.h>
#include "qegl_p.h"
diff --git a/src/gui/egl/qeglproperties_stub.cpp b/src/gui/egl/qeglproperties_stub.cpp
index c129266e46..c04f6a1070 100644
--- a/src/gui/egl/qeglproperties_stub.cpp
+++ b/src/gui/egl/qeglproperties_stub.cpp
@@ -123,13 +123,6 @@ bool QEglProperties::reduceConfiguration()
return false;
}
-static void addTag(QString& str, const QString& tag)
-{
- Q_UNUSED(str)
- Q_UNUSED(tag)
- NOEGL
-}
-
// Convert a property list to a string suitable for debug output.
QString QEglProperties::toString() const
{
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 2a6b22c2d1..c74b715f8d 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2879,7 +2879,7 @@ CONVERT_DECL(quint32, qrgb666)
CONVERT_DECL(qargb6666, quint32)
CONVERT_DECL(quint32, qargb6666)
CONVERT_DECL(qrgb555, quint32)
-#if !defined(Q_WS_QWS) || (defined(QT_QWS_DEPTH_15) && defined(QT_QWS_DEPTH_16))
+#if (defined(QT_QWS_DEPTH_15) && defined(QT_QWS_DEPTH_16))
CONVERT_DECL(quint16, qrgb555)
CONVERT_DECL(qrgb555, quint16)
#endif
@@ -3046,7 +3046,7 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
-#if !defined(Q_WS_QWS) || (defined(QT_QWS_DEPTH_15) && defined(QT_QWS_DEPTH_16))
+#if defined(QT_QWS_DEPTH_15) && defined(QT_QWS_DEPTH_16)
CONVERT_PTR(qrgb555, quint16),
#else
0,
@@ -3122,7 +3122,7 @@ static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormat
CONVERT_PTR(quint32, qrgb555),
CONVERT_PTR(quint32, qrgb555),
CONVERT_PTR(quint32, qrgb555),
-#if !defined(Q_WS_QWS) || (defined(QT_QWS_DEPTH_15) && defined(QT_QWS_DEPTH_16))
+#if defined(QT_QWS_DEPTH_15) && defined(QT_QWS_DEPTH_16)
CONVERT_PTR(quint16, qrgb555),
#else
0,
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index ee32924f11..e8fa22232e 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1323,9 +1323,8 @@ uint QGuiApplicationPrivate::currentKeyPlatform()
uint platform = KB_Win;
#ifdef Q_OS_MAC
platform = KB_Mac;
-#elif defined Q_WS_X11
+#elif defined Q_WS_X11 // ## TODO: detect these
platform = KB_X11;
- // ## TODO: detect these
#if 0
if (X11->desktopEnvironment == DE_KDE)
platform |= KB_KDE;
diff --git a/src/gui/kernel/qkeymapper_p.h b/src/gui/kernel/qkeymapper_p.h
index 95dd624164..1fada6f59a 100644
--- a/src/gui/kernel/qkeymapper_p.h
+++ b/src/gui/kernel/qkeymapper_p.h
@@ -81,59 +81,9 @@ private:
Q_DISABLE_COPY(QKeyMapper)
};
-
-
-#if defined(Q_OS_WIN)
-enum WindowsNativeModifiers {
- ShiftLeft = 0x00000001,
- ControlLeft = 0x00000002,
- AltLeft = 0x00000004,
- MetaLeft = 0x00000008,
- ShiftRight = 0x00000010,
- ControlRight = 0x00000020,
- AltRight = 0x00000040,
- MetaRight = 0x00000080,
- CapsLock = 0x00000100,
- NumLock = 0x00000200,
- ScrollLock = 0x00000400,
- ExtendedKey = 0x01000000,
-
- // Convenience mappings
- ShiftAny = 0x00000011,
- ControlAny = 0x00000022,
- AltAny = 0x00000044,
- MetaAny = 0x00000088,
- LockAny = 0x00000700
-};
-# if !defined(tagMSG)
- typedef struct tagMSG MSG;
-# endif
-#elif defined(Q_WS_MAC)
-QT_BEGIN_INCLUDE_NAMESPACE
-# include <private/qt_mac_p.h>
-QT_END_INCLUDE_NAMESPACE
-#elif defined(Q_WS_X11)
-
-QT_BEGIN_INCLUDE_NAMESPACE
-typedef ulong XID;
-typedef XID KeySym;
-QT_END_INCLUDE_NAMESPACE
-
-struct QXCoreDesc {
- int min_keycode;
- int max_keycode;
- int keysyms_per_keycode;
- KeySym *keysyms;
- uchar mode_switch;
- uchar num_lock;
- KeySym lock_meaning;
-};
-
-#endif
-
struct KeyboardLayoutItem;
-typedef struct __TISInputSource * TISInputSourceRef;
class QKeyEvent;
+
class QKeyMapperPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QKeyMapper)
@@ -146,17 +96,6 @@ public:
QLocale keyboardInputLocale;
Qt::LayoutDirection keyboardInputDirection;
-
-#if defined(Q_OS_WIN)
- void clearRecordedKeys();
- void updateKeyMap(const MSG &msg);
- bool translateKeyEvent(QWidget *receiver, const MSG &msg, bool grab);
- void updatePossibleKeyCodes(unsigned char *kbdBuffer, quint32 scancode, quint32 vk_key);
- bool isADeadKey(unsigned int vk_key, unsigned int modifiers);
- void deleteLayouts();
-
- KeyboardLayoutItem *keyLayout[256];
-#endif // defined(Q_OS_WIN)
};
QKeyMapperPrivate *qt_keymapper_private(); // from qkeymapper.cpp
diff --git a/src/gui/painting/qmemrotate_p.h b/src/gui/painting/qmemrotate_p.h
index 84b0b01846..a8c2c6bfbd 100644
--- a/src/gui/painting/qmemrotate_p.h
+++ b/src/gui/painting/qmemrotate_p.h
@@ -70,20 +70,14 @@ QT_BEGIN_NAMESPACE
#endif
#endif
-#if defined(Q_WS_QWS) || defined(Q_WS_QPA) && defined(Q_OS_WIN)
-#define Q_GUI_QWS_EXPORT Q_GUI_EXPORT
-#else
-#define Q_GUI_QWS_EXPORT
-#endif
-
#define QT_DECL_MEMROTATE(srctype, desttype) \
- void Q_GUI_QWS_EXPORT qt_memrotate90(const srctype*, int, int, int, desttype*, int); \
- void Q_GUI_QWS_EXPORT qt_memrotate180(const srctype*, int, int, int, desttype*, int); \
- void Q_GUI_QWS_EXPORT qt_memrotate270(const srctype*, int, int, int, desttype*, int)
+ void Q_GUI_EXPORT qt_memrotate90(const srctype*, int, int, int, desttype*, int); \
+ void Q_GUI_EXPORT qt_memrotate180(const srctype*, int, int, int, desttype*, int); \
+ void Q_GUI_EXPORT qt_memrotate270(const srctype*, int, int, int, desttype*, int)
void Q_GUI_EXPORT qt_memrotate90(const quint32*, int, int, int, quint32*, int);
-void Q_GUI_QWS_EXPORT qt_memrotate180(const quint32*, int, int, int, quint32*, int);
-void Q_GUI_QWS_EXPORT qt_memrotate270(const quint32*, int, int, int, quint32*, int);
+void Q_GUI_EXPORT qt_memrotate180(const quint32*, int, int, int, quint32*, int);
+void Q_GUI_EXPORT qt_memrotate270(const quint32*, int, int, int, quint32*, int);
QT_DECL_MEMROTATE(quint32, quint16);
QT_DECL_MEMROTATE(quint16, quint32);
diff --git a/src/gui/painting/qpaintengine.h b/src/gui/painting/qpaintengine.h
index 28c2942930..5d5424dfae 100644
--- a/src/gui/painting/qpaintengine.h
+++ b/src/gui/painting/qpaintengine.h
@@ -250,9 +250,6 @@ private:
friend class QFontEngineBox;
friend class QFontEngineMac;
friend class QFontEngineWin;
-#ifndef QT_NO_FREETYPE
- friend class QFontEngineFT;
-#endif
#ifndef QT_NO_QWS_QPF
friend class QFontEngineQPF1;
#endif
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index 6e71e9986a..d9cc428337 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -324,8 +324,6 @@ public:
#if defined (Q_OS_WIN)
HDC hdc;
-#elif defined(Q_WS_MAC)
- CGContextRef cgContext;
#endif
QRect deviceRect;
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index b56f6b42e4..5876f3bf93 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -42,10 +42,9 @@
#include <qmath.h>
#include "qtextureglyphcache_p.h"
-
+#include "private/qfontengine_p.h"
#include "private/qnumeric_p.h"
#include "private/qnativeimage_p.h"
-#include "private/qfontengine_ft_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 740cd4c52c..52cfb8a54e 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -556,9 +556,7 @@ public:
HANDLE handle;
bool memoryFont;
QVector<FONTSIGNATURE> signatures;
-#elif defined(Q_WS_MAC)
- ATSFontContainerRef handle;
-#elif defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
+#elif defined(Q_OS_SYMBIAN)
QString temporaryFileName;
TInt screenDeviceFontFileId;
TUid fontStoreFontFileUid;
diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp
index cf707fe78f..de945e129b 100644
--- a/src/gui/text/qfontsubset.cpp
+++ b/src/gui/text/qfontsubset.cpp
@@ -45,12 +45,6 @@
#include "private/qpdf_p.h"
#include "private/qfunctions_p.h"
-
-#ifndef QT_NO_FREETYPE
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#endif
-
QT_BEGIN_NAMESPACE
static const char * const agl =
@@ -276,13 +270,6 @@ QByteArray QFontSubset::glyphName(unsigned short unicode, bool symbol)
return buffer;
}
-#ifndef QT_NO_FREETYPE
-static FT_Face ft_face(const QFontEngine *engine)
-{
- return 0;
-}
-#endif
-
QByteArray QFontSubset::glyphName(unsigned int glyph, const QVector<int> reverseMap) const
{
uint glyphIndex = glyph_indices[glyph];
@@ -292,20 +279,6 @@ QByteArray QFontSubset::glyphName(unsigned int glyph, const QVector<int> reverse
QByteArray ba;
QPdf::ByteStream s(&ba);
-#ifndef QT_NO_FREETYPE
- FT_Face face = ft_face(fontEngine);
-
- char name[32];
- name[0] = 0;
- if (face && FT_HAS_GLYPH_NAMES(face)) {
- FT_Get_Glyph_Name(face, glyphIndex, &name, 32);
- if (name[0] == '.') // fix broken PS fonts returning .notdef for many glyphs
- name[0] = 0;
- }
- if (name[0]) {
- s << '/' << name;
- } else
-#endif
if (reverseMap[glyphIndex] && reverseMap[glyphIndex] < 0x10000) {
s << '/' << glyphName(reverseMap[glyphIndex], false);
} else {
diff --git a/src/gui/text/qlinecontrol.cpp b/src/gui/text/qlinecontrol.cpp
index 3373807bd7..40452a94c2 100644
--- a/src/gui/text/qlinecontrol.cpp
+++ b/src/gui/text/qlinecontrol.cpp
@@ -1521,12 +1521,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
end(1);
}
else if (event == QKeySequence::MoveToNextChar) {
-#if !defined(Q_WS_WIN) || defined(QT_NO_COMPLETER)
if (hasSelectedText()) {
-#else
- if (hasSelectedText() && m_completer
- && m_completer->completionMode() == QCompleter::InlineCompletion) {
-#endif
moveCursor(selectionEnd(), false);
} else {
cursorForward(0, visual ? 1 : (layoutDirection() == Qt::LeftToRight ? 1 : -1));
@@ -1536,12 +1531,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
cursorForward(1, visual ? 1 : (layoutDirection() == Qt::LeftToRight ? 1 : -1));
}
else if (event == QKeySequence::MoveToPreviousChar) {
-#if !defined(Q_WS_WIN) || defined(QT_NO_COMPLETER)
if (hasSelectedText()) {
-#else
- if (hasSelectedText() && m_completer
- && m_completer->completionMode() == QCompleter::InlineCompletion) {
-#endif
moveCursor(selectionStart(), false);
} else {
cursorForward(0, visual ? -1 : (layoutDirection() == Qt::LeftToRight ? -1 : 1));
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index d3f8cb7cde..9756b620b7 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -61,10 +61,6 @@
#include "qfontengine_p.h"
-#if !defined(QT_NO_FREETYPE)
-# include "qfontengine_ft_p.h"
-#endif
-
QT_BEGIN_NAMESPACE
#define ObjectSelectionBrush (QTextFormat::ForegroundBrush + 1)
@@ -2109,23 +2105,6 @@ static QGlyphRun glyphRunWithInfo(QFontEngine *fontEngine, const QGlyphLayout &g
fontD->fontEngine = fontEngine;
fontD->thread = QThread::currentThread();
fontD->fontEngine->ref.ref();
-#if !defined(QT_NO_FREETYPE)
- if (fontEngine->type() == QFontEngine::Freetype) {
- QFontEngineFT *freeTypeEngine = static_cast<QFontEngineFT *>(fontEngine);
- switch (freeTypeEngine->defaultHintStyle()) {
- case QFontEngineFT::HintNone:
- fontD->hintingPreference = QFont::PreferNoHinting;
- break;
- case QFontEngineFT::HintLight:
- fontD->hintingPreference = QFont::PreferVerticalHinting;
- break;
- case QFontEngineFT::HintMedium:
- case QFontEngineFT::HintFull:
- fontD->hintingPreference = QFont::PreferFullHinting;
- break;
- };
- }
-#endif
QVarLengthArray<glyph_t> glyphsArray;
QVarLengthArray<QFixedPoint> positionsArray;
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index 5e5f8e31c8..c6bdfbd9c2 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -80,14 +80,6 @@ SOURCES += \
text/qrawfont.cpp \
text/qglyphrun.cpp
-win32:!qpa {
- SOURCES += \
- text/qfont_win.cpp \
- text/qfontengine_win.cpp \
- text/qrawfont_win.cpp
- HEADERS += text/qfontengine_win_p.h
-}
-
contains(QT_CONFIG, directwrite) {
LIBS_PRIVATE += -ldwrite
HEADERS += text/qfontenginedirectwrite_p.h
@@ -106,35 +98,14 @@ unix:x11 {
text/qrawfont_ft.cpp
}
-!qpa:!x11:mac {
- HEADERS += \
- text/qfontengine_mac_p.h
- OBJECTIVE_HEADERS += \
- text/qfontengine_coretext_p.h
- SOURCES += \
- text/qfont_mac.cpp \
- text/qrawfont_mac.cpp
- OBJECTIVE_SOURCES += \
- text/qfontengine_coretext.mm \
- text/qfontengine_mac.mm
- contains(QT_CONFIG, harfbuzz) {
- DEFINES += QT_ENABLE_HARFBUZZ_FOR_MAC
- }
-}
-
-qpa {
- SOURCES += \
- text/qfont_qpa.cpp \
- text/qfontengine_qpa.cpp \
- text/qplatformfontdatabase_qpa.cpp \
- text/qrawfont_qpa.cpp
-
- HEADERS += \
- text/qplatformfontdatabase_qpa.h
+SOURCES += \
+ text/qfont_qpa.cpp \
+ text/qfontengine_qpa.cpp \
+ text/qplatformfontdatabase_qpa.cpp \
+ text/qrawfont_qpa.cpp
- DEFINES += QT_NO_FONTCONFIG
- DEFINES += QT_NO_FREETYPE
-}
+HEADERS += \
+ text/qplatformfontdatabase_qpa.h
symbian {
SOURCES += \
@@ -156,79 +127,5 @@ symbian {
LIBS += -lfntstr -lecom
}
-!qpa {
-contains(QT_CONFIG, freetype) {
- SOURCES += \
- ../3rdparty/freetype/src/base/ftbase.c \
- ../3rdparty/freetype/src/base/ftbbox.c \
- ../3rdparty/freetype/src/base/ftdebug.c \
- ../3rdparty/freetype/src/base/ftglyph.c \
- ../3rdparty/freetype/src/base/ftinit.c \
- ../3rdparty/freetype/src/base/ftmm.c \
- ../3rdparty/freetype/src/base/fttype1.c \
- ../3rdparty/freetype/src/base/ftsynth.c \
- ../3rdparty/freetype/src/base/ftbitmap.c \
- ../3rdparty/freetype/src/bdf/bdf.c \
- ../3rdparty/freetype/src/cache/ftcache.c \
- ../3rdparty/freetype/src/cff/cff.c \
- ../3rdparty/freetype/src/cid/type1cid.c \
- ../3rdparty/freetype/src/gzip/ftgzip.c \
- ../3rdparty/freetype/src/pcf/pcf.c \
- ../3rdparty/freetype/src/pfr/pfr.c \
- ../3rdparty/freetype/src/psaux/psaux.c \
- ../3rdparty/freetype/src/pshinter/pshinter.c \
- ../3rdparty/freetype/src/psnames/psmodule.c \
- ../3rdparty/freetype/src/raster/raster.c \
- ../3rdparty/freetype/src/sfnt/sfnt.c \
- ../3rdparty/freetype/src/smooth/smooth.c \
- ../3rdparty/freetype/src/truetype/truetype.c \
- ../3rdparty/freetype/src/type1/type1.c \
- ../3rdparty/freetype/src/type42/type42.c \
- ../3rdparty/freetype/src/winfonts/winfnt.c \
- ../3rdparty/freetype/src/lzw/ftlzw.c\
- ../3rdparty/freetype/src/otvalid/otvalid.c\
- ../3rdparty/freetype/src/otvalid/otvbase.c\
- ../3rdparty/freetype/src/otvalid/otvgdef.c\
- ../3rdparty/freetype/src/otvalid/otvjstf.c\
- ../3rdparty/freetype/src/otvalid/otvcommn.c\
- ../3rdparty/freetype/src/otvalid/otvgpos.c\
- ../3rdparty/freetype/src/otvalid/otvgsub.c\
- ../3rdparty/freetype/src/otvalid/otvmod.c\
- ../3rdparty/freetype/src/autofit/afangles.c\
- ../3rdparty/freetype/src/autofit/afglobal.c\
- ../3rdparty/freetype/src/autofit/aflatin.c\
- ../3rdparty/freetype/src/autofit/afmodule.c\
- ../3rdparty/freetype/src/autofit/afdummy.c\
- ../3rdparty/freetype/src/autofit/afhints.c\
- ../3rdparty/freetype/src/autofit/afloader.c\
- ../3rdparty/freetype/src/autofit/autofit.c
-
- symbian {
- SOURCES += \
- ../3rdparty/freetype/src/base/ftsystem.c
- } else {
- SOURCES += \
- ../3rdparty/freetype/builds/unix/ftsystem.c
- INCLUDEPATH += \
- ../3rdparty/freetype/builds/unix
- }
-
- INCLUDEPATH += \
- ../3rdparty/freetype/src \
- ../3rdparty/freetype/include
-
- DEFINES += FT2_BUILD_LIBRARY FT_CONFIG_OPTION_SYSTEM_ZLIB
-
-} else:contains(QT_CONFIG, system-freetype) {
- # pull in the proper freetype2 include directory
- include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
- LIBS_PRIVATE += -lfreetype
-}
-
-contains(QT_CONFIG, fontconfig) {
- CONFIG += opentype
-}
-}#!qpa
-
DEFINES += QT_NO_OPENTYPE
INCLUDEPATH += ../3rdparty/harfbuzz/src