diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2019-01-18 20:25:30 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2019-01-21 15:10:54 +0000 |
commit | a78e3e5dd5f882a28a3152f2e63ae986a9f2a8c5 (patch) | |
tree | 046f13d3382f0e9c6da0bc50893cab4e71ae379c /src/libs/utils | |
parent | 620086109ada596969033112a71b754c3e29c186 (diff) |
use initializer lists
Change-Id: I82b04601f1db52197b3dc625b6b7e0f143c1c8b6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/libs/utils')
-rw-r--r-- | src/libs/utils/wizard.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<WizardProgressItem *>() << item); + prevItem->setNextItems({item}); if (nextItem) - item->setNextItems(QList<WizardProgressItem *>() << nextItem); + item->setNextItems({nextItem}); } void Wizard::_q_pageRemoved(int pageId) @@ -626,7 +626,7 @@ QList<WizardProgressItem *> 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<WizardProgressItem *>() << toItem; + return {toItem}; QHash<WizardProgressItem *, QHash<WizardProgressItem *, bool> > visitedItemsToParents; QList<QPair<WizardProgressItem *, WizardProgressItem *> > workingItems; // next to prev item @@ -662,7 +662,7 @@ QList<WizardProgressItem *> WizardProgressPrivate::singlePathBetween(WizardProgr return path; itItem = visitedItemsToParents.constFind(it); } - return QList<WizardProgressItem *>(); + return {}; } void WizardProgressPrivate::updateReachableItems() |