forked from qt-creator/qt-creator
Fix tests compilation
Change-Id: I20d990b6be83e5fcd30a8911bcd2bbe8cc303989 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
8ee43eeb1a
commit
ef8787e59f
@@ -30,8 +30,8 @@
|
||||
#ifndef HIGHLIGHTER_H
|
||||
#define HIGHLIGHTER_H
|
||||
|
||||
#include "../basetextdocumentlayout.h"
|
||||
#include "../syntaxhighlighter.h"
|
||||
#include "basetextdocumentlayout.h"
|
||||
#include "syntaxhighlighter.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
@@ -13,7 +13,8 @@ QtcPlugin {
|
||||
cpp.includePaths: base.concat([
|
||||
"generichighlighter",
|
||||
"snippets",
|
||||
"codeassist"
|
||||
"codeassist",
|
||||
"."
|
||||
])
|
||||
|
||||
files: [
|
||||
|
@@ -14,4 +14,4 @@ COPYFILES = $$OTHER_FILES
|
||||
include(../../../copy.pri)
|
||||
|
||||
TARGET = $$qtLibraryName(plugin1)
|
||||
DESTDIR = $$OUT_PWD
|
||||
CONFIG -= debug_and_release_target
|
||||
|
@@ -14,4 +14,4 @@ COPYFILES = $$OTHER_FILES
|
||||
include(../../../copy.pri)
|
||||
|
||||
TARGET = $$qtLibraryName(plugin2)
|
||||
DESTDIR = $$OUT_PWD
|
||||
CONFIG -= debug_and_release_target
|
||||
|
@@ -14,4 +14,4 @@ COPYFILES = $$OTHER_FILES
|
||||
include(../../../copy.pri)
|
||||
|
||||
TARGET = $$qtLibraryName(plugin3)
|
||||
DESTDIR = $$OUT_PWD
|
||||
CONFIG -= debug_and_release_target
|
||||
|
@@ -5,16 +5,15 @@ HEADERS += plugin1.h
|
||||
|
||||
OTHER_FILES = $$PWD/plugin.spec
|
||||
|
||||
include(../../../../../../qtcreator.pri)
|
||||
include(../../../../qttest.pri)
|
||||
include(../../../../../../src/libs/extensionsystem/extensionsystem.pri)
|
||||
include(../../../../qttestrpath.pri)
|
||||
|
||||
COPYDIR = $$OUT_PWD
|
||||
COPYFILES = $$OTHER_FILES
|
||||
include(../../../copy.pri)
|
||||
|
||||
TARGET = $$qtLibraryName(plugin1)
|
||||
DESTDIR = $$OUT_PWD
|
||||
CONFIG -= debug_and_release_target
|
||||
|
||||
LIBS += -L$$OUT_PWD/../plugin2 -L$$OUT_PWD/../plugin3
|
||||
LIBS += -l$$qtLibraryName(plugin2) -l$$qtLibraryName(plugin3)
|
||||
|
@@ -5,16 +5,15 @@ HEADERS += plugin2.h
|
||||
|
||||
OTHER_FILES = $$PWD/plugin.spec
|
||||
|
||||
include(../../../../../../qtcreator.pri)
|
||||
include(../../../../qttest.pri)
|
||||
include(../../../../../../src/libs/extensionsystem/extensionsystem.pri)
|
||||
include(../../../../qttestrpath.pri)
|
||||
|
||||
COPYDIR = $$OUT_PWD
|
||||
COPYFILES = $$OTHER_FILES
|
||||
include(../../../copy.pri)
|
||||
|
||||
TARGET = $$qtLibraryName(plugin2)
|
||||
DESTDIR = $$OUT_PWD
|
||||
CONFIG -= debug_and_release_target
|
||||
|
||||
macx {
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-install_name,$${OUT_PWD}/
|
||||
|
@@ -5,16 +5,15 @@ HEADERS += plugin3.h
|
||||
|
||||
OTHER_FILES = $$PWD/plugin.spec
|
||||
|
||||
include(../../../../../../qtcreator.pri)
|
||||
include(../../../../qttest.pri)
|
||||
include(../../../../../../src/libs/extensionsystem/extensionsystem.pri)
|
||||
include(../../../../qttestrpath.pri)
|
||||
|
||||
COPYDIR = $$OUT_PWD
|
||||
COPYFILES = $$OTHER_FILES
|
||||
include(../../../copy.pri)
|
||||
|
||||
TARGET = $$qtLibraryName(plugin3)
|
||||
DESTDIR = $$OUT_PWD
|
||||
CONFIG -= debug_and_release_target
|
||||
|
||||
LIBS += -L$$OUT_PWD/../plugin2
|
||||
LIBS += -l$$qtLibraryName(plugin2)
|
||||
|
@@ -14,4 +14,4 @@ COPYFILES = $$PWD/testplugin.xml
|
||||
include(../../copy.pri)
|
||||
|
||||
TARGET = $$qtLibraryName(test)
|
||||
DESTDIR = $$OUT_PWD
|
||||
CONFIG -= debug_and_release_target
|
||||
|
@@ -1,5 +1,4 @@
|
||||
include(../../qttest.pri)
|
||||
include(../shared/shared.pri)
|
||||
|
||||
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
|
||||
|
||||
@@ -7,7 +6,10 @@ UTILSDIR = $$IDE_SOURCE_TREE/src/libs/
|
||||
|
||||
INCLUDEPATH += $$UTILSDIR
|
||||
DEFINES += QTCREATOR_UTILS_LIB
|
||||
*-g++ {
|
||||
CONFIG -= warn_on
|
||||
QMAKE_CXXFLAGS += -Wall -Wno-trigraphs
|
||||
}
|
||||
|
||||
SOURCES += tst_fileutils.cpp \
|
||||
$$UTILSDIR/utils/fileutils.cpp \
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
include(../../../qtcreator.pri)
|
||||
include(../../auto/qttest.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
|
||||
|
||||
FAKEVIMDIR = $$IDE_SOURCE_TREE/src/plugins/fakevim
|
||||
|
@@ -6,8 +6,7 @@ fakevim \
|
||||
debugger \
|
||||
preprocessor \
|
||||
subdir_proparser \
|
||||
utils \
|
||||
devices
|
||||
utils
|
||||
|
||||
unix {
|
||||
# Uses popen
|
||||
|
@@ -113,6 +113,9 @@ public:
|
||||
virtual void stopExpandingMacro(unsigned, const Macro &)
|
||||
{ }
|
||||
|
||||
virtual void markAsIncludeGuard(const QByteArray &)
|
||||
{ }
|
||||
|
||||
virtual void startSkippingBlocks(unsigned)
|
||||
{ }
|
||||
|
||||
|
@@ -7,7 +7,6 @@ include(../../auto/qttest.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/cplusplus/cplusplus.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/languageutils/languageutils.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/3rdparty/botan/botan.pri)
|
||||
|
||||
# Input
|
||||
SOURCES += main.cpp
|
||||
|
@@ -126,7 +126,7 @@ bool ArgumentsCollector::checkAndSetStringArg(int &pos, QString &arg, const char
|
||||
{
|
||||
if (m_arguments.at(pos) == QLatin1String(opt)) {
|
||||
if (!arg.isEmpty()) {
|
||||
throw ArgumentErrorException(QLatin1String("option ") + opt
|
||||
throw ArgumentErrorException(QLatin1String("option ") + QLatin1String(opt)
|
||||
+ QLatin1String(" was given twice."));
|
||||
}
|
||||
arg = m_arguments.at(++pos);
|
||||
@@ -142,13 +142,13 @@ bool ArgumentsCollector::checkAndSetIntArg(int &pos, int &val,
|
||||
{
|
||||
if (m_arguments.at(pos) == QLatin1String(opt)) {
|
||||
if (alreadyGiven) {
|
||||
throw ArgumentErrorException(QLatin1String("option ") + opt
|
||||
throw ArgumentErrorException(QLatin1String("option ") + QLatin1String(opt)
|
||||
+ QLatin1String(" was given twice."));
|
||||
}
|
||||
bool isNumber;
|
||||
val = m_arguments.at(++pos).toInt(&isNumber);
|
||||
if (!isNumber) {
|
||||
throw ArgumentErrorException(QLatin1String("option ") + opt
|
||||
throw ArgumentErrorException(QLatin1String("option ") + QLatin1String(opt)
|
||||
+ QLatin1String(" needs integer argument"));
|
||||
}
|
||||
alreadyGiven = true;
|
||||
|
@@ -124,7 +124,7 @@ bool ArgumentsCollector::checkAndSetStringArg(int &pos, QString &arg, const char
|
||||
{
|
||||
if (m_arguments.at(pos) == QLatin1String(opt)) {
|
||||
if (!arg.isEmpty()) {
|
||||
throw ArgumentErrorException(QLatin1String("option ") + opt
|
||||
throw ArgumentErrorException(QLatin1String("option ") + QLatin1String(opt)
|
||||
+ QLatin1String(" was given twice."));
|
||||
}
|
||||
arg = m_arguments.at(++pos);
|
||||
@@ -140,13 +140,13 @@ bool ArgumentsCollector::checkAndSetIntArg(int &pos, int &val,
|
||||
{
|
||||
if (m_arguments.at(pos) == QLatin1String(opt)) {
|
||||
if (alreadyGiven) {
|
||||
throw ArgumentErrorException(QLatin1String("option ") + opt
|
||||
throw ArgumentErrorException(QLatin1String("option ") + QLatin1String(opt)
|
||||
+ QLatin1String(" was given twice."));
|
||||
}
|
||||
bool isNumber;
|
||||
val = m_arguments.at(++pos).toInt(&isNumber);
|
||||
if (!isNumber) {
|
||||
throw ArgumentErrorException(QLatin1String("option ") + opt
|
||||
throw ArgumentErrorException(QLatin1String("option ") + QLatin1String(opt)
|
||||
+ QLatin1String(" needs integer argument"));
|
||||
}
|
||||
alreadyGiven = true;
|
||||
|
@@ -127,7 +127,7 @@ bool ArgumentsCollector::checkAndSetStringArg(int &pos, QString &arg, const char
|
||||
{
|
||||
if (m_arguments.at(pos) == QLatin1String(opt)) {
|
||||
if (!arg.isEmpty()) {
|
||||
throw ArgumentErrorException(QLatin1String("option ") + opt
|
||||
throw ArgumentErrorException(QLatin1String("option ") + QLatin1String(opt)
|
||||
+ QLatin1String(" was given twice."));
|
||||
}
|
||||
arg = m_arguments.at(++pos);
|
||||
@@ -143,13 +143,13 @@ bool ArgumentsCollector::checkAndSetIntArg(int &pos, int &val,
|
||||
{
|
||||
if (m_arguments.at(pos) == QLatin1String(opt)) {
|
||||
if (alreadyGiven) {
|
||||
throw ArgumentErrorException(QLatin1String("option ") + opt
|
||||
throw ArgumentErrorException(QLatin1String("option ") + QLatin1String(opt)
|
||||
+ QLatin1String(" was given twice."));
|
||||
}
|
||||
bool isNumber;
|
||||
val = m_arguments.at(++pos).toInt(&isNumber);
|
||||
if (!isNumber) {
|
||||
throw ArgumentErrorException(QLatin1String("option ") + opt
|
||||
throw ArgumentErrorException(QLatin1String("option ") + QLatin1String(opt)
|
||||
+ QLatin1String(" needs integer argument"));
|
||||
}
|
||||
alreadyGiven = true;
|
||||
|
@@ -7,7 +7,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
include(../../../../qtcreator.pri)
|
||||
include(../../../auto/qttest.pri)
|
||||
include(../../../../src/rpath.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
|
||||
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
void operator()(const QString &fileName, const QByteArray &src, Node *ast) {
|
||||
_src = src;
|
||||
QString basename = fileName;
|
||||
int dotIdx = basename.lastIndexOf('.');
|
||||
int dotIdx = basename.lastIndexOf(QLatin1Char('.'));
|
||||
if (dotIdx != -1)
|
||||
basename.truncate(dotIdx);
|
||||
basename.append(QLatin1String(".ast.dot"));
|
||||
@@ -99,7 +99,7 @@ protected:
|
||||
}
|
||||
|
||||
QString spell(const SourceLocation &token) {
|
||||
return _src.mid(token.offset, token.length).replace('\'', "\\\\").replace('"', "\\\"");
|
||||
return QString::fromLatin1(_src.mid(token.offset, token.length).replace('\'', "\\\\").replace('"', "\\\""));
|
||||
}
|
||||
|
||||
void terminal(const SourceLocation &token) {
|
||||
@@ -332,7 +332,7 @@ int main(int argc, char *argv[])
|
||||
file.close();
|
||||
|
||||
Document::MutablePtr doc = Document::create(fileName, Document::guessLanguageFromSuffix(fileName));
|
||||
doc->setSource(source);
|
||||
doc->setSource(QString::fromUtf8(source));
|
||||
doc->parse();
|
||||
|
||||
foreach (const DiagnosticMessage &m, doc->diagnosticMessages()) {
|
||||
|
@@ -1,3 +1,3 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
CONFIG += ordered
|
||||
SUBDIRS += parsertests.pro modeldemo.pro testapps testrunner.pro
|
||||
|
@@ -1,6 +1,5 @@
|
||||
include(../../../qtcreator.pri)
|
||||
include(../../auto/qttestrpath.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/3rdparty/botan/botan.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/ssh/ssh.pri)
|
||||
include($$IDE_SOURCE_TREE/src/plugins/valgrind/valgrind_test.pri)
|
||||
|
@@ -1,5 +1,4 @@
|
||||
include(../../auto/qttest.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/3rdparty/botan/botan.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/ssh/ssh.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
|
||||
include($$IDE_SOURCE_TREE/src/plugins/valgrind/valgrind_test.pri)
|
||||
|
@@ -1,6 +1,5 @@
|
||||
include(../../auto/qttest.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/3rdparty/botan/botan.pri)
|
||||
include($$IDE_SOURCE_TREE/src/libs/ssh/ssh.pri)
|
||||
include($$IDE_SOURCE_TREE/src/plugins/valgrind/valgrind_test.pri)
|
||||
|
||||
|
Reference in New Issue
Block a user