summaryrefslogtreecommitdiff
path: root/src/plugins/remotelinux
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-02-14 12:29:00 +0100
committerhjk <hjk@qt.io>2019-02-18 10:12:55 +0000
commit06cc09a30f93eb43afd29a25fd40e061e54e3765 (patch)
treebf8372545700fd9fc956705d456991ddf5ea717d /src/plugins/remotelinux
parent631b982aaa06c9e7d451476d15d9121496ee11f0 (diff)
downloadqt-creator-06cc09a30f93eb43afd29a25fd40e061e54e3765.tar.gz
QtSupport et al: Move QtVersionFactory to *QtVersion implementation
At most a dozen lines each left. Change-Id: Ifbf34f814266ba7bee83d3fee9db831eb450dfc4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/remotelinux')
-rw-r--r--src/plugins/remotelinux/embeddedlinuxqtversion.cpp20
-rw-r--r--src/plugins/remotelinux/embeddedlinuxqtversion.h7
-rw-r--r--src/plugins/remotelinux/embeddedlinuxqtversionfactory.cpp52
-rw-r--r--src/plugins/remotelinux/embeddedlinuxqtversionfactory.h40
-rw-r--r--src/plugins/remotelinux/remotelinux.pro2
-rw-r--r--src/plugins/remotelinux/remotelinux.qbs2
-rw-r--r--src/plugins/remotelinux/remotelinuxplugin.cpp2
7 files changed, 28 insertions, 97 deletions
diff --git a/src/plugins/remotelinux/embeddedlinuxqtversion.cpp b/src/plugins/remotelinux/embeddedlinuxqtversion.cpp
index 9f99db46d6..ace6fd7178 100644
--- a/src/plugins/remotelinux/embeddedlinuxqtversion.cpp
+++ b/src/plugins/remotelinux/embeddedlinuxqtversion.cpp
@@ -60,5 +60,25 @@ 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 &) {
+ EmbeddedLinuxQtVersion tempVersion;
+ QList<ProjectExplorer::Abi> 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
index f4eb9c0f26..cbf5426795 100644
--- a/src/plugins/remotelinux/embeddedlinuxqtversion.h
+++ b/src/plugins/remotelinux/embeddedlinuxqtversion.h
@@ -26,6 +26,7 @@
#pragma once
#include <qtsupport/baseqtversion.h>
+#include <qtsupport/qtversionfactory.h>
namespace RemoteLinux {
namespace Internal {
@@ -46,5 +47,11 @@ public:
QSet<Core::Id> targetDeviceTypes() const override;
};
+class EmbeddedLinuxQtVersionFactory : public QtSupport::QtVersionFactory
+{
+public:
+ EmbeddedLinuxQtVersionFactory();
+};
+
} // namespace Internal
} // namespace RemoteLinux
diff --git a/src/plugins/remotelinux/embeddedlinuxqtversionfactory.cpp b/src/plugins/remotelinux/embeddedlinuxqtversionfactory.cpp
deleted file mode 100644
index e657e81fa4..0000000000
--- a/src/plugins/remotelinux/embeddedlinuxqtversionfactory.cpp
+++ /dev/null
@@ -1,52 +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 "embeddedlinuxqtversionfactory.h"
-
-#include "embeddedlinuxqtversion.h"
-#include "remotelinux_constants.h"
-
-namespace RemoteLinux {
-namespace Internal {
-
-EmbeddedLinuxQtVersionFactory::EmbeddedLinuxQtVersionFactory()
-{
- setQtVersionCreator([] { return new EmbeddedLinuxQtVersion; });
- setSupportedType(RemoteLinux::Constants::EMBEDDED_LINUX_QT);
- setPriority(10);
-
- setRestrictionChecker([](const SetupData &) {
- EmbeddedLinuxQtVersion tempVersion;
- QList<ProjectExplorer::Abi> 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/embeddedlinuxqtversionfactory.h b/src/plugins/remotelinux/embeddedlinuxqtversionfactory.h
deleted file mode 100644
index 2bcbbcae40..0000000000
--- a/src/plugins/remotelinux/embeddedlinuxqtversionfactory.h
+++ /dev/null
@@ -1,40 +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/qtversionfactory.h>
-
-namespace RemoteLinux {
-namespace Internal {
-
-class EmbeddedLinuxQtVersionFactory : public QtSupport::QtVersionFactory
-{
-public:
- EmbeddedLinuxQtVersionFactory();
-};
-
-} // Internal
-} // RemoteLinux
diff --git a/src/plugins/remotelinux/remotelinux.pro b/src/plugins/remotelinux/remotelinux.pro
index 027cc59b22..b1cab71cfa 100644
--- a/src/plugins/remotelinux/remotelinux.pro
+++ b/src/plugins/remotelinux/remotelinux.pro
@@ -4,7 +4,6 @@ include(../../qtcreatorplugin.pri)
HEADERS += \
embeddedlinuxqtversion.h \
- embeddedlinuxqtversionfactory.h \
remotelinuxenvironmentaspect.h \
remotelinuxenvironmentaspectwidget.h \
remotelinuxplugin.h \
@@ -49,7 +48,6 @@ HEADERS += \
SOURCES += \
embeddedlinuxqtversion.cpp \
- embeddedlinuxqtversionfactory.cpp \
remotelinuxenvironmentaspect.cpp \
remotelinuxenvironmentaspectwidget.cpp \
remotelinuxplugin.cpp \
diff --git a/src/plugins/remotelinux/remotelinux.qbs b/src/plugins/remotelinux/remotelinux.qbs
index 1f553d662b..7eebf0b3f8 100644
--- a/src/plugins/remotelinux/remotelinux.qbs
+++ b/src/plugins/remotelinux/remotelinux.qbs
@@ -29,8 +29,6 @@ Project {
"deploymenttimeinfo.h",
"embeddedlinuxqtversion.cpp",
"embeddedlinuxqtversion.h",
- "embeddedlinuxqtversionfactory.cpp",
- "embeddedlinuxqtversionfactory.h",
"genericdirectuploadservice.cpp",
"genericdirectuploadservice.h",
"genericdirectuploadstep.cpp",
diff --git a/src/plugins/remotelinux/remotelinuxplugin.cpp b/src/plugins/remotelinux/remotelinuxplugin.cpp
index c9b3277681..e305e472e2 100644
--- a/src/plugins/remotelinux/remotelinuxplugin.cpp
+++ b/src/plugins/remotelinux/remotelinuxplugin.cpp
@@ -25,7 +25,7 @@
#include "remotelinuxplugin.h"
-#include "embeddedlinuxqtversionfactory.h"
+#include "embeddedlinuxqtversion.h"
#include "genericlinuxdeviceconfigurationfactory.h"
#include "remotelinux_constants.h"
#include "remotelinuxqmltoolingsupport.h"