summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-09-13 16:19:53 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-09-13 20:18:22 +0200
commit650dc4fc2856339805a80e3170f4de6ce1003588 (patch)
tree2988d5f0d04c7c1643f5fd759e793d6af20b9eae
parent8a8fca2f853cd007d568438f5807441f75b6cd68 (diff)
Get Linguist to compile again
Change-Id: If65b0e046a277bd2c83c5188285de4e8d14101b8 Reviewed-on: http://codereview.qt-project.org/4832 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r--src/linguist/linguist/formpreviewview.h2
-rw-r--r--src/linguist/linguist/linguist.pro9
-rw-r--r--src/linguist/lupdate/lupdate.pro4
-rw-r--r--src/linguist/lupdate/qdeclarative.cpp42
-rw-r--r--src/linguist/shared/profileevaluator.cpp2
-rw-r--r--src/linguist/shared/qph.cpp3
-rw-r--r--src/linguist/shared/ts.cpp3
7 files changed, 26 insertions, 39 deletions
diff --git a/src/linguist/linguist/formpreviewview.h b/src/linguist/linguist/formpreviewview.h
index 15fafc4b7..506fd2c96 100644
--- a/src/linguist/linguist/formpreviewview.h
+++ b/src/linguist/linguist/formpreviewview.h
@@ -42,7 +42,7 @@
#ifndef FORMPREVIEWVIEW_H
#define FORMPREVIEWVIEW_H
-#include <quiloader_p.h>
+#include <private/quiloader_p.h>
#include <QtCore/QHash>
#include <QtCore/QList>
diff --git a/src/linguist/linguist/linguist.pro b/src/linguist/linguist/linguist.pro
index db68e9130..d92996409 100644
--- a/src/linguist/linguist/linguist.pro
+++ b/src/linguist/linguist/linguist.pro
@@ -4,11 +4,9 @@ TEMPLATE = app
LANGUAGE = C++
DESTDIR = $$QT.designer.bins
-QT += core-private widgets xml designer
+QT += core-private widgets xml designer uitools-private printsupport
-CONFIG += qt \
- warn_on \
- uitools
+CONFIG += qt warn_on
DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII
build_all:!build_pass {
@@ -20,9 +18,6 @@ include(../shared/formats.pri)
DEFINES += QFORMINTERNAL_NAMESPACE
-INCLUDEPATH += $$QT_SOURCE_TREE/src/uitools
-INCLUDEPATH += $$QT_SOURCE_TREE/tools/uilib
-
SOURCES += \
batchtranslationdialog.cpp \
errorsview.cpp \
diff --git a/src/linguist/lupdate/lupdate.pro b/src/linguist/lupdate/lupdate.pro
index 02e315ed6..6ad523edb 100644
--- a/src/linguist/lupdate/lupdate.pro
+++ b/src/linguist/lupdate/lupdate.pro
@@ -18,8 +18,8 @@ build_all:!build_pass {
include(../shared/formats.pri)
include(../shared/proparser.pri)
-include($$QT.declarative.sources/qml/parser/parser.pri)
-INCLUDEPATH += $$QT.declarative.sources/qml $$QT.declarative.includes
+#include($$QT.declarative.sources/qml/parser/parser.pri)
+#INCLUDEPATH += $$QT.declarative.sources/qml $$QT.declarative.includes
SOURCES += \
main.cpp \
diff --git a/src/linguist/lupdate/qdeclarative.cpp b/src/linguist/lupdate/qdeclarative.cpp
index 6bf9cf469..23001ebab 100644
--- a/src/linguist/lupdate/qdeclarative.cpp
+++ b/src/linguist/lupdate/qdeclarative.cpp
@@ -47,12 +47,11 @@
#include <QtCore/QFile>
#include <QtCore/QString>
-#include "parser/qdeclarativejsengine_p.h"
-#include "parser/qdeclarativejsparser_p.h"
-#include "parser/qdeclarativejslexer_p.h"
-#include "parser/qdeclarativejsnodepool_p.h"
-#include "parser/qdeclarativejsastvisitor_p.h"
-#include "parser/qdeclarativejsast_p.h"
+#include "private/qdeclarativejsengine_p.h"
+#include "private/qdeclarativejsparser_p.h"
+#include "private/qdeclarativejslexer_p.h"
+#include "private/qdeclarativejsastvisitor_p.h"
+#include "private/qdeclarativejsast_p.h"
#include <QCoreApplication>
#include <QFile>
@@ -110,8 +109,8 @@ protected:
{
m_bSource.clear();
if (AST::IdentifierExpression *idExpr = AST::cast<AST::IdentifierExpression *>(node->base)) {
- if (idExpr->name->asString() == QLatin1String("qsTr") ||
- idExpr->name->asString() == QLatin1String("QT_TR_NOOP")) {
+ if (idExpr->name == QLatin1String("qsTr") ||
+ idExpr->name == QLatin1String("QT_TR_NOOP")) {
if (!node->arguments)
return;
AST::BinaryExpression *binary = AST::cast<AST::BinaryExpression *>(node->arguments->expression);
@@ -121,14 +120,14 @@ protected:
}
AST::StringLiteral *literal = AST::cast<AST::StringLiteral *>(node->arguments->expression);
if (literal || !m_bSource.isEmpty()) {
- const QString source = literal ? literal->value->asString() : m_bSource;
+ const QString source = literal ? literal->value.toString() : m_bSource;
QString comment;
bool plural = false;
AST::ArgumentList *commentNode = node->arguments->next;
if (commentNode && AST::cast<AST::StringLiteral *>(commentNode->expression)) {
literal = AST::cast<AST::StringLiteral *>(commentNode->expression);
- comment = literal->value->asString();
+ comment = literal->value.toString();
AST::ArgumentList *nNode = commentNode->next;
if (nNode)
@@ -154,11 +153,11 @@ protected:
msg.setExtras(extra);
m_translator->extend(msg);
}
- } else if (idExpr->name->asString() == QLatin1String("qsTranslate") ||
- idExpr->name->asString() == QLatin1String("QT_TRANSLATE_NOOP")) {
+ } else if (idExpr->name == QLatin1String("qsTranslate") ||
+ idExpr->name == QLatin1String("QT_TRANSLATE_NOOP")) {
if (node->arguments && AST::cast<AST::StringLiteral *>(node->arguments->expression)) {
AST::StringLiteral *literal = AST::cast<AST::StringLiteral *>(node->arguments->expression);
- const QString context = literal->value->asString();
+ const QString context = literal->value.toString();
QString source;
QString comment;
@@ -185,11 +184,11 @@ protected:
id = scomment.msgid;
}
- source = literal ? literal->value->asString() : m_bSource;
+ source = literal ? literal->value.toString() : m_bSource;
AST::ArgumentList *commentNode = sourceNode->next;
if (commentNode && AST::cast<AST::StringLiteral *>(commentNode->expression)) {
literal = AST::cast<AST::StringLiteral *>(commentNode->expression);
- comment = literal->value->asString();
+ comment = literal->value.toString();
AST::ArgumentList *nNode = commentNode->next;
if (nNode)
@@ -205,8 +204,8 @@ protected:
msg.setExtras(extra);
m_translator->extend(msg);
}
- } else if (idExpr->name->asString() == QLatin1String("qsTrId") ||
- idExpr->name->asString() == QLatin1String("QT_TRID_NOOP")) {
+ } else if (idExpr->name == QLatin1String("qsTrId") ||
+ idExpr->name == QLatin1String("QT_TRID_NOOP")) {
if (!node->arguments)
return;
@@ -223,7 +222,7 @@ protected:
extra = comment.extra;
}
- const QString id = literal->value->asString();
+ const QString id = literal->value.toString();
bool plural = node->arguments->next;
TranslatorMessage msg(QString(), sourcetext,
@@ -254,13 +253,13 @@ private:
if (!createString(l))
return false;
} else
- m_bSource.prepend(ls->value->asString());
+ m_bSource.prepend(ls->value.toString());
if (r) {
if (!createString(r))
return false;
} else
- m_bSource.append(rs->value->asString());
+ m_bSource.append(rs->value);
return true;
}
@@ -393,9 +392,6 @@ bool loadQml(Translator &translator, const QString &filename, ConversionData &cd
Engine driver;
Parser parser(&driver);
- NodePool nodePool(filename, &driver);
- driver.setNodePool(&nodePool);
-
Lexer lexer(&driver);
lexer.setCode(code, /*line = */ 1);
driver.setLexer(&lexer);
diff --git a/src/linguist/shared/profileevaluator.cpp b/src/linguist/shared/profileevaluator.cpp
index 94e66745b..0a399f2f2 100644
--- a/src/linguist/shared/profileevaluator.cpp
+++ b/src/linguist/shared/profileevaluator.cpp
@@ -1022,8 +1022,6 @@ QString ProFileEvaluator::Private::propertyValue(const QString &name) const
return QLibraryInfo::location(QLibraryInfo::SettingsPath);
if (name == QLatin1String("QT_INSTALL_EXAMPLES"))
return QLibraryInfo::location(QLibraryInfo::ExamplesPath);
- if (name == QLatin1String("QT_INSTALL_DEMOS"))
- return QLibraryInfo::location(QLibraryInfo::DemosPath);
if (name == QLatin1String("QMAKE_MKSPECS"))
return qmake_mkspec_paths().join(Option::dirlist_sep);
if (name == QLatin1String("QMAKE_VERSION"))
diff --git a/src/linguist/shared/qph.cpp b/src/linguist/shared/qph.cpp
index b22aa3fe8..6452b012f 100644
--- a/src/linguist/shared/qph.cpp
+++ b/src/linguist/shared/qph.cpp
@@ -46,8 +46,7 @@
#include <QtCore/QTextCodec>
#include <QtCore/QTextStream>
-#include <QtXml/QXmlStreamReader>
-#include <QtXml/QXmlStreamAttribute>
+#include <QtCore/QXmlStreamReader>
QT_BEGIN_NAMESPACE
diff --git a/src/linguist/shared/ts.cpp b/src/linguist/shared/ts.cpp
index 4523bc55d..ba6edc724 100644
--- a/src/linguist/shared/ts.cpp
+++ b/src/linguist/shared/ts.cpp
@@ -46,8 +46,7 @@
#include <QtCore/QTextCodec>
#include <QtCore/QTextStream>
-#include <QtXml/QXmlStreamReader>
-#include <QtXml/QXmlStreamAttribute>
+#include <QtCore/QXmlStreamReader>
#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)