Skip to content
Snippets Groups Projects
Commit 824c6a5c authored by Christian Kandeler's avatar Christian Kandeler Committed by Tobias Hunger
Browse files

QbsProjectManager: Support the "plain C" and "plain C++" wizards.


Change-Id: Idcc8459660526f972949a6f6908acc19bd52a4f7
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 60fa56db
No related branches found
No related tags found
No related merge requests found
import qbs
CppApplication {
type: "application" // To suppress bundle generation on Mac
files: "main.c"
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
-->
<wizard version="1" kind="project" firstpage="10" id="S.Plain C (Qbs)" category="I.Projects"
platformIndependent="true" featuresRequired="Qbs.QbsSupport">
<icon>../common/console.png</icon>
<description>Creates a plain C project using qbs.</description>
<displayname>Plain C Project (Qbs Build)</displayname>;
<displaycategory>Non-Qt Project</displaycategory>
<files>
<file source="../common/main.c" target="main.c" openeditor="true"/>
<file source="project.qbs" target="%ProjectName%.qbs" openproject="true"/>
</files>
</wizard>
import qbs
CppApplication {
type: "application" // To suppress bundle generation on Mac
files: "main.cpp"
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
-->
<wizard version="1" kind="project" firstpage="10" id="S.Plain C++ (Qbs)" category="I.Projects"
platformIndependent="true" featuresRequired="Qbs.QbsSupport">
<icon>../common/console.png</icon>
<description>Creates a plain (non-Qt) C++ project using qbs.</description>
<displayname>Plain C++ Project (Qbs Build)</displayname>;
<displaycategory>Non-Qt Project</displaycategory>
<files>
<file source="../common/main.cpp" target="main.cpp" openeditor="true"/>
<file source="project.qbs" target="%ProjectName%.qbs" openproject="true"/>
</files>
</wizard>
......@@ -45,6 +45,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/featureprovider.h>
#include <coreplugin/icore.h>
#include <coreplugin/fileiconprovider.h>
#include <projectexplorer/buildmanager.h>
......@@ -62,6 +63,17 @@
namespace QbsProjectManager {
namespace Internal {
class QbsFeatureProvider : public Core::IFeatureProvider
{
Core::FeatureSet availableFeatures(const QString & /* platform */) const {
return Core::FeatureSet(Core::Id("Qbs.QbsSupport"));
}
QStringList availablePlatforms() const { return QStringList(); }
QString displayNameForPlatform(const QString & /* platform */) const { return QString(); }
};
QbsProjectManagerPlugin::QbsProjectManagerPlugin() :
m_manager(0),
m_projectExplorer(0),
......@@ -92,6 +104,7 @@ bool QbsProjectManagerPlugin::initialize(const QStringList &arguments, QString *
addAutoReleasedObject(new QbsInstallStepFactory);
addAutoReleasedObject(new QbsDeployConfigurationFactory);
addAutoReleasedObject(new QbsRunConfigurationFactory);
addAutoReleasedObject(new QbsFeatureProvider);
//menus
// Build Menu:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment