summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-10 17:43:12 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-10 17:43:13 +0200
commit8ba384a5645aebbefe34b814828024d511171497 (patch)
tree6f6cfe1b849b6e0e02de15ee74ad0f3d5fc740b6 /src/gui
parente694ced803589b3504b6bdb2fc8bf97bc891c794 (diff)
parent25b72a63fffe800f2005b21d254b0b191d263b10 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp5
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h1
-rw-r--r--src/gui/painting/qcolor.cpp5
-rw-r--r--src/gui/text/qfontdatabase.cpp1
4 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 00b8e05f30..1b7edb1278 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -448,6 +448,11 @@ void QWindowSystemInterface::unregisterTouchDevice(const QTouchDevice *device)
QTouchDevicePrivate::unregisterDevice(device);
}
+bool QWindowSystemInterface::isTouchDeviceRegistered(const QTouchDevice *device)
+{
+ return QTouchDevicePrivate::isRegistered(device);
+}
+
void QWindowSystemInterface::handleTouchEvent(QWindow *w, QTouchDevice *device,
const QList<TouchPoint> &points, Qt::KeyboardModifiers mods)
{
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index 00437e8341..6bf87439b9 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -130,6 +130,7 @@ public:
static void registerTouchDevice(const QTouchDevice *device);
static void unregisterTouchDevice(const QTouchDevice *device);
+ static bool isTouchDeviceRegistered(const QTouchDevice *device);
static void handleTouchEvent(QWindow *w, QTouchDevice *device,
const QList<struct TouchPoint> &points, Qt::KeyboardModifiers mods = Qt::NoModifier);
static void handleTouchEvent(QWindow *w, ulong timestamp, QTouchDevice *device,
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 20dd8d7f82..0d24fd94f5 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -527,9 +527,10 @@ QString QColor::name(NameFormat format) const
{
switch (format) {
case HexRgb:
- return QString::asprintf("#%02x%02x%02x", red(), green(), blue());
+ return QLatin1Char('#') + QString::number(rgba() | 0x1000000, 16).rightRef(6);
case HexArgb:
- return QString::asprintf("#%02x%02x%02x%02x", alpha(), red(), green(), blue());
+ // it's called rgba() but it does return AARRGGBB
+ return QLatin1Char('#') + QString::number(rgba() | 0x100000000, 16).rightRef(8);
}
return QString();
}
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index cdfcdec80c..ca569e5961 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -2801,6 +2801,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
req.fallBackFamilies.clear();
}
+ Q_ASSERT(fe);
if (fe->symbol || (d->request.styleStrategy & QFont::NoFontMerging)) {
for (int i = 0; i < QChar::ScriptCount; ++i) {
if (!d->engineData->engines[i]) {