forked from qt-creator/qt-creator
Move QtParser to QtSupport plugin
This way we can make use of it in the cmake plugin Change-Id: Ie1887d49ea616ec62d91a73b4daa75d69cef61c9 Reviewed-on: http://codereview.qt.nokia.com/91 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -37,7 +37,6 @@
|
|||||||
#include "qt4target.h"
|
#include "qt4target.h"
|
||||||
#include "qt4buildconfiguration.h"
|
#include "qt4buildconfiguration.h"
|
||||||
#include "qt4projectmanagerconstants.h"
|
#include "qt4projectmanagerconstants.h"
|
||||||
#include "qtparser.h"
|
|
||||||
|
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
#include <projectexplorer/buildsteplist.h>
|
#include <projectexplorer/buildsteplist.h>
|
||||||
@@ -45,6 +44,7 @@
|
|||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
|
#include <qtsupport/qtparser.h>
|
||||||
|
|
||||||
#include <QtCore/QDir>
|
#include <QtCore/QDir>
|
||||||
#include <QtCore/QFileInfo>
|
#include <QtCore/QFileInfo>
|
||||||
@@ -207,9 +207,9 @@ bool MakeStep::init()
|
|||||||
if (bc->qtVersion())
|
if (bc->qtVersion())
|
||||||
parser = bc->qtVersion()->createOutputParser();
|
parser = bc->qtVersion()->createOutputParser();
|
||||||
if (parser)
|
if (parser)
|
||||||
parser->appendOutputParser(new QtParser);
|
parser->appendOutputParser(new QtSupport::QtParser);
|
||||||
else
|
else
|
||||||
parser = new QtParser;
|
parser = new QtSupport::QtParser;
|
||||||
if (toolchain)
|
if (toolchain)
|
||||||
parser->appendOutputParser(toolchain->outputParser());
|
parser->appendOutputParser(toolchain->outputParser());
|
||||||
|
|
||||||
|
@@ -6,7 +6,6 @@ include(../../qtcreatorplugin.pri)
|
|||||||
include(qt4projectmanager_dependencies.pri)
|
include(qt4projectmanager_dependencies.pri)
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
qtparser.h \
|
|
||||||
qt4projectmanagerplugin.h \
|
qt4projectmanagerplugin.h \
|
||||||
qt4projectmanager.h \
|
qt4projectmanager.h \
|
||||||
qt4project.h \
|
qt4project.h \
|
||||||
@@ -72,7 +71,6 @@ HEADERS += \
|
|||||||
qt4basetargetfactory.h
|
qt4basetargetfactory.h
|
||||||
|
|
||||||
SOURCES += qt4projectmanagerplugin.cpp \
|
SOURCES += qt4projectmanagerplugin.cpp \
|
||||||
qtparser.cpp \
|
|
||||||
qt4projectmanager.cpp \
|
qt4projectmanager.cpp \
|
||||||
qt4project.cpp \
|
qt4project.cpp \
|
||||||
qt4nodes.cpp \
|
qt4nodes.cpp \
|
||||||
|
@@ -74,11 +74,8 @@ private slots:
|
|||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
void testBasicProjectLoading(); // Test fails!
|
void testBasicProjectLoading(); // Test fails!
|
||||||
|
|
||||||
void testAbldOutputParsers_data();
|
void testAbldOutputParsers_data();
|
||||||
void testAbldOutputParsers();
|
void testAbldOutputParsers();
|
||||||
void testQtOutputParser_data();
|
|
||||||
void testQtOutputParser();
|
|
||||||
void testSbsV2OutputParsers_data();
|
void testSbsV2OutputParsers_data();
|
||||||
void testSbsV2OutputParsers();
|
void testSbsV2OutputParsers();
|
||||||
void testRvctOutputParser_data();
|
void testRvctOutputParser_data();
|
||||||
|
@@ -31,14 +31,12 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "qtparser.h"
|
#include "qtparser.h"
|
||||||
#include "qt4projectmanagerconstants.h"
|
|
||||||
|
|
||||||
#include <projectexplorer/taskwindow.h>
|
#include <projectexplorer/taskwindow.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
using namespace Qt4ProjectManager;
|
using namespace QtSupport;
|
||||||
using namespace Qt4ProjectManager::Internal;
|
|
||||||
using ProjectExplorer::Task;
|
using ProjectExplorer::Task;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@@ -79,14 +77,15 @@ void QtParser::stdError(const QString &line)
|
|||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
# include <QTest>
|
# include <QTest>
|
||||||
|
|
||||||
# include "qt4projectmanagerplugin.h"
|
# include "qtsupportplugin.h"
|
||||||
# include <projectexplorer/projectexplorerconstants.h>
|
# include <projectexplorer/projectexplorerconstants.h>
|
||||||
# include <projectexplorer/metatypedeclarations.h>
|
# include <projectexplorer/metatypedeclarations.h>
|
||||||
# include <projectexplorer/outputparser_test.h>
|
# include <projectexplorer/outputparser_test.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
using namespace QtSupport::Internal;
|
||||||
|
|
||||||
void Qt4ProjectManagerPlugin::testQtOutputParser_data()
|
void QtSupportPlugin::testQtOutputParser_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<QString>("input");
|
QTest::addColumn<QString>("input");
|
||||||
QTest::addColumn<OutputParserTester::Channel>("inputChannel");
|
QTest::addColumn<OutputParserTester::Channel>("inputChannel");
|
||||||
@@ -141,7 +140,7 @@ void Qt4ProjectManagerPlugin::testQtOutputParser_data()
|
|||||||
<< QString();
|
<< QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Qt4ProjectManagerPlugin::testQtOutputParser()
|
void QtSupportPlugin::testQtOutputParser()
|
||||||
{
|
{
|
||||||
OutputParserTester testbench;
|
OutputParserTester testbench;
|
||||||
testbench.appendOutputParser(new QtParser);
|
testbench.appendOutputParser(new QtParser);
|
@@ -33,14 +33,14 @@
|
|||||||
#ifndef QTPARSER_H
|
#ifndef QTPARSER_H
|
||||||
#define QTPARSER_H
|
#define QTPARSER_H
|
||||||
|
|
||||||
|
#include "qtsupport_global.h"
|
||||||
#include <projectexplorer/ioutputparser.h>
|
#include <projectexplorer/ioutputparser.h>
|
||||||
|
|
||||||
namespace Qt4ProjectManager {
|
namespace QtSupport {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
// Parser for Qt-specific utilities like moc, uic, etc.
|
// Parser for Qt-specific utilities like moc, uic, etc.
|
||||||
|
|
||||||
class QtParser : public ProjectExplorer::IOutputParser
|
class QTSUPPORT_EXPORT QtParser : public ProjectExplorer::IOutputParser
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -52,7 +52,6 @@ private:
|
|||||||
QRegExp m_mocRegExp;
|
QRegExp m_mocRegExp;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namesapce Internal
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
|
||||||
#endif // QTPARSER_H
|
#endif // QTPARSER_H
|
@@ -21,6 +21,7 @@ HEADERS += \
|
|||||||
debugginghelperbuildtask.h \
|
debugginghelperbuildtask.h \
|
||||||
qtsupportconstants.h \
|
qtsupportconstants.h \
|
||||||
profilereader.h \
|
profilereader.h \
|
||||||
|
qtparser.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
qtsupportplugin.cpp \
|
qtsupportplugin.cpp \
|
||||||
@@ -34,6 +35,7 @@ SOURCES += \
|
|||||||
qtoptionspage.cpp \
|
qtoptionspage.cpp \
|
||||||
debugginghelperbuildtask.cpp \
|
debugginghelperbuildtask.cpp \
|
||||||
profilereader.cpp \
|
profilereader.cpp \
|
||||||
|
qtparser.cpp
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
showbuildlog.ui \
|
showbuildlog.ui \
|
||||||
|
@@ -49,6 +49,12 @@ public:
|
|||||||
~QtSupportPlugin();
|
~QtSupportPlugin();
|
||||||
bool initialize(const QStringList &arguments, QString *error_message);
|
bool initialize(const QStringList &arguments, QString *error_message);
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
void testQtOutputParser_data();
|
||||||
|
void testQtOutputParser();
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
Reference in New Issue
Block a user