summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qhighdpiscaling_p.h
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-06-22 11:44:14 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-06-29 19:19:47 +0200
commit9fa3cf15c8500fba5bbb861f1925160815ae2afd (patch)
treef779e08446bf302803b27130cf4c92fe46ba68b6 /src/gui/kernel/qhighdpiscaling_p.h
parentc70c4e42665eb34e677fc51a49552c9af3f58d7a (diff)
Use QList instead of QVector in gui
Applied to headers only. Source file to be changed separately. Task-number: QTBUG-84469 Change-Id: Ic08a899321eaffc46b8461aaee3dbaa4d2c727a9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/kernel/qhighdpiscaling_p.h')
-rw-r--r--src/gui/kernel/qhighdpiscaling_p.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h
index ed493a94c6..dfacf2a4f3 100644
--- a/src/gui/kernel/qhighdpiscaling_p.h
+++ b/src/gui/kernel/qhighdpiscaling_p.h
@@ -52,11 +52,11 @@
//
#include <QtGui/private/qtguiglobal_p.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qloggingcategory.h>
#include <QtCore/qmargins.h>
#include <QtCore/qmath.h>
#include <QtCore/qrect.h>
-#include <QtCore/qvector.h>
-#include <QtCore/qloggingcategory.h>
#include <QtGui/qregion.h>
#include <QtGui/qscreen.h>
#include <QtGui/qvector2d.h>
@@ -184,13 +184,13 @@ inline QMargins scale(const QMargins &margins, qreal scaleFactor, QPoint origin
qRound(qreal(margins.right()) * scaleFactor), qRound(qreal(margins.bottom()) * scaleFactor));
}
-template <typename T>
-QVector<T> scale(const QVector<T> &vector, qreal scaleFactor, QPoint origin = QPoint(0, 0))
+template<typename T>
+QList<T> scale(const QList<T> &vector, qreal scaleFactor, QPoint origin = QPoint(0, 0))
{
if (!QHighDpiScaling::isActive())
return vector;
- QVector<T> scaled;
+ QList<T> scaled;
scaled.reserve(vector.size());
for (const T &item : vector)
scaled.append(scale(item, scaleFactor, origin));