diff options
Diffstat (limited to 'src/platformsupport')
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 += \ |