forked from qt-creator/qt-creator
BaseQtVersion: Allow for a predicate when retrieving Qt versions
Make methods used to retrieve Qt versions from the Qt versions manager take a predicate to select the interesting version. Change-Id: I9218c57bae6d5033d49d618dfc0da41fe578444d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -26,12 +26,15 @@
|
||||
#include "qnxdeployqtlibrariesdialog.h"
|
||||
#include "ui_qnxdeployqtlibrariesdialog.h"
|
||||
|
||||
#include "qnxconstants.h"
|
||||
#include "qnxqtversion.h"
|
||||
|
||||
#include <projectexplorer/deployablefile.h>
|
||||
#include <qtsupport/qtversionmanager.h>
|
||||
#include <remotelinux/genericdirectuploadservice.h>
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QDir>
|
||||
@@ -54,14 +57,11 @@ QnxDeployQtLibrariesDialog::QnxDeployQtLibrariesDialog(const IDevice::ConstPtr &
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
QList<BaseQtVersion*> qtVersions = QtVersionManager::validVersions();
|
||||
foreach (BaseQtVersion *qtVersion, qtVersions) {
|
||||
QnxQtVersion *qnxQt = dynamic_cast<QnxQtVersion *>(qtVersion);
|
||||
if (!qnxQt)
|
||||
continue;
|
||||
|
||||
m_ui->qtLibraryCombo->addItem(qnxQt->displayName(), qnxQt->uniqueId());
|
||||
}
|
||||
const QList<BaseQtVersion*> qtVersions
|
||||
= QtVersionManager::validVersions(Utils::equal(&BaseQtVersion::type,
|
||||
QString::fromLatin1(Constants::QNX_QNX_QT)));
|
||||
for (BaseQtVersion *v : qtVersions)
|
||||
m_ui->qtLibraryCombo->addItem(v->displayName(), v->uniqueId());
|
||||
|
||||
m_ui->basePathLabel->setText(QString());
|
||||
m_ui->remoteDirectory->setText(QLatin1String("/qt"));
|
||||
|
||||
Reference in New Issue
Block a user