forked from qt-creator/qt-creator
Move QMakeParser to Qt4ProjectManager
This commit is contained in:
@@ -32,7 +32,6 @@
|
||||
#include "projectexplorerconstants.h"
|
||||
#include "gccparser.h"
|
||||
#include "msvcparser.h"
|
||||
#include "qmakeparser.h"
|
||||
|
||||
using namespace ProjectExplorer::Internal;
|
||||
|
||||
@@ -65,18 +64,3 @@ ProjectExplorer::IBuildParser * MsvcParserFactory::create(const QString & name)
|
||||
Q_UNUSED(name)
|
||||
return new MsvcParser();
|
||||
}
|
||||
|
||||
QMakeParserFactory::~QMakeParserFactory()
|
||||
{
|
||||
}
|
||||
|
||||
bool QMakeParserFactory::canCreate(const QString & name) const
|
||||
{
|
||||
return (name == Constants::BUILD_PARSER_QMAKE);
|
||||
}
|
||||
|
||||
ProjectExplorer::IBuildParser * QMakeParserFactory::create(const QString & name) const
|
||||
{
|
||||
Q_UNUSED(name)
|
||||
return new QMakeParser();
|
||||
}
|
||||
|
@@ -55,16 +55,6 @@ public:
|
||||
virtual ProjectExplorer::IBuildParser * create(const QString & name) const;
|
||||
};
|
||||
|
||||
class QMakeParserFactory : public ProjectExplorer::IBuildParserFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QMakeParserFactory() {}
|
||||
virtual ~QMakeParserFactory();
|
||||
virtual bool canCreate(const QString & name) const;
|
||||
virtual ProjectExplorer::IBuildParser * create(const QString & name) const;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
|
@@ -307,7 +307,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
||||
// Build parsers
|
||||
addAutoReleasedObject(new GccParserFactory);
|
||||
addAutoReleasedObject(new MsvcParserFactory);
|
||||
addAutoReleasedObject(new QMakeParserFactory);
|
||||
|
||||
// Settings page
|
||||
addAutoReleasedObject(new ProjectExplorerSettingsPage);
|
||||
|
@@ -66,7 +66,6 @@ HEADERS += projectexplorer.h \
|
||||
projectexplorersettingspage.h \
|
||||
projectwelcomepage.h \
|
||||
projectwelcomepagewidget.h \
|
||||
qmakeparser.h \
|
||||
baseprojectwizarddialog.h
|
||||
SOURCES += projectexplorer.cpp \
|
||||
projectwindow.cpp \
|
||||
@@ -121,7 +120,6 @@ SOURCES += projectexplorer.cpp \
|
||||
projectwelcomepage.cpp \
|
||||
projectwelcomepagewidget.cpp \
|
||||
corelistenercheckingforrunningbuild.cpp \
|
||||
qmakeparser.cpp \
|
||||
baseprojectwizarddialog.cpp
|
||||
FORMS += processstep.ui \
|
||||
editorsettingspropertiespage.ui \
|
||||
|
@@ -179,7 +179,6 @@ const char * const FORM_MIMETYPE = "application/x-designer";
|
||||
const char * const RESOURCE_MIMETYPE = "application/vnd.nokia.xml.qt.resource";
|
||||
|
||||
// build parsers
|
||||
const char * const BUILD_PARSER_QMAKE = "BuildParser.QMake";
|
||||
const char * const BUILD_PARSER_MSVC = "BuildParser.MSVC";
|
||||
const char * const BUILD_PARSER_GCC = "BuildParser.Gcc";
|
||||
const char * const BUILD_PARSER_RVCT = "BuildParser.Rvct";
|
||||
|
@@ -28,10 +28,28 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "qmakeparser.h"
|
||||
#include "projectexplorerconstants.h"
|
||||
#include "taskwindow.h"
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
#include <projectexplorer/taskwindow.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Qt4ProjectManager;
|
||||
using namespace Qt4ProjectManager::Internal;
|
||||
using ProjectExplorer::TaskWindow;
|
||||
|
||||
QMakeParserFactory::~QMakeParserFactory()
|
||||
{
|
||||
}
|
||||
|
||||
bool QMakeParserFactory::canCreate(const QString & name) const
|
||||
{
|
||||
return (name == Constants::BUILD_PARSER_QMAKE);
|
||||
}
|
||||
|
||||
ProjectExplorer::IBuildParser * QMakeParserFactory::create(const QString & name) const
|
||||
{
|
||||
Q_UNUSED(name)
|
||||
return new QMakeParser();
|
||||
}
|
||||
|
||||
QMakeParser::QMakeParser()
|
||||
{
|
||||
@@ -39,7 +57,7 @@ QMakeParser::QMakeParser()
|
||||
|
||||
QString QMakeParser::name() const
|
||||
{
|
||||
return QLatin1String(ProjectExplorer::Constants::BUILD_PARSER_QMAKE);
|
||||
return QLatin1String(Qt4ProjectManager::Constants::BUILD_PARSER_QMAKE);
|
||||
}
|
||||
|
||||
void QMakeParser::stdOutput(const QString & line)
|
||||
@@ -57,7 +75,7 @@ void QMakeParser::stdError(const QString & line)
|
||||
lne /* description */,
|
||||
QString() /* filename */,
|
||||
-1 /* linenumber */,
|
||||
Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
return;
|
||||
}
|
||||
}
|
@@ -30,11 +30,23 @@
|
||||
#ifndef QMAKEPARSER_H
|
||||
#define QMAKEPARSER_H
|
||||
|
||||
#include "ibuildparser.h"
|
||||
#include <projectexplorer/ibuildparser.h>
|
||||
|
||||
#include <QtCore/QRegExp>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class QMakeParserFactory : public ProjectExplorer::IBuildParserFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QMakeParserFactory() {}
|
||||
virtual ~QMakeParserFactory();
|
||||
virtual bool canCreate(const QString & name) const;
|
||||
virtual ProjectExplorer::IBuildParser * create(const QString & name) const;
|
||||
};
|
||||
|
||||
|
||||
class QMakeParser : public ProjectExplorer::IBuildParser
|
||||
{
|
||||
@@ -48,6 +60,7 @@ public:
|
||||
private:
|
||||
};
|
||||
|
||||
} // namesapce Interanal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // QMAKEPARSER_H
|
@@ -39,8 +39,6 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
@@ -152,7 +150,7 @@ bool QMakeStep::init()
|
||||
setArguments(args);
|
||||
setEnvironment(qt4bc->environment());
|
||||
|
||||
setBuildParser(ProjectExplorer::Constants::BUILD_PARSER_QMAKE);
|
||||
setBuildParser(Qt4ProjectManager::Constants::BUILD_PARSER_QMAKE);
|
||||
return AbstractMakeStep::init();
|
||||
}
|
||||
|
||||
|
@@ -39,7 +39,8 @@ HEADERS += qt4projectmanagerplugin.h \
|
||||
externaleditors.h \
|
||||
gettingstartedwelcomepagewidget.h \
|
||||
gettingstartedwelcomepage.h \
|
||||
qt4buildconfiguration.h
|
||||
qt4buildconfiguration.h \
|
||||
qmakeparser.h
|
||||
SOURCES += qt4projectmanagerplugin.cpp \
|
||||
qt4projectmanager.cpp \
|
||||
qt4project.cpp \
|
||||
@@ -74,7 +75,8 @@ SOURCES += qt4projectmanagerplugin.cpp \
|
||||
externaleditors.cpp \
|
||||
gettingstartedwelcomepagewidget.cpp \
|
||||
gettingstartedwelcomepage.cpp \
|
||||
qt4buildconfiguration.cpp
|
||||
qt4buildconfiguration.cpp \
|
||||
qmakeparser.cpp
|
||||
FORMS += makestep.ui \
|
||||
qmakestep.ui \
|
||||
qt4projectconfigwidget.ui \
|
||||
|
@@ -77,6 +77,9 @@ const char * const QT_SETTINGS_CATEGORY = "L.Qt4";
|
||||
const char * const QT_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt4");
|
||||
const char * const QTVERSION_SETTINGS_PAGE_ID = "Qt Versions";
|
||||
const char * const QTVERSION_SETTINGS_PAGE_NAME = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Versions");
|
||||
|
||||
// BuildParser
|
||||
const char * const BUILD_PARSER_QMAKE = "BuildParser.QMake";
|
||||
} // namespace Constants
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
|
@@ -45,6 +45,7 @@
|
||||
#include "externaleditors.h"
|
||||
#include "gettingstartedwelcomepage.h"
|
||||
#include "gettingstartedwelcomepagewidget.h"
|
||||
#include "qmakeparser.h"
|
||||
|
||||
#ifdef QTCREATOR_WITH_S60
|
||||
#include "qt-s60/s60manager.h"
|
||||
@@ -149,6 +150,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
|
||||
|
||||
addAutoReleasedObject(new QMakeStepFactory);
|
||||
addAutoReleasedObject(new MakeStepFactory);
|
||||
addAutoReleasedObject(new QMakeParserFactory);
|
||||
|
||||
addAutoReleasedObject(new Qt4RunConfigurationFactory);
|
||||
|
||||
|
Reference in New Issue
Block a user