summaryrefslogtreecommitdiff
path: root/src/plugins/qtsupport
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/qtsupport
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/qtsupport')
-rw-r--r--src/plugins/qtsupport/desktopqtversion.cpp17
-rw-r--r--src/plugins/qtsupport/desktopqtversion.h11
-rw-r--r--src/plugins/qtsupport/desktopqtversionfactory.cpp39
-rw-r--r--src/plugins/qtsupport/desktopqtversionfactory.h40
-rw-r--r--src/plugins/qtsupport/qtsupport.pro2
-rw-r--r--src/plugins/qtsupport/qtsupport.qbs4
-rw-r--r--src/plugins/qtsupport/qtsupportplugin.cpp5
7 files changed, 33 insertions, 85 deletions
diff --git a/src/plugins/qtsupport/desktopqtversion.cpp b/src/plugins/qtsupport/desktopqtversion.cpp
index f6db881248..f97f90f5f8 100644
--- a/src/plugins/qtsupport/desktopqtversion.cpp
+++ b/src/plugins/qtsupport/desktopqtversion.cpp
@@ -38,7 +38,7 @@
#include <QCoreApplication>
#include <QFileInfo>
-using namespace QtSupport;
+namespace QtSupport {
DesktopQtVersion::DesktopQtVersion()
: BaseQtVersion()
@@ -119,3 +119,18 @@ QString DesktopQtVersion::qmlsceneCommand() const
DesktopQtVersion::DesktopQtVersion(const DesktopQtVersion &other) = default;
+
+namespace Internal {
+
+// Factory
+
+DesktopQtVersionFactory::DesktopQtVersionFactory()
+{
+ setQtVersionCreator([] { return new DesktopQtVersion; });
+ setSupportedType(QtSupport::Constants::DESKTOPQT);
+ setPriority(0); // Lowest of all, we want to be the fallback
+ // No further restrictions. We are the fallback :) so we don't care what kind of qt it is.
+}
+
+} // Internal
+} // QtSupport
diff --git a/src/plugins/qtsupport/desktopqtversion.h b/src/plugins/qtsupport/desktopqtversion.h
index 4b74d95648..ab9eb7ebb4 100644
--- a/src/plugins/qtsupport/desktopqtversion.h
+++ b/src/plugins/qtsupport/desktopqtversion.h
@@ -25,6 +25,8 @@
#pragma once
+#include <qtsupport/qtversionfactory.h>
+
#include "baseqtversion.h"
namespace QtSupport {
@@ -58,4 +60,13 @@ private:
mutable QString m_qmlsceneCommand;
};
+namespace Internal {
+
+class DesktopQtVersionFactory : public QtVersionFactory
+{
+public:
+ DesktopQtVersionFactory();
+};
+
+} // Internal
} // QtSupport
diff --git a/src/plugins/qtsupport/desktopqtversionfactory.cpp b/src/plugins/qtsupport/desktopqtversionfactory.cpp
deleted file mode 100644
index b7a8bcea90..0000000000
--- a/src/plugins/qtsupport/desktopqtversionfactory.cpp
+++ /dev/null
@@ -1,39 +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 "desktopqtversionfactory.h"
-#include "desktopqtversion.h"
-#include <qtsupport/qtsupportconstants.h>
-
-using namespace QtSupport;
-using namespace QtSupport::Internal;
-
-DesktopQtVersionFactory::DesktopQtVersionFactory()
-{
- setQtVersionCreator([] { return new DesktopQtVersion; });
- setSupportedType(Constants::DESKTOPQT);
- setPriority(0); // Lowest of all, we want to be the fallback
- // No further restrictions. We are the fallback :) so we don't care what kind of qt it is.
-}
diff --git a/src/plugins/qtsupport/desktopqtversionfactory.h b/src/plugins/qtsupport/desktopqtversionfactory.h
deleted file mode 100644
index 00d308456e..0000000000
--- a/src/plugins/qtsupport/desktopqtversionfactory.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 "qtversionfactory.h"
-
-namespace QtSupport {
-namespace Internal {
-
-class DesktopQtVersionFactory : public QtVersionFactory
-{
-public:
- DesktopQtVersionFactory();
-};
-
-} // Internal
-} // QtSupport
diff --git a/src/plugins/qtsupport/qtsupport.pro b/src/plugins/qtsupport/qtsupport.pro
index 3edc564354..78832697ea 100644
--- a/src/plugins/qtsupport/qtsupport.pro
+++ b/src/plugins/qtsupport/qtsupport.pro
@@ -28,7 +28,6 @@ HEADERS += \
exampleslistmodel.h \
screenshotcropper.h \
qtconfigwidget.h \
- desktopqtversionfactory.h \
desktopqtversion.h \
uicgenerator.h \
qscxmlcgenerator.h
@@ -53,7 +52,6 @@ SOURCES += \
exampleslistmodel.cpp \
screenshotcropper.cpp \
qtconfigwidget.cpp \
- desktopqtversionfactory.cpp \
desktopqtversion.cpp \
uicgenerator.cpp \
qscxmlcgenerator.cpp
diff --git a/src/plugins/qtsupport/qtsupport.qbs b/src/plugins/qtsupport/qtsupport.qbs
index 15794bafe4..25cba7a70c 100644
--- a/src/plugins/qtsupport/qtsupport.qbs
+++ b/src/plugins/qtsupport/qtsupport.qbs
@@ -104,8 +104,8 @@ Project {
Group {
name: "QtVersion"
files: [
- "desktopqtversion.cpp", "desktopqtversion.h",
- "desktopqtversionfactory.cpp", "desktopqtversionfactory.h",
+ "desktopqtversion.cpp",
+ "desktopqtversion.h",
]
}
diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp
index bfb12a671a..daa32ce870 100644
--- a/src/plugins/qtsupport/qtsupportplugin.cpp
+++ b/src/plugins/qtsupport/qtsupportplugin.cpp
@@ -27,14 +27,17 @@
#include "codegenerator.h"
#include "codegensettingspage.h"
-#include "desktopqtversionfactory.h"
+#include "desktopqtversion.h"
#include "gettingstartedwelcomepage.h"
#include "qtkitinformation.h"
#include "qtoptionspage.h"
+#include "qtsupportconstants.h"
+#include "qtversionfactory.h"
#include "qtversionmanager.h"
#include "uicgenerator.h"
#include "qscxmlcgenerator.h"
+#include "desktopqtversion.h"
#include "profilereader.h"
#include <coreplugin/icore.h>