forked from qt-creator/qt-creator
Use more toList/toSet to avoid deprecation warnings
Change-Id: I43575a54ff944bf0e89d452d13944fcaee270208 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -167,11 +167,11 @@ static QHash<XcodePlatform::ToolchainTarget, ToolChainPair> findToolChains(const
|
||||
|
||||
static QSet<Kit *> existingAutoDetectedIosKits()
|
||||
{
|
||||
return Utils::filtered(KitManager::kits(), [](Kit *kit) -> bool {
|
||||
return Utils::toSet(Utils::filtered(KitManager::kits(), [](Kit *kit) -> bool {
|
||||
Core::Id deviceKind = DeviceTypeKitAspect::deviceTypeId(kit);
|
||||
return kit->isAutoDetected() && (deviceKind == Constants::IOS_DEVICE_TYPE
|
||||
|| deviceKind == Constants::IOS_SIMULATOR_TYPE);
|
||||
}).toSet();
|
||||
}));
|
||||
}
|
||||
|
||||
static void printKits(const QSet<Kit *> &kits)
|
||||
@@ -249,9 +249,9 @@ void IosConfigurations::updateAutomaticKitList()
|
||||
// target -> tool chain
|
||||
const auto targetToolChainHash = findToolChains(platforms);
|
||||
|
||||
const auto qtVersions = QtVersionManager::versions([](const BaseQtVersion *v) {
|
||||
const auto qtVersions = Utils::toSet(QtVersionManager::versions([](const BaseQtVersion *v) {
|
||||
return v->isValid() && v->type() == Constants::IOSQT;
|
||||
}).toSet();
|
||||
}));
|
||||
|
||||
const DebuggerItem *possibleDebugger = DebuggerItemManager::findByEngineType(LldbEngineType);
|
||||
const QVariant debuggerId = (possibleDebugger ? possibleDebugger->id() : QVariant());
|
||||
|
@@ -190,8 +190,7 @@ Core::GeneratedFiles JsonWizardFileGenerator::fileList(Utils::MacroExpander *exp
|
||||
std::tie(fileList, dirList)
|
||||
= Utils::partition(concreteFiles, [](const File &f) { return !QFileInfo(f.source).isDir(); });
|
||||
|
||||
const QSet<QString> knownFiles
|
||||
= QSet<QString>::fromList(Utils::transform(fileList, &File::target));
|
||||
const QSet<QString> knownFiles = Utils::transform<QSet>(fileList, &File::target);
|
||||
|
||||
foreach (const File &dir, dirList) {
|
||||
QDir sourceDir(dir.source);
|
||||
|
@@ -26,6 +26,8 @@
|
||||
#include "contentnoteditableindicator.h"
|
||||
#include "nodemetainfo.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QSet>
|
||||
#include <QPen>
|
||||
|
||||
@@ -68,9 +70,9 @@ void ContentNotEditableIndicator::setItems(const QList<FormEditorItem*> &itemLis
|
||||
void ContentNotEditableIndicator::updateItems(const QList<FormEditorItem *> &itemList)
|
||||
{
|
||||
QSet<FormEditorItem*> affectedFormEditorItemItems;
|
||||
affectedFormEditorItemItems.unite(itemList.toSet());
|
||||
affectedFormEditorItemItems.unite(Utils::toSet(itemList));
|
||||
foreach (FormEditorItem *formEditorItem, itemList)
|
||||
affectedFormEditorItemItems.unite(formEditorItem->offspringFormEditorItems().toSet());
|
||||
affectedFormEditorItemItems.unite(Utils::toSet(formEditorItem->offspringFormEditorItems()));
|
||||
|
||||
foreach (const EntryPair &entryPair, m_entryList) {
|
||||
foreach (FormEditorItem *formEditorItem, affectedFormEditorItemItems) {
|
||||
|
@@ -27,6 +27,8 @@
|
||||
|
||||
#include "formeditorscene.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
RubberBandSelectionManipulator::RubberBandSelectionManipulator(LayerItem *layerItem, FormEditorView *editorView)
|
||||
@@ -125,9 +127,9 @@ void RubberBandSelectionManipulator::select(SelectionType selectionType)
|
||||
}
|
||||
break;
|
||||
case RemoveFromSelection: {
|
||||
QSet<QmlItemNode> oldSelectionSet(m_oldSelectionList.toSet());
|
||||
QSet<QmlItemNode> newSelectionSet(newNodeList.toSet());
|
||||
nodeList.append(oldSelectionSet.subtract(newSelectionSet).toList());
|
||||
QSet<QmlItemNode> oldSelectionSet = Utils::toSet(m_oldSelectionList);
|
||||
const QSet<QmlItemNode> newSelectionSet = Utils::toSet(newNodeList);
|
||||
nodeList.append(Utils::toList(oldSelectionSet.subtract(newSelectionSet)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -634,7 +634,7 @@ static QList<ModelNode> collectParents(const QList<ModelNode> &modelNodes)
|
||||
}
|
||||
}
|
||||
|
||||
return parents.toList();
|
||||
return Utils::toList(parents);
|
||||
}
|
||||
|
||||
QList<QPersistentModelIndex> NavigatorTreeModel::nodesToPersistentIndex(const QList<ModelNode> &modelNodes)
|
||||
|
@@ -25,10 +25,6 @@
|
||||
|
||||
#include "nodeinstanceview.h"
|
||||
|
||||
#include <QUrl>
|
||||
#include <QMultiHash>
|
||||
#include <QTimerEvent>
|
||||
|
||||
#include <model.h>
|
||||
#include <modelnode.h>
|
||||
#include <metainfo.h>
|
||||
@@ -72,6 +68,12 @@
|
||||
|
||||
#include "nodeinstanceserverproxy.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QUrl>
|
||||
#include <QMultiHash>
|
||||
#include <QTimerEvent>
|
||||
|
||||
enum {
|
||||
debug = false
|
||||
};
|
||||
@@ -1189,7 +1191,7 @@ void NodeInstanceView::pixmapChanged(const PixmapChangedCommand &command)
|
||||
m_nodeInstanceServer->benchmark(Q_FUNC_INFO + QString::number(renderImageChangeSet.count()));
|
||||
|
||||
if (!renderImageChangeSet.isEmpty())
|
||||
emitInstancesRenderImageChanged(renderImageChangeSet.toList().toVector());
|
||||
emitInstancesRenderImageChanged(Utils::toList(renderImageChangeSet).toVector());
|
||||
}
|
||||
|
||||
QMultiHash<ModelNode, InformationName> NodeInstanceView::informationChanged(const QVector<InformationContainer> &containerVector)
|
||||
|
Reference in New Issue
Block a user