summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-04-23 14:09:02 +0200
committerAhmad Samir <a.samirh78@gmail.com>2023-04-25 06:15:36 +0200
commit4538bbf4a68a80f09cad8749a2b05bfb8ce4290c (patch)
tree85574e51d5fe2defbcb6e5025b26d318cd3f5ab1 /src/gui/kernel/qwindowsysteminterface.cpp
parentd8a688adf01e2750fd4012de4b8966901630f574 (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.cpp6
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()) {