diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-10 18:43:23 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-11 10:39:04 +0200 |
commit | 5c7733d5c5564a64468c5fdd5e8bd29cc131784c (patch) | |
tree | 3b48a02abf60d56bf9c383f1d081bb8549d32950 /src/scripttools | |
parent | 3880777ff260a660434d36d6f63da6fd1c25d79d (diff) | |
download | qtscript-5c7733d5c5564a64468c5fdd5e8bd29cc131784c.tar.gz |
Bump Qt version to Qt 6
And also fix usages of removed API.
Change-Id: Ifbbe08a202ed19b5969781f66240174ef816269e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/scripttools')
4 files changed, 10 insertions, 7 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggeragent.cpp b/src/scripttools/debugging/qscriptdebuggeragent.cpp index 7e25304..81ffb64 100644 --- a/src/scripttools/debugging/qscriptdebuggeragent.cpp +++ b/src/scripttools/debugging/qscriptdebuggeragent.cpp @@ -394,11 +394,13 @@ void QScriptDebuggerAgent::scriptsCheckpoint() QPair<QList<qint64>, QList<qint64> > QScriptDebuggerAgent::scriptsDelta() const { Q_D(const QScriptDebuggerAgent); - QSet<qint64> prevSet = d->previousCheckpointScripts.keys().toSet(); - QSet<qint64> currSet = d->checkpointScripts.keys().toSet(); + QList<qint64> prevKeys = d->previousCheckpointScripts.keys(); + QList<qint64> currKeys = d->checkpointScripts.keys(); + QSet<qint64> prevSet = QSet<qint64>(prevKeys.begin(), prevKeys.end()); + QSet<qint64> currSet = QSet<qint64>(currKeys.begin(), currKeys.end()); QSet<qint64> addedScriptIds = currSet - prevSet; QSet<qint64> removedScriptIds = prevSet - currSet; - return qMakePair(addedScriptIds.toList(), removedScriptIds.toList()); + return qMakePair(addedScriptIds.values(), removedScriptIds.values()); } /*! diff --git a/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp b/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp index c71d0b0..ab0bc24 100644 --- a/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp +++ b/src/scripttools/debugging/qscriptdebuggercommandexecutor.cpp @@ -398,7 +398,7 @@ QScriptDebuggerResponse QScriptDebuggerCommandExecutor::execute( obj = obj.prototype(); } } - QStringList matchesList = matches.toList(); + QStringList matchesList = matches.values(); std::stable_sort(matchesList.begin(), matchesList.end()); response.setResult(matchesList); } break; diff --git a/src/scripttools/debugging/qscriptobjectsnapshot.cpp b/src/scripttools/debugging/qscriptobjectsnapshot.cpp index 50eee7d..c2e68ab 100644 --- a/src/scripttools/debugging/qscriptobjectsnapshot.cpp +++ b/src/scripttools/debugging/qscriptobjectsnapshot.cpp @@ -93,7 +93,8 @@ QScriptObjectSnapshot::Delta QScriptObjectSnapshot::capture(const QScriptValue & QSet<QString> prevSet; for (int i = 0; i < m_properties.size(); ++i) prevSet.insert(m_properties.at(i).name()); - QSet<QString> currSet = currProps.keys().toSet(); + QList<QString> currPropsKeys = currProps.keys(); + QSet<QString> currSet = QSet<QString>(currPropsKeys.begin(), currPropsKeys.end()); QSet<QString> removedProperties = prevSet - currSet; QSet<QString> addedProperties = currSet - prevSet; QSet<QString> maybeChangedProperties = currSet & prevSet; @@ -120,7 +121,7 @@ QScriptObjectSnapshot::Delta QScriptObjectSnapshot::capture(const QScriptValue & } } - result.removedProperties = removedProperties.toList(); + result.removedProperties = removedProperties.values(); m_properties = currProps.values(); diff --git a/src/scripttools/debugging/qscriptxmlparser.cpp b/src/scripttools/debugging/qscriptxmlparser.cpp index 2cf8c85..a29b69e 100644 --- a/src/scripttools/debugging/qscriptxmlparser.cpp +++ b/src/scripttools/debugging/qscriptxmlparser.cpp @@ -168,7 +168,7 @@ QScriptXmlParser::Result QScriptXmlParser::parse(const QString &xml) reader.readNext(); // </program> reader.readNext(); // EndDocument Q_ASSERT(reader.atEnd()); - return Result(functionsInfo, lineNumbers.toSet()); + return Result(functionsInfo, QSet<int>(lineNumbers.begin(), lineNumbers.end())); } QT_END_NAMESPACE |