forked from qt-creator/qt-creator
Qt4ProjectManager: Exported header cleanup.
This commit is contained in:
69
src/plugins/qt4projectmanager/buildconfigurationinfo.h
Normal file
69
src/plugins/qt4projectmanager/buildconfigurationinfo.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** No Commercial Usage
|
||||
**
|
||||
** This file contains pre-release code and may not be distributed.
|
||||
** You may use this file in accordance with the terms and conditions
|
||||
** contained in the Technology Preview License Agreement accompanying
|
||||
** this package.
|
||||
**
|
||||
** 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, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef BUILDCONFIGURATIONINFO_H
|
||||
#define BUILDCONFIGURATIONINFO_H
|
||||
|
||||
#include "qtversionmanager.h"
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
struct QT4PROJECTMANAGER_EXPORT BuildConfigurationInfo {
|
||||
explicit BuildConfigurationInfo()
|
||||
: version(0), buildConfig(QtVersion::QmakeBuildConfig(0)), importing(false), temporaryQtVersion(false)
|
||||
{}
|
||||
|
||||
explicit BuildConfigurationInfo(QtVersion *v, QtVersion::QmakeBuildConfigs bc,
|
||||
const QString &aa, const QString &d, bool importing_ = false, bool temporaryQtVersion_ = false) :
|
||||
version(v), buildConfig(bc), additionalArguments(aa), directory(d), importing(importing_), temporaryQtVersion(temporaryQtVersion_)
|
||||
{ }
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return version != 0;
|
||||
}
|
||||
|
||||
QtVersion *version;
|
||||
QtVersion::QmakeBuildConfigs buildConfig;
|
||||
QString additionalArguments;
|
||||
QString directory;
|
||||
bool importing;
|
||||
bool temporaryQtVersion;
|
||||
|
||||
static QList<BuildConfigurationInfo> importBuildConfigurations(const QString &proFilePath);
|
||||
static BuildConfigurationInfo checkForBuild(const QString &directory, const QString &proFilePath);
|
||||
static QList<BuildConfigurationInfo> filterBuildConfigurationInfos(const QList<BuildConfigurationInfo> &infos, const QString &id);
|
||||
};
|
||||
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // BUILDCONFIGURATIONINFO_H
|
@@ -32,6 +32,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "qt4desktoptargetfactory.h"
|
||||
#include "buildconfigurationinfo.h"
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
#include "qt4project.h"
|
||||
#include "qt4runconfiguration.h"
|
||||
@@ -102,7 +103,7 @@ bool Qt4DesktopTargetFactory::canRestore(ProjectExplorer::Project *parent, const
|
||||
return canCreate(parent, idFromMap(map));
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4DesktopTargetFactory::restore(ProjectExplorer::Project *parent, const QVariantMap &map)
|
||||
ProjectExplorer::Target *Qt4DesktopTargetFactory::restore(ProjectExplorer::Project *parent, const QVariantMap &map)
|
||||
{
|
||||
if (!canRestore(parent, map))
|
||||
return 0;
|
||||
@@ -158,7 +159,7 @@ Qt4TargetSetupWidget *Qt4DesktopTargetFactory::createTargetSetupWidget(const QSt
|
||||
return widget;
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4DesktopTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
|
||||
ProjectExplorer::Target *Qt4DesktopTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
|
||||
{
|
||||
if (!canCreate(parent, id))
|
||||
return 0;
|
||||
@@ -183,7 +184,7 @@ bool Qt4DesktopTargetFactory::isMobileTarget(const QString &id)
|
||||
return false;
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4DesktopTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos)
|
||||
ProjectExplorer::Target *Qt4DesktopTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos)
|
||||
{
|
||||
if (!canCreate(parent, id))
|
||||
return 0;
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#ifndef QT4DESKTOPTARGETFACTORY_H
|
||||
#define QT4DESKTOPTARGETFACTORY_H
|
||||
|
||||
#include "qt4target.h"
|
||||
#include "qt4basetargetfactory.h"
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
|
||||
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
|
||||
Qt4ProjectManager::Qt4BaseTarget *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
|
||||
ProjectExplorer::Target *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
|
||||
QString defaultShadowBuildDirectory(const QString &projectLocation, const QString &id);
|
||||
|
||||
virtual bool supportsTargetId(const QString &id) const;
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
Qt4TargetSetupWidget *createTargetSetupWidget(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion, bool importEnabled, QList<BuildConfigurationInfo> importInfos);
|
||||
bool isMobileTarget(const QString &id);
|
||||
QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion);
|
||||
Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id);
|
||||
Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
|
||||
ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id);
|
||||
ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
|
||||
|
||||
};
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "qt4simulatortargetfactory.h"
|
||||
#include "buildconfigurationinfo.h"
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
#include "qt4project.h"
|
||||
#include "qt4runconfiguration.h"
|
||||
@@ -103,7 +104,7 @@ bool Qt4SimulatorTargetFactory::canRestore(ProjectExplorer::Project *parent, con
|
||||
return canCreate(parent, idFromMap(map));
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4SimulatorTargetFactory::restore(ProjectExplorer::Project *parent, const QVariantMap &map)
|
||||
ProjectExplorer::Target *Qt4SimulatorTargetFactory::restore(ProjectExplorer::Project *parent, const QVariantMap &map)
|
||||
{
|
||||
if (!canRestore(parent, map))
|
||||
return 0;
|
||||
@@ -151,7 +152,7 @@ bool Qt4SimulatorTargetFactory::isMobileTarget(const QString &id)
|
||||
return true;
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4SimulatorTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
|
||||
ProjectExplorer::Target *Qt4SimulatorTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
|
||||
{
|
||||
if (!canCreate(parent, id))
|
||||
return 0;
|
||||
@@ -169,7 +170,7 @@ Qt4BaseTarget *Qt4SimulatorTargetFactory::create(ProjectExplorer::Project *paren
|
||||
return create(parent, id, infos);
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4SimulatorTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos)
|
||||
ProjectExplorer::Target *Qt4SimulatorTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos)
|
||||
{
|
||||
if (!canCreate(parent, id))
|
||||
return 0;
|
||||
|
@@ -33,7 +33,8 @@
|
||||
|
||||
#ifndef QT4SIMULATORTARGETFACTORY_H
|
||||
#define QT4SIMULATORTARGETFACTORY_H
|
||||
#include "qt4target.h"
|
||||
|
||||
#include "qt4basetargetfactory.h"
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -53,15 +54,15 @@ public:
|
||||
|
||||
bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
|
||||
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
|
||||
Qt4ProjectManager::Qt4BaseTarget *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
|
||||
ProjectExplorer::Target *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
|
||||
QString defaultShadowBuildDirectory(const QString &projectLocation, const QString &id);
|
||||
|
||||
bool supportsTargetId(const QString &id) const;
|
||||
|
||||
QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion);
|
||||
bool isMobileTarget(const QString &id);
|
||||
Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id);
|
||||
Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
|
||||
ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id);
|
||||
ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -32,6 +32,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "qt4maemotargetfactory.h"
|
||||
#include "buildconfigurationinfo.h"
|
||||
#include "qt4project.h"
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
#include "qt-maemo/maemodeploystep.h"
|
||||
@@ -110,7 +111,7 @@ bool Qt4MaemoTargetFactory::canRestore(ProjectExplorer::Project *parent, const Q
|
||||
return canCreate(parent, idFromMap(map));
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4MaemoTargetFactory::restore(ProjectExplorer::Project *parent, const QVariantMap &map)
|
||||
ProjectExplorer::Target *Qt4MaemoTargetFactory::restore(ProjectExplorer::Project *parent, const QVariantMap &map)
|
||||
{
|
||||
if (!canRestore(parent, map))
|
||||
return 0;
|
||||
@@ -171,7 +172,7 @@ bool Qt4MaemoTargetFactory::isMobileTarget(const QString &id)
|
||||
return true;
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4MaemoTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
|
||||
ProjectExplorer::Target *Qt4MaemoTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
|
||||
{
|
||||
if (!canCreate(parent, id))
|
||||
return 0;
|
||||
@@ -190,7 +191,7 @@ Qt4BaseTarget *Qt4MaemoTargetFactory::create(ProjectExplorer::Project *parent, c
|
||||
return create(parent, id, infos);
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4MaemoTargetFactory::create(ProjectExplorer::Project *parent,
|
||||
ProjectExplorer::Target *Qt4MaemoTargetFactory::create(ProjectExplorer::Project *parent,
|
||||
const QString &id, const QList<BuildConfigurationInfo> &infos)
|
||||
{
|
||||
if (!canCreate(parent, id))
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#ifndef QT4MAEMOTARGETFACTORY_H
|
||||
#define QT4MAEMOTARGETFACTORY_H
|
||||
|
||||
#include "qt4target.h"
|
||||
#include "qt4basetargetfactory.h"
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -52,13 +52,13 @@ public:
|
||||
|
||||
bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
|
||||
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
|
||||
Qt4ProjectManager::Qt4BaseTarget *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
|
||||
ProjectExplorer::Target *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
|
||||
QString defaultShadowBuildDirectory(const QString &projectLocation, const QString &id);
|
||||
|
||||
bool supportsTargetId(const QString &id) const;
|
||||
|
||||
Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id);
|
||||
Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
|
||||
ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id);
|
||||
ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
|
||||
|
||||
QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion);
|
||||
bool isMobileTarget(const QString &id);
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include "qt4symbiantargetfactory.h"
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
#include "qt4project.h"
|
||||
#include "buildconfigurationinfo.h"
|
||||
|
||||
#include "qt-s60/s60deployconfiguration.h"
|
||||
#include "qt-s60/s60devicerunconfiguration.h"
|
||||
@@ -110,7 +111,7 @@ bool Qt4SymbianTargetFactory::canRestore(ProjectExplorer::Project *parent, const
|
||||
return canCreate(parent, idFromMap(map));
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4SymbianTargetFactory::restore(ProjectExplorer::Project *parent, const QVariantMap &map)
|
||||
ProjectExplorer::Target *Qt4SymbianTargetFactory::restore(ProjectExplorer::Project *parent, const QVariantMap &map)
|
||||
{
|
||||
if (!canRestore(parent, map))
|
||||
return 0;
|
||||
@@ -160,7 +161,7 @@ bool Qt4SymbianTargetFactory::isMobileTarget(const QString &id)
|
||||
return true;
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
|
||||
ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
|
||||
{
|
||||
if (!canCreate(parent, id))
|
||||
return 0;
|
||||
@@ -186,7 +187,7 @@ Qt4BaseTarget *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent,
|
||||
return create(parent, id, infos);
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos)
|
||||
ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos)
|
||||
{
|
||||
if (!canCreate(parent, id))
|
||||
return 0;
|
||||
@@ -205,7 +206,7 @@ Qt4BaseTarget *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent,
|
||||
return t;
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget)
|
||||
ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget)
|
||||
{
|
||||
if (!widget->isTargetSelected())
|
||||
return 0;
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#ifndef QT4SYMBIANTARGETFACTORY_H
|
||||
#define QT4SYMBIANTARGETFACTORY_H
|
||||
|
||||
#include "qt4target.h"
|
||||
#include "qt4basetargetfactory.h"
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
@@ -52,11 +52,11 @@ public:
|
||||
|
||||
bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
|
||||
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
|
||||
Qt4ProjectManager::Qt4BaseTarget *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
|
||||
virtual ProjectExplorer::Target *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
|
||||
|
||||
Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id);
|
||||
Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
|
||||
Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget);
|
||||
virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id);
|
||||
virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
|
||||
virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget);
|
||||
|
||||
QString defaultShadowBuildDirectory(const QString &projectLocation, const QString &id);
|
||||
QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion);
|
||||
|
82
src/plugins/qt4projectmanager/qt4basetargetfactory.h
Normal file
82
src/plugins/qt4projectmanager/qt4basetargetfactory.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** No Commercial Usage
|
||||
**
|
||||
** This file contains pre-release code and may not be distributed.
|
||||
** You may use this file in accordance with the terms and conditions
|
||||
** contained in the Technology Preview License Agreement accompanying
|
||||
** this package.
|
||||
**
|
||||
** 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, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef QT4BASETARGETFACTORY_H
|
||||
#define QT4BASETARGETFACTORY_H
|
||||
|
||||
#include "qt4projectmanager_global.h"
|
||||
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <QtCore/QList>
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
class Qt4TargetSetupWidget;
|
||||
class QtVersionNumber;
|
||||
struct BuildConfigurationInfo;
|
||||
|
||||
class QT4PROJECTMANAGER_EXPORT Qt4BaseTargetFactory : public ProjectExplorer::ITargetFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Qt4BaseTargetFactory(QObject *parent);
|
||||
virtual ~Qt4BaseTargetFactory();
|
||||
|
||||
virtual Qt4TargetSetupWidget *createTargetSetupWidget(const QString &id,
|
||||
const QString &proFilePath,
|
||||
const QtVersionNumber &minimumQtVersion,
|
||||
bool importEnabled,
|
||||
QList<BuildConfigurationInfo> importInfos);
|
||||
|
||||
virtual QString defaultShadowBuildDirectory(const QString &projectLocation, const QString &id) =0;
|
||||
/// used by the default implementation of createTargetSetupWidget
|
||||
/// not needed otherwise
|
||||
virtual QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion) = 0;
|
||||
/// only used in the TargetSetupPage
|
||||
virtual QIcon iconForId(const QString &id) const = 0;
|
||||
|
||||
virtual bool isMobileTarget(const QString &id) = 0;
|
||||
|
||||
virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id) = 0;
|
||||
virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos) = 0;
|
||||
virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget);
|
||||
|
||||
static Qt4BaseTargetFactory *qt4BaseTargetFactoryForId(const QString &id);
|
||||
|
||||
protected:
|
||||
static QString msgBuildConfigurationName(const BuildConfigurationInfo &info);
|
||||
};
|
||||
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // QT4BASETARGETFACTORY_H
|
@@ -71,7 +71,10 @@ HEADERS += \
|
||||
qmldebugginglibrary.h \
|
||||
profilecompletion.h \
|
||||
profilekeywords.h \
|
||||
debugginghelperbuildtask.h
|
||||
debugginghelperbuildtask.h \
|
||||
qt4targetsetupwidget.h \
|
||||
qt4basetargetfactory.h \
|
||||
buildconfigurationinfo.h
|
||||
SOURCES += qt4projectmanagerplugin.cpp \
|
||||
qtparser.cpp \
|
||||
qt4projectmanager.cpp \
|
||||
|
@@ -32,11 +32,12 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "qt4target.h"
|
||||
#include "buildconfigurationinfo.h"
|
||||
|
||||
#include "makestep.h"
|
||||
#include "qmakestep.h"
|
||||
#include "qt4project.h"
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
#include "qt4basetargetfactory.h"
|
||||
#include "qt4projectconfigwidget.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -85,7 +86,7 @@ Qt4TargetSetupWidget *Qt4BaseTargetFactory::createTargetSetupWidget(const QStrin
|
||||
return new Qt4DefaultTargetSetupWidget(this, id, proFilePath, infos, number, importEnabled, importInfos);
|
||||
}
|
||||
|
||||
Qt4BaseTarget *Qt4BaseTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget)
|
||||
ProjectExplorer::Target *Qt4BaseTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget)
|
||||
{
|
||||
if (!widget->isTargetSelected())
|
||||
return 0;
|
||||
@@ -264,8 +265,8 @@ void Qt4BaseTarget::emitProFileEvaluateNeeded()
|
||||
// Qt4TargetSetupWidget
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Qt4TargetSetupWidget::Qt4TargetSetupWidget()
|
||||
: QWidget(0)
|
||||
Qt4TargetSetupWidget::Qt4TargetSetupWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#define QT4TARGET_H
|
||||
|
||||
#include "qt4buildconfiguration.h"
|
||||
#include "qt4targetsetupwidget.h"
|
||||
#include "qtversionmanager.h"
|
||||
|
||||
#include <projectexplorer/target.h>
|
||||
@@ -55,41 +56,13 @@ class QPushButton;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
|
||||
class Qt4Project;
|
||||
class Qt4BaseTargetFactory;
|
||||
|
||||
namespace Internal {
|
||||
class Qt4ProFileNode;
|
||||
}
|
||||
|
||||
struct BuildConfigurationInfo {
|
||||
explicit BuildConfigurationInfo()
|
||||
: version(0), buildConfig(QtVersion::QmakeBuildConfig(0)), importing(false), temporaryQtVersion(false)
|
||||
{}
|
||||
|
||||
explicit BuildConfigurationInfo(QtVersion *v, QtVersion::QmakeBuildConfigs bc,
|
||||
const QString &aa, const QString &d, bool importing_ = false, bool temporaryQtVersion_ = false) :
|
||||
version(v), buildConfig(bc), additionalArguments(aa), directory(d), importing(importing_), temporaryQtVersion(temporaryQtVersion_)
|
||||
{ }
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return version != 0;
|
||||
}
|
||||
|
||||
QtVersion *version;
|
||||
QtVersion::QmakeBuildConfigs buildConfig;
|
||||
QString additionalArguments;
|
||||
QString directory;
|
||||
bool importing;
|
||||
bool temporaryQtVersion;
|
||||
|
||||
|
||||
static QList<BuildConfigurationInfo> importBuildConfigurations(const QString &proFilePath);
|
||||
static BuildConfigurationInfo checkForBuild(const QString &directory, const QString &proFilePath);
|
||||
static QList<BuildConfigurationInfo> filterBuildConfigurationInfos(const QList<BuildConfigurationInfo> &infos, const QString &id);
|
||||
};
|
||||
|
||||
class Qt4BaseTarget : public ProjectExplorer::Target
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -132,53 +105,6 @@ private slots:
|
||||
void emitProFileEvaluateNeeded();
|
||||
};
|
||||
|
||||
class QT4PROJECTMANAGER_EXPORT Qt4TargetSetupWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Qt4TargetSetupWidget();
|
||||
~Qt4TargetSetupWidget();
|
||||
virtual bool isTargetSelected() const = 0;
|
||||
virtual void setTargetSelected(bool b) = 0;
|
||||
virtual void setProFilePath(const QString &proFilePath) = 0;
|
||||
virtual QList<BuildConfigurationInfo> usedImportInfos() = 0;
|
||||
signals:
|
||||
void selectedToggled() const;
|
||||
void newImportBuildConfiguration(const BuildConfigurationInfo &info);
|
||||
};
|
||||
|
||||
class QT4PROJECTMANAGER_EXPORT Qt4BaseTargetFactory : public ProjectExplorer::ITargetFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Qt4BaseTargetFactory(QObject *parent);
|
||||
~Qt4BaseTargetFactory();
|
||||
|
||||
virtual Qt4TargetSetupWidget *createTargetSetupWidget(const QString &id,
|
||||
const QString &proFilePath,
|
||||
const QtVersionNumber &minimumQtVersion,
|
||||
bool importEnabled,
|
||||
QList<BuildConfigurationInfo> importInfos);
|
||||
|
||||
virtual QString defaultShadowBuildDirectory(const QString &projectLocation, const QString &id) =0;
|
||||
/// used by the default implementation of createTargetSetupWidget
|
||||
/// not needed otherwise
|
||||
virtual QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath, const QtVersionNumber &minimumQtVersion) = 0;
|
||||
/// only used in the TargetSetupPage
|
||||
virtual QIcon iconForId(const QString &id) const = 0;
|
||||
|
||||
virtual bool isMobileTarget(const QString &id) = 0;
|
||||
|
||||
virtual Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id) = 0;
|
||||
virtual Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos) = 0;
|
||||
virtual Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget);
|
||||
|
||||
static Qt4BaseTargetFactory *qt4BaseTargetFactoryForId(const QString &id);
|
||||
|
||||
protected:
|
||||
static QString msgBuildConfigurationName(const BuildConfigurationInfo &info);
|
||||
};
|
||||
|
||||
class Qt4DefaultTargetSetupWidget : public Qt4TargetSetupWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
62
src/plugins/qt4projectmanager/qt4targetsetupwidget.h
Normal file
62
src/plugins/qt4projectmanager/qt4targetsetupwidget.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** No Commercial Usage
|
||||
**
|
||||
** This file contains pre-release code and may not be distributed.
|
||||
** You may use this file in accordance with the terms and conditions
|
||||
** contained in the Technology Preview License Agreement accompanying
|
||||
** this package.
|
||||
**
|
||||
** 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, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef QT4TARGETSETUPWIDGET_H
|
||||
#define QT4TARGETSETUPWIDGET_H
|
||||
|
||||
#include "qt4projectmanager_global.h"
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
struct BuildConfigurationInfo;
|
||||
|
||||
class QT4PROJECTMANAGER_EXPORT Qt4TargetSetupWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Qt4TargetSetupWidget(QWidget *parent = 0);
|
||||
~Qt4TargetSetupWidget();
|
||||
virtual bool isTargetSelected() const = 0;
|
||||
virtual void setTargetSelected(bool b) = 0;
|
||||
virtual void setProFilePath(const QString &proFilePath) = 0;
|
||||
virtual QList<BuildConfigurationInfo> usedImportInfos() = 0;
|
||||
|
||||
signals:
|
||||
void selectedToggled() const;
|
||||
void newImportBuildConfiguration(const BuildConfigurationInfo &info);
|
||||
};
|
||||
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // QT4TARGETSETUPWIDGET_H
|
@@ -34,11 +34,12 @@
|
||||
#include "targetsetuppage.h"
|
||||
|
||||
#include "ui_targetsetuppage.h"
|
||||
|
||||
#include "buildconfigurationinfo.h"
|
||||
#include "qt4project.h"
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
#include "qt4target.h"
|
||||
#include "qtversionmanager.h"
|
||||
#include "qt4basetargetfactory.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <projectexplorer/task.h>
|
||||
@@ -199,20 +200,16 @@ bool TargetSetupPage::setupProject(Qt4ProjectManager::Qt4Project *project)
|
||||
}
|
||||
}
|
||||
|
||||
Qt4BaseTarget *target = factory->create(project, it.key(), it.value());
|
||||
if (target)
|
||||
if (ProjectExplorer::Target *target = factory->create(project, it.key(), it.value()))
|
||||
project->addTarget(target);
|
||||
}
|
||||
|
||||
// Create a desktop target if nothing else was set up:
|
||||
if (project->targets().isEmpty()) {
|
||||
Qt4BaseTargetFactory *tf = Qt4BaseTargetFactory::qt4BaseTargetFactoryForId(Constants::DESKTOP_TARGET_ID);
|
||||
if (tf) {
|
||||
Qt4BaseTarget *target = tf->create(project, Constants::DESKTOP_TARGET_ID);
|
||||
if (target)
|
||||
if (Qt4BaseTargetFactory *tf = Qt4BaseTargetFactory::qt4BaseTargetFactoryForId(Constants::DESKTOP_TARGET_ID))
|
||||
if (ProjectExplorer::Target *target = tf->create(project, Constants::DESKTOP_TARGET_ID))
|
||||
project->addTarget(target);
|
||||
}
|
||||
}
|
||||
|
||||
// Select active target
|
||||
// a) Simulator target
|
||||
|
Reference in New Issue
Block a user