summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMorten Sorvig <morten.sorvig@nokia.com>2011-09-29 14:29:05 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-10 07:47:58 +0200
commit9fa6e8f627d0c61fd5a3b993903a362dc04bf707 (patch)
tree56858ef0994ef4b300d5f6928fa51b0844bf1861 /src/gui
parent33233ca3e3d79152744eedd353106c5d95737e00 (diff)
Clean-up a macro for Cocoa
Remove the usage of Q_MAC_USE_COCOA and Carbon code paths. Change-Id: Ib569ad8c6d9ffe258f454b3c3b06e95294a10112 Reviewed-on: http://codereview.qt-project.org/5100 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Sanity-Review: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qregion.h7
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp2
-rw-r--r--src/gui/text/qtextengine.cpp6
-rw-r--r--src/gui/text/qtextlayout.cpp2
4 files changed, 3 insertions, 14 deletions
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index 75d29e1ef5..d1ec9c6c34 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -152,13 +152,8 @@ public:
RgnHandle toQDRgnForUpdate_sys() const;
static QRegion fromQDRgn(RgnHandle shape);
#endif
-#ifdef QT_MAC_USE_COCOA
inline HIMutableShapeRef handle(bool unused = false) const
{ Q_UNUSED(unused); return toHIMutableShape(); }
-#else
- inline RgnHandle handle() const { return handle(false); }
- inline RgnHandle handle(bool) const { return toQDRgn(); }
-#endif
HIMutableShapeRef toHIMutableShape() const;
static QRegion fromHIShapeRef(HIShapeRef shape);
#elif defined(Q_WS_QWS) || defined(Q_WS_QPA)
@@ -201,8 +196,6 @@ Q_GUI_EXPORT
#elif defined(Q_WS_X11)
Region rgn;
void *xrectangles;
-#elif defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA)
- mutable RgnHandle unused; // Here for binary compatibility reasons. ### Qt 5 remove.
#endif
#if defined(Q_WS_QWS) || defined(Q_WS_QPA) || defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
QRegionPrivate *qt_rgn;
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 665efe07f2..0f9a82c25a 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -367,7 +367,7 @@ void QImageTextureGlyphCache::createTextureData(int width, int height)
int QImageTextureGlyphCache::glyphMargin() const
{
-#if (defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)) || defined(Q_WS_X11)
+#if defined(Q_WS_MAC) || defined(Q_WS_X11)
return 0;
#else
return m_type == QFontEngineGlyphCache::Raster_RGBMask ? 2 : 0;
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 93c9e1e06f..416a219e05 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1489,12 +1489,8 @@ void QTextEngine::itemize() const
int length = layoutData->string.length();
if (!length)
return;
-#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA)
- // ATSUI requires RTL flags to correctly identify the character stops.
- bool ignore = false;
-#else
+
bool ignore = ignoreBidi;
-#endif
bool rtl = isRightToLeft();
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index e1bbca609e..8a77b07008 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1290,7 +1290,7 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition
&& (p->transform().type() > QTransform::TxTranslate);
if (toggleAntialiasing)
p->setRenderHint(QPainter::Antialiasing);
-#if defined(QT_MAC_USE_COCOA)
+#ifdef Q_WS_MAC
// Always draw the cursor aligned to pixel boundary.
x = qRound(x);
#endif