diff options
author | Svetlana Abramenkova <sabramenkova@luxoft.com> | 2020-08-20 11:25:30 +0300 |
---|---|---|
committer | Svetlana Abramenkova <sabramenkova@luxoft.com> | 2020-08-20 14:48:14 +0300 |
commit | ae8ead36e590e27724ff5347280948cdf10a4a0d (patch) | |
tree | 09bb6f737fd4d3bc816d230ccb00f77590579394 | |
parent | 8c893f697b86f45d478078980e2f81457d6b52e4 (diff) |
Fix deprecated methodsv5.15.0_QtAS
Change-Id: I9dee86d57d174a0a0633fec78d845dd0fe0683df
Reviewed-by: Nikolay Zamotaev <nzamotaev@luxoft.com>
Reviewed-by: Grigorii Zimin <gzimin@luxoft.com>
-rw-r--r-- | src/bench/main.cpp | 6 | ||||
-rw-r--r-- | src/bench/mainwindow.cpp | 6 | ||||
-rw-r--r-- | src/ipc/ipcclient.cpp | 6 | ||||
-rw-r--r-- | src/ipc/ipcconnection.cpp | 3 | ||||
-rw-r--r-- | src/previewGenerator/main.cpp | 2 | ||||
-rw-r--r-- | src/resourcemap.cpp | 2 | ||||
-rw-r--r-- | src/runtime/main.cpp | 2 |
7 files changed, 11 insertions, 16 deletions
diff --git a/src/bench/main.cpp b/src/bench/main.cpp index 41b8d41..cc15009 100644 --- a/src/bench/main.cpp +++ b/src/bench/main.cpp @@ -443,8 +443,7 @@ void MasterApplication::listenForArguments() } auto handleConnection = [this](QLocalSocket *connection) { - auto QLocalSocket_error = static_cast<void (QLocalSocket::*)(QLocalSocket::LocalSocketError)>(&QLocalSocket::error); - connect(connection, QLocalSocket_error, this, [connection]() { + connect(connection, &QLocalSocket::errorOccurred, this, [connection]() { qWarning() << "Error receiving arguments:" << connection->errorString(); connection->close(); }); @@ -603,8 +602,7 @@ void SlaveApplication::forwardArguments() { QLocalSocket *socket = new QLocalSocket(this); - auto QLocalSocket_error = static_cast<void(QLocalSocket::*)(QLocalSocket::LocalSocketError)>(&QLocalSocket::error); - connect(socket, QLocalSocket_error, this, [socket]() { + connect(socket, &QLocalSocket::errorOccurred, this, [socket]() { qCritical() << "Error forwarding arguments:" << socket->errorString(); exit(1); }); diff --git a/src/bench/mainwindow.cpp b/src/bench/mainwindow.cpp index a7cc0b3..692f9ba 100644 --- a/src/bench/mainwindow.cpp +++ b/src/bench/mainwindow.cpp @@ -427,7 +427,7 @@ void MainWindow::restoreImportPathsFromSettings() } s.endArray(); - m_node->qmlEngine()->setImportPathList(m_imports->toList() + m_qmlDefaultimportList); + m_node->qmlEngine()->setImportPathList(m_imports->values() + m_qmlDefaultimportList); } void MainWindow::setupToolBar() @@ -496,7 +496,7 @@ void MainWindow::setImportPaths(const QStringList &pathList) { if (m_imports == nullptr) m_imports = new QSet<QString>(); - *m_imports = QSet<QString>::fromList(pathList); + *m_imports = QSet<QString>(pathList.begin(),pathList.end()); m_node->qmlEngine()->setImportPathList(pathList + m_qmlDefaultimportList); m_runtimeManager->setImportPathList(pathList + m_qmlDefaultimportList); @@ -562,7 +562,7 @@ void MainWindow::openPreferences(Host *host) connect(&dialog, &OptionsDialog::updateRuntimePath, m_runtimeManager, &RuntimeManager::updateRuntimePath); dialog.setHostModel(m_hostModel); dialog.setDiscoveredHostsModel(m_discoveryManager->discoveredHostsModel()); - dialog.setImports(m_imports->toList()); + dialog.setImports(m_imports->values()); if (host) dialog.openHostConfig(host); diff --git a/src/ipc/ipcclient.cpp b/src/ipc/ipcclient.cpp index eabb06a..10a36c1 100644 --- a/src/ipc/ipcclient.cpp +++ b/src/ipc/ipcclient.cpp @@ -88,8 +88,7 @@ IpcClient::IpcClient(QObject *parent) connect(m_socket, &QAbstractSocket::connected, this, &IpcClient::connected); connect(m_socket, &QAbstractSocket::connected, this, &IpcClient::processQueue); connect(m_socket, &QAbstractSocket::disconnected, this, &IpcClient::disconnected); - void (QAbstractSocket::*QAbstractSocket__error)(QAbstractSocket::SocketError) = &QAbstractSocket::error; - connect(m_socket, QAbstractSocket__error, this, &IpcClient::onError); + connect(m_socket, &QAbstractSocket::errorOccurred, this, &IpcClient::onError); connect(m_socket, &QAbstractSocket::bytesWritten, this, &IpcClient::onBytesWritten); connect(m_connection, &IpcConnection::received, this, &IpcClient::received); @@ -105,8 +104,7 @@ IpcClient::IpcClient(QTcpSocket *socket, QObject *parent) qInfo() << "IpcClient socket: " << socket; connect(m_socket, &QAbstractSocket::connected, this, &IpcClient::connected); connect(m_socket, &QAbstractSocket::disconnected, this, &IpcClient::disconnected); - void (QAbstractSocket::*QAbstractSocket__error)(QAbstractSocket::SocketError) = &QAbstractSocket::error; - connect(m_socket, QAbstractSocket__error, this, &IpcClient::onError); + connect(m_socket, &QAbstractSocket::errorOccurred, this, &IpcClient::onError); connect(m_socket, &QAbstractSocket::bytesWritten, this, &IpcClient::onBytesWritten); } diff --git a/src/ipc/ipcconnection.cpp b/src/ipc/ipcconnection.cpp index 3ab4b03..b9853a4 100644 --- a/src/ipc/ipcconnection.cpp +++ b/src/ipc/ipcconnection.cpp @@ -56,8 +56,7 @@ IpcConnection::IpcConnection(QTcpSocket *socket, QObject *parent) DEBUG << "IpcConnection()"; connect(m_socket, &QAbstractSocket::disconnected, this, &IpcConnection::close); - void (QAbstractSocket::*QAbstractSocket__error)(QAbstractSocket::SocketError) = &QAbstractSocket::error; - connect(m_socket, QAbstractSocket__error, this, &IpcConnection::closeWithError); + connect(m_socket, &QAbstractSocket::errorOccurred, this, &IpcConnection::closeWithError); connect(m_socket, &QAbstractSocket::readyRead, this, &IpcConnection::readData); } diff --git a/src/previewGenerator/main.cpp b/src/previewGenerator/main.cpp index 993d375..db00bfe 100644 --- a/src/previewGenerator/main.cpp +++ b/src/previewGenerator/main.cpp @@ -130,7 +130,7 @@ int main (int argc, char** argv) qPrintable(preview.errorString())); } - QTextStream(stdout) << QLatin1String("ready#") << preview.serverName().toUtf8().toHex() << endl; + QTextStream(stdout) << QLatin1String("ready#") << preview.serverName().toUtf8().toHex() << Qt::endl; return app.exec(); } diff --git a/src/resourcemap.cpp b/src/resourcemap.cpp index 3d8f80b..f25de19 100644 --- a/src/resourcemap.cpp +++ b/src/resourcemap.cpp @@ -245,7 +245,7 @@ bool ResourceMap::updateMapping(const LiveDocument &qrcDocument, QIODevice *qrcF } qCDebug(rmLog) << "Mapping" << prefixedResourceName << "to" << filePath; - m_resourcesByDocument.insertMulti(localePrefix + filePath, resource); + m_resourcesByDocument.insert(localePrefix + filePath, resource); m_documentByResource.insert(prefixedResourceName, filePath); m_resourcesByQrc.insert(qrcDocument.relativeFilePath(), prefixedResourceName); }; diff --git a/src/runtime/main.cpp b/src/runtime/main.cpp index d4eefb5..a7a7af8 100644 --- a/src/runtime/main.cpp +++ b/src/runtime/main.cpp @@ -46,12 +46,12 @@ struct Options Options() : updatesAsOverlay(false) , updateOnConnect(false) - , allowCreateMissing(false) , fullscreen(false) , transparent(false) , frameless(false) , stayontop(false) , hideButtons(false) + , allowCreateMissing(false) , windowTitle("QML Live Runtime") { ipcPort = Constants::DEFAULT_PORT(); |