diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-04-23 14:09:02 +0200 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-04-25 06:15:36 +0200 |
commit | 4538bbf4a68a80f09cad8749a2b05bfb8ce4290c (patch) | |
tree | 85574e51d5fe2defbcb6e5025b26d318cd3f5ab1 /src/gui/kernel/qwindowsysteminterface.cpp | |
parent | d8a688adf01e2750fd4012de4b8966901630f574 (diff) |
Misc.: Fix some narrowing integral conversion warnings
Drive-by change: use QByteArrayView instead of allocating a QByteArray.
Change-Id: Iaf7acbbdb4efbb101b73b30061ce38dd1fa99ca3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 714a859590..be2157c8b9 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -138,7 +138,7 @@ static bool handleWindowSystemEvent(Args ...args) return QWindowSystemHelper<Delivery>::template handleEvent<EventType>(args...); } -int QWindowSystemInterfacePrivate::windowSystemEventsQueued() +qsizetype QWindowSystemInterfacePrivate::windowSystemEventsQueued() { return windowSystemEventQueue.count(); } @@ -791,7 +791,7 @@ void QWindowSystemInterface::handleScreenRemoved(QPlatformScreen *platformScreen void QWindowSystemInterface::handlePrimaryScreenChanged(QPlatformScreen *newPrimary) { QScreen *newPrimaryScreen = newPrimary->screen(); - int indexOfScreen = QGuiApplicationPrivate::screen_list.indexOf(newPrimaryScreen); + qsizetype indexOfScreen = QGuiApplicationPrivate::screen_list.indexOf(newPrimaryScreen); Q_ASSERT(indexOfScreen >= 0); if (indexOfScreen == 0) return; @@ -1058,7 +1058,7 @@ Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QWindowSystemInterface::TouchPo */ bool QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags) { - const int count = QWindowSystemInterfacePrivate::windowSystemEventQueue.count(); + const qsizetype count = QWindowSystemInterfacePrivate::windowSystemEventQueue.count(); if (!count) return false; if (!QGuiApplication::instance()) { |