forked from qt-creator/qt-creator
QbsProjectManager: Introduce QbsBuildInfo
We will need to pass additional build info data in order to support importing builds. Change-Id: Ic62d0da246f5a19b53632ef3dc61b1f4fc434e5b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "qbsbuildconfiguration.h"
|
||||
|
||||
#include "qbsbuildconfigurationwidget.h"
|
||||
#include "qbsbuildinfo.h"
|
||||
#include "qbsbuildstep.h"
|
||||
#include "qbscleanstep.h"
|
||||
#include "qbsinstallstep.h"
|
||||
@@ -36,7 +37,6 @@
|
||||
#include <coreplugin/documentmanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <projectexplorer/buildinfo.h>
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/deployconfiguration.h>
|
||||
#include <projectexplorer/kit.h>
|
||||
@@ -380,7 +380,7 @@ bool QbsBuildConfigurationFactory::canHandle(const Target *t) const
|
||||
BuildInfo *QbsBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
||||
BuildConfiguration::BuildType type) const
|
||||
{
|
||||
auto info = new ProjectExplorer::BuildInfo(this);
|
||||
auto info = new QbsBuildInfo(this);
|
||||
info->typeName = tr("Build");
|
||||
info->kitId = k->id();
|
||||
info->buildType = type;
|
||||
|
||||
48
src/plugins/qbsprojectmanager/qbsbuildinfo.cpp
Normal file
48
src/plugins/qbsprojectmanager/qbsbuildinfo.cpp
Normal file
@@ -0,0 +1,48 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 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 "qbsbuildinfo.h"
|
||||
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
namespace QbsProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
QbsBuildInfo::QbsBuildInfo(const ProjectExplorer::IBuildConfigurationFactory *f)
|
||||
: ProjectExplorer::BuildInfo(f)
|
||||
{
|
||||
}
|
||||
|
||||
QList<ProjectExplorer::Task> QbsBuildInfo::reportIssues(const QString &projectPath,
|
||||
const QString &buildDir) const
|
||||
{
|
||||
const ProjectExplorer::Kit * const k = ProjectExplorer::KitManager::kit(kitId);
|
||||
const QtSupport::BaseQtVersion * const version = QtSupport::QtKitInformation::qtVersion(k);
|
||||
return version ? version->reportIssues(projectPath, buildDir)
|
||||
: QList<ProjectExplorer::Task>();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QbsProjectManager
|
||||
47
src/plugins/qbsprojectmanager/qbsbuildinfo.h
Normal file
47
src/plugins/qbsprojectmanager/qbsbuildinfo.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QBSBUILDINFO_H
|
||||
#define QBSBUILDINFO_H
|
||||
|
||||
#include <projectexplorer/buildinfo.h>
|
||||
|
||||
namespace QbsProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class QbsBuildInfo final : public ProjectExplorer::BuildInfo
|
||||
{
|
||||
public:
|
||||
QbsBuildInfo(const ProjectExplorer::IBuildConfigurationFactory *f);
|
||||
|
||||
private:
|
||||
QList<ProjectExplorer::Task> reportIssues(const QString &projectPath,
|
||||
const QString &buildDir) const override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QbsProjectManager
|
||||
|
||||
#endif // QBSBUILDINFO_H
|
||||
@@ -23,6 +23,7 @@ HEADERS = \
|
||||
propertyprovider.h \
|
||||
qbsbuildconfiguration.h \
|
||||
qbsbuildconfigurationwidget.h \
|
||||
qbsbuildinfo.h \
|
||||
qbsbuildstep.h \
|
||||
qbscleanstep.h \
|
||||
qbsdeployconfigurationfactory.h \
|
||||
@@ -48,6 +49,7 @@ SOURCES = \
|
||||
defaultpropertyprovider.cpp \
|
||||
qbsbuildconfiguration.cpp \
|
||||
qbsbuildconfigurationwidget.cpp \
|
||||
qbsbuildinfo.cpp \
|
||||
qbsbuildstep.cpp \
|
||||
qbscleanstep.cpp \
|
||||
qbsdeployconfigurationfactory.cpp \
|
||||
|
||||
@@ -68,6 +68,8 @@ QtcPlugin {
|
||||
"qbsbuildconfiguration.h",
|
||||
"qbsbuildconfigurationwidget.cpp",
|
||||
"qbsbuildconfigurationwidget.h",
|
||||
"qbsbuildinfo.cpp",
|
||||
"qbsbuildinfo.h",
|
||||
"qbsbuildstep.cpp",
|
||||
"qbsbuildstep.h",
|
||||
"qbsbuildstepconfigwidget.ui",
|
||||
|
||||
Reference in New Issue
Block a user