Move QMakeParser to Qt4ProjectManager

This commit is contained in:
dt
2009-11-30 19:16:00 +01:00
parent b7635dda19
commit 2de390cfdb
11 changed files with 48 additions and 42 deletions

View File

@@ -32,7 +32,6 @@
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "gccparser.h" #include "gccparser.h"
#include "msvcparser.h" #include "msvcparser.h"
#include "qmakeparser.h"
using namespace ProjectExplorer::Internal; using namespace ProjectExplorer::Internal;
@@ -65,18 +64,3 @@ ProjectExplorer::IBuildParser * MsvcParserFactory::create(const QString & name)
Q_UNUSED(name) Q_UNUSED(name)
return new MsvcParser(); 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();
}

View File

@@ -55,16 +55,6 @@ public:
virtual ProjectExplorer::IBuildParser * create(const QString & name) const; 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 Internal
} // namespace ProjectExplorer } // namespace ProjectExplorer

View File

@@ -307,7 +307,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// Build parsers // Build parsers
addAutoReleasedObject(new GccParserFactory); addAutoReleasedObject(new GccParserFactory);
addAutoReleasedObject(new MsvcParserFactory); addAutoReleasedObject(new MsvcParserFactory);
addAutoReleasedObject(new QMakeParserFactory);
// Settings page // Settings page
addAutoReleasedObject(new ProjectExplorerSettingsPage); addAutoReleasedObject(new ProjectExplorerSettingsPage);

View File

@@ -66,7 +66,6 @@ HEADERS += projectexplorer.h \
projectexplorersettingspage.h \ projectexplorersettingspage.h \
projectwelcomepage.h \ projectwelcomepage.h \
projectwelcomepagewidget.h \ projectwelcomepagewidget.h \
qmakeparser.h \
baseprojectwizarddialog.h baseprojectwizarddialog.h
SOURCES += projectexplorer.cpp \ SOURCES += projectexplorer.cpp \
projectwindow.cpp \ projectwindow.cpp \
@@ -121,7 +120,6 @@ SOURCES += projectexplorer.cpp \
projectwelcomepage.cpp \ projectwelcomepage.cpp \
projectwelcomepagewidget.cpp \ projectwelcomepagewidget.cpp \
corelistenercheckingforrunningbuild.cpp \ corelistenercheckingforrunningbuild.cpp \
qmakeparser.cpp \
baseprojectwizarddialog.cpp baseprojectwizarddialog.cpp
FORMS += processstep.ui \ FORMS += processstep.ui \
editorsettingspropertiespage.ui \ editorsettingspropertiespage.ui \

View File

@@ -179,7 +179,6 @@ const char * const FORM_MIMETYPE = "application/x-designer";
const char * const RESOURCE_MIMETYPE = "application/vnd.nokia.xml.qt.resource"; const char * const RESOURCE_MIMETYPE = "application/vnd.nokia.xml.qt.resource";
// build parsers // build parsers
const char * const BUILD_PARSER_QMAKE = "BuildParser.QMake";
const char * const BUILD_PARSER_MSVC = "BuildParser.MSVC"; const char * const BUILD_PARSER_MSVC = "BuildParser.MSVC";
const char * const BUILD_PARSER_GCC = "BuildParser.Gcc"; const char * const BUILD_PARSER_GCC = "BuildParser.Gcc";
const char * const BUILD_PARSER_RVCT = "BuildParser.Rvct"; const char * const BUILD_PARSER_RVCT = "BuildParser.Rvct";

View File

@@ -28,10 +28,28 @@
**************************************************************************/ **************************************************************************/
#include "qmakeparser.h" #include "qmakeparser.h"
#include "projectexplorerconstants.h" #include "qt4projectmanagerconstants.h"
#include "taskwindow.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() QMakeParser::QMakeParser()
{ {
@@ -39,7 +57,7 @@ QMakeParser::QMakeParser()
QString QMakeParser::name() const QString QMakeParser::name() const
{ {
return QLatin1String(ProjectExplorer::Constants::BUILD_PARSER_QMAKE); return QLatin1String(Qt4ProjectManager::Constants::BUILD_PARSER_QMAKE);
} }
void QMakeParser::stdOutput(const QString & line) void QMakeParser::stdOutput(const QString & line)
@@ -57,7 +75,7 @@ void QMakeParser::stdError(const QString & line)
lne /* description */, lne /* description */,
QString() /* filename */, QString() /* filename */,
-1 /* linenumber */, -1 /* linenumber */,
Constants::TASK_CATEGORY_BUILDSYSTEM)); ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
return; return;
} }
} }

View File

@@ -30,11 +30,23 @@
#ifndef QMAKEPARSER_H #ifndef QMAKEPARSER_H
#define QMAKEPARSER_H #define QMAKEPARSER_H
#include "ibuildparser.h" #include <projectexplorer/ibuildparser.h>
#include <QtCore/QRegExp> #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 class QMakeParser : public ProjectExplorer::IBuildParser
{ {
@@ -48,6 +60,7 @@ public:
private: private:
}; };
} // namesapce Interanal
} // namespace ProjectExplorer } // namespace ProjectExplorer
#endif // QMAKEPARSER_H #endif // QMAKEPARSER_H

View File

@@ -39,8 +39,6 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <QFileDialog> #include <QFileDialog>
#include <QDir> #include <QDir>
#include <QFile> #include <QFile>
@@ -152,7 +150,7 @@ bool QMakeStep::init()
setArguments(args); setArguments(args);
setEnvironment(qt4bc->environment()); setEnvironment(qt4bc->environment());
setBuildParser(ProjectExplorer::Constants::BUILD_PARSER_QMAKE); setBuildParser(Qt4ProjectManager::Constants::BUILD_PARSER_QMAKE);
return AbstractMakeStep::init(); return AbstractMakeStep::init();
} }

View File

@@ -39,7 +39,8 @@ HEADERS += qt4projectmanagerplugin.h \
externaleditors.h \ externaleditors.h \
gettingstartedwelcomepagewidget.h \ gettingstartedwelcomepagewidget.h \
gettingstartedwelcomepage.h \ gettingstartedwelcomepage.h \
qt4buildconfiguration.h qt4buildconfiguration.h \
qmakeparser.h
SOURCES += qt4projectmanagerplugin.cpp \ SOURCES += qt4projectmanagerplugin.cpp \
qt4projectmanager.cpp \ qt4projectmanager.cpp \
qt4project.cpp \ qt4project.cpp \
@@ -74,7 +75,8 @@ SOURCES += qt4projectmanagerplugin.cpp \
externaleditors.cpp \ externaleditors.cpp \
gettingstartedwelcomepagewidget.cpp \ gettingstartedwelcomepagewidget.cpp \
gettingstartedwelcomepage.cpp \ gettingstartedwelcomepage.cpp \
qt4buildconfiguration.cpp qt4buildconfiguration.cpp \
qmakeparser.cpp
FORMS += makestep.ui \ FORMS += makestep.ui \
qmakestep.ui \ qmakestep.ui \
qt4projectconfigwidget.ui \ qt4projectconfigwidget.ui \

View File

@@ -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 QT_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt4");
const char * const QTVERSION_SETTINGS_PAGE_ID = "Qt Versions"; const char * const QTVERSION_SETTINGS_PAGE_ID = "Qt Versions";
const char * const QTVERSION_SETTINGS_PAGE_NAME = QT_TRANSLATE_NOOP("Qt4ProjectManager", "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 Constants
} // namespace Qt4ProjectManager } // namespace Qt4ProjectManager

View File

@@ -45,6 +45,7 @@
#include "externaleditors.h" #include "externaleditors.h"
#include "gettingstartedwelcomepage.h" #include "gettingstartedwelcomepage.h"
#include "gettingstartedwelcomepagewidget.h" #include "gettingstartedwelcomepagewidget.h"
#include "qmakeparser.h"
#ifdef QTCREATOR_WITH_S60 #ifdef QTCREATOR_WITH_S60
#include "qt-s60/s60manager.h" #include "qt-s60/s60manager.h"
@@ -149,6 +150,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
addAutoReleasedObject(new QMakeStepFactory); addAutoReleasedObject(new QMakeStepFactory);
addAutoReleasedObject(new MakeStepFactory); addAutoReleasedObject(new MakeStepFactory);
addAutoReleasedObject(new QMakeParserFactory);
addAutoReleasedObject(new Qt4RunConfigurationFactory); addAutoReleasedObject(new Qt4RunConfigurationFactory);