summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWater-Team <water@pad.test.qt.nokia.com>2011-07-08 23:00:15 (GMT)
committerWater-Team <water@pad.test.qt.nokia.com>2011-07-08 23:00:15 (GMT)
commit915c8a684b13ace823da28be5da64ae15de4472f (patch)
tree3bb1be20f870d38022208771f375cc764b62cbdc /src
parent4fcb7c233c3c8d748d66bf698df059ad7546ae88 (diff)
parent8f52cddb714fbdd616c813045e8ca1f96851bdfc (diff)
downloadQt-915c8a684b13ace823da28be5da64ae15de4472f.zip
Qt-915c8a684b13ace823da28be5da64ae15de4472f.tar.gz
Qt-915c8a684b13ace823da28be5da64ae15de4472f.tar.bz2
Merge branch '4.8-upstream' into master-water
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfile.cpp2
-rw-r--r--src/corelib/tools/qline.cpp5
-rw-r--r--src/corelib/tools/qlocale.qdoc1
-rw-r--r--src/corelib/tools/qpoint.cpp9
-rw-r--r--src/corelib/tools/qset.qdoc1
-rw-r--r--src/corelib/tools/qstring.cpp3
-rw-r--r--src/corelib/tools/qstringlist.h2
-rw-r--r--src/corelib/xml/qxmlstream.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp8
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp8
-rw-r--r--src/gui/dialogs/qmessagebox.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicsgridlayout.cpp2
-rw-r--r--src/gui/itemviews/qabstractproxymodel.cpp9
-rw-r--r--src/gui/kernel/qgenericplugin_qpa.cpp1
-rw-r--r--src/gui/kernel/qgenericpluginfactory_qpa.cpp1
-rw-r--r--src/gui/kernel/qkeysequence.cpp4
-rw-r--r--src/gui/kernel/qplatformcursor_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformwindowformat_qpa.cpp8
-rw-r--r--src/gui/kernel/qsizepolicy.qdoc2
-rw-r--r--src/gui/kernel/qwidget_qpa.cpp6
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp2
-rw-r--r--src/gui/painting/qpainter.cpp14
-rw-r--r--src/gui/painting/qprinterinfo.cpp4
-rw-r--r--src/gui/text/qfontdatabase.cpp91
-rw-r--r--src/gui/text/qfontdatabase_mac.cpp6
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp2
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp2
-rw-r--r--src/gui/text/qfontdatabase_win.cpp8
-rw-r--r--src/gui/text/qfontdatabase_x11.cpp14
-rw-r--r--src/gui/text/qfontengine_coretext.mm20
-rw-r--r--src/gui/text/qfontengine_coretext_p.h3
-rw-r--r--src/gui/text/qfontenginedirectwrite.cpp146
-rw-r--r--src/gui/text/qfontenginedirectwrite_p.h6
-rw-r--r--src/gui/text/qfontmetrics.cpp3
-rw-r--r--src/gui/text/qplatformfontdatabase_qpa.cpp2
-rw-r--r--src/gui/text/qtextcursor.cpp1
-rw-r--r--src/gui/text/qtextlayout.cpp16
-rw-r--r--src/gui/widgets/qcheckbox.cpp1
-rw-r--r--src/gui/widgets/qlineedit.cpp4
-rw-r--r--src/gui/widgets/qradiobutton.cpp1
-rw-r--r--src/gui/widgets/qtabwidget.cpp1
-rw-r--r--src/gui/widgets/qtextedit.cpp2
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp1
-rw-r--r--src/network/kernel/qnetworkproxy.cpp8
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp2
-rw-r--r--src/opengl/qgl_qpa.cpp6
-rw-r--r--src/plugins/platforms/openvglite/main.cpp71
-rw-r--r--src/plugins/platforms/openvglite/openvglite.pro12
-rw-r--r--src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp193
-rw-r--r--src/plugins/platforms/openvglite/qgraphicssystem_vglite.h93
-rw-r--r--src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp131
-rw-r--r--src/plugins/platforms/openvglite/qwindowsurface_vglite.h91
63 files changed, 341 insertions, 748 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 66edf58..929b2f9 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -358,6 +358,7 @@ QFilePrivate::setError(QFile::FileError err, int errNum)
/*!
\enum QFile::FileHandleFlag
+ \since 4.8
This enum is used when opening a file to specify additional
options which only apply to files and not to a generic
@@ -1657,6 +1658,7 @@ bool QFile::atEnd() const
/*!
\fn bool QFile::seek(qint64 pos)
+ \since 4.8
For random-access devices, this function sets the current position
to \a pos, returning true on success, or false if an error occurred.
diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp
index af3b7d5..0f67652 100644
--- a/src/corelib/tools/qline.cpp
+++ b/src/corelib/tools/qline.cpp
@@ -564,8 +564,9 @@ qreal QLineF::length() const
Returns the angle of the line in degrees.
- Positive values for the angles mean counter-clockwise while negative values
- mean the clockwise direction. Zero degrees is at the 3 o'clock position.
+ The return value will be in the range of values from 0.0 up to but not
+ including 360.0. The angles are measured counter-clockwise from a point
+ on the x-axis to the right of the origin (x > 0).
\sa setAngle()
*/
diff --git a/src/corelib/tools/qlocale.qdoc b/src/corelib/tools/qlocale.qdoc
index fd139c3..5d4f305 100644
--- a/src/corelib/tools/qlocale.qdoc
+++ b/src/corelib/tools/qlocale.qdoc
@@ -608,6 +608,7 @@
/*!
\enum QLocale::Script
+ \since 4.8
This enumerated type is used to specify a script.
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index bd32fe7..ae6ed71 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -188,6 +188,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn QPoint &QPoint::operator*=(float factor)
+ \since 4.8
Multiplies this point's coordinates by the given \a factor, and
returns a reference to this point.
@@ -200,6 +201,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn QPoint &QPoint::operator*=(double factor)
+ \since 4.8
Multiplies this point's coordinates by the given \a factor, and
returns a reference to this point. For example:
@@ -214,6 +216,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn QPoint &QPoint::operator*=(int factor)
+ \since 4.8
Multiplies this point's coordinates by the given \a factor, and
returns a reference to this point.
@@ -259,6 +262,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn const QPoint operator*(const QPoint &point, float factor)
\relates QPoint
+ \since 4.8
Returns a copy of the given \a point multiplied by the given \a factor.
@@ -271,6 +275,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn const QPoint operator*(const QPoint &point, double factor)
\relates QPoint
+ \since 4.8
Returns a copy of the given \a point multiplied by the given \a factor.
@@ -283,6 +288,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn const QPoint operator*(const QPoint &point, int factor)
\relates QPoint
+ \since 4.8
Returns a copy of the given \a point multiplied by the given \a factor.
@@ -293,6 +299,7 @@ QT_BEGIN_NAMESPACE
\fn const QPoint operator*(float factor, const QPoint &point)
\overload
\relates QPoint
+ \since 4.8
Returns a copy of the given \a point multiplied by the given \a factor.
*/
@@ -301,6 +308,7 @@ QT_BEGIN_NAMESPACE
\fn const QPoint operator*(double factor, const QPoint &point)
\overload
\relates QPoint
+ \since 4.8
Returns a copy of the given \a point multiplied by the given \a factor.
*/
@@ -309,6 +317,7 @@ QT_BEGIN_NAMESPACE
\fn const QPoint operator*(int factor, const QPoint &point)
\overload
\relates QPoint
+ \since 4.8
Returns a copy of the given \a point multiplied by the given \a factor.
*/
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc
index f562c68..31129e0 100644
--- a/src/corelib/tools/qset.qdoc
+++ b/src/corelib/tools/qset.qdoc
@@ -124,6 +124,7 @@
/*!
\fn void QSet::swap(QSet<T> &other)
+ \since 4.8
Swaps set \a other with this set. This operation is very fast and
never fails.
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index ee45cfd..791bfff 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -839,18 +839,21 @@ int QString::grow(int size)
/*!
\typedef QString::const_reference
+ \since 4.8
The QString::const_reference typedef provides an STL-style
const reference for QString.
*/
/*!
\typedef QString::reference
+ \since 4.8
The QString::const_reference typedef provides an STL-style
reference for QString.
*/
/*!
\typedef QString::value_type
+ \since 4.8
The QString::const_reference typedef provides an STL-style
value type for QString.
diff --git a/src/corelib/tools/qstringlist.h b/src/corelib/tools/qstringlist.h
index 2159512..f4689b4 100644
--- a/src/corelib/tools/qstringlist.h
+++ b/src/corelib/tools/qstringlist.h
@@ -71,7 +71,7 @@ public:
inline QStringList(const QStringList &l) : QList<QString>(l) { }
inline QStringList(const QList<QString> &l) : QList<QString>(l) { }
#ifdef Q_COMPILER_INITIALIZER_LISTS
- inline QStringList(std::initializer_list<QString> args) : QList(args) { }
+ inline QStringList(std::initializer_list<QString> args) : QList<QString>(args) { }
#endif
inline void sort();
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index caaffd3..9682688 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -3381,7 +3381,10 @@ int QXmlStreamWriter::autoFormattingIndent() const
}
/*!
- Returns \c true if the stream failed to write to the underlying device.
+ \since 4.8
+
+ Returns true if the stream failed to write to the underlying device;
+ otherwise returns false.
The error status is never reset. Writes happening after the error
occurred are ignored, even if the error condition is cleared.
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
index 8787a5e..b1ebec8 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -114,7 +114,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty bool AnimatedImage::cache
- \since Quick 1.1
+ \since QtQuick 1.1
Specifies whether the image should be cached. The default value is
true. Setting \a cache to false is useful when dealing with large images,
@@ -123,7 +123,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlproperty bool AnimatedImage::mirror
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds whether the image should be horizontally inverted
(effectively displaying a mirrored image).
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index 9c274e9..4b4efb6 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -215,7 +215,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage()
/*!
\qmlproperty bool BorderImage::cache
- \since Quick 1.1
+ \since QtQuick 1.1
Specifies whether the image should be cached. The default value is
true. Setting \a cache to false is useful when dealing with large images,
@@ -224,7 +224,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage()
/*!
\qmlproperty bool BorderImage::mirror
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds whether the image should be horizontally inverted
(effectively displaying a mirrored image).
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index d5c58df..fd2dc45 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -1399,7 +1399,7 @@ void QDeclarativeFlickable::setContentHeight(qreal h)
/*!
\qmlmethod Flickable::resizeContent(real width, real height, QPointF center)
\preliminary
- \since Quick 1.1
+ \since QtQuick 1.1
Resizes the content to \a width x \a height about \a center.
@@ -1439,7 +1439,7 @@ void QDeclarativeFlickable::resizeContent(qreal w, qreal h, QPointF center)
/*!
\qmlmethod Flickable::returnToBounds()
\preliminary
- \since Quick 1.1
+ \since QtQuick 1.1
Ensures the content is within legal bounds.
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 23433d6..e53472d 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -2618,7 +2618,7 @@ void QDeclarativeGridView::positionViewAtIndex(int index, int mode)
/*!
\qmlmethod GridView::positionViewAtBeginning()
\qmlmethod GridView::positionViewAtEnd()
- \since Quick 1.1
+ \since QtQuick 1.1
Positions the view at the beginning or end, taking into account any header or footer.
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index e6bb798..9b9d680 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -473,7 +473,7 @@ QRectF QDeclarativeImage::boundingRect() const
/*!
\qmlproperty bool Image::cache
- \since Quick 1.1
+ \since QtQuick 1.1
Specifies whether the image should be cached. The default value is
true. Setting \a cache to false is useful when dealing with large images,
@@ -482,7 +482,7 @@ QRectF QDeclarativeImage::boundingRect() const
/*!
\qmlproperty bool Image::mirror
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds whether the image should be horizontally inverted
(effectively displaying a mirrored image).
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 805ca4d..d36d163 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -3480,7 +3480,7 @@ qreal QDeclarativeItem::implicitHeight() const
/*!
\qmlproperty real Item::implicitWidth
\qmlproperty real Item::implicitHeight
- \since Quick 1.1
+ \since QtQuick 1.1
Defines the natural width or height of the Item if no \l width or \l height is specified.
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index f29f778..f0fc96b 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -3028,7 +3028,7 @@ void QDeclarativeListView::positionViewAtIndex(int index, int mode)
/*!
\qmlmethod ListView::positionViewAtBeginning()
\qmlmethod ListView::positionViewAtEnd()
- \since Quick 1.1
+ \since QtQuick 1.1
Positions the view at the beginning or end, taking into account any header or footer.
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index 18f008a..0e06a4c 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -419,7 +419,7 @@ void QDeclarativeMouseArea::setEnabled(bool a)
/*!
\qmlproperty bool MouseArea::preventStealing
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds whether the mouse events may be stolen from this
MouseArea.
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
index f3d1a68..483cad4 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
@@ -584,7 +584,7 @@ QDeclarativeRow::QDeclarativeRow(QDeclarativeItem *parent)
/*!
\qmlproperty enumeration Row::layoutDirection
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds the layoutDirection of the row.
@@ -878,7 +878,7 @@ void QDeclarativeGrid::setFlow(Flow flow)
/*!
\qmlproperty enumeration Grid::layoutDirection
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds the layout direction of the layout.
@@ -1236,7 +1236,7 @@ void QDeclarativeFlow::setFlow(Flow flow)
/*!
\qmlproperty enumeration Flow::layoutDirection
- \since Quick 1.1
+ \since QtQuick 1.1
This property holds the layout direction of the layout.
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index 813c255..e881b96 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -128,7 +128,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
/*!
\qmlsignal Repeater::onItemAdded(int index, Item item)
- \since Quick 1.1
+ \since QtQuick 1.1
This handler is called when an item is added to the repeater. The \a index
parameter holds the index at which the item has been inserted within the
@@ -137,7 +137,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
/*!
\qmlsignal Repeater::onItemRemoved(int index, Item item)
- \since Quick 1.1
+ \since QtQuick 1.1
This handler is called when an item is removed from the repeater. The \a index
parameter holds the index at which the item was removed from the repeater,
@@ -306,7 +306,7 @@ int QDeclarativeRepeater::count() const
/*!
\qmlmethod Item Repeater::itemAt(index)
- \since Quick 1.1
+ \since QtQuick 1.1
Returns the \l Item that has been created at the given \a index, or \c null
if no item exists at \a index.
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index 54ff406..20e4eef 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -1190,7 +1190,7 @@ void QDeclarativeText::setWrapMode(WrapMode mode)
/*!
\qmlproperty int Text::lineCount
- \since Quick 1.1
+ \since QtQuick 1.1
Returns the number of lines visible in the text item.
@@ -1206,7 +1206,7 @@ int QDeclarativeText::lineCount() const
/*!
\qmlproperty bool Text::truncated
- \since Quick 1.1
+ \since QtQuick 1.1
Returns true if the text has been truncated due to \l maximumLineCount
or \l elide.
@@ -1223,7 +1223,7 @@ bool QDeclarativeText::truncated() const
/*!
\qmlproperty int Text::maximumLineCount
- \since Quick 1.1
+ \since QtQuick 1.1
Set this property to limit the number of lines that the text item will show.
If elide is set to Text.ElideRight, the text will be elided appropriately.
@@ -1457,7 +1457,7 @@ qreal QDeclarativeText::paintedHeight() const
/*!
\qmlproperty real Text::lineHeight
- \since Quick 1.1
+ \since QtQuick 1.1
Sets the line height for the text.
The value can be in pixels or a multiplier depending on lineHeightMode.
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 20b2e76..ca7e948 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -107,7 +107,7 @@ TextEdit {
/*!
\qmlsignal TextEdit::onLinkActivated(string link)
- \since Quick 1.1
+ \since QtQuick 1.1
This handler is called when the user clicks on a link embedded in the text.
The link must be in rich text or HTML format and the
@@ -615,7 +615,7 @@ void QDeclarativeTextEdit::setWrapMode(WrapMode mode)
/*!
\qmlproperty int TextEdit::lineCount
- \since Quick 1.1
+ \since QtQuick 1.1
Returns the total number of lines in the textEdit item.
*/
@@ -709,7 +709,7 @@ void QDeclarativeTextEdit::moveCursorSelection(int pos)
/*!
\qmlmethod void TextEdit::moveCursorSelection(int position, SelectionMode mode = TextEdit.SelectCharacters)
- \since Quick 1.1
+ \since QtQuick 1.1
Moves the cursor to \a position and updates the selection according to the optional \a mode
parameter. (To only move the cursor, set the \l cursorPosition property.)
@@ -1074,7 +1074,7 @@ void QDeclarativeTextEdit::setSelectByMouse(bool on)
/*!
\qmlproperty enum TextEdit::mouseSelectionMode
- \since Quick 1.1
+ \since QtQuick 1.1
Specifies how text should be selected using a mouse.
@@ -1220,7 +1220,7 @@ void QDeclarativeTextEditPrivate::focusChanged(bool hasFocus)
/*!
\qmlmethod void TextEdit::deselect()
- \since Quick 1.1
+ \since QtQuick 1.1
Removes active text selection.
*/
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index d2897eb..7014571 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1014,7 +1014,7 @@ int QDeclarativeTextInput::positionAt(int x) const
/*!
\qmlmethod int TextInput::positionAt(int x, CursorPosition position = CursorBetweenCharacters)
- \since Quick 1.1
+ \since QtQuick 1.1
This function returns the character position at
x pixels from the left of the textInput. Position 0 is before the
@@ -1402,7 +1402,7 @@ QVariant QDeclarativeTextInput::inputMethodQuery(Qt::InputMethodQuery property)
/*!
\qmlmethod void TextInput::deselect()
- \since Quick 1.1
+ \since QtQuick 1.1
Removes active text selection.
*/
@@ -1574,7 +1574,7 @@ void QDeclarativeTextInput::setSelectByMouse(bool on)
/*!
\qmlproperty enum TextInput::mouseSelectionMode
- \since Quick 1.1
+ \since QtQuick 1.1
Specifies how text should be selected using a mouse.
@@ -1622,7 +1622,7 @@ void QDeclarativeTextInput::moveCursorSelection(int position)
/*!
\qmlmethod void TextInput::moveCursorSelection(int position, SelectionMode mode = TextInput.SelectCharacters)
- \since Quick 1.1
+ \since QtQuick 1.1
Moves the cursor to \a position and updates the selection according to the optional \a mode
parameter. (To only move the cursor, set the \l cursorPosition property.)
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index c3a1084..a2f086b 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -2507,7 +2507,12 @@ void QMessageBox::setInformativeText(const QString &text)
label->hide();
QTextBrowser *textBrowser = new QTextBrowser(this);
textBrowser->setOpenExternalLinks(true);
- grid->addWidget(textBrowser, 1, 1, 1, 1);
+#if defined(Q_OS_SYMBIAN)
+ const int preferredTextColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 0 : 1;
+#else
+ const int preferredTextColumn = 1;
+#endif
+ grid->addWidget(textBrowser, 1, preferredTextColumn, 1, 1);
d->textBrowser = textBrowser;
#else
grid->addWidget(label, 1, 1, 1, 1);
diff --git a/src/gui/graphicsview/qgraphicsgridlayout.cpp b/src/gui/graphicsview/qgraphicsgridlayout.cpp
index 2fbfc5d..fb4bd32 100644
--- a/src/gui/graphicsview/qgraphicsgridlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsgridlayout.cpp
@@ -600,6 +600,8 @@ void QGraphicsGridLayout::removeAt(int index)
}
/*!
+ \since 4.8
+
Removes the layout item \a item without destroying it.
Ownership of the item is transferred to the caller.
diff --git a/src/gui/itemviews/qabstractproxymodel.cpp b/src/gui/itemviews/qabstractproxymodel.cpp
index 48c84ac..f00b7ee 100644
--- a/src/gui/itemviews/qabstractproxymodel.cpp
+++ b/src/gui/itemviews/qabstractproxymodel.cpp
@@ -298,6 +298,7 @@ bool QAbstractProxyModel::setHeaderData(int section, Qt::Orientation orientation
/*!
\reimp
+ \since 4.8
*/
QModelIndex QAbstractProxyModel::buddy(const QModelIndex &index) const
{
@@ -307,6 +308,7 @@ QModelIndex QAbstractProxyModel::buddy(const QModelIndex &index) const
/*!
\reimp
+ \since 4.8
*/
bool QAbstractProxyModel::canFetchMore(const QModelIndex &parent) const
{
@@ -316,6 +318,7 @@ bool QAbstractProxyModel::canFetchMore(const QModelIndex &parent) const
/*!
\reimp
+ \since 4.8
*/
void QAbstractProxyModel::fetchMore(const QModelIndex &parent)
{
@@ -325,6 +328,7 @@ void QAbstractProxyModel::fetchMore(const QModelIndex &parent)
/*!
\reimp
+ \since 4.8
*/
void QAbstractProxyModel::sort(int column, Qt::SortOrder order)
{
@@ -334,6 +338,7 @@ void QAbstractProxyModel::sort(int column, Qt::SortOrder order)
/*!
\reimp
+ \since 4.8
*/
QSize QAbstractProxyModel::span(const QModelIndex &index) const
{
@@ -343,6 +348,7 @@ QSize QAbstractProxyModel::span(const QModelIndex &index) const
/*!
\reimp
+ \since 4.8
*/
bool QAbstractProxyModel::hasChildren(const QModelIndex &parent) const
{
@@ -352,6 +358,7 @@ bool QAbstractProxyModel::hasChildren(const QModelIndex &parent) const
/*!
\reimp
+ \since 4.8
*/
QMimeData* QAbstractProxyModel::mimeData(const QModelIndexList &indexes) const
{
@@ -364,6 +371,7 @@ QMimeData* QAbstractProxyModel::mimeData(const QModelIndexList &indexes) const
/*!
\reimp
+ \since 4.8
*/
QStringList QAbstractProxyModel::mimeTypes() const
{
@@ -373,6 +381,7 @@ QStringList QAbstractProxyModel::mimeTypes() const
/*!
\reimp
+ \since 4.8
*/
Qt::DropActions QAbstractProxyModel::supportedDropActions() const
{
diff --git a/src/gui/kernel/qgenericplugin_qpa.cpp b/src/gui/kernel/qgenericplugin_qpa.cpp
index e7b65b7..dae512d 100644
--- a/src/gui/kernel/qgenericplugin_qpa.cpp
+++ b/src/gui/kernel/qgenericplugin_qpa.cpp
@@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE
\class QGenericPlugin
\ingroup plugins
\ingroup qpa
+ \since 4.8
\brief The QGenericPlugin class is an abstract base class for
window-system related plugins in Qt QPA.
diff --git a/src/gui/kernel/qgenericpluginfactory_qpa.cpp b/src/gui/kernel/qgenericpluginfactory_qpa.cpp
index fb6a0d8..86e146a 100644
--- a/src/gui/kernel/qgenericpluginfactory_qpa.cpp
+++ b/src/gui/kernel/qgenericpluginfactory_qpa.cpp
@@ -61,6 +61,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
/*!
\class QGenericPluginFactory
\ingroup qpa
+ \since 4.8
\brief The QGenericPluginFactory class creates window-system
related plugin drivers in Qt QPA.
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 117b72f..5fc72d4 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -933,7 +933,7 @@ QKeySequence::QKeySequence(const QString &key)
}
/*!
- \since 4.x
+ \since 4.7
Creates a key sequence from the \a key string based on \a format.
*/
QKeySequence::QKeySequence(const QString &key, QKeySequence::SequenceFormat format)
@@ -1130,7 +1130,7 @@ int QKeySequence::assign(const QString &ks)
/*!
\fn int QKeySequence::assign(const QString &keys, QKeySequence::SequenceFormat format)
- \since 4.x
+ \since 4.7
Adds the given \a keys to the key sequence (based on \a format).
\a keys may contain up to four key codes, provided they are
diff --git a/src/gui/kernel/qplatformcursor_qpa.cpp b/src/gui/kernel/qplatformcursor_qpa.cpp
index 0695486..0426226 100644
--- a/src/gui/kernel/qplatformcursor_qpa.cpp
+++ b/src/gui/kernel/qplatformcursor_qpa.cpp
@@ -53,6 +53,7 @@ QList <QWeakPointer<QPlatformCursor> > QPlatformCursorPrivate::instances;
/*!
\class QPlatformCursor
+ \since 4.8
\brief The QPlatformCursor class provides information about
pointer device events (movement, buttons), and requests to change
@@ -105,6 +106,7 @@ QPlatformCursor::QPlatformCursor(QPlatformScreen *scr )
/*!
\class QPlatformCursorImage
+ \since 4.8
\brief The QPlatformCursorImage class provides a set of graphics
intended to be used as cursors.
diff --git a/src/gui/kernel/qplatformwindowformat_qpa.cpp b/src/gui/kernel/qplatformwindowformat_qpa.cpp
index 482ae68..4ab8dfd 100644
--- a/src/gui/kernel/qplatformwindowformat_qpa.cpp
+++ b/src/gui/kernel/qplatformwindowformat_qpa.cpp
@@ -101,11 +101,11 @@ public:
/*!
\class QPlatformWindowFormat
+ \ingroup painting
+ \since 4.8
\brief The QPlatformWindowFormat class specifies the display format of an OpenGL
rendering context and if possible attributes of the corresponding QPlatformWindow.
- \ingroup painting
-
QWidget has a setter and getter function for QPlatformWindowFormat. These functions can be used
by the application programmer to signal what kind of format he wants to the window and glcontext
should have. However, it is not always possible to fulfill these requirements. The application
@@ -937,6 +937,8 @@ void QPlatformWindowFormat::setDefaultFormat(const QPlatformWindowFormat &f)
/*!
+ \since 4.8
+
Returns true if all the options of the two QPlatformWindowFormat objects
\a a and \a b are equal; otherwise returns false.
@@ -960,6 +962,8 @@ bool operator==(const QPlatformWindowFormat& a, const QPlatformWindowFormat& b)
/*!
+ \since 4.8
+
Returns false if all the options of the two QPlatformWindowFormat objects
\a a and \a b are equal; otherwise returns true.
diff --git a/src/gui/kernel/qsizepolicy.qdoc b/src/gui/kernel/qsizepolicy.qdoc
index 593560e..7002ed3 100644
--- a/src/gui/kernel/qsizepolicy.qdoc
+++ b/src/gui/kernel/qsizepolicy.qdoc
@@ -263,6 +263,7 @@
/*!
\fn void QSizePolicy::setWidthForHeight(bool dependent)
+ \since 4.8
Sets the flag determining whether the widget's width
depends on its height, to \a dependent.
@@ -276,6 +277,7 @@
/*!
\fn bool QSizePolicy::hasWidthForHeight() const
+ \since 4.8
Returns true if the widget's width depends on its
height; otherwise returns false.
diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp
index 56c3010..224f574 100644
--- a/src/gui/kernel/qwidget_qpa.cpp
+++ b/src/gui/kernel/qwidget_qpa.cpp
@@ -690,6 +690,7 @@ int QWidget::metric(PaintDeviceMetric m) const
/*!
\preliminary
+ \since 4.8
Sets the window to be the platform \a window specified.
@@ -710,6 +711,7 @@ void QWidget::setPlatformWindow(QPlatformWindow *window)
/*!
\preliminary
+ \since 4.8
Returns the QPlatformWindow this widget will be drawn into.
*/
@@ -724,6 +726,8 @@ QPlatformWindow *QWidget::platformWindow() const
}
/*!
+ \since 4.8
+
Sets the platform window format for the widget to the \a format specified.
*/
void QWidget::setPlatformWindowFormat(const QPlatformWindowFormat &format)
@@ -743,6 +747,8 @@ void QWidget::setPlatformWindowFormat(const QPlatformWindowFormat &format)
}
/*!
+ \since 4.8
+
Returns the platform window format for the widget.
*/
QPlatformWindowFormat QWidget::platformWindowFormat() const
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 994986b..147d2ec 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -1611,6 +1611,8 @@ void QX11PaintEnginePrivate::fillPolygon_dev(const QPointF *polygonPoints, int p
&& (fill.style() != Qt::NoBrush)
&& ((has_fill_texture && fill.texture().hasAlpha()) || antialias || !solid_fill || has_alpha_pen != has_alpha_brush))
{
+ tessellator->tessellate((QPointF *)clippedPoints, clippedCount,
+ mode == QPaintEngine::WindingMode);
if (tessellator->size > 0) {
XRenderPictureAttributes attrs;
attrs.poly_edge = antialias ? PolyEdgeSmooth : PolyEdgeSharp;
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 435e12a..9bd9733 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -6646,6 +6646,10 @@ void QPainter::drawTextItem(const QPointF &p, const QTextItem &_ti)
qreal x = p.x();
qreal y = p.y();
+ bool rtl = ti.flags & QTextItem::RightToLeft;
+ if (rtl)
+ x += ti.width.toReal();
+
int start = 0;
int end, i;
for (end = 0; end < ti.glyphs.numGlyphs; ++end) {
@@ -6662,14 +6666,19 @@ void QPainter::drawTextItem(const QPointF &p, const QTextItem &_ti)
ti2.width += ti.glyphs.effectiveAdvance(i);
}
+ if (rtl)
+ x -= ti2.width.toReal();
+
d->engine->drawTextItem(QPointF(x, y), ti2);
+ if (!rtl)
+ x += ti2.width.toReal();
+
// reset the high byte for all glyphs and advance to the next sub-string
const int hi = which << 24;
for (i = start; i < end; ++i) {
glyphs.glyphs[i] = hi | glyphs.glyphs[i];
}
- x += ti2.width.toReal();
// change engine
start = end;
@@ -6684,6 +6693,9 @@ void QPainter::drawTextItem(const QPointF &p, const QTextItem &_ti)
ti2.width += ti.glyphs.effectiveAdvance(i);
}
+ if (rtl)
+ x -= ti2.width.toReal();
+
if (d->extended)
d->extended->drawTextItem(QPointF(x, y), ti2);
else
diff --git a/src/gui/painting/qprinterinfo.cpp b/src/gui/painting/qprinterinfo.cpp
index a7ddc85..c00a1cc 100644
--- a/src/gui/painting/qprinterinfo.cpp
+++ b/src/gui/painting/qprinterinfo.cpp
@@ -79,6 +79,8 @@ QPrinterInfo::QPrinterInfo()
}
/*!
+ \since 4.8
+
Constructs a copy of \a other.
*/
QPrinterInfo::QPrinterInfo(const QPrinterInfo &other)
@@ -117,6 +119,8 @@ QPrinterInfo::~QPrinterInfo()
}
/*!
+ \since 4.8
+
Sets the QPrinterInfo object to be equal to \a other.
*/
QPrinterInfo &QPrinterInfo::operator=(const QPrinterInfo &other)
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 98186df..3762f39 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -218,16 +218,14 @@ struct QtFontStyle
Key(const QString &styleString);
Key() : style(QFont::StyleNormal),
weight(QFont::Normal), stretch(0) { }
- Key(const Key &o) : style(o.style),
- weight(o.weight), stretch(o.stretch) { }
+ Key(const Key &o) : style(o.style), weight(o.weight), stretch(o.stretch) { }
uint style : 2;
signed int weight : 8;
signed int stretch : 12;
bool operator==(const Key & other) {
- return (style == other.style &&
- weight == other.weight &&
- (stretch == 0 || other.stretch == 0 || stretch == other.stretch));
+ return (style == other.style && weight == other.weight &&
+ (stretch == 0 || other.stretch == 0 || stretch == other.stretch));
}
bool operator!=(const Key &other) {
return !operator==(other);
@@ -279,6 +277,7 @@ struct QtFontStyle
bool smoothScalable : 1;
signed int count : 30;
QtFontSize *pixelSizes;
+ QString styleName;
#ifdef Q_WS_X11
const char *weightName;
@@ -353,13 +352,20 @@ struct QtFontFoundry
int count;
QtFontStyle **styles;
- QtFontStyle *style(const QtFontStyle::Key &, bool = false);
+ QtFontStyle *style(const QtFontStyle::Key &, const QString & = QString(), bool = false);
};
-QtFontStyle *QtFontFoundry::style(const QtFontStyle::Key &key, bool create)
+QtFontStyle *QtFontFoundry::style(const QtFontStyle::Key &key, const QString &styleName, bool create)
{
int pos = 0;
if (count) {
+ // if styleName for searching first if possible
+ if (!styleName.isEmpty()) {
+ for (; pos < count; pos++) {
+ if (styles[pos]->styleName == styleName)
+ return styles[pos];
+ }
+ }
int low = 0;
int high = count;
pos = count / 2;
@@ -386,6 +392,7 @@ QtFontStyle *QtFontFoundry::style(const QtFontStyle::Key &key, bool create)
}
QtFontStyle *style = new QtFontStyle(key);
+ style->styleName = styleName;
memmove(styles + pos + 1, styles + pos, (count-pos)*sizeof(QtFontStyle *));
styles[pos] = style;
count++;
@@ -814,7 +821,7 @@ void QFontDatabasePrivate::addFont(const QString &familyname, const char *foundr
}
QtFontFoundry *foundry = f->foundry(QString::fromLatin1(foundryname), true);
- QtFontStyle *style = foundry->style(styleKey, true);
+ QtFontStyle *style = foundry->style(styleKey, QString(), true);
style->smoothScalable = (pixelSize == 0);
style->antialiased = antialiased;
QtFontSize *size = style->pixelSize(pixelSize?pixelSize:SMOOTH_SCALABLE, true);
@@ -1131,7 +1138,8 @@ QString QFontDatabase::resolveFontFamilyAlias(const QString &family)
#endif
QT_END_INCLUDE_NAMESPACE
-static QtFontStyle *bestStyle(QtFontFoundry *foundry, const QtFontStyle::Key &styleKey)
+static QtFontStyle *bestStyle(QtFontFoundry *foundry, const QtFontStyle::Key &styleKey,
+ const QString &styleName = QString())
{
int best = 0;
int dist = 0xffff;
@@ -1139,6 +1147,12 @@ static QtFontStyle *bestStyle(QtFontFoundry *foundry, const QtFontStyle::Key &st
for ( int i = 0; i < foundry->count; i++ ) {
QtFontStyle *style = foundry->styles[i];
+ if (!styleName.isEmpty() && styleName == style->styleName) {
+ dist = 0;
+ best = i;
+ break;
+ }
+
int d = qAbs( styleKey.weight - style->key.weight );
if ( styleKey.stretch != 0 && style->key.stretch != 0 ) {
@@ -1532,7 +1546,8 @@ static QString styleStringHelper(int weight, QFont::Style style)
*/
QString QFontDatabase::styleString(const QFont &font)
{
- return styleStringHelper(font.weight(), font.style());
+ return font.styleName().isEmpty() ? styleStringHelper(font.weight(), font.style())
+ : font.styleName();
}
/*!
@@ -1542,7 +1557,8 @@ QString QFontDatabase::styleString(const QFont &font)
*/
QString QFontDatabase::styleString(const QFontInfo &fontInfo)
{
- return styleStringHelper(fontInfo.weight(), fontInfo.style());
+ return fontInfo.styleName().isEmpty() ? styleStringHelper(fontInfo.weight(), fontInfo.style())
+ : fontInfo.styleName();
}
@@ -1788,13 +1804,17 @@ QStringList QFontDatabase::styles(const QString &family) const
for (int k = 0; k < foundry->count; k++) {
QtFontStyle::Key ke(foundry->styles[k]->key);
ke.stretch = 0;
- allStyles.style(ke, true);
+ allStyles.style(ke, foundry->styles[k]->styleName, true);
}
}
}
- for (int i = 0; i < allStyles.count; i++)
- l.append(styleStringHelper(allStyles.styles[i]->key.weight, (QFont::Style)allStyles.styles[i]->key.style));
+ for (int i = 0; i < allStyles.count; i++) {
+ l.append(allStyles.styles[i]->styleName.isEmpty() ?
+ styleStringHelper(allStyles.styles[i]->key.weight,
+ (QFont::Style)allStyles.styles[i]->key.style) :
+ allStyles.styles[i]->styleName);
+ }
return l;
}
@@ -1852,7 +1872,9 @@ bool QFontDatabase::isBitmapScalable(const QString &family,
QtFontFoundry *foundry = f->foundries[j];
if (foundryName.isEmpty() || foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
for (int k = 0; k < foundry->count; k++)
- if ((style.isEmpty() || foundry->styles[k]->key == styleKey)
+ if ((style.isEmpty() ||
+ foundry->styles[k]->styleName == style ||
+ foundry->styles[k]->key == styleKey)
&& foundry->styles[k]->bitmapScalable && !foundry->styles[k]->smoothScalable) {
bitmapScalable = true;
goto end;
@@ -1891,7 +1913,9 @@ bool QFontDatabase::isSmoothlyScalable(const QString &family, const QString &sty
QtFontFoundry *foundry = f->foundries[j];
if (foundryName.isEmpty() || foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
for (int k = 0; k < foundry->count; k++)
- if ((style.isEmpty() || foundry->styles[k]->key == styleKey) && foundry->styles[k]->smoothScalable) {
+ if ((style.isEmpty() ||
+ foundry->styles[k]->styleName == style ||
+ foundry->styles[k]->key == styleKey) && foundry->styles[k]->smoothScalable) {
smoothScalable = true;
goto end;
}
@@ -1924,12 +1948,12 @@ bool QFontDatabase::isScalable(const QString &family,
\sa smoothSizes(), standardSizes()
*/
QList<int> QFontDatabase::pointSizes(const QString &family,
- const QString &style)
+ const QString &styleName)
{
#if defined(Q_WS_WIN)
// windows and macosx are always smoothly scalable
Q_UNUSED(family);
- Q_UNUSED(style);
+ Q_UNUSED(styleName);
return standardSizes();
#else
bool smoothScalable = false;
@@ -1940,7 +1964,7 @@ QList<int> QFontDatabase::pointSizes(const QString &family,
QT_PREPEND_NAMESPACE(load)(familyName);
- QtFontStyle::Key styleKey(style);
+ QtFontStyle::Key styleKey(styleName);
QList<int> sizes;
@@ -1957,7 +1981,7 @@ QList<int> QFontDatabase::pointSizes(const QString &family,
for (int j = 0; j < fam->count; j++) {
QtFontFoundry *foundry = fam->foundries[j];
if (foundryName.isEmpty() || foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
- QtFontStyle *style = foundry->style(styleKey);
+ QtFontStyle *style = foundry->style(styleKey, styleName);
if (!style) continue;
if (style->smoothScalable) {
@@ -2008,17 +2032,20 @@ QFont QFontDatabase::font(const QString &family, const QString &style,
QtFontFoundry *foundry = f->foundries[j];
if (foundryName.isEmpty() || foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
for (int k = 0; k < foundry->count; k++)
- allStyles.style(foundry->styles[k]->key, true);
+ allStyles.style(foundry->styles[k]->key, foundry->styles[k]->styleName, true);
}
}
QtFontStyle::Key styleKey(style);
- QtFontStyle *s = bestStyle(&allStyles, styleKey);
+ QtFontStyle *s = bestStyle(&allStyles, styleKey, style);
if (!s) // no styles found?
return QApplication::font();
+
QFont fnt(family, pointSize, s->key.weight);
fnt.setStyle((QFont::Style)s->key.style);
+ if (!s->styleName.isEmpty())
+ fnt.setStyleName(s->styleName);
return fnt;
}
@@ -2032,11 +2059,11 @@ QFont QFontDatabase::font(const QString &family, const QString &style,
\sa pointSizes(), standardSizes()
*/
QList<int> QFontDatabase::smoothSizes(const QString &family,
- const QString &style)
+ const QString &styleName)
{
#ifdef Q_WS_WIN
Q_UNUSED(family);
- Q_UNUSED(style);
+ Q_UNUSED(styleName);
return QFontDatabase::standardSizes();
#else
bool smoothScalable = false;
@@ -2047,7 +2074,7 @@ QList<int> QFontDatabase::smoothSizes(const QString &family,
QT_PREPEND_NAMESPACE(load)(familyName);
- QtFontStyle::Key styleKey(style);
+ QtFontStyle::Key styleKey(styleName);
QList<int> sizes;
@@ -2064,7 +2091,7 @@ QList<int> QFontDatabase::smoothSizes(const QString &family,
for (int j = 0; j < fam->count; j++) {
QtFontFoundry *foundry = fam->foundries[j];
if (foundryName.isEmpty() || foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
- QtFontStyle *style = foundry->style(styleKey);
+ QtFontStyle *style = foundry->style(styleKey, styleName);
if (!style) continue;
if (style->smoothScalable) {
@@ -2131,12 +2158,12 @@ bool QFontDatabase::italic(const QString &family, const QString &style) const
QtFontFoundry *foundry = f->foundries[j];
if (foundryName.isEmpty() || foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
for (int k = 0; k < foundry->count; k++)
- allStyles.style(foundry->styles[k]->key, true);
+ allStyles.style(foundry->styles[k]->key, foundry->styles[k]->styleName, true);
}
}
QtFontStyle::Key styleKey(style);
- QtFontStyle *s = allStyles.style(styleKey);
+ QtFontStyle *s = allStyles.style(styleKey, style);
return s && s->key.style == QFont::StyleItalic;
}
@@ -2166,12 +2193,12 @@ bool QFontDatabase::bold(const QString &family,
if (foundryName.isEmpty() ||
foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
for (int k = 0; k < foundry->count; k++)
- allStyles.style(foundry->styles[k]->key, true);
+ allStyles.style(foundry->styles[k]->key, foundry->styles[k]->styleName, true);
}
}
QtFontStyle::Key styleKey(style);
- QtFontStyle *s = allStyles.style(styleKey);
+ QtFontStyle *s = allStyles.style(styleKey, style);
return s && s->key.weight >= QFont::Bold;
}
@@ -2202,12 +2229,12 @@ int QFontDatabase::weight(const QString &family,
if (foundryName.isEmpty() ||
foundry->name.compare(foundryName, Qt::CaseInsensitive) == 0) {
for (int k = 0; k < foundry->count; k++)
- allStyles.style(foundry->styles[k]->key, true);
+ allStyles.style(foundry->styles[k]->key, foundry->styles[k]->styleName, true);
}
}
QtFontStyle::Key styleKey(style);
- QtFontStyle *s = allStyles.style(styleKey);
+ QtFontStyle *s = allStyles.style(styleKey, style);
return s ? s->key.weight : -1;
}
diff --git a/src/gui/text/qfontdatabase_mac.cpp b/src/gui/text/qfontdatabase_mac.cpp
index 60cf586..fc8247d 100644
--- a/src/gui/text/qfontdatabase_mac.cpp
+++ b/src/gui/text/qfontdatabase_mac.cpp
@@ -106,12 +106,14 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
CTFontDescriptorRef font = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fonts, i);
QCFString family_name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontFamilyNameAttribute);
+ QCFString style_name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontStyleNameAttribute);
QtFontFamily *family = db->family(family_name, true);
for(int ws = 1; ws < QFontDatabase::WritingSystemsCount; ++ws)
family->writingSystems[ws] = QtFontFamily::Supported;
QtFontFoundry *foundry = family->foundry(foundry_name, true);
QtFontStyle::Key styleKey;
+ QString styleName = style_name;
if(QCFType<CFDictionaryRef> styles = (CFDictionaryRef)CTFontDescriptorCopyAttribute(font, kCTFontTraitsAttribute)) {
if(CFNumberRef weight = (CFNumberRef)CFDictionaryGetValue(styles, kCTFontWeightTrait)) {
Q_ASSERT(CFNumberIsFloatType(weight));
@@ -132,7 +134,7 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
}
}
- QtFontStyle *style = foundry->style(styleKey, true);
+ QtFontStyle *style = foundry->style(styleKey, styleName, true);
style->smoothScalable = true;
if(QCFType<CFNumberRef> size = (CFNumberRef)CTFontDescriptorCopyAttribute(font, kCTFontSizeAttribute)) {
//qDebug() << "WHEE";
@@ -205,7 +207,7 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
QtFontFamily *family = db->family(familyName, true);
QtFontFoundry *foundry = family->foundry(QString(), true);
- QtFontStyle *style = foundry->style(styleKey, true);
+ QtFontStyle *style = foundry->style(styleKey, QString(), true);
style->pixelSize(0, true);
style->smoothScalable = true;
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp
index fd5c6b4..6b6f4f1 100644
--- a/src/gui/text/qfontdatabase_qpa.cpp
+++ b/src/gui/text/qfontdatabase_qpa.cpp
@@ -73,7 +73,7 @@ Q_GUI_EXPORT void qt_registerFont(const QString &familyName, const QString &fou
}
QtFontFoundry *foundry = f->foundry(foundryname, true);
- QtFontStyle *fontStyle = foundry->style(styleKey, true);
+ QtFontStyle *fontStyle = foundry->style(styleKey, QString(), true);
fontStyle->smoothScalable = scalable;
fontStyle->antialiased = antialiased;
QtFontSize *size = fontStyle->pixelSize(pixelSize?pixelSize:SMOOTH_SCALABLE, true);
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 980b5de..2f4d055 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -508,7 +508,7 @@ static bool registerScreenDeviceFont(int screenDeviceFontIndex,
QtFontFamily *family = privateDb()->family(familyName, true);
family->fixedPitch = faceAttrib.IsMonoWidth();
QtFontFoundry *foundry = family->foundry(QString(), true);
- QtFontStyle *style = foundry->style(styleKey, true);
+ QtFontStyle *style = foundry->style(styleKey, QString(), true);
style->smoothScalable = typefaceSupport.iIsScalable;
style->pixelSize(0, true);
diff --git a/src/gui/text/qfontdatabase_win.cpp b/src/gui/text/qfontdatabase_win.cpp
index 20f945a..788eb30 100644
--- a/src/gui/text/qfontdatabase_win.cpp
+++ b/src/gui/text/qfontdatabase_win.cpp
@@ -284,7 +284,7 @@ void addFontToDatabase(QString familyName, const QString &scriptName,
family->english_name = getEnglishName(familyName);
QtFontFoundry *foundry = family->foundry(foundryName, true);
- QtFontStyle *style = foundry->style(styleKey, true);
+ QtFontStyle *style = foundry->style(styleKey, QString(), true);
style->smoothScalable = scalable;
style->pixelSize( size, TRUE);
@@ -292,14 +292,14 @@ void addFontToDatabase(QString familyName, const QString &scriptName,
if (styleKey.weight <= QFont::DemiBold) {
QtFontStyle::Key key(styleKey);
key.weight = QFont::Bold;
- QtFontStyle *style = foundry->style(key, true);
+ QtFontStyle *style = foundry->style(key, QString(), true);
style->smoothScalable = scalable;
style->pixelSize( size, TRUE);
}
if (styleKey.style != QFont::StyleItalic) {
QtFontStyle::Key key(styleKey);
key.style = QFont::StyleItalic;
- QtFontStyle *style = foundry->style(key, true);
+ QtFontStyle *style = foundry->style(key, QString(), true);
style->smoothScalable = scalable;
style->pixelSize( size, TRUE);
}
@@ -307,7 +307,7 @@ void addFontToDatabase(QString familyName, const QString &scriptName,
QtFontStyle::Key key(styleKey);
key.weight = QFont::Bold;
key.style = QFont::StyleItalic;
- QtFontStyle *style = foundry->style(key, true);
+ QtFontStyle *style = foundry->style(key, QString(), true);
style->smoothScalable = scalable;
style->pixelSize( size, TRUE);
}
diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp
index 958daa2..922a97f 100644
--- a/src/gui/text/qfontdatabase_x11.cpp
+++ b/src/gui/text/qfontdatabase_x11.cpp
@@ -680,7 +680,7 @@ static void loadXlfds(const char *reqFamily, int encoding_id)
family->fontFileIndex = -1;
family->symbol_checked = true;
QtFontFoundry *foundry = family->foundry(QLatin1String(foundryName), true);
- QtFontStyle *style = foundry->style(styleKey, true);
+ QtFontStyle *style = foundry->style(styleKey, QString(), true);
delete [] style->weightName;
style->weightName = qstrdup(tokens[Weight]);
@@ -1034,13 +1034,14 @@ static void loadFontConfig()
FcChar8 *file_value;
int index_value;
FcChar8 *foundry_value;
+ FcChar8 *style_value;
FcBool scalable;
{
FcObjectSet *os = FcObjectSetCreate();
FcPattern *pattern = FcPatternCreate();
const char *properties [] = {
- FC_FAMILY, FC_WEIGHT, FC_SLANT,
+ FC_FAMILY, FC_STYLE, FC_WEIGHT, FC_SLANT,
FC_SPACING, FC_FILE, FC_INDEX,
FC_LANG, FC_CHARSET, FC_FOUNDRY, FC_SCALABLE, FC_PIXEL_SIZE, FC_WEIGHT,
FC_WIDTH,
@@ -1085,6 +1086,8 @@ static void loadFontConfig()
scalable = FcTrue;
if (FcPatternGetString(fonts->fonts[i], FC_FOUNDRY, 0, &foundry_value) != FcResultMatch)
foundry_value = 0;
+ if (FcPatternGetString(fonts->fonts[i], FC_STYLE, 0, &style_value) != FcResultMatch)
+ style_value = 0;
QtFontFamily *family = db->family(familyName, true);
FcLangSet *langset = 0;
@@ -1142,6 +1145,7 @@ static void loadFontConfig()
family->fontFileIndex = index_value;
QtFontStyle::Key styleKey;
+ QString styleName = style_value ? QString::fromUtf8((const char *) style_value) : QString();
styleKey.style = (slant_value == FC_SLANT_ITALIC)
? QFont::StyleItalic
: ((slant_value == FC_SLANT_OBLIQUE)
@@ -1156,7 +1160,7 @@ static void loadFontConfig()
QtFontFoundry *foundry
= family->foundry(foundry_value ? QString::fromUtf8((const char *)foundry_value) : QString(), true);
- QtFontStyle *style = foundry->style(styleKey, true);
+ QtFontStyle *style = foundry->style(styleKey, styleName, true);
if (spacing_value < FC_MONO)
family->fixedPitch = false;
@@ -1208,7 +1212,7 @@ static void loadFontConfig()
for (int i = 0; i < 4; ++i) {
styleKey.style = (i%2) ? QFont::StyleNormal : QFont::StyleItalic;
styleKey.weight = (i > 1) ? QFont::Bold : QFont::Normal;
- QtFontStyle *style = foundry->style(styleKey, true);
+ QtFontStyle *style = foundry->style(styleKey, QString(), true);
style->smoothScalable = true;
QtFontSize *size = style->pixelSize(SMOOTH_SCALABLE, true);
QtFontEncoding *enc = size->encodingID(-1, 0, 0, 0, 0, true);
@@ -1356,7 +1360,7 @@ static void initializeDb()
if (equiv) continue;
// let's fake one...
- equiv = foundry->style(key, true);
+ equiv = foundry->style(key, QString(), true);
equiv->smoothScalable = true;
QtFontSize *equiv_size = equiv->pixelSize(SMOOTH_SCALABLE, true);
diff --git a/src/gui/text/qfontengine_coretext.mm b/src/gui/text/qfontengine_coretext.mm
index 64b8682..07711a3 100644
--- a/src/gui/text/qfontengine_coretext.mm
+++ b/src/gui/text/qfontengine_coretext.mm
@@ -492,17 +492,6 @@ void QCoreTextFontEngine::init()
avgCharWidth = QFixed::fromReal(width * fontDef.pixelSize / emSize);
} else
avgCharWidth = QFontEngine::averageCharWidth();
-
- ctMaxCharWidth = ctMinLeftBearing = ctMinRightBearing = 0;
- QByteArray hheaTable = getSfntTable(MAKE_TAG('h', 'h', 'e', 'a'));
- if (hheaTable.size() >= 16) {
- quint16 width = qFromBigEndian<quint16>(reinterpret_cast<const uchar *>(hheaTable.constData() + 10));
- ctMaxCharWidth = width * fontDef.pixelSize / emSize;
- qint16 bearing = qFromBigEndian<qint16>(reinterpret_cast<const uchar *>(hheaTable.constData() + 12));
- ctMinLeftBearing = bearing * fontDef.pixelSize / emSize;
- bearing = qFromBigEndian<qint16>(reinterpret_cast<const uchar *>(hheaTable.constData() + 14));
- ctMinRightBearing = bearing * fontDef.pixelSize / emSize;
- }
}
bool QCoreTextFontEngine::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs,
@@ -599,20 +588,17 @@ QFixed QCoreTextFontEngine::averageCharWidth() const
qreal QCoreTextFontEngine::maxCharWidth() const
{
- return (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
- ? qRound(ctMaxCharWidth) : ctMaxCharWidth;
+ return 0;
}
qreal QCoreTextFontEngine::minLeftBearing() const
{
- return (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
- ? qRound(ctMinLeftBearing) : ctMinLeftBearing;
+ return 0;
}
qreal QCoreTextFontEngine::minRightBearing() const
{
- return (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
- ? qRound(ctMinRightBearing) : ctMinLeftBearing;
+ return 0;
}
void QCoreTextFontEngine::draw(CGContextRef ctx, qreal x, qreal y, const QTextItemInt &ti, int paintDeviceHeight)
diff --git a/src/gui/text/qfontengine_coretext_p.h b/src/gui/text/qfontengine_coretext_p.h
index 3ca8a0a..efe8295 100644
--- a/src/gui/text/qfontengine_coretext_p.h
+++ b/src/gui/text/qfontengine_coretext_p.h
@@ -103,9 +103,6 @@ private:
int synthesisFlags;
CGAffineTransform transform;
QFixed avgCharWidth;
- qreal ctMaxCharWidth;
- qreal ctMinLeftBearing;
- qreal ctMinRightBearing;
friend class QCoreTextFontEngineMulti;
};
diff --git a/src/gui/text/qfontenginedirectwrite.cpp b/src/gui/text/qfontenginedirectwrite.cpp
index 890cad9..d693273 100644
--- a/src/gui/text/qfontenginedirectwrite.cpp
+++ b/src/gui/text/qfontenginedirectwrite.cpp
@@ -390,6 +390,60 @@ glyph_metrics_t QFontEngineDirectWrite::boundingBox(const QGlyphLayout &glyphs)
return glyph_metrics_t(0, -m_ascent, w - lastRightBearing(glyphs), m_ascent + m_descent, w, 0);
}
+glyph_metrics_t QFontEngineDirectWrite::alphaMapBoundingBox(glyph_t glyph, QFixed subPixelPosition,
+ const QTransform &matrix,
+ GlyphFormat /*format*/)
+{
+ glyph_metrics_t bbox = QFontEngine::boundingBox(glyph, matrix); // To get transformed advance
+
+ UINT16 glyphIndex = glyph;
+ FLOAT glyphAdvance = 0;
+
+ DWRITE_GLYPH_OFFSET glyphOffset;
+ glyphOffset.advanceOffset = 0;
+ glyphOffset.ascenderOffset = 0;
+
+ DWRITE_GLYPH_RUN glyphRun;
+ glyphRun.fontFace = m_directWriteFontFace;
+ glyphRun.fontEmSize = fontDef.pixelSize;
+ glyphRun.glyphCount = 1;
+ glyphRun.glyphIndices = &glyphIndex;
+ glyphRun.glyphAdvances = &glyphAdvance;
+ glyphRun.isSideways = false;
+ glyphRun.bidiLevel = 0;
+ glyphRun.glyphOffsets = &glyphOffset;
+
+ DWRITE_MATRIX transform;
+ transform.dx = subPixelPosition.toReal();
+ transform.dy = 0;
+ transform.m11 = matrix.m11();
+ transform.m12 = matrix.m12();
+ transform.m21 = matrix.m21();
+ transform.m22 = matrix.m22();
+
+ IDWriteGlyphRunAnalysis *glyphAnalysis = NULL;
+ HRESULT hr = m_directWriteFactory->CreateGlyphRunAnalysis(
+ &glyphRun,
+ 1.0f,
+ &transform,
+ DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC,
+ DWRITE_MEASURING_MODE_NATURAL,
+ 0.0, 0.0,
+ &glyphAnalysis
+ );
+
+ if (SUCCEEDED(hr)) {
+ RECT rect;
+ glyphAnalysis->GetAlphaTextureBounds(DWRITE_TEXTURE_CLEARTYPE_3x1, &rect);
+ glyphAnalysis->Release();
+
+ return glyph_metrics_t(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
+ bbox.xoff, bbox.yoff);
+ } else {
+ return glyph_metrics_t();
+ }
+}
+
glyph_metrics_t QFontEngineDirectWrite::boundingBox(glyph_t g)
{
if (m_directWriteFontFace == 0)
@@ -459,9 +513,10 @@ qreal QFontEngineDirectWrite::maxCharWidth() const
extern uint qt_pow_gamma[256];
-QImage QFontEngineDirectWrite::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition)
+QImage QFontEngineDirectWrite::alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition,
+ const QTransform &xform)
{
- QImage im = imageForGlyph(glyph, subPixelPosition, 0, QTransform());
+ QImage im = imageForGlyph(glyph, subPixelPosition, 0, xform);
QImage indexed(im.width(), im.height(), QImage::Format_Indexed8);
QVector<QRgb> colors(256);
@@ -492,12 +547,8 @@ QImage QFontEngineDirectWrite::imageForGlyph(glyph_t t,
int margin,
const QTransform &xform)
{
- glyph_metrics_t metrics = QFontEngine::boundingBox(t, xform);
- int width = (metrics.width + margin * 2 + 4).ceil().toInt() ;
- int height = (metrics.height + margin * 2 + 4).ceil().toInt();
-
UINT16 glyphIndex = t;
- FLOAT glyphAdvance = metrics.xoff.toReal();
+ FLOAT glyphAdvance = 0;
DWRITE_GLYPH_OFFSET glyphOffset;
glyphOffset.advanceOffset = 0;
@@ -513,12 +564,9 @@ QImage QFontEngineDirectWrite::imageForGlyph(glyph_t t,
glyphRun.bidiLevel = 0;
glyphRun.glyphOffsets = &glyphOffset;
- QFixed x = margin - metrics.x.round() + subPixelPosition;
- QFixed y = margin - metrics.y.floor();
-
DWRITE_MATRIX transform;
- transform.dx = x.toReal();
- transform.dy = y.toReal();
+ transform.dx = subPixelPosition.toReal();
+ transform.dy = 0;
transform.m11 = xform.m11();
transform.m12 = xform.m12();
transform.m21 = xform.m21();
@@ -537,48 +585,54 @@ QImage QFontEngineDirectWrite::imageForGlyph(glyph_t t,
if (SUCCEEDED(hr)) {
RECT rect;
- rect.left = 0;
- rect.top = 0;
- rect.right = width;
- rect.bottom = height;
-
- int size = width * height * 3;
- BYTE *alphaValues = new BYTE[size];
- qMemSet(alphaValues, size, 0);
-
- hr = glyphAnalysis->CreateAlphaTexture(DWRITE_TEXTURE_CLEARTYPE_3x1,
- &rect,
- alphaValues,
- size);
-
- if (SUCCEEDED(hr)) {
- QImage img(width, height, QImage::Format_RGB32);
- img.fill(0xffffffff);
+ glyphAnalysis->GetAlphaTextureBounds(DWRITE_TEXTURE_CLEARTYPE_3x1, &rect);
- for (int y=0; y<height; ++y) {
- uint *dest = reinterpret_cast<uint *>(img.scanLine(y));
- BYTE *src = alphaValues + width * 3 * y;
+ rect.left -= margin;
+ rect.top -= margin;
+ rect.right += margin;
+ rect.bottom += margin;
- for (int x=0; x<width; ++x) {
- dest[x] = *(src) << 16
- | *(src + 1) << 8
- | *(src + 2);
+ int width = rect.right - rect.left;
+ int height = rect.bottom - rect.top;
- src += 3;
+ int size = width * height * 3;
+ if (size > 0) {
+ BYTE *alphaValues = new BYTE[size];
+ qMemSet(alphaValues, size, 0);
+
+ hr = glyphAnalysis->CreateAlphaTexture(DWRITE_TEXTURE_CLEARTYPE_3x1,
+ &rect,
+ alphaValues,
+ size);
+
+ if (SUCCEEDED(hr)) {
+ QImage img(width, height, QImage::Format_RGB32);
+ img.fill(0xffffffff);
+
+ for (int y=0; y<height; ++y) {
+ uint *dest = reinterpret_cast<uint *>(img.scanLine(y));
+ BYTE *src = alphaValues + width * 3 * y;
+
+ for (int x=0; x<width; ++x) {
+ dest[x] = *(src) << 16
+ | *(src + 1) << 8
+ | *(src + 2);
+
+ src += 3;
+ }
}
- }
- delete[] alphaValues;
- glyphAnalysis->Release();
+ delete[] alphaValues;
+ glyphAnalysis->Release();
- return img;
- } else {
- delete[] alphaValues;
- glyphAnalysis->Release();
+ return img;
+ } else {
+ delete[] alphaValues;
+ glyphAnalysis->Release();
- qErrnoWarning("QFontEngineDirectWrite::imageForGlyph: CreateAlphaTexture failed");
+ qErrnoWarning("QFontEngineDirectWrite::imageForGlyph: CreateAlphaTexture failed");
+ }
}
-
} else {
qErrnoWarning("QFontEngineDirectWrite::imageForGlyph: CreateGlyphRunAnalysis failed");
}
diff --git a/src/gui/text/qfontenginedirectwrite_p.h b/src/gui/text/qfontenginedirectwrite_p.h
index d0086fc..edf1e6a 100644
--- a/src/gui/text/qfontenginedirectwrite_p.h
+++ b/src/gui/text/qfontenginedirectwrite_p.h
@@ -86,6 +86,10 @@ public:
glyph_metrics_t boundingBox(const QGlyphLayout &glyphs);
glyph_metrics_t boundingBox(glyph_t g);
+ glyph_metrics_t alphaMapBoundingBox(glyph_t glyph,
+ QFixed subPixelPosition,
+ const QTransform &matrix,
+ GlyphFormat format);
QFixed ascent() const;
QFixed descent() const;
@@ -97,7 +101,7 @@ public:
bool supportsSubPixelPositions() const;
- QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition);
+ QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t);
QImage alphaRGBMapForGlyph(glyph_t t, QFixed subPixelPosition, int margin,
const QTransform &xform);
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index 9e1646f..f3d4107 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -442,6 +442,8 @@ bool QFontMetrics::inFont(QChar ch) const
}
/*!
+ \since 4.8
+
Returns true if the character encoded in UCS-4/UTF-32 is a valid
character in the font; otherwise returns false.
*/
@@ -1330,6 +1332,7 @@ bool QFontMetricsF::inFont(QChar ch) const
/*!
\fn bool QFontMetricsF::inFontUcs4(uint ch) const
+ \since 4.8
Returns true if the character given by \a ch, encoded in UCS-4/UTF-32,
is a valid character in the font; otherwise returns false.
diff --git a/src/gui/text/qplatformfontdatabase_qpa.cpp b/src/gui/text/qplatformfontdatabase_qpa.cpp
index 7e829db..d1d1f94 100644
--- a/src/gui/text/qplatformfontdatabase_qpa.cpp
+++ b/src/gui/text/qplatformfontdatabase_qpa.cpp
@@ -203,6 +203,7 @@ bool QSupportedWritingSystems::supported(QFontDatabase::WritingSystem writingSys
\brief The QSupportedWritingSystems class is used when registering fonts with the internal Qt
fontdatabase
\ingroup painting
+ \since 4.8
Its to provide an easy to use interface for indicating what writing systems a specific font
supports.
@@ -322,6 +323,7 @@ QString QPlatformFontDatabase::fontDir() const
\class QPlatformFontDatabase
\brief The QPlatformFontDatabase class makes it possible to customize how fonts
are discovered and how they are rendered
+ \since 4.8
\ingroup painting
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 8bbe86c..7e7ca6c 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -2569,6 +2569,7 @@ QTextDocument *QTextCursor::document() const
/*!
\enum Qt::CursorMoveStyle
+ \since 4.8
This enum describes the movement style available to text cursors. The options
are:
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index c1bc846..7990667 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -579,6 +579,8 @@ bool QTextLayout::cacheEnabled() const
}
/*!
+ \since 4.8
+
Set the cursor movement style. If the QTextLayout is backed by
a document, you can ignore this and use the option in QTextDocument,
this option is for widgets like QLineEdit or custom widgets without
@@ -592,6 +594,8 @@ void QTextLayout::setCursorMoveStyle(Qt::CursorMoveStyle style)
}
/*!
+ \since 4.8
+
The cursor movement style of this QTextLayout. The default is
Qt::LogicalMoveStyle.
@@ -725,9 +729,11 @@ int QTextLayout::previousCursorPosition(int oldPos, CursorMode mode) const
}
/*!
+ \since 4.8
+
Returns the cursor position to the right of \a oldPos, next to it.
- It's dependent on the visual position of characters, after bi-directional
- reordering.
+ The position is dependent on the visual position of characters, after
+ bi-directional reordering.
\sa leftCursorPosition(), nextCursorPosition()
*/
@@ -739,9 +745,11 @@ int QTextLayout::rightCursorPosition(int oldPos) const
}
/*!
+ \since 4.8
+
Returns the cursor position to the left of \a oldPos, next to it.
- It's dependent on the visual position of characters, after bi-directional
- reordering.
+ The position is dependent on the visual position of characters, after
+ bi-directional reordering.
\sa rightCursorPosition(), previousCursorPosition()
*/
diff --git a/src/gui/widgets/qcheckbox.cpp b/src/gui/widgets/qcheckbox.cpp
index 9904a15..2210488 100644
--- a/src/gui/widgets/qcheckbox.cpp
+++ b/src/gui/widgets/qcheckbox.cpp
@@ -303,6 +303,7 @@ QSize QCheckBox::sizeHint() const
/*!
\reimp
+ \since 4.8
*/
QSize QCheckBox::minimumSizeHint() const
{
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 2d63f63..7d35766 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1128,6 +1128,8 @@ void QLineEdit::setDragEnabled(bool b)
*/
/*!
+ \since 4.8
+
Returns the movement style for the cursor in the line edit.
*/
Qt::CursorMoveStyle QLineEdit::cursorMoveStyle() const
@@ -1137,6 +1139,8 @@ Qt::CursorMoveStyle QLineEdit::cursorMoveStyle() const
}
/*!
+ \since 4.8
+
Sets the movement style for the cursor in the line edit to the given
\a style.
*/
diff --git a/src/gui/widgets/qradiobutton.cpp b/src/gui/widgets/qradiobutton.cpp
index eeef40e..9ce4eba 100644
--- a/src/gui/widgets/qradiobutton.cpp
+++ b/src/gui/widgets/qradiobutton.cpp
@@ -206,6 +206,7 @@ QSize QRadioButton::sizeHint() const
/*!
\reimp
+ \since 4.8
*/
QSize QRadioButton::minimumSizeHint() const
{
diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp
index c6551e5..78dda23 100644
--- a/src/gui/widgets/qtabwidget.cpp
+++ b/src/gui/widgets/qtabwidget.cpp
@@ -885,6 +885,7 @@ QSize QTabWidget::minimumSizeHint() const
/*!
\reimp
+ \since 4.8
*/
int QTabWidget::heightForWidth(int width) const
{
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index 2670089..61d4fed 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -2472,6 +2472,8 @@ bool QTextEdit::find(const QString &exp, QTextDocument::FindFlags options)
and the text edit will try to guess the right format.
Use setHtml() or setPlainText() directly to avoid text edit's guessing.
+
+ \sa toPlainText(), toHtml()
*/
void QTextEdit::setText(const QString &text)
{
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
index fdb36e8..8065025 100644
--- a/src/network/bearer/qnetworkconfigmanager.cpp
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -126,6 +126,7 @@ QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate()
/*!
\fn void QNetworkConfigurationManager::configurationRemoved(const QNetworkConfiguration &config)
+ \since 4.8
This signal is emitted when a configuration is about to be removed from the system. The removed
configuration, specified by \a config, is invalid but retains name and identifier.
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 4f9836e..6d4df44 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -916,6 +916,8 @@ QNetworkProxyQuery::QNetworkProxyQuery(quint16 bindPort, const QString &protocol
#ifndef QT_NO_BEARERMANAGEMENT
/*!
+ \since 4.8
+
Constructs a QNetworkProxyQuery with the URL \a requestUrl and
sets the query type to \a queryType. The specified \a networkConfiguration
is used to resolve the proxy settings.
@@ -931,6 +933,8 @@ QNetworkProxyQuery::QNetworkProxyQuery(const QNetworkConfiguration &networkConfi
}
/*!
+ \since 4.8
+
Constructs a QNetworkProxyQuery of type \a queryType and sets the
protocol tag to be \a protocolTag. This constructor is suitable
for QNetworkProxyQuery::TcpSocket queries, because it sets the
@@ -953,6 +957,8 @@ QNetworkProxyQuery::QNetworkProxyQuery(const QNetworkConfiguration &networkConfi
}
/*!
+ \since 4.8
+
Constructs a QNetworkProxyQuery of type \a queryType and sets the
protocol tag to be \a protocolTag. This constructor is suitable
for QNetworkProxyQuery::TcpSocket queries because it sets the
@@ -1197,6 +1203,8 @@ QNetworkConfiguration QNetworkProxyQuery::networkConfiguration() const
}
/*!
+ \since 4.8
+
Sets the network configuration component of this QNetworkProxyQuery
object to be \a networkConfiguration. The network configuration can
be used to return different proxy settings based on the network in
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 52450b6..5d2221f 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1696,6 +1696,8 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
}
int numGlyphs = vertexCoordinates->vertexCount() / 4;
+ if (numGlyphs == 0)
+ return;
if (elementIndices.size() < numGlyphs*6) {
Q_ASSERT(elementIndices.size() % 6 == 0);
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp
index 9ba8b75..518c860 100644
--- a/src/opengl/qgl_qpa.cpp
+++ b/src/opengl/qgl_qpa.cpp
@@ -53,6 +53,8 @@
QT_BEGIN_NAMESPACE
/*!
+ \since 4.8
+
Returns an OpenGL format for the platform window format specified by \a format.
*/
QGLFormat QGLFormat::fromPlatformWindowFormat(const QPlatformWindowFormat &format)
@@ -87,6 +89,8 @@ QGLFormat QGLFormat::fromPlatformWindowFormat(const QPlatformWindowFormat &forma
}
/*!
+ \since 4.8
+
Returns a platform window format for the OpenGL format specified by \a format.
*/
QPlatformWindowFormat QGLFormat::toPlatformWindowFormat(const QGLFormat &format)
@@ -387,6 +391,8 @@ QGLContext::QGLContext(QPlatformGLContext *platformContext)
}
/*!
+ \since 4.8
+
Returns a OpenGL context for the platform-specific OpenGL context given by
\a platformContext.
*/
diff --git a/src/plugins/platforms/openvglite/main.cpp b/src/plugins/platforms/openvglite/main.cpp
deleted file mode 100644
index 19220a6..0000000
--- a/src/plugins/platforms/openvglite/main.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <private/qgraphicssystemplugin_p.h>
-#include "qgraphicssystem_vglite.h"
-
-QT_BEGIN_NAMESPACE
-
-class QVGGraphicsSystemPlugin : public QGraphicsSystemPlugin
-{
-public:
- QStringList keys() const;
- QGraphicsSystem *create(const QString&);
-};
-
-QStringList QVGGraphicsSystemPlugin::keys() const
-{
- QStringList list;
- list << "OpenVG";
- return list;
-}
-
-QGraphicsSystem* QVGGraphicsSystemPlugin::create(const QString& system)
-{
- if (system.toLower() == "openvg")
- return new QVGLiteGraphicsSystem;
-
- return 0;
-}
-
-Q_EXPORT_PLUGIN2(openvg, QVGGraphicsSystemPlugin)
-
-QT_END_NAMESPACE
diff --git a/src/plugins/platforms/openvglite/openvglite.pro b/src/plugins/platforms/openvglite/openvglite.pro
deleted file mode 100644
index 9d7860a..0000000
--- a/src/plugins/platforms/openvglite/openvglite.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TARGET = qvglitegraphicssystem
-include(../../qpluginbase.pri)
-
-QT += openvg
-
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/graphicssystems
-
-SOURCES = main.cpp qgraphicssystem_vglite.cpp qwindowsurface_vglite.cpp
-HEADERS = qgraphicssystem_vglite.h qwindowsurface_vglite.h
-
-target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems
-INSTALLS += target
diff --git a/src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp b/src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp
deleted file mode 100644
index 203896f..0000000
--- a/src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qgraphicssystem_vglite.h"
-#include "qwindowsurface_vglite.h"
-#include <QtOpenVG/private/qpixmapdata_vg_p.h>
-#include <QtGui/private/qegl_p.h>
-#include <QtCore/qdebug.h>
-#ifdef OPENVG_USBHP_INIT
-extern "C" {
-#include <linuxusbhp.h>
-};
-#endif
-
-QT_BEGIN_NAMESPACE
-
-QVGLiteGraphicsSystem::QVGLiteGraphicsSystem()
- : w(0), h(0), d(0), dw(0), dh(0), physWidth(0), physHeight(0),
- surface(0), context(0), rootWindow(0),
- screenFormat(QImage::Format_RGB16), preservedSwap(false)
-{
-#ifdef OPENVG_USBHP_INIT
- initLibrary();
-#endif
-
- // The graphics system is also the screen definition.
- mScreens.append(this);
-
- QString displaySpec = QString::fromLatin1(qgetenv("QWS_DISPLAY"));
- QStringList displayArgs = displaySpec.split(QLatin1Char(':'));
-
- // Initialize EGL and create the global EGL context.
- context = qt_vg_create_context(0);
- if (!context) {
- qFatal("QVGLiteGraphicsSystem: could not initialize EGL");
- return;
- }
-
- // Get the root window handle to use. Default to zero.
- QRegExp winidRx(QLatin1String("winid=?(\\d+)"));
- int winidIdx = displayArgs.indexOf(winidRx);
- int handle = 0;
- if (winidIdx >= 0) {
- winidRx.exactMatch(displayArgs.at(winidIdx));
- handle = winidRx.cap(1).toInt();
- }
-
- // Create a full-screen window based on the native handle.
- // If the context is premultiplied, the window should be too.
- QEglProperties props;
-#ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT
- EGLint surfaceType = 0;
- if (context->configAttrib(EGL_SURFACE_TYPE, &surfaceType) &&
- (surfaceType & EGL_VG_ALPHA_FORMAT_PRE_BIT) != 0)
- props.setValue(EGL_VG_ALPHA_FORMAT, EGL_VG_ALPHA_FORMAT_PRE);
-#endif
- rootWindow = eglCreateWindowSurface
- (context->display(), context->config(),
- (EGLNativeWindowType)handle, props.properties());
- if (rootWindow == EGL_NO_SURFACE) {
- delete context;
- context = 0;
- qFatal("QVGLiteGraphicsSystem: could not create full-screen window");
- return;
- }
-
- // Try to turn on preserved swap behaviour on the root window.
- // This will allow us to optimize compositing to focus on just
- // the screen region that has changed. Otherwise we must
- // re-composite the entire screen every frame.
-#if !defined(QVG_NO_PRESERVED_SWAP)
- eglGetError(); // Clear error state first.
- eglSurfaceAttrib(context->display(), rootWindow,
- EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
- preservedSwap = (eglGetError() == EGL_SUCCESS);
-#else
- preservedSwap = false;
-#endif
-
- // Fetch the root window properties.
- eglQuerySurface(context->display(), rootWindow, EGL_WIDTH, &w);
- eglQuerySurface(context->display(), rootWindow, EGL_HEIGHT, &h);
- screenFormat = qt_vg_config_to_image_format(context);
- switch (screenFormat) {
- case QImage::Format_ARGB32_Premultiplied:
- case QImage::Format_ARGB32:
- case QImage::Format_RGB32:
- default:
- d = 32;
- break;
- case QImage::Format_RGB16:
- case QImage::Format_ARGB4444_Premultiplied:
- d = 16;
- break;
- }
- dw = w;
- dh = h;
- qDebug("screen size: %dx%dx%d", w, h, d);
-
- // Handle display physical size spec. From qscreenlinuxfb_qws.cpp.
- QRegExp mmWidthRx(QLatin1String("mmWidth=?(\\d+)"));
- int dimIdxW = displayArgs.indexOf(mmWidthRx);
- QRegExp mmHeightRx(QLatin1String("mmHeight=?(\\d+)"));
- int dimIdxH = displayArgs.indexOf(mmHeightRx);
- if (dimIdxW >= 0) {
- mmWidthRx.exactMatch(displayArgs.at(dimIdxW));
- physWidth = mmWidthRx.cap(1).toInt();
- if (dimIdxH < 0)
- physHeight = dh*physWidth/dw;
- }
- if (dimIdxH >= 0) {
- mmHeightRx.exactMatch(displayArgs.at(dimIdxH));
- physHeight = mmHeightRx.cap(1).toInt();
- if (dimIdxW < 0)
- physWidth = dw*physHeight/dh;
- }
- if (dimIdxW < 0 && dimIdxH < 0) {
- const int dpi = 72;
- physWidth = qRound(dw * 25.4 / dpi);
- physHeight = qRound(dh * 25.4 / dpi);
- }
-}
-
-QVGLiteGraphicsSystem::~QVGLiteGraphicsSystem()
-{
-}
-
-QPixmapData *QVGLiteGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
-{
-#if !defined(QVGLite_NO_SINGLE_CONTEXT) && !defined(QVGLite_NO_PIXMAP_DATA)
- // Pixmaps can use QVGLitePixmapData; bitmaps must use raster.
- if (type == QPixmapData::PixmapType)
- return new QVGPixmapData(type);
- else
- return new QRasterPixmapData(type);
-#else
- return new QRasterPixmapData(type);
-#endif
-}
-
-QWindowSurface *QVGLiteGraphicsSystem::createWindowSurface(QWidget *widget) const
-{
- if (widget->windowType() == Qt::Desktop)
- return 0; // Don't create an explicit window surface for the destkop.
- if (surface) {
- qWarning() << "QVGLiteGraphicsSystem: only one window surface "
- "is supported at a time";
- return 0;
- }
- surface = new QVGLiteWindowSurface
- (const_cast<QVGLiteGraphicsSystem *>(this), widget);
- return surface;
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/platforms/openvglite/qgraphicssystem_vglite.h b/src/plugins/platforms/openvglite/qgraphicssystem_vglite.h
deleted file mode 100644
index 41b1d28..0000000
--- a/src/plugins/platforms/openvglite/qgraphicssystem_vglite.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QGRAPHICSSYSTEM_VGLITE_H
-#define QGRAPHICSSYSTEM_VGLITE_H
-
-#include <QtGui/private/qgraphicssystem_p.h>
-#include <QtGui/private/qegl_p.h>
-#include <QtGui/qimage.h>
-
-QT_BEGIN_NAMESPACE
-
-class QVGLiteWindowSurface;
-
-class QVGLiteGraphicsSystem : public QGraphicsSystem,
- public QGraphicsSystemScreen
-{
-public:
- QVGLiteGraphicsSystem();
- ~QVGLiteGraphicsSystem();
-
- QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
- QWindowSurface *createWindowSurface(QWidget *widget) const;
- QList<QGraphicsSystemScreen *> screens() const { return mScreens; }
-
- QRect geometry() const { return QRect(0, 0, w, h); }
- int depth() const { return d; }
- QImage::Format format() const { return screenFormat; }
- QSize physicalSize() const { return QSize(physWidth, physHeight); }
-
-private:
- friend class QVGLiteWindowSurface;
-
- int w;
- int h;
- int d;
-
- int dw;
- int dh;
-
- int physWidth;
- int physHeight;
-
- mutable QVGLiteWindowSurface *surface;
- QEglContext *context;
- EGLSurface rootWindow;
- QImage::Format screenFormat;
- bool preservedSwap;
-
- QList<QGraphicsSystemScreen *> mScreens;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp b/src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp
deleted file mode 100644
index dad23c1..0000000
--- a/src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qwindowsurface_vglite.h"
-#include "qgraphicssystem_vglite.h"
-#include <QtOpenVG/qvg.h>
-#include <QtOpenVG/private/qvg_p.h>
-#include <QtOpenVG/private/qpaintengine_vg_p.h>
-
-QT_BEGIN_NAMESPACE
-
-QVGLiteWindowSurface::QVGLiteWindowSurface
- (QVGLiteGraphicsSystem *gs, QWidget *window)
- : QWindowSurface(window), graphicsSystem(gs),
- isPaintingActive(false), engine(0)
-{
-}
-
-QVGLiteWindowSurface::~QVGLiteWindowSurface()
-{
- graphicsSystem->surface = 0;
- if (engine)
- qt_vg_destroy_paint_engine(engine);
-}
-
-QPaintDevice *QVGLiteWindowSurface::paintDevice()
-{
- qt_vg_make_current(graphicsSystem->context, graphicsSystem->rootWindow);
- isPaintingActive = true;
- // TODO: clear the parts of the back buffer that are not
- // covered by the window surface to black.
- return this;
-}
-
-void QVGLiteWindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &offset)
-{
- Q_UNUSED(widget);
- Q_UNUSED(region);
- Q_UNUSED(offset);
- QEglContext *context = graphicsSystem->context;
- if (context) {
- if (!isPaintingActive)
- qt_vg_make_current(context, graphicsSystem->rootWindow);
- context->swapBuffers();
- qt_vg_done_current(context);
- context->setSurface(EGL_NO_SURFACE);
- isPaintingActive = false;
- }
-}
-
-void QVGLiteWindowSurface::setGeometry(const QRect &rect)
-{
- QWindowSurface::setGeometry(rect);
-}
-
-bool QVGLiteWindowSurface::scroll(const QRegion &area, int dx, int dy)
-{
- return QWindowSurface::scroll(area, dx, dy);
-}
-
-void QVGLiteWindowSurface::beginPaint(const QRegion &region)
-{
- Q_UNUSED(region);
-}
-
-void QVGLiteWindowSurface::endPaint(const QRegion &region)
-{
- Q_UNUSED(region);
-}
-
-QPaintEngine *QVGLiteWindowSurface::paintEngine() const
-{
- if (!engine)
- engine = qt_vg_create_paint_engine();
- return engine;
-}
-
-// We need to get access to QWidget::metric() from QVGLiteWindowSurface::metric,
-// but it is not a friend of QWidget. To get around this, we create a
-// fake QX11PaintEngine class, which is a friend.
-class QX11PaintEngine
-{
-public:
- static int metric(const QWidget *widget, QPaintDevice::PaintDeviceMetric met)
- {
- return widget->metric(met);
- }
-};
-
-int QVGLiteWindowSurface::metric(PaintDeviceMetric met) const
-{
- return QX11PaintEngine::metric(window(), met);
-}
diff --git a/src/plugins/platforms/openvglite/qwindowsurface_vglite.h b/src/plugins/platforms/openvglite/qwindowsurface_vglite.h
deleted file mode 100644
index b6e22d8..0000000
--- a/src/plugins/platforms/openvglite/qwindowsurface_vglite.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QWINDOWSURFACE_VGLITE_H
-#define QWINDOWSURFACE_VGLITE_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtGui/private/qwindowsurface_p.h>
-#include <QtGui/private/qegl_p.h>
-
-QT_BEGIN_NAMESPACE
-
-class QVGLiteGraphicsSystem;
-class QVGPaintEngine;
-
-class Q_OPENVG_EXPORT QVGLiteWindowSurface : public QWindowSurface, public QPaintDevice
-{
-public:
- QVGLiteWindowSurface(QVGLiteGraphicsSystem *gs, QWidget *window);
- ~QVGLiteWindowSurface();
-
- QPaintDevice *paintDevice();
- void flush(QWidget *widget, const QRegion &region, const QPoint &offset);
- void setGeometry(const QRect &rect);
- bool scroll(const QRegion &area, int dx, int dy);
-
- void beginPaint(const QRegion &region);
- void endPaint(const QRegion &region);
-
- QPaintEngine *paintEngine() const;
-
-protected:
- int metric(PaintDeviceMetric metric) const;
-
-private:
- QVGLiteGraphicsSystem *graphicsSystem;
- bool isPaintingActive;
- mutable QVGPaintEngine *engine;
-};
-
-QT_END_NAMESPACE
-
-#endif // QWINDOWSURFACE_VGLITE_H