From a78e3e5dd5f882a28a3152f2e63ae986a9f2a8c5 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Fri, 18 Jan 2019 20:25:30 +0100 Subject: use initializer lists Change-Id: I82b04601f1db52197b3dc625b6b7e0f143c1c8b6 Reviewed-by: Orgad Shaneh --- src/libs/utils/wizard.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libs/utils') diff --git a/src/libs/utils/wizard.cpp b/src/libs/utils/wizard.cpp index a1c0e2fb68..2680f41c2d 100644 --- a/src/libs/utils/wizard.cpp +++ b/src/libs/utils/wizard.cpp @@ -510,9 +510,9 @@ void Wizard::_q_pageAdded(int pageId) nextItem = d->m_wizardProgress->item(nextId); if (prevItem) - prevItem->setNextItems(QList() << item); + prevItem->setNextItems({item}); if (nextItem) - item->setNextItems(QList() << nextItem); + item->setNextItems({nextItem}); } void Wizard::_q_pageRemoved(int pageId) @@ -626,7 +626,7 @@ QList WizardProgressPrivate::singlePathBetween(WizardProgr // When we had X->A in addition and "from" was X and "to" was C, this would not work // (it should return the shortest path which would be X->A->C). if (item->nextItems().contains(toItem)) - return QList() << toItem; + return {toItem}; QHash > visitedItemsToParents; QList > workingItems; // next to prev item @@ -662,7 +662,7 @@ QList WizardProgressPrivate::singlePathBetween(WizardProgr return path; itItem = visitedItemsToParents.constFind(it); } - return QList(); + return {}; } void WizardProgressPrivate::updateReachableItems() -- cgit v1.2.3