aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2022-06-13 15:35:37 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2022-06-14 10:01:40 +0200
commitc57ab963bd9630767fc5f900de0f8d9e8e4a2907 (patch)
treeb2779f7fb52f465eb2eef6115a5cb0cf4a386aa1
parent4b4ed83a1eb4259a9ced3ae58ed2849086b14534 (diff)
Fix the build of the manual tests x11vkbtest and x11vkbwrapper
- fix insertion of QVariant value into std::map - remove unneeded QStateMachine include - fix QT_CHARTS_* namespace macros - fix implicit construction of Qt::WindowFlags - fix usage of Qt::endl without namespace qualifier - fix include order of windowhelper.h Change-Id: I624fd4cc9769778cc0760aa7a9fdfabfa6528c66 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--tests/manual/x11vkbtest/filehelper.cpp3
-rw-r--r--tests/manual/x11vkbtest/main.cpp1
-rw-r--r--tests/manual/x11vkbtest/memorymonitor.h8
-rw-r--r--tests/manual/x11vkbtest/testreporter.cpp2
-rw-r--r--tests/manual/x11vkbtest/windowhelper.cpp4
5 files changed, 9 insertions, 9 deletions
diff --git a/tests/manual/x11vkbtest/filehelper.cpp b/tests/manual/x11vkbtest/filehelper.cpp
index f3a379af..a35ac738 100644
--- a/tests/manual/x11vkbtest/filehelper.cpp
+++ b/tests/manual/x11vkbtest/filehelper.cpp
@@ -33,6 +33,7 @@
#include <QJsonDocument>
#include <QJsonObject>
#include <fstream>
+#include <utility>
#include "filehelper.h"
@@ -86,7 +87,7 @@ bool FileHelper::getJsonFromFile(const QString &fileName, std::map<QString, QVar
result = false;
} else {
auto jsonIter = jsonObj.constBegin();
- jsonMap.insert({jsonIter.key(), jsonIter.value()});
+ jsonMap.insert(std::make_pair(jsonIter.key(), jsonIter.value()));
}
}
}
diff --git a/tests/manual/x11vkbtest/main.cpp b/tests/manual/x11vkbtest/main.cpp
index f248bd53..d32de079 100644
--- a/tests/manual/x11vkbtest/main.cpp
+++ b/tests/manual/x11vkbtest/main.cpp
@@ -30,7 +30,6 @@
#include <QApplication>
#include <QDebug>
#include <QCommandLineParser>
-#include <QStateMachine>
#include <QtGui/QGuiApplication>
#include <QtCharts/QChartView>
#include <QtWidgets/QMainWindow>
diff --git a/tests/manual/x11vkbtest/memorymonitor.h b/tests/manual/x11vkbtest/memorymonitor.h
index 01239383..b91dedf7 100644
--- a/tests/manual/x11vkbtest/memorymonitor.h
+++ b/tests/manual/x11vkbtest/memorymonitor.h
@@ -33,12 +33,10 @@
#include <QtCharts/QChart>
#include <QtCore/QTimer>
-QT_CHARTS_BEGIN_NAMESPACE
+QT_BEGIN_NAMESPACE
class QSplineSeries;
class QValueAxis;
-QT_CHARTS_END_NAMESPACE
-
-QT_CHARTS_USE_NAMESPACE
+QT_END_NAMESPACE
class QMainWindow;
@@ -46,7 +44,7 @@ class MemoryMonitor : public QChart
{
Q_OBJECT
public:
- explicit MemoryMonitor(QMainWindow &window, QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = nullptr);
+ explicit MemoryMonitor(QMainWindow &window, QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = Qt::WindowFlags());
~MemoryMonitor();
public:
diff --git a/tests/manual/x11vkbtest/testreporter.cpp b/tests/manual/x11vkbtest/testreporter.cpp
index d0cb4c60..2da532eb 100644
--- a/tests/manual/x11vkbtest/testreporter.cpp
+++ b/tests/manual/x11vkbtest/testreporter.cpp
@@ -35,6 +35,8 @@
#include "colors.h"
#include "startclose.h"
+using Qt::endl;
+
namespace {
const QString KReport_CSV_File = "result.csv";
const QString KCSV_Column_Separator = ";";
diff --git a/tests/manual/x11vkbtest/windowhelper.cpp b/tests/manual/x11vkbtest/windowhelper.cpp
index 9223774b..61d672b6 100644
--- a/tests/manual/x11vkbtest/windowhelper.cpp
+++ b/tests/manual/x11vkbtest/windowhelper.cpp
@@ -28,7 +28,8 @@
****************************************************************************/
#include <QTextStream>
-#include <cstdlib>
+
+#include "windowhelper.h"
extern "C" {
#include <xdo.h>
@@ -38,7 +39,6 @@ extern "C" {
#include <cstdio>
#include <cstdlib>
-#include "windowhelper.h"
WindowHelper::WindowHelper(QObject *parent) :
QObject(parent),