diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index 534242d6d48..ec12f992c05 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -44,7 +44,8 @@ #include #include #include -#include +#include + #include #include diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index d78d7b4056b..e8cd959ec6c 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include diff --git a/src/plugins/qtsupport/CMakeLists.txt b/src/plugins/qtsupport/CMakeLists.txt index ebd9aa5c8f8..b7abc0d3fe1 100644 --- a/src/plugins/qtsupport/CMakeLists.txt +++ b/src/plugins/qtsupport/CMakeLists.txt @@ -8,7 +8,6 @@ add_qtc_plugin(QtSupport codegensettings.cpp codegensettings.h codegensettingspage.cpp codegensettingspage.h codegensettingspagewidget.ui - desktopqtversion.cpp desktopqtversion.h exampleslistmodel.cpp exampleslistmodel.h gettingstartedwelcomepage.cpp gettingstartedwelcomepage.h profilereader.cpp profilereader.h @@ -29,6 +28,7 @@ add_qtc_plugin(QtSupport qtversionfactory.cpp qtversionfactory.h qtversioninfo.ui qtversionmanager.cpp qtversionmanager.h qtversionmanager.ui + qtversions.cpp qtversions.h screenshotcropper.cpp screenshotcropper.h showbuildlog.ui translationwizardpage.cpp translationwizardpage.h diff --git a/src/plugins/qtsupport/qtprojectimporter.cpp b/src/plugins/qtsupport/qtprojectimporter.cpp index 301026b3568..1ba4de73217 100644 --- a/src/plugins/qtsupport/qtprojectimporter.cpp +++ b/src/plugins/qtsupport/qtprojectimporter.cpp @@ -129,7 +129,7 @@ void QtProjectImporter::persistTemporaryQt(Kit *k, const QVariantList &vl) } // namespace QtSupport #include "qtsupportplugin.h" -#include "desktopqtversion.h" +#include "qtversions.h" #include #include diff --git a/src/plugins/qtsupport/qtsupport.pro b/src/plugins/qtsupport/qtsupport.pro index e378fbe75d1..b92bea8174e 100644 --- a/src/plugins/qtsupport/qtsupport.pro +++ b/src/plugins/qtsupport/qtsupport.pro @@ -29,7 +29,7 @@ HEADERS += \ exampleslistmodel.h \ screenshotcropper.h \ qtconfigwidget.h \ - desktopqtversion.h \ + qtversions.h \ uicgenerator.h \ qscxmlcgenerator.h \ translationwizardpage.h @@ -55,7 +55,7 @@ SOURCES += \ exampleslistmodel.cpp \ screenshotcropper.cpp \ qtconfigwidget.cpp \ - desktopqtversion.cpp \ + qtversions.cpp \ uicgenerator.cpp \ qscxmlcgenerator.cpp \ translationwizardpage.cpp diff --git a/src/plugins/qtsupport/qtsupport.qbs b/src/plugins/qtsupport/qtsupport.qbs index 86a203cf867..7e17ef55864 100644 --- a/src/plugins/qtsupport/qtsupport.qbs +++ b/src/plugins/qtsupport/qtsupport.qbs @@ -114,8 +114,8 @@ Project { Group { name: "QtVersion" files: [ - "desktopqtversion.cpp", - "desktopqtversion.h", + "qtversions.cpp", + "qtversions.h", ] } diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp index 0ff2adf6b2f..2bb86dd31ab 100644 --- a/src/plugins/qtsupport/qtsupportplugin.cpp +++ b/src/plugins/qtsupport/qtsupportplugin.cpp @@ -27,20 +27,17 @@ #include "codegenerator.h" #include "codegensettingspage.h" -#include "desktopqtversion.h" #include "gettingstartedwelcomepage.h" +#include "profilereader.h" +#include "qscxmlcgenerator.h" #include "qtkitinformation.h" #include "qtoptionspage.h" #include "qtoutputformatter.h" #include "qtsupportconstants.h" -#include "qtversionfactory.h" #include "qtversionmanager.h" +#include "qtversions.h" #include "translationwizardpage.h" #include "uicgenerator.h" -#include "qscxmlcgenerator.h" - -#include "desktopqtversion.h" -#include "profilereader.h" #include #include @@ -66,7 +63,9 @@ class QtSupportPluginPrivate { public: QtVersionManager qtVersionManager; + DesktopQtVersionFactory desktopQtVersionFactory; + EmbeddedLinuxQtVersionFactory embeddedLinuxQtVersionFactory; CodeGenSettingsPage codeGenSettingsPage; QtOptionsPage qtOptionsPage; diff --git a/src/plugins/qtsupport/desktopqtversion.cpp b/src/plugins/qtsupport/qtversions.cpp similarity index 75% rename from src/plugins/qtsupport/desktopqtversion.cpp rename to src/plugins/qtsupport/qtversions.cpp index c3d23cb5bfb..460f5a6cdfb 100644 --- a/src/plugins/qtsupport/desktopqtversion.cpp +++ b/src/plugins/qtsupport/qtversions.cpp @@ -23,12 +23,14 @@ ** ****************************************************************************/ -#include "desktopqtversion.h" +#include "qtversions.h" #include "qtsupportconstants.h" #include #include + #include + #include #include @@ -114,5 +116,44 @@ DesktopQtVersionFactory::DesktopQtVersionFactory() // 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 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 } // QtSupport diff --git a/src/plugins/qtsupport/desktopqtversion.h b/src/plugins/qtsupport/qtversions.h similarity index 92% rename from src/plugins/qtsupport/desktopqtversion.h rename to src/plugins/qtsupport/qtversions.h index 01e304e23ec..2eadda3c415 100644 --- a/src/plugins/qtsupport/desktopqtversion.h +++ b/src/plugins/qtsupport/qtversions.h @@ -25,8 +25,7 @@ #pragma once -#include - +#include "qtversionfactory.h" #include "baseqtversion.h" namespace QtSupport { @@ -59,5 +58,11 @@ public: DesktopQtVersionFactory(); }; +class EmbeddedLinuxQtVersionFactory : public QtSupport::QtVersionFactory +{ +public: + EmbeddedLinuxQtVersionFactory(); +}; + } // Internal } // QtSupport diff --git a/src/plugins/remotelinux/CMakeLists.txt b/src/plugins/remotelinux/CMakeLists.txt index 63c97b1686a..8a850e33a47 100644 --- a/src/plugins/remotelinux/CMakeLists.txt +++ b/src/plugins/remotelinux/CMakeLists.txt @@ -7,7 +7,6 @@ add_qtc_plugin(RemoteLinux abstractremotelinuxdeploystep.cpp abstractremotelinuxdeploystep.h abstractuploadandinstallpackageservice.cpp abstractuploadandinstallpackageservice.h deploymenttimeinfo.cpp deploymenttimeinfo.h - embeddedlinuxqtversion.cpp embeddedlinuxqtversion.h genericdirectuploadservice.cpp genericdirectuploadservice.h genericdirectuploadstep.cpp genericdirectuploadstep.h genericlinuxdeviceconfigurationwidget.cpp genericlinuxdeviceconfigurationwidget.h genericlinuxdeviceconfigurationwidget.ui diff --git a/src/plugins/remotelinux/embeddedlinuxqtversion.cpp b/src/plugins/remotelinux/embeddedlinuxqtversion.cpp deleted file mode 100644 index e315cf066a3..00000000000 --- a/src/plugins/remotelinux/embeddedlinuxqtversion.cpp +++ /dev/null @@ -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 -#include - -#include - -namespace RemoteLinux { -namespace Internal { - -QString EmbeddedLinuxQtVersion::description() const -{ - return QCoreApplication::translate("QtVersion", "Embedded Linux", "Qt Version is used for embedded Linux development"); -} - -QSet 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 diff --git a/src/plugins/remotelinux/embeddedlinuxqtversion.h b/src/plugins/remotelinux/embeddedlinuxqtversion.h deleted file mode 100644 index e70eea1df36..00000000000 --- a/src/plugins/remotelinux/embeddedlinuxqtversion.h +++ /dev/null @@ -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 -#include - -namespace RemoteLinux { -namespace Internal { - -class EmbeddedLinuxQtVersion : public QtSupport::BaseQtVersion -{ -public: - EmbeddedLinuxQtVersion() = default; - - QString description() const override; - - QSet targetDeviceTypes() const override; -}; - -class EmbeddedLinuxQtVersionFactory : public QtSupport::QtVersionFactory -{ -public: - EmbeddedLinuxQtVersionFactory(); -}; - -} // namespace Internal -} // namespace RemoteLinux diff --git a/src/plugins/remotelinux/remotelinux.pro b/src/plugins/remotelinux/remotelinux.pro index 5314e25d64b..1e92e019cb4 100644 --- a/src/plugins/remotelinux/remotelinux.pro +++ b/src/plugins/remotelinux/remotelinux.pro @@ -3,7 +3,6 @@ QT += network include(../../qtcreatorplugin.pri) HEADERS += \ - embeddedlinuxqtversion.h \ makeinstallstep.h \ remotelinuxenvironmentaspect.h \ remotelinuxenvironmentaspectwidget.h \ @@ -47,7 +46,6 @@ HEADERS += \ deploymenttimeinfo.h SOURCES += \ - embeddedlinuxqtversion.cpp \ makeinstallstep.cpp \ remotelinuxenvironmentaspect.cpp \ remotelinuxenvironmentaspectwidget.cpp \ diff --git a/src/plugins/remotelinux/remotelinux.qbs b/src/plugins/remotelinux/remotelinux.qbs index e2a9551393e..c56e122c699 100644 --- a/src/plugins/remotelinux/remotelinux.qbs +++ b/src/plugins/remotelinux/remotelinux.qbs @@ -27,8 +27,6 @@ Project { "abstractuploadandinstallpackageservice.h", "deploymenttimeinfo.cpp", "deploymenttimeinfo.h", - "embeddedlinuxqtversion.cpp", - "embeddedlinuxqtversion.h", "genericdirectuploadservice.cpp", "genericdirectuploadservice.h", "genericdirectuploadstep.cpp", diff --git a/src/plugins/remotelinux/remotelinux_constants.h b/src/plugins/remotelinux/remotelinux_constants.h index 1b34d1d4d73..479dfda1679 100644 --- a/src/plugins/remotelinux/remotelinux_constants.h +++ b/src/plugins/remotelinux/remotelinux_constants.h @@ -30,7 +30,5 @@ namespace Constants { const char GenericLinuxOsType[] = "GenericLinuxOsType"; -const char EMBEDDED_LINUX_QT[] = "RemoteLinux.EmbeddedLinuxQt"; - } // Constants } // RemoteLinux diff --git a/src/plugins/remotelinux/remotelinuxplugin.cpp b/src/plugins/remotelinux/remotelinuxplugin.cpp index 438c5c23e3e..1f517802482 100644 --- a/src/plugins/remotelinux/remotelinuxplugin.cpp +++ b/src/plugins/remotelinux/remotelinuxplugin.cpp @@ -25,7 +25,6 @@ #include "remotelinuxplugin.h" -#include "embeddedlinuxqtversion.h" #include "linuxdevice.h" #include "remotelinux_constants.h" #include "remotelinuxqmltoolingsupport.h" @@ -82,7 +81,6 @@ public: checkForFreeDiskSpaceStepFactory; GenericDeployStepFactory remoteLinuxKillAppStepFactory; GenericDeployStepFactory makeInstallStepFactory; - EmbeddedLinuxQtVersionFactory embeddedLinuxQtVersionFactory; const QList supportedRunConfigs { runConfigurationFactory.id(),