summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp2
-rw-r--r--src/gui/image/qjpeghandler.cpp6
-rw-r--r--src/gui/kernel/qopenglcontext.cpp14
-rw-r--r--src/gui/kernel/qplatformservices.cpp3
-rw-r--r--src/gui/kernel/qplatformservices.h1
-rw-r--r--src/gui/painting/qpaintengineex.cpp4
-rw-r--r--src/gui/painting/qpathclipper_p.h32
-rw-r--r--src/gui/text/qfontmetrics.cpp8
-rw-r--r--src/gui/text/qtextformat.cpp2
9 files changed, 39 insertions, 33 deletions
diff --git a/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp b/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp
index f43bba1324..a691c24ce0 100644
--- a/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp
+++ b/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp
@@ -48,7 +48,7 @@ static const char * const start_xpm[]={
//! [1]
QPixmap myPixmap;
-myPixmap->setMask(myPixmap->createHeuristicMask());
+myPixmap.setMask(myPixmap.createHeuristicMask());
//! [1]
//! [2]
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp
index eb580c81f1..b07e1e28d3 100644
--- a/src/gui/image/qjpeghandler.cpp
+++ b/src/gui/image/qjpeghandler.cpp
@@ -825,10 +825,10 @@ static int getExifOrientation(QByteArray &exifData)
quint16 tag;
quint16 type;
quint32 components;
- quint32 value;
-
- stream >> tag >> type >> components >> value;
+ quint16 value;
+ quint16 dummy;
+ stream >> tag >> type >> components >> value >> dummy;
if (tag == 0x0112) { // Tag Exif.Image.Orientation
if (components !=1)
return -1;
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 1cd67b19d2..3fccd6ba9a 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -518,8 +518,9 @@ void QOpenGLContext::setScreen(QScreen *screen)
in addition. Therefore \a handle is variant containing a platform-specific
value type. These classes can be found in the QtPlatformHeaders module.
- When create() is called with native handles set, the handles' ownership are
- not taken, meaning that \c destroy() will not destroy the native context.
+ When create() is called with native handles set, QOpenGLContext does not
+ take ownership of the handles, so destroying the QOpenGLContext does not
+ destroy the native context.
\note Some frameworks track the current context and surfaces internally.
Making the adopted QOpenGLContext current via Qt will have no effect on such
@@ -582,8 +583,8 @@ QVariant QOpenGLContext::nativeHandle() const
Returns \c true if the native context was successfully created and is ready to
be used with makeCurrent(), swapBuffers(), etc.
- \note If the context is already created, this function will first call
- \c destroy(), and then create a new OpenGL context.
+ \note If the context already exists, this function destroys the existing
+ context first, and then creates a new one.
\sa makeCurrent(), format()
*/
@@ -606,6 +607,8 @@ bool QOpenGLContext::create()
}
/*!
+ \internal
+
Destroy the underlying platform context associated with this context.
If any other context is directly or indirectly sharing resources with this
@@ -659,8 +662,7 @@ void QOpenGLContext::destroy()
/*!
Destroys the QOpenGLContext object.
- This implicitly calls \c destroy(), so if this is the current context for the
- thread, doneCurrent() is also called.
+ If this is the current context for the thread, doneCurrent() is also called.
*/
QOpenGLContext::~QOpenGLContext()
{
diff --git a/src/gui/kernel/qplatformservices.cpp b/src/gui/kernel/qplatformservices.cpp
index e11a1858f6..2188920c86 100644
--- a/src/gui/kernel/qplatformservices.cpp
+++ b/src/gui/kernel/qplatformservices.cpp
@@ -49,6 +49,9 @@ QT_BEGIN_NAMESPACE
\brief The QPlatformServices provides the backend for desktop-related functionality.
*/
+QPlatformServices::QPlatformServices()
+{ }
+
bool QPlatformServices::openUrl(const QUrl &url)
{
qWarning("This plugin does not support QPlatformServices::openUrl() for '%s'.",
diff --git a/src/gui/kernel/qplatformservices.h b/src/gui/kernel/qplatformservices.h
index 00a87d51f5..005748d18c 100644
--- a/src/gui/kernel/qplatformservices.h
+++ b/src/gui/kernel/qplatformservices.h
@@ -52,6 +52,7 @@ class QUrl;
class Q_GUI_EXPORT QPlatformServices
{
public:
+ QPlatformServices();
virtual ~QPlatformServices() { }
virtual bool openUrl(const QUrl &url);
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 0c3ea37b29..f5e6f7cca6 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -1075,9 +1075,9 @@ void QPaintEngineEx::drawStaticTextItem(QStaticTextItem *staticTextItem)
}
}
-bool QPaintEngineEx::requiresPretransformedGlyphPositions(QFontEngine *, const QTransform &t) const
+bool QPaintEngineEx::requiresPretransformedGlyphPositions(QFontEngine *, const QTransform &) const
{
- return t.type() >= QTransform::TxProject;
+ return false;
}
bool QPaintEngineEx::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const
diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h
index 5475503f22..5fc8bbaf09 100644
--- a/src/gui/painting/qpathclipper_p.h
+++ b/src/gui/painting/qpathclipper_p.h
@@ -414,22 +414,6 @@ inline void QPathSegments::addIntersection(int index, const Intersection &inters
}
}
-inline void QWingedEdge::TraversalStatus::flipDirection()
-{
- direction = QWingedEdge::flip(direction);
-}
-
-inline void QWingedEdge::TraversalStatus::flipTraversal()
-{
- traversal = QWingedEdge::flip(traversal);
-}
-
-inline void QWingedEdge::TraversalStatus::flip()
-{
- flipDirection();
- flipTraversal();
-}
-
inline int QWingedEdge::edgeCount() const
{
return m_edges.size();
@@ -471,11 +455,27 @@ inline QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal traversal)
return traversal == QPathEdge::RightTraversal ? QPathEdge::LeftTraversal : QPathEdge::RightTraversal;
}
+inline void QWingedEdge::TraversalStatus::flipTraversal()
+{
+ traversal = QWingedEdge::flip(traversal);
+}
+
inline QPathEdge::Direction QWingedEdge::flip(QPathEdge::Direction direction)
{
return direction == QPathEdge::Forward ? QPathEdge::Backward : QPathEdge::Forward;
}
+inline void QWingedEdge::TraversalStatus::flipDirection()
+{
+ direction = QWingedEdge::flip(direction);
+}
+
+inline void QWingedEdge::TraversalStatus::flip()
+{
+ flipDirection();
+ flipTraversal();
+}
+
QT_END_NAMESPACE
#endif // QPATHCLIPPER_P_H
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index 9610482145..e010dd62ae 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -647,7 +647,7 @@ int QFontMetrics::charWidth(const QString &text, int pos) const
e.g. for italicized fonts, and that the width of the returned
rectangle might be different than what the width() method returns.
- If you want to know the advance width of the string (to layout
+ If you want to know the advance width of the string (to lay out
a set of strings next to each other), use width() instead.
Newline characters are processed as normal characters, \e not as
@@ -817,7 +817,7 @@ QSize QFontMetrics::size(int flags, const QString &text, int tabStops, int *tabA
e.g. for italicized fonts, and that the width of the returned
rectangle might be different than what the width() method returns.
- If you want to know the advance width of the string (to layout
+ If you want to know the advance width of the string (to lay out
a set of strings next to each other), use width() instead.
Newline characters are processed as normal characters, \e not as
@@ -1432,7 +1432,7 @@ qreal QFontMetricsF::width(QChar ch) const
e.g. for italicized fonts, and that the width of the returned
rectangle might be different than what the width() method returns.
- If you want to know the advance width of the string (to layout
+ If you want to know the advance width of the string (to lay out
a set of strings next to each other), use width() instead.
Newline characters are processed as normal characters, \e not as
@@ -1606,7 +1606,7 @@ QSizeF QFontMetricsF::size(int flags, const QString &text, int tabStops, int *ta
e.g. for italicized fonts, and that the width of the returned
rectangle might be different than what the width() method returns.
- If you want to know the advance width of the string (to layout
+ If you want to know the advance width of the string (to lay out
a set of strings next to each other), use width() instead.
Newline characters are processed as normal characters, \e not as
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index 1502758ee8..ab4b10522a 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -305,7 +305,7 @@ uint QTextFormatPrivate::recalcHash() const
{
hashValue = 0;
for (QVector<Property>::ConstIterator it = props.constBegin(); it != props.constEnd(); ++it)
- hashValue += (it->key << 16) + variantHash(it->value);
+ hashValue += (static_cast<quint32>(it->key) << 16) + variantHash(it->value);
hashDirty = false;