forked from qt-creator/qt-creator
RemoteLinux: Move EmbeddeLinuxQtVersion to QtSupport
The class uses only one ID from RL at compile time, and after the move RL does not hard-depend on QtSupport anymore. Change-Id: I9f8aa6782e45fe998d83ddcc5323c396964bf1fe Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -44,7 +44,8 @@
|
|||||||
#include <qtsupport/baseqtversion.h>
|
#include <qtsupport/baseqtversion.h>
|
||||||
#include <qtsupport/qtkitinformation.h>
|
#include <qtsupport/qtkitinformation.h>
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
#include <qtsupport/qtsupportconstants.h>
|
||||||
#include <qtsupport/desktopqtversion.h>
|
#include <qtsupport/qtversions.h>
|
||||||
|
|
||||||
#include <qmljs/qmljsmodelmanagerinterface.h>
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#include <qtsupport/qtkitinformation.h>
|
#include <qtsupport/qtkitinformation.h>
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
#include <qtsupport/qtsupportconstants.h>
|
||||||
#include <qtsupport/desktopqtversion.h>
|
#include <qtsupport/qtversions.h>
|
||||||
|
|
||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
|
@@ -8,7 +8,6 @@ add_qtc_plugin(QtSupport
|
|||||||
codegensettings.cpp codegensettings.h
|
codegensettings.cpp codegensettings.h
|
||||||
codegensettingspage.cpp codegensettingspage.h
|
codegensettingspage.cpp codegensettingspage.h
|
||||||
codegensettingspagewidget.ui
|
codegensettingspagewidget.ui
|
||||||
desktopqtversion.cpp desktopqtversion.h
|
|
||||||
exampleslistmodel.cpp exampleslistmodel.h
|
exampleslistmodel.cpp exampleslistmodel.h
|
||||||
gettingstartedwelcomepage.cpp gettingstartedwelcomepage.h
|
gettingstartedwelcomepage.cpp gettingstartedwelcomepage.h
|
||||||
profilereader.cpp profilereader.h
|
profilereader.cpp profilereader.h
|
||||||
@@ -29,6 +28,7 @@ add_qtc_plugin(QtSupport
|
|||||||
qtversionfactory.cpp qtversionfactory.h
|
qtversionfactory.cpp qtversionfactory.h
|
||||||
qtversioninfo.ui
|
qtversioninfo.ui
|
||||||
qtversionmanager.cpp qtversionmanager.h qtversionmanager.ui
|
qtversionmanager.cpp qtversionmanager.h qtversionmanager.ui
|
||||||
|
qtversions.cpp qtversions.h
|
||||||
screenshotcropper.cpp screenshotcropper.h
|
screenshotcropper.cpp screenshotcropper.h
|
||||||
showbuildlog.ui
|
showbuildlog.ui
|
||||||
translationwizardpage.cpp translationwizardpage.h
|
translationwizardpage.cpp translationwizardpage.h
|
||||||
|
@@ -129,7 +129,7 @@ void QtProjectImporter::persistTemporaryQt(Kit *k, const QVariantList &vl)
|
|||||||
} // namespace QtSupport
|
} // namespace QtSupport
|
||||||
|
|
||||||
#include "qtsupportplugin.h"
|
#include "qtsupportplugin.h"
|
||||||
#include "desktopqtversion.h"
|
#include "qtversions.h"
|
||||||
|
|
||||||
#include <projectexplorer/buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <projectexplorer/buildinfo.h>
|
#include <projectexplorer/buildinfo.h>
|
||||||
|
@@ -29,7 +29,7 @@ HEADERS += \
|
|||||||
exampleslistmodel.h \
|
exampleslistmodel.h \
|
||||||
screenshotcropper.h \
|
screenshotcropper.h \
|
||||||
qtconfigwidget.h \
|
qtconfigwidget.h \
|
||||||
desktopqtversion.h \
|
qtversions.h \
|
||||||
uicgenerator.h \
|
uicgenerator.h \
|
||||||
qscxmlcgenerator.h \
|
qscxmlcgenerator.h \
|
||||||
translationwizardpage.h
|
translationwizardpage.h
|
||||||
@@ -55,7 +55,7 @@ SOURCES += \
|
|||||||
exampleslistmodel.cpp \
|
exampleslistmodel.cpp \
|
||||||
screenshotcropper.cpp \
|
screenshotcropper.cpp \
|
||||||
qtconfigwidget.cpp \
|
qtconfigwidget.cpp \
|
||||||
desktopqtversion.cpp \
|
qtversions.cpp \
|
||||||
uicgenerator.cpp \
|
uicgenerator.cpp \
|
||||||
qscxmlcgenerator.cpp \
|
qscxmlcgenerator.cpp \
|
||||||
translationwizardpage.cpp
|
translationwizardpage.cpp
|
||||||
|
@@ -114,8 +114,8 @@ Project {
|
|||||||
Group {
|
Group {
|
||||||
name: "QtVersion"
|
name: "QtVersion"
|
||||||
files: [
|
files: [
|
||||||
"desktopqtversion.cpp",
|
"qtversions.cpp",
|
||||||
"desktopqtversion.h",
|
"qtversions.h",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,20 +27,17 @@
|
|||||||
|
|
||||||
#include "codegenerator.h"
|
#include "codegenerator.h"
|
||||||
#include "codegensettingspage.h"
|
#include "codegensettingspage.h"
|
||||||
#include "desktopqtversion.h"
|
|
||||||
#include "gettingstartedwelcomepage.h"
|
#include "gettingstartedwelcomepage.h"
|
||||||
|
#include "profilereader.h"
|
||||||
|
#include "qscxmlcgenerator.h"
|
||||||
#include "qtkitinformation.h"
|
#include "qtkitinformation.h"
|
||||||
#include "qtoptionspage.h"
|
#include "qtoptionspage.h"
|
||||||
#include "qtoutputformatter.h"
|
#include "qtoutputformatter.h"
|
||||||
#include "qtsupportconstants.h"
|
#include "qtsupportconstants.h"
|
||||||
#include "qtversionfactory.h"
|
|
||||||
#include "qtversionmanager.h"
|
#include "qtversionmanager.h"
|
||||||
|
#include "qtversions.h"
|
||||||
#include "translationwizardpage.h"
|
#include "translationwizardpage.h"
|
||||||
#include "uicgenerator.h"
|
#include "uicgenerator.h"
|
||||||
#include "qscxmlcgenerator.h"
|
|
||||||
|
|
||||||
#include "desktopqtversion.h"
|
|
||||||
#include "profilereader.h"
|
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/jsexpander.h>
|
#include <coreplugin/jsexpander.h>
|
||||||
@@ -66,7 +63,9 @@ class QtSupportPluginPrivate
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QtVersionManager qtVersionManager;
|
QtVersionManager qtVersionManager;
|
||||||
|
|
||||||
DesktopQtVersionFactory desktopQtVersionFactory;
|
DesktopQtVersionFactory desktopQtVersionFactory;
|
||||||
|
EmbeddedLinuxQtVersionFactory embeddedLinuxQtVersionFactory;
|
||||||
|
|
||||||
CodeGenSettingsPage codeGenSettingsPage;
|
CodeGenSettingsPage codeGenSettingsPage;
|
||||||
QtOptionsPage qtOptionsPage;
|
QtOptionsPage qtOptionsPage;
|
||||||
|
@@ -23,12 +23,14 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "desktopqtversion.h"
|
#include "qtversions.h"
|
||||||
#include "qtsupportconstants.h"
|
#include "qtsupportconstants.h"
|
||||||
|
|
||||||
#include <projectexplorer/abi.h>
|
#include <projectexplorer/abi.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
|
|
||||||
#include <remotelinux/remotelinux_constants.h>
|
#include <remotelinux/remotelinux_constants.h>
|
||||||
|
|
||||||
#include <coreplugin/featureprovider.h>
|
#include <coreplugin/featureprovider.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
@@ -114,5 +116,44 @@ DesktopQtVersionFactory::DesktopQtVersionFactory()
|
|||||||
// No further restrictions. We are the fallback :) so we don't care what kind of qt it is.
|
// No further restrictions. We are the fallback :) so we don't care what kind of qt it is.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// EmbeddedLinuxQtVersion
|
||||||
|
|
||||||
|
const char EMBEDDED_LINUX_QT[] = "RemoteLinux.EmbeddedLinuxQt";
|
||||||
|
|
||||||
|
class EmbeddedLinuxQtVersion : public BaseQtVersion
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EmbeddedLinuxQtVersion() = default;
|
||||||
|
|
||||||
|
QString description() const override
|
||||||
|
{
|
||||||
|
return QCoreApplication::translate("QtVersion", "Embedded Linux",
|
||||||
|
"Qt Version is used for embedded Linux development");
|
||||||
|
}
|
||||||
|
|
||||||
|
QSet<Core::Id> targetDeviceTypes() const override
|
||||||
|
{
|
||||||
|
return {RemoteLinux::Constants::GenericLinuxOsType};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EmbeddedLinuxQtVersionFactory::EmbeddedLinuxQtVersionFactory()
|
||||||
|
{
|
||||||
|
setQtVersionCreator([] { return new EmbeddedLinuxQtVersion; });
|
||||||
|
setSupportedType(EMBEDDED_LINUX_QT);
|
||||||
|
setPriority(10);
|
||||||
|
|
||||||
|
setRestrictionChecker([](const SetupData &) {
|
||||||
|
const EmbeddedLinuxQtVersion tempVersion;
|
||||||
|
const ProjectExplorer::Abis abis = tempVersion.qtAbis();
|
||||||
|
|
||||||
|
// Note: This fails for e.g. intel/meego cross builds on x86 linux machines.
|
||||||
|
return abis.count() == 1
|
||||||
|
&& abis.at(0).os() == ProjectExplorer::Abi::LinuxOS
|
||||||
|
&& !ProjectExplorer::Abi::hostAbi().isCompatibleWith(abis.at(0));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
} // QtSupport
|
} // QtSupport
|
@@ -25,8 +25,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <qtsupport/qtversionfactory.h>
|
#include "qtversionfactory.h"
|
||||||
|
|
||||||
#include "baseqtversion.h"
|
#include "baseqtversion.h"
|
||||||
|
|
||||||
namespace QtSupport {
|
namespace QtSupport {
|
||||||
@@ -59,5 +58,11 @@ public:
|
|||||||
DesktopQtVersionFactory();
|
DesktopQtVersionFactory();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class EmbeddedLinuxQtVersionFactory : public QtSupport::QtVersionFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EmbeddedLinuxQtVersionFactory();
|
||||||
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
} // QtSupport
|
} // QtSupport
|
@@ -7,7 +7,6 @@ add_qtc_plugin(RemoteLinux
|
|||||||
abstractremotelinuxdeploystep.cpp abstractremotelinuxdeploystep.h
|
abstractremotelinuxdeploystep.cpp abstractremotelinuxdeploystep.h
|
||||||
abstractuploadandinstallpackageservice.cpp abstractuploadandinstallpackageservice.h
|
abstractuploadandinstallpackageservice.cpp abstractuploadandinstallpackageservice.h
|
||||||
deploymenttimeinfo.cpp deploymenttimeinfo.h
|
deploymenttimeinfo.cpp deploymenttimeinfo.h
|
||||||
embeddedlinuxqtversion.cpp embeddedlinuxqtversion.h
|
|
||||||
genericdirectuploadservice.cpp genericdirectuploadservice.h
|
genericdirectuploadservice.cpp genericdirectuploadservice.h
|
||||||
genericdirectuploadstep.cpp genericdirectuploadstep.h
|
genericdirectuploadstep.cpp genericdirectuploadstep.h
|
||||||
genericlinuxdeviceconfigurationwidget.cpp genericlinuxdeviceconfigurationwidget.h genericlinuxdeviceconfigurationwidget.ui
|
genericlinuxdeviceconfigurationwidget.cpp genericlinuxdeviceconfigurationwidget.h genericlinuxdeviceconfigurationwidget.ui
|
||||||
|
@@ -1,69 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and The Qt Company. For licensing terms
|
|
||||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
||||||
** information use the contact form at https://www.qt.io/contact-us.
|
|
||||||
**
|
|
||||||
** GNU General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU
|
|
||||||
** General Public License version 3 as published by the Free Software
|
|
||||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
||||||
** included in the packaging of this file. Please review the following
|
|
||||||
** information to ensure the GNU General Public License requirements will
|
|
||||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "embeddedlinuxqtversion.h"
|
|
||||||
|
|
||||||
#include "remotelinux_constants.h"
|
|
||||||
|
|
||||||
#include <coreplugin/id.h>
|
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
|
||||||
|
|
||||||
#include <QCoreApplication>
|
|
||||||
|
|
||||||
namespace RemoteLinux {
|
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
QString EmbeddedLinuxQtVersion::description() const
|
|
||||||
{
|
|
||||||
return QCoreApplication::translate("QtVersion", "Embedded Linux", "Qt Version is used for embedded Linux development");
|
|
||||||
}
|
|
||||||
|
|
||||||
QSet<Core::Id> EmbeddedLinuxQtVersion::targetDeviceTypes() const
|
|
||||||
{
|
|
||||||
return {Constants::GenericLinuxOsType};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Factory
|
|
||||||
|
|
||||||
EmbeddedLinuxQtVersionFactory::EmbeddedLinuxQtVersionFactory()
|
|
||||||
{
|
|
||||||
setQtVersionCreator([] { return new EmbeddedLinuxQtVersion; });
|
|
||||||
setSupportedType(RemoteLinux::Constants::EMBEDDED_LINUX_QT);
|
|
||||||
setPriority(10);
|
|
||||||
|
|
||||||
setRestrictionChecker([](const SetupData &) {
|
|
||||||
const EmbeddedLinuxQtVersion tempVersion;
|
|
||||||
const ProjectExplorer::Abis abis = tempVersion.qtAbis();
|
|
||||||
|
|
||||||
// Note: This fails for e.g. intel/meego cross builds on x86 linux machines.
|
|
||||||
return abis.count() == 1
|
|
||||||
&& abis.at(0).os() == ProjectExplorer::Abi::LinuxOS
|
|
||||||
&& !ProjectExplorer::Abi::hostAbi().isCompatibleWith(abis.at(0));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Internal
|
|
||||||
} // namespace RemoteLinux
|
|
@@ -1,51 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
|
||||||
** Contact: https://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and The Qt Company. For licensing terms
|
|
||||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
||||||
** information use the contact form at https://www.qt.io/contact-us.
|
|
||||||
**
|
|
||||||
** GNU General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU
|
|
||||||
** General Public License version 3 as published by the Free Software
|
|
||||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
||||||
** included in the packaging of this file. Please review the following
|
|
||||||
** information to ensure the GNU General Public License requirements will
|
|
||||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <qtsupport/baseqtversion.h>
|
|
||||||
#include <qtsupport/qtversionfactory.h>
|
|
||||||
|
|
||||||
namespace RemoteLinux {
|
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class EmbeddedLinuxQtVersion : public QtSupport::BaseQtVersion
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
EmbeddedLinuxQtVersion() = default;
|
|
||||||
|
|
||||||
QString description() const override;
|
|
||||||
|
|
||||||
QSet<Core::Id> targetDeviceTypes() const override;
|
|
||||||
};
|
|
||||||
|
|
||||||
class EmbeddedLinuxQtVersionFactory : public QtSupport::QtVersionFactory
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
EmbeddedLinuxQtVersionFactory();
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Internal
|
|
||||||
} // namespace RemoteLinux
|
|
@@ -3,7 +3,6 @@ QT += network
|
|||||||
include(../../qtcreatorplugin.pri)
|
include(../../qtcreatorplugin.pri)
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
embeddedlinuxqtversion.h \
|
|
||||||
makeinstallstep.h \
|
makeinstallstep.h \
|
||||||
remotelinuxenvironmentaspect.h \
|
remotelinuxenvironmentaspect.h \
|
||||||
remotelinuxenvironmentaspectwidget.h \
|
remotelinuxenvironmentaspectwidget.h \
|
||||||
@@ -47,7 +46,6 @@ HEADERS += \
|
|||||||
deploymenttimeinfo.h
|
deploymenttimeinfo.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
embeddedlinuxqtversion.cpp \
|
|
||||||
makeinstallstep.cpp \
|
makeinstallstep.cpp \
|
||||||
remotelinuxenvironmentaspect.cpp \
|
remotelinuxenvironmentaspect.cpp \
|
||||||
remotelinuxenvironmentaspectwidget.cpp \
|
remotelinuxenvironmentaspectwidget.cpp \
|
||||||
|
@@ -27,8 +27,6 @@ Project {
|
|||||||
"abstractuploadandinstallpackageservice.h",
|
"abstractuploadandinstallpackageservice.h",
|
||||||
"deploymenttimeinfo.cpp",
|
"deploymenttimeinfo.cpp",
|
||||||
"deploymenttimeinfo.h",
|
"deploymenttimeinfo.h",
|
||||||
"embeddedlinuxqtversion.cpp",
|
|
||||||
"embeddedlinuxqtversion.h",
|
|
||||||
"genericdirectuploadservice.cpp",
|
"genericdirectuploadservice.cpp",
|
||||||
"genericdirectuploadservice.h",
|
"genericdirectuploadservice.h",
|
||||||
"genericdirectuploadstep.cpp",
|
"genericdirectuploadstep.cpp",
|
||||||
|
@@ -30,7 +30,5 @@ namespace Constants {
|
|||||||
|
|
||||||
const char GenericLinuxOsType[] = "GenericLinuxOsType";
|
const char GenericLinuxOsType[] = "GenericLinuxOsType";
|
||||||
|
|
||||||
const char EMBEDDED_LINUX_QT[] = "RemoteLinux.EmbeddedLinuxQt";
|
|
||||||
|
|
||||||
} // Constants
|
} // Constants
|
||||||
} // RemoteLinux
|
} // RemoteLinux
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
#include "remotelinuxplugin.h"
|
#include "remotelinuxplugin.h"
|
||||||
|
|
||||||
#include "embeddedlinuxqtversion.h"
|
|
||||||
#include "linuxdevice.h"
|
#include "linuxdevice.h"
|
||||||
#include "remotelinux_constants.h"
|
#include "remotelinux_constants.h"
|
||||||
#include "remotelinuxqmltoolingsupport.h"
|
#include "remotelinuxqmltoolingsupport.h"
|
||||||
@@ -82,7 +81,6 @@ public:
|
|||||||
checkForFreeDiskSpaceStepFactory;
|
checkForFreeDiskSpaceStepFactory;
|
||||||
GenericDeployStepFactory<RemoteLinuxKillAppStep> remoteLinuxKillAppStepFactory;
|
GenericDeployStepFactory<RemoteLinuxKillAppStep> remoteLinuxKillAppStepFactory;
|
||||||
GenericDeployStepFactory<MakeInstallStep> makeInstallStepFactory;
|
GenericDeployStepFactory<MakeInstallStep> makeInstallStepFactory;
|
||||||
EmbeddedLinuxQtVersionFactory embeddedLinuxQtVersionFactory;
|
|
||||||
|
|
||||||
const QList<Core::Id> supportedRunConfigs {
|
const QList<Core::Id> supportedRunConfigs {
|
||||||
runConfigurationFactory.id(),
|
runConfigurationFactory.id(),
|
||||||
|
Reference in New Issue
Block a user