Get Linguist to compile again
authorLars Knoll <lars.knoll@nokia.com>
Tue, 13 Sep 2011 14:19:53 +0000 (16:19 +0200)
committerLars Knoll <lars.knoll@nokia.com>
Tue, 13 Sep 2011 18:18:22 +0000 (20:18 +0200)
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>
src/linguist/linguist/formpreviewview.h
src/linguist/linguist/linguist.pro
src/linguist/lupdate/lupdate.pro
src/linguist/lupdate/qdeclarative.cpp
src/linguist/shared/profileevaluator.cpp
src/linguist/shared/qph.cpp
src/linguist/shared/ts.cpp

index 15fafc4..506fd2c 100644 (file)
@@ -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>
index db68e91..d929964 100644 (file)
@@ -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 \
index 02e315e..6ad523e 100644 (file)
@@ -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 \
index 6bf9cf4..23001eb 100644 (file)
 #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);
index 94e6674..0a399f2 100644 (file)
@@ -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"))
index b22aa3f..6452b01 100644 (file)
@@ -46,8 +46,7 @@
 #include <QtCore/QTextCodec>
 #include <QtCore/QTextStream>
 
-#include <QtXml/QXmlStreamReader>
-#include <QtXml/QXmlStreamAttribute>
+#include <QtCore/QXmlStreamReader>
 
 QT_BEGIN_NAMESPACE
 
index 4523bc5..ba6edc7 100644 (file)
@@ -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)