Qnx: Move QnxRunConfigurationFactory close to run config

No need to have half a dozen lines of code in a separate translation
unit.

Change-Id: I7b611f3404d3db4a1f731b4bfa79bd560a2bf9f3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2018-04-06 11:49:36 +02:00
parent 71501a3bf7
commit 9670c67704
7 changed files with 19 additions and 91 deletions

View File

@@ -10,7 +10,6 @@ SOURCES += qnxplugin.cpp \
qnxrunconfiguration.cpp \
qnxanalyzesupport.cpp \
qnxdebugsupport.cpp \
qnxrunconfigurationfactory.cpp \
qnxqtversionfactory.cpp \
qnxqtversion.cpp \
qnxdeployconfiguration.cpp \
@@ -38,7 +37,6 @@ HEADERS += qnxplugin.h\
qnxrunconfiguration.h \
qnxanalyzesupport.h \
qnxdebugsupport.h \
qnxrunconfigurationfactory.h \
qnxqtversionfactory.h \
qnxqtversion.h \
qnxdeployconfiguration.h \

View File

@@ -65,8 +65,6 @@ QtcPlugin {
"qnxqtversionfactory.h",
"qnxrunconfiguration.cpp",
"qnxrunconfiguration.h",
"qnxrunconfigurationfactory.cpp",
"qnxrunconfigurationfactory.h",
"qnxutils.cpp",
"qnxutils.h",
"qnx_export.h",

View File

@@ -35,7 +35,6 @@
#include "qnxqtversion.h"
#include "qnxqtversionfactory.h"
#include "qnxrunconfiguration.h"
#include "qnxrunconfigurationfactory.h"
#include "qnxsettingspage.h"
#include "qnxtoolchain.h"
#include "qnxutils.h"

View File

@@ -24,12 +24,15 @@
****************************************************************************/
#include "qnxrunconfiguration.h"
#include "qnxconstants.h"
#include "qnxdevicefactory.h"
#include <projectexplorer/runnables.h>
#include <projectexplorer/target.h>
#include <remotelinux/remotelinuxrunconfigurationwidget.h>
#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
#include <utils/environment.h>
@@ -98,5 +101,14 @@ bool QnxRunConfiguration::fromMap(const QVariantMap &map)
return true;
}
// QnxRunConfigurationFactory
QnxRunConfigurationFactory::QnxRunConfigurationFactory()
{
registerRunConfiguration<QnxRunConfiguration>(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX);
addSupportedTargetDeviceType(Constants::QNX_QNX_OS_TYPE);
addSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID);
}
} // namespace Internal
} // namespace Qnx

View File

@@ -47,5 +47,12 @@ private:
QString m_qtLibPath;
};
class QnxRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory
{
Q_OBJECT
public:
QnxRunConfigurationFactory();
};
} // namespace Internal
} // namespace Qnx

View File

@@ -1,45 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
** Contact: KDAB (info@kdab.com)
**
** 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 "qnxrunconfigurationfactory.h"
#include "qnxconstants.h"
#include "qnxrunconfiguration.h"
#include "qnxdevicefactory.h"
#include <qmakeprojectmanager/qmakeprojectmanagerconstants.h>
namespace Qnx {
namespace Internal {
QnxRunConfigurationFactory::QnxRunConfigurationFactory()
{
registerRunConfiguration<QnxRunConfiguration>(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX);
addSupportedTargetDeviceType(Constants::QNX_QNX_OS_TYPE);
addSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID);
}
} // namespace Internal
} // namespace Qnx

View File

@@ -1,41 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
** Contact: KDAB (info@kdab.com)
**
** 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 <projectexplorer/runconfiguration.h>
namespace Qnx {
namespace Internal {
class QnxRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory
{
Q_OBJECT
public:
QnxRunConfigurationFactory();
};
} // namespace Internal
} // namespace Qnx