Move Project::makeUnique to Utils

This is more generic than projects

Change-Id: Ifdbc57ff48f9fd4a40e6149ba636e0a55cbac502
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Eike Ziller
2018-03-28 16:03:11 +02:00
parent 7160b83589
commit ab7960f6cf
8 changed files with 33 additions and 29 deletions

View File

@@ -29,12 +29,12 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/project.h>
#include <coreplugin/icore.h>
#include <utils/environment.h>
#include <utils/detailswidget.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
#include <utils/stringutils.h>
#include <utils/treemodel.h>
#include <QCheckBox>
@@ -317,7 +317,7 @@ QString CMakeToolItemModel::uniqueDisplayName(const QString &base) const
{
QStringList names;
forItemsAtLevel<2>([&names](CMakeToolTreeItem *item) { names << item->m_name; });
return ProjectExplorer::Project::makeUnique(base, names);
return Utils::makeUniquelyNumbered(base, names);
}
// -----------------------------------------------------------------------