forked from qt-creator/qt-creator
ExtensionSystem: Move away from QList
Qt 6 API will move away from it. Use QVector for API and some std container for internal things. Change-Id: Iff14d48a47d5ac52ade875d9c8c84ad8a4f577d8 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -196,9 +196,9 @@ ExtensionSystem::IPlugin::ShutdownFlag QmlPreviewPlugin::aboutToShutdown()
|
||||
return SynchronousShutdown;
|
||||
}
|
||||
|
||||
QList<QObject *> QmlPreviewPlugin::createTestObjects() const
|
||||
QVector<QObject *> QmlPreviewPlugin::createTestObjects() const
|
||||
{
|
||||
QList<QObject *> tests;
|
||||
QVector<QObject *> tests;
|
||||
#ifdef WITH_TESTS
|
||||
tests.append(new QmlPreviewClientTest);
|
||||
tests.append(new QmlPreviewPluginTest);
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
bool initialize(const QStringList &arguments, QString *errorString) override;
|
||||
void extensionsInitialized() override;
|
||||
ShutdownFlag aboutToShutdown() override;
|
||||
QList<QObject *> createTestObjects() const override;
|
||||
QVector<QObject *> createTestObjects() const override;
|
||||
|
||||
QString previewedFile() const;
|
||||
void setPreviewedFile(const QString &previewedFile);
|
||||
|
||||
@@ -43,7 +43,7 @@ QmlPreviewPluginTest::QmlPreviewPluginTest(QObject *parent) : QObject(parent)
|
||||
|
||||
static ExtensionSystem::IPlugin *getPlugin()
|
||||
{
|
||||
const QList<ExtensionSystem::PluginSpec *> plugins = ExtensionSystem::PluginManager::plugins();
|
||||
const QVector<ExtensionSystem::PluginSpec *> plugins = ExtensionSystem::PluginManager::plugins();
|
||||
auto it = std::find_if(plugins.begin(), plugins.end(), [](ExtensionSystem::PluginSpec *spec) {
|
||||
return spec->name() == "QmlPreview";
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user