aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@qt.io>2018-12-03 14:22:38 +0200
committerVille Voutilainen <ville.voutilainen@qt.io>2018-12-03 13:56:02 +0000
commitb55b3692f6cc57f8a7ef972388504b5133331ceb (patch)
tree25ea57e77ab074eb2951786253df8e131e835e8b
parent3a025d75fd470dfcda5ae67e5b8ece0b00cdc8c9 (diff)
Fix compilation with gcc 4.8
GCC 4.8 doesn't like using QPointers in signal connections. Change-Id: Ide55318374183e52eaf09176a118f7d22b7cfd6e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp16
-rw-r--r--tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp6
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp2
3 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
index 941303d3ef..1202cddc05 100644
--- a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
+++ b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
@@ -1174,7 +1174,7 @@ void tst_QQmlDebugJS::changeBreakpoint()
QCOMPARE(init(qmlscene, CHANGEBREAKPOINT_QMLFILE), ConnectSuccess);
bool isStopped = false;
- QObject::connect(m_client, &QJSDebugClient::stopped, this, [&]() { isStopped = true; });
+ QObject::connect(m_client.data(), &QJSDebugClient::stopped, this, [&]() { isStopped = true; });
auto continueDebugging = [&]() {
m_client->continueDebugging(QJSDebugClient::Continue);
@@ -1198,7 +1198,7 @@ void tst_QQmlDebugJS::changeBreakpoint()
auto setBreakPoint = [&](int sourceLine, bool enabled) {
int id = -1;
- auto connection = QObject::connect(m_client, &QJSDebugClient::result, [&]() {
+ auto connection = QObject::connect(m_client.data(), &QJSDebugClient::result, [&]() {
id = extractBody().value("breakpoint").toInt();
});
@@ -1551,7 +1551,7 @@ void tst_QQmlDebugJS::encodeQmlScope()
bool isStopped = false;
bool scopesFailed = false;
- QObject::connect(m_client, &QJSDebugClient::failure, this, [&]() {
+ QObject::connect(m_client.data(), &QJSDebugClient::failure, this, [&]() {
qWarning() << "received failure" << m_client->response;
scopesFailed = true;
m_process->stop();
@@ -1559,12 +1559,12 @@ void tst_QQmlDebugJS::encodeQmlScope()
isStopped = false;
});
- QObject::connect(m_client, &QJSDebugClient::stopped, this, [&]() {
+ QObject::connect(m_client.data(), &QJSDebugClient::stopped, this, [&]() {
m_client->frame();
isStopped = true;
});
- QObject::connect(m_client, &QJSDebugClient::result, this, [&]() {
+ QObject::connect(m_client.data(), &QJSDebugClient::result, this, [&]() {
const QVariantMap value = m_client->parser.call(
QJSValueList() << QJSValue(QString(m_client->response))).toVariant().toMap();
@@ -1611,20 +1611,20 @@ void tst_QQmlDebugJS::breakOnAnchor()
int breaks = 0;
bool stopped = false;
- QObject::connect(m_client, &QJSDebugClient::stopped, this, [&]() {
+ QObject::connect(m_client.data(), &QJSDebugClient::stopped, this, [&]() {
stopped = true;
++breaks;
m_client->evaluate("this", 0, -1);
});
- QObject::connect(m_client, &QJSDebugClient::result, this, [&]() {
+ QObject::connect(m_client.data(), &QJSDebugClient::result, this, [&]() {
if (stopped) {
m_client->continueDebugging(QJSDebugClient::Continue);
stopped = false;
}
});
- QObject::connect(m_client, &QJSDebugClient::failure, this, [&]() {
+ QObject::connect(m_client.data(), &QJSDebugClient::failure, this, [&]() {
qWarning() << "received failure" << m_client->response;
});
diff --git a/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp b/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
index b4f8f389cf..4c4c514832 100644
--- a/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
+++ b/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
@@ -101,11 +101,11 @@ QList<QQmlDebugClient *> tst_QQmlPreview::createClients()
{
m_client = new QQmlPreviewClient(m_connection);
- QObject::connect(m_client, &QQmlPreviewClient::request, this, &tst_QQmlPreview::serveRequest);
- QObject::connect(m_client, &QQmlPreviewClient::error, this, [this](const QString &error) {
+ QObject::connect(m_client.data(), &QQmlPreviewClient::request, this, &tst_QQmlPreview::serveRequest);
+ QObject::connect(m_client.data(), &QQmlPreviewClient::error, this, [this](const QString &error) {
m_serviceErrors.append(error);
});
- QObject::connect(m_client, &QQmlPreviewClient::fps,
+ QObject::connect(m_client.data(), &QQmlPreviewClient::fps,
this, [this](const QQmlPreviewClient::FpsInfo &info) {
m_frameStats = info;
});
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index 1783ded9d6..e0bd5413fe 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -467,7 +467,7 @@ QList<QQmlDebugClient *> tst_QQmlProfilerService::createClients()
m_client.reset(new QQmlProfilerTestClient(m_connection));
m_client->client->setRecording(m_recordFromStart);
m_client->client->setFlushInterval(m_flushInterval);
- QObject::connect(m_client->client, &QQmlProfilerClient::complete,
+ QObject::connect(m_client->client.data(), &QQmlProfilerClient::complete,
this, [this](){ m_isComplete = true; });
return QList<QQmlDebugClient *>({m_client->client});
}