diff options
author | Katja Marttila <katja.marttila@qt.io> | 2021-04-15 15:52:33 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2021-05-21 12:09:32 +0300 |
commit | be2c54531eeb00822259d6f6bfcb90b43768cea3 (patch) | |
tree | cece9822ae77972f4382f8f99031ee761b4aa92f /src/libs/installer/scriptengine.cpp | |
parent | eb4b39099231254c850d897ede4ceaf79b91b4b6 (diff) |
Add possibility to list components with regexp
Task-number: QTIFW-2225
Change-Id: I6a7fdfc1070ad54d520563cae7d2446e97e2e87c
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/scriptengine.cpp')
-rw-r--r-- | src/libs/installer/scriptengine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp index 5dd56939c..c8fc65d34 100644 --- a/src/libs/installer/scriptengine.cpp +++ b/src/libs/installer/scriptengine.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -75,10 +75,10 @@ namespace QInstaller { \internal */ -QJSValue InstallerProxy::components() const +QJSValue InstallerProxy::components(const QString ®exp) const { if (m_core) { - const QList<Component*> all = m_core->components(PackageManagerCore::ComponentType::All); + const QList<Component*> all = m_core->components(PackageManagerCore::ComponentType::All, regexp); QJSValue scriptComponentsObject = m_engine->newArray(all.count()); for (int i = 0; i < all.count(); ++i) { Component *const component = all.at(i); |