diff --git a/tests/auto/generichighlighter/highlighterengine/highlighterengine.pro b/tests/auto/generichighlighter/highlighterengine/highlighterengine.pro index 1342b49e6e04943d86acfcb29a3facd4ecdc5635..7ff0d5c2f9a4f995e981017229ea67d8d55e1bce 100644 --- a/tests/auto/generichighlighter/highlighterengine/highlighterengine.pro +++ b/tests/auto/generichighlighter/highlighterengine/highlighterengine.pro @@ -2,13 +2,11 @@ QT += gui CONFIG += qtestlib testcase PLUGINSDIR = ../../../../src/plugins -TEXTEDITORDIR = $$PLUGINSDIR/texteditor GENERICHIGHLIGHTERDIR = $$PLUGINSDIR/texteditor/generichighlighter SOURCES += tst_highlighterengine.cpp \ highlightermock.cpp \ formats.cpp \ - $$TEXTEDITORDIR/syntaxhighlighter.cpp \ $$GENERICHIGHLIGHTERDIR/highlighter.cpp \ $$GENERICHIGHLIGHTERDIR/context.cpp \ $$GENERICHIGHLIGHTERDIR/dynamicrule.cpp \ @@ -24,7 +22,7 @@ HEADERS += \ basetextdocumentlayout.h \ formats.h \ tabsettings.h \ - $$TEXTEDITORDIR/syntaxhighlighter.h \ + texteditor/syntaxhighlighter.h \ $$GENERICHIGHLIGHTERDIR/highlighter.h \ $$GENERICHIGHLIGHTERDIR/context.h \ $$GENERICHIGHLIGHTERDIR/dynamicrule.h \ @@ -35,6 +33,6 @@ HEADERS += \ $$GENERICHIGHLIGHTERDIR/keywordlist.h \ $$GENERICHIGHLIGHTERDIR/itemdata.h -INCLUDEPATH += $$GENERICHIGHLIGHTERDIR $$PLUGINSDIR $$TEXTEDITORDIR +INCLUDEPATH += $$GENERICHIGHLIGHTERDIR TARGET=tst_$$TARGET diff --git a/tests/auto/generichighlighter/highlighterengine/tabsettings.h b/tests/auto/generichighlighter/highlighterengine/tabsettings.h index b79bbdbaf81aab5034507b90eb1f7da34ec4f2aa..7cc507038ec2b4e94c870c5e0364d58fe5acd2bd 100644 --- a/tests/auto/generichighlighter/highlighterengine/tabsettings.h +++ b/tests/auto/generichighlighter/highlighterengine/tabsettings.h @@ -36,8 +36,9 @@ namespace TextEditor { -struct TabSettings +class TabSettings { +public: int indentationColumn(const QString &) const { return 0; } }; diff --git a/tests/auto/generichighlighter/highlighterengine/texteditor/syntaxhighlighter.h b/tests/auto/generichighlighter/highlighterengine/texteditor/syntaxhighlighter.h new file mode 100644 index 0000000000000000000000000000000000000000..c1355d8ce37596af48adf67c99819a90adf988d2 --- /dev/null +++ b/tests/auto/generichighlighter/highlighterengine/texteditor/syntaxhighlighter.h @@ -0,0 +1,43 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** 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. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef SYNTAXHIGHLIGHTER_H +#define SYNTAXHIGHLIGHTER_H + +// Replaces the "real" syntaxhighlighter.h file. The scope of this test is restricted to the +// highlight definition's context engine. Using QSyntaxHighlighter as a base instead of the +// real TextEditor::SyntaxHighlighter should not affect it. + +#include <QtGui/QSyntaxHighlighter> + +namespace TextEditor { + typedef QSyntaxHighlighter SyntaxHighlighter; +} + +#endif //SYNTAXHIGHLIGHTER_H