Commit e3842f99 authored by dt's avatar dt Committed by Daniel Teske
Browse files

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: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 754be1bc
......@@ -37,7 +37,6 @@
#include "qt4target.h"
#include "qt4buildconfiguration.h"
#include "qt4projectmanagerconstants.h"
#include "qtparser.h"
#include <projectexplorer/toolchain.h>
#include <projectexplorer/buildsteplist.h>
......@@ -45,6 +44,7 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/qtcprocess.h>
#include <qtsupport/qtparser.h>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
......@@ -207,9 +207,9 @@ bool MakeStep::init()
if (bc->qtVersion())
parser = bc->qtVersion()->createOutputParser();
if (parser)
parser->appendOutputParser(new QtParser);
parser->appendOutputParser(new QtSupport::QtParser);
else
parser = new QtParser;
parser = new QtSupport::QtParser;
if (toolchain)
parser->appendOutputParser(toolchain->outputParser());
......
......@@ -6,7 +6,6 @@ include(../../qtcreatorplugin.pri)
include(qt4projectmanager_dependencies.pri)
HEADERS += \
qtparser.h \
qt4projectmanagerplugin.h \
qt4projectmanager.h \
qt4project.h \
......@@ -72,7 +71,6 @@ HEADERS += \
qt4basetargetfactory.h
SOURCES += qt4projectmanagerplugin.cpp \
qtparser.cpp \
qt4projectmanager.cpp \
qt4project.cpp \
qt4nodes.cpp \
......
......@@ -74,11 +74,8 @@ private slots:
#ifdef WITH_TESTS
void testBasicProjectLoading(); // Test fails!
void testAbldOutputParsers_data();
void testAbldOutputParsers();
void testQtOutputParser_data();
void testQtOutputParser();
void testSbsV2OutputParsers_data();
void testSbsV2OutputParsers();
void testRvctOutputParser_data();
......
......@@ -31,14 +31,12 @@
**************************************************************************/
#include "qtparser.h"
#include "qt4projectmanagerconstants.h"
#include <projectexplorer/taskwindow.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h>
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
using namespace QtSupport;
using ProjectExplorer::Task;
namespace {
......@@ -79,14 +77,15 @@ void QtParser::stdError(const QString &line)
#ifdef WITH_TESTS
# include <QTest>
# include "qt4projectmanagerplugin.h"
# include "qtsupportplugin.h"
# include <projectexplorer/projectexplorerconstants.h>
# include <projectexplorer/metatypedeclarations.h>
# include <projectexplorer/outputparser_test.h>
using namespace ProjectExplorer;
using namespace QtSupport::Internal;
void Qt4ProjectManagerPlugin::testQtOutputParser_data()
void QtSupportPlugin::testQtOutputParser_data()
{
QTest::addColumn<QString>("input");
QTest::addColumn<OutputParserTester::Channel>("inputChannel");
......@@ -141,7 +140,7 @@ void Qt4ProjectManagerPlugin::testQtOutputParser_data()
<< QString();
}
void Qt4ProjectManagerPlugin::testQtOutputParser()
void QtSupportPlugin::testQtOutputParser()
{
OutputParserTester testbench;
testbench.appendOutputParser(new QtParser);
......
......@@ -33,14 +33,14 @@
#ifndef QTPARSER_H
#define QTPARSER_H
#include "qtsupport_global.h"
#include <projectexplorer/ioutputparser.h>
namespace Qt4ProjectManager {
namespace Internal {
namespace QtSupport {
// Parser for Qt-specific utilities like moc, uic, etc.
class QtParser : public ProjectExplorer::IOutputParser
class QTSUPPORT_EXPORT QtParser : public ProjectExplorer::IOutputParser
{
Q_OBJECT
......@@ -52,7 +52,6 @@ private:
QRegExp m_mocRegExp;
};
} // namesapce Internal
} // namespace ProjectExplorer
#endif // QTPARSER_H
......@@ -21,6 +21,7 @@ HEADERS += \
debugginghelperbuildtask.h \
qtsupportconstants.h \
profilereader.h \
qtparser.h
SOURCES += \
qtsupportplugin.cpp \
......@@ -34,6 +35,7 @@ SOURCES += \
qtoptionspage.cpp \
debugginghelperbuildtask.cpp \
profilereader.cpp \
qtparser.cpp
FORMS += \
showbuildlog.ui \
......
......@@ -49,6 +49,12 @@ public:
~QtSupportPlugin();
bool initialize(const QStringList &arguments, QString *error_message);
void extensionsInitialized();
private slots:
#ifdef WITH_TESTS
void testQtOutputParser_data();
void testQtOutputParser();
#endif
};
} // namespace Internal
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment