summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-06-30 22:59:21 +0200
committerLiang Qi <liang.qi@qt.io>2018-07-02 11:23:45 +0200
commite3ed2281c0c891cf3b15c95f9f7cdae42e9f233a (patch)
treeaae8da6ce616eae02b69fb1fcdcb4383c8fe6811 /src/platformsupport
parent3be141d5bc199080b524d8f6f5ce514e8f74d23a (diff)
parente75e4b39b78ba05ea2cd45dc96acf99fc89c5915 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: MÃ¥rten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp2
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp14
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp2
-rw-r--r--src/platformsupport/platformsupport.pro2
-rw-r--r--src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp9
-rw-r--r--src/platformsupport/themes/themes.pro2
6 files changed, 15 insertions, 16 deletions
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
index aab1ab9889..8df8da1a38 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
@@ -1000,7 +1000,7 @@ static QChar *createFontFile(const QString &faceName)
if (!faceName.isEmpty()) {
const int nameLength = qMin(faceName.length(), LF_FACESIZE - 1);
faceNamePtr = new QChar[nameLength + 1];
- memcpy(faceNamePtr, faceName.utf16(), sizeof(wchar_t) * nameLength);
+ memcpy(static_cast<void *>(faceNamePtr), faceName.utf16(), sizeof(wchar_t) * nameLength);
faceNamePtr[nameLength] = 0;
}
return faceNamePtr;
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
index 04372ae4d9..86a4cd0076 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
+++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
@@ -245,18 +245,12 @@ void QEvdevMouseHandler::readMouseData()
m_y += data->value;
posChanged = true;
} else if (data->code == ABS_WHEEL) { // vertical scroll
- // data->value: 1 == up, -1 == down
- if (data->value == 1)
- delta.setY(120);
- else
- delta.setY(-120);
+ // data->value: positive == up, negative == down
+ delta.setY(120 * data->value);
emit handleWheelEvent(delta);
} else if (data->code == ABS_THROTTLE) { // horizontal scroll
- // data->value: 1 == right, -1 == left
- if (data->value == 1)
- delta.setX(-120);
- else
- delta.setX(120);
+ // data->value: positive == right, negative == left
+ delta.setX(-120 * data->value);
emit handleWheelEvent(delta);
}
} else if (data->type == EV_KEY && data->code == BTN_TOUCH) {
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
index 7b7649bc5c..f3cc160b3e 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
@@ -368,7 +368,7 @@ QEvdevTouchScreenHandler::~QEvdevTouchScreenHandler()
bool QEvdevTouchScreenHandler::isFiltered() const
{
- return d->m_filtered;
+ return d && d->m_filtered;
}
QTouchDevice *QEvdevTouchScreenHandler::touchDevice() const
diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro
index 7dbb6f6cae..6d4f1b93bd 100644
--- a/src/platformsupport/platformsupport.pro
+++ b/src/platformsupport/platformsupport.pro
@@ -16,7 +16,7 @@ qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput)|qtConfig(integrityhid) {
input.depends += devicediscovery
}
-if(unix:!darwin)|qtConfig(xcb): \
+if(unix:!uikit)|qtConfig(xcb): \
SUBDIRS += services
qtConfig(opengl): \
diff --git a/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp b/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp
index 2153924ec8..e81d272d4f 100644
--- a/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp
+++ b/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp
@@ -90,12 +90,17 @@ static QString iconTempPath()
static const QString KDEItemFormat = QStringLiteral("org.kde.StatusNotifierItem-%1-%2");
static const QString KDEWatcherService = QStringLiteral("org.kde.StatusNotifierWatcher");
-static const QString TempFileTemplate = iconTempPath() + QLatin1String("/qt-trayicon-XXXXXX.png");
static const QString XdgNotificationService = QStringLiteral("org.freedesktop.Notifications");
static const QString XdgNotificationPath = QStringLiteral("/org/freedesktop/Notifications");
static const QString DefaultAction = QStringLiteral("default");
static int instanceCount = 0;
+static inline QString tempFileTemplate()
+{
+ static const QString TempFileTemplate = iconTempPath() + QLatin1String("/qt-trayicon-XXXXXX.png");
+ return TempFileTemplate;
+}
+
/*!
\class QDBusTrayIcon
\internal
@@ -206,7 +211,7 @@ QTemporaryFile *QDBusTrayIcon::tempIcon(const QIcon &icon)
if (!necessary)
return nullptr;
qreal dpr = qGuiApp->devicePixelRatio();
- QTemporaryFile *ret = new QTemporaryFile(TempFileTemplate, this);
+ QTemporaryFile *ret = new QTemporaryFile(tempFileTemplate(), this);
ret->open();
icon.pixmap(QSize(22 * dpr, 22 * dpr)).save(ret);
ret->close();
diff --git a/src/platformsupport/themes/themes.pro b/src/platformsupport/themes/themes.pro
index 44f94fafc8..668a843473 100644
--- a/src/platformsupport/themes/themes.pro
+++ b/src/platformsupport/themes/themes.pro
@@ -6,7 +6,7 @@ CONFIG += static internal_module
DEFINES += QT_NO_CAST_FROM_ASCII
-if(unix:!darwin)|qtConfig(xcb): \
+if(unix:!uikit)|qtConfig(xcb): \
include($$PWD/genericunix/genericunix.pri)
HEADERS += \