Commit cbc5b211 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

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's avatarJoerg Bornemann <joerg.bornemann@qt.io>
parent d023014a
......@@ -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;
......
/****************************************************************************
**
** 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
/****************************************************************************
**
** 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",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment