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>
This commit is contained in:
parent
3a025d75fd
commit
b55b3692f6
|
@ -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;
|
||||
});
|
||||
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
|
|
|
@ -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});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue