From 0558db7b54a60297444ff3a9a0d49651383bf825 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 23 Jul 2018 22:28:49 +0200 Subject: Debugger: Modernize modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using modernize-use-default-member-init modernize-use-equals-default Change-Id: I91a6874f0d7b94e9079ab4ef07c23c60c80be9c0 Reviewed-by: Christian Stenger Reviewed-by: hjk --- src/plugins/debugger/qml/qmlengine.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/plugins/debugger/qml/qmlengine.cpp') diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 21cdbdd141..9c389813e4 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -127,7 +127,7 @@ struct QmlV8ObjectData } }; -typedef std::function QmlCallback; +using QmlCallback = std::function; struct LookupData { @@ -136,7 +136,7 @@ struct LookupData QString exp; }; -typedef QHash LookupItems; // id -> (iname, exp) +using LookupItems = QHash; // id -> (iname, exp) static void setWatchItemHasChildren(WatchItem *item, bool hasChildren) { @@ -415,7 +415,7 @@ void QmlEngine::connectionStartupFailed() return; } - QMessageBox *infoBox = new QMessageBox(ICore::mainWindow()); + auto infoBox = new QMessageBox(ICore::mainWindow()); infoBox->setIcon(QMessageBox::Critical); infoBox->setWindowTitle(Core::Constants::IDE_DISPLAY_NAME); infoBox->setText(tr("Could not connect to the in-process QML debugger." @@ -436,7 +436,7 @@ void QmlEngine::appStartupFailed(const QString &errorMessage) QString error = tr("Could not connect to the in-process QML debugger. %1").arg(errorMessage); if (isMasterEngine()) { - QMessageBox *infoBox = new QMessageBox(ICore::mainWindow()); + auto infoBox = new QMessageBox(ICore::mainWindow()); infoBox->setIcon(QMessageBox::Critical); infoBox->setWindowTitle(Core::Constants::IDE_DISPLAY_NAME); infoBox->setText(error); @@ -935,9 +935,9 @@ void QmlEngine::selectWatchData(const QString &iname) bool compareConsoleItems(const ConsoleItem *a, const ConsoleItem *b) { - if (a == 0) + if (a == nullptr) return true; - if (b == 0) + if (b == nullptr) return false; return a->text() < b->text(); } @@ -947,7 +947,7 @@ static ConsoleItem *constructLogItemTree(const QVariant &result, { bool sorted = boolSetting(SortStructMembers); if (!result.isValid()) - return 0; + return nullptr; QString text; ConsoleItem *item = nullptr; -- cgit v1.2.1