Updated the QML front-end to revision 44f3548fde7cf6a87bd3cc8bb1cc0e63cfc5ca4c of qt/kinetic-declarativeui

This commit is contained in:
Roberto Raggi
2009-10-26 11:53:28 +01:00
parent dc9e019a1d
commit 2bd9c40dd9
16 changed files with 497 additions and 287 deletions

View File

@@ -1,20 +1,18 @@
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
-- --
-- This file is part of Qt Creator -- Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-- Contact: Qt Software Information (qt-info@nokia.com)
-- --
-- Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -- This file is part of the QtDeclarative module of the Qt Toolkit.
-- --
-- Contact: Nokia Corporation (qt-info@nokia.com) -- $QT_BEGIN_LICENSE:LGPL$
-- -- No Commercial Usage
-- Commercial Usage -- This file contains pre-release code and may not be distributed.
-- -- You may use this file in accordance with the terms and conditions
-- Licensees holding valid Qt Commercial licenses may use this file in -- contained in the either Technology Preview License Agreement or the
-- accordance with the Qt Commercial License Agreement provided with the -- Beta Release License Agreement.
-- Software or, alternatively, in accordance with the terms contained in
-- a written agreement between you and Nokia.
-- --
-- GNU Lesser General Public License Usage -- GNU Lesser General Public License Usage
--
-- Alternatively, this file may be used under the terms of the GNU Lesser -- 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 -- General Public License version 2.1 as published by the Free Software
-- Foundation and appearing in the file LICENSE.LGPL included in the -- Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,8 +20,25 @@
-- ensure the GNU Lesser General Public License version 2.1 requirements -- 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. -- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-- --
-- In addition, as a special exception, Nokia gives you certain
-- additional rights. These rights are described in the Nokia Qt LGPL
-- Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-- package.
--
-- GNU General Public License Usage
-- Alternatively, this file may be used under the terms of the GNU
-- General Public License version 3.0 as published by the Free Software
-- Foundation and appearing in the file LICENSE.GPL included in the
-- packaging of this file. Please review the following information to
-- ensure the GNU General Public License version 3.0 requirements will be
-- met: http://www.gnu.org/copyleft/gpl.html.
--
-- If you are unsure which license is appropriate for your use, please -- If you are unsure which license is appropriate for your use, please
-- contact the sales department at http://qt.nokia.com/contact. -- contact the sales department at qt-sales@nokia.com.
-- $QT_END_LICENSE$
--
-- This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-- WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-- --
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
@@ -85,23 +100,21 @@
%start TopLevel %start TopLevel
/. /.
/************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtScript module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -109,12 +122,27 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtCore/QtDebug> #include <QtCore/QtDebug>
#include <QtGui/QApplication>
#include <string.h> #include <string.h>
@@ -126,23 +154,21 @@
./ ./
/: /:
/************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtScript module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -150,10 +176,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
// //
// W A R N I N G // W A R N I N G
@@ -2920,7 +2960,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
yylloc.startColumn += yylloc.length; yylloc.startColumn += yylloc.length;
yylloc.length = 0; yylloc.length = 0;
//const QString msg = QString::fromUtf8("Missing `;'"); //const QString msg = qApp->translate("QmlParser", "Missing `;'");
//diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg)); //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg));
first_token = &token_buffer[0]; first_token = &token_buffer[0];
@@ -2945,7 +2985,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
token_buffer[1].loc = yylloc = location(lexer); token_buffer[1].loc = yylloc = location(lexer);
if (t_action(errorState, yytoken)) { if (t_action(errorState, yytoken)) {
const QString msg = QString::fromUtf8("Unexpected token `%1'").arg(QLatin1String(spell[token_buffer[0].token])); const QString msg = qApp->translate("QmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token_buffer[0].token]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
action = errorState; action = errorState;
@@ -2973,7 +3013,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) { for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
int a = t_action(errorState, *tk); int a = t_action(errorState, *tk);
if (a > 0 && t_action(a, yytoken)) { if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Expected token `%1'").arg(QLatin1String(spell[*tk])); const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
yytoken = *tk; yytoken = *tk;
@@ -2996,7 +3036,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
int a = t_action(errorState, tk); int a = t_action(errorState, tk);
if (a > 0 && t_action(a, yytoken)) { if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Expected token `%1'").arg(QLatin1String(spell[tk])); const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
yytoken = tk; yytoken = tk;
@@ -3009,7 +3049,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
} }
} }
const QString msg = QString::fromUtf8("Syntax error"); const QString msg = qApp->translate("QmlParser", "Syntax error");
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
} }

View File

@@ -1,20 +1,18 @@
/**************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtScript module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,10 +20,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmljsast_p.h" #include "qmljsast_p.h"
#include "qmljsastvisitor_p.h" #include "qmljsastvisitor_p.h"

View File

@@ -1,20 +1,18 @@
/**************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtDeclarative module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,10 +20,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMLJSAST_P_H #ifndef QMLJSAST_P_H
#define QMLJSAST_P_H #define QMLJSAST_P_H

View File

@@ -1,20 +1,18 @@
/**************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtScript module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,10 +20,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMLJSAST_FWD_P_H #ifndef QMLJSAST_FWD_P_H
#define QMLJSAST_FWD_P_H #define QMLJSAST_FWD_P_H

View File

@@ -1,20 +1,18 @@
/************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtScript module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,14 +20,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmljsastvisitor_p.h" #include "qmljsastvisitor_p.h"
QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
namespace QmlJS { namespace AST { namespace QmlJS { namespace AST {
@@ -43,4 +55,4 @@ Visitor::~Visitor()
} } // namespace QmlJS::AST } } // namespace QmlJS::AST
QT_QML_END_NAMESPACE QT_END_NAMESPACE

View File

@@ -1,20 +1,18 @@
/************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtScript module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,10 +20,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMLJSASTVISITOR_P_H #ifndef QMLJSASTVISITOR_P_H
#define QMLJSASTVISITOR_P_H #define QMLJSASTVISITOR_P_H

View File

@@ -1,20 +1,18 @@
/**************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtDeclarative module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,10 +20,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmljsglobal_p.h" #include "qmljsglobal_p.h"
#include "qmljsengine_p.h" #include "qmljsengine_p.h"
@@ -152,7 +164,7 @@ double integerFromString(const char *buf, int size, int radix)
double integerFromString(const QString &str, int radix) double integerFromString(const QString &str, int radix)
{ {
QByteArray ba = str.trimmed().toUtf8(); QByteArray ba = str.trimmed().toLatin1();
return integerFromString(ba.constData(), ba.size(), radix); return integerFromString(ba.constData(), ba.size(), radix);
} }

View File

@@ -1,20 +1,18 @@
/************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtDeclarative module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,10 +20,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMLJSENGINE_P_H #ifndef QMLJSENGINE_P_H
#define QMLJSENGINE_P_H #define QMLJSENGINE_P_H

View File

@@ -2,8 +2,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved. ** Contact: Qt Software Information (qt-info@nokia.com)
** Contact: Nokia Corporation (qt-info@nokia.com)
** **
** This file is part of the QtCore module of the Qt Toolkit. ** This file is part of the QtCore module of the Qt Toolkit.
** **
@@ -11,8 +10,8 @@
** No Commercial Usage ** No Commercial Usage
** This file contains pre-release code and may not be distributed. ** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions ** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying ** contained in the either Technology Preview License Agreement or the
** this package. ** Beta Release License Agreement.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser ** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -22,20 +21,21 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
** **
** In addition, as a special exception, Nokia gives you certain additional ** In addition, as a special exception, Nokia gives you certain
** rights. These rights are described in the Nokia Qt LGPL Exception ** additional rights. These rights are described in the Nokia Qt LGPL
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** ** package.
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
** **
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/

View File

@@ -2,8 +2,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved. ** Contact: Qt Software Information (qt-info@nokia.com)
** Contact: Nokia Corporation (qt-info@nokia.com)
** **
** This file is part of the QtCore module of the Qt Toolkit. ** This file is part of the QtCore module of the Qt Toolkit.
** **
@@ -11,8 +10,8 @@
** No Commercial Usage ** No Commercial Usage
** This file contains pre-release code and may not be distributed. ** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions ** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying ** contained in the either Technology Preview License Agreement or the
** this package. ** Beta Release License Agreement.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser ** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -22,20 +21,21 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
** **
** In addition, as a special exception, Nokia gives you certain additional ** In addition, as a special exception, Nokia gives you certain
** rights. These rights are described in the Nokia Qt LGPL Exception ** additional rights. These rights are described in the Nokia Qt LGPL
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** ** package.
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
** **
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/

View File

@@ -1,20 +1,18 @@
/************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtDeclarative module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,10 +20,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
@@ -36,6 +48,8 @@
#include "qmljslexer_p.h" #include "qmljslexer_p.h"
#include "qmljsgrammar_p.h" #include "qmljsgrammar_p.h"
#include <QtGui/qapplication.h>
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@@ -536,7 +550,7 @@ int Lexer::lex()
else { else {
setDone(Bad); setDone(Bad);
err = IllegalCharacter; err = IllegalCharacter;
errmsg = QLatin1String("Illegal character"); errmsg = qApp->translate("QmlParser", "Illegal character");
} }
} }
break; break;
@@ -550,7 +564,7 @@ int Lexer::lex()
} else if (current == 0 || isLineTerminator()) { } else if (current == 0 || isLineTerminator()) {
setDone(Bad); setDone(Bad);
err = UnclosedStringLiteral; err = UnclosedStringLiteral;
errmsg = QLatin1String("Unclosed string at end of line"); errmsg = qApp->translate("QmlParser", "Unclosed string at end of line");
} else if (current == '\\') { } else if (current == '\\') {
state = InEscapeSequence; state = InEscapeSequence;
} else { } else {
@@ -576,7 +590,7 @@ int Lexer::lex()
} else { } else {
setDone(Bad); setDone(Bad);
err = IllegalEscapeSequence; err = IllegalEscapeSequence;
errmsg = QLatin1String("Illegal escape squence"); errmsg = qApp->translate("QmlParser", "Illegal escape squence");
} }
} else if (current == 'x') } else if (current == 'x')
state = InHexEscape; state = InHexEscape;
@@ -622,7 +636,7 @@ int Lexer::lex()
} else { } else {
setDone(Bad); setDone(Bad);
err = IllegalUnicodeEscapeSequence; err = IllegalUnicodeEscapeSequence;
errmsg = QLatin1String("Illegal unicode escape sequence"); errmsg = qApp->translate("QmlParser", "Illegal unicode escape sequence");
} }
break; break;
case InSingleLineComment: case InSingleLineComment:
@@ -648,7 +662,7 @@ int Lexer::lex()
if (current == 0) { if (current == 0) {
setDone(Bad); setDone(Bad);
err = UnclosedComment; err = UnclosedComment;
errmsg = QLatin1String("Unclosed comment at end of file"); errmsg = qApp->translate("QmlParser", "Unclosed comment at end of file");
driver->addComment(startpos, tokenLength(), startlineno, startcolumn); driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
} else if (isLineTerminator()) { } else if (isLineTerminator()) {
shiftWindowsLineBreak(); shiftWindowsLineBreak();
@@ -735,7 +749,7 @@ int Lexer::lex()
} else { } else {
setDone(Bad); setDone(Bad);
err = IllegalExponentIndicator; err = IllegalExponentIndicator;
errmsg = QLatin1String("Illegal syntax for exponential number"); errmsg = qApp->translate("QmlParser", "Illegal syntax for exponential number");
} }
break; break;
case InExponent: case InExponent:
@@ -761,7 +775,7 @@ int Lexer::lex()
&& isIdentLetter(current)) { && isIdentLetter(current)) {
state = Bad; state = Bad;
err = IllegalIdentifier; err = IllegalIdentifier;
errmsg = QLatin1String("Identifier cannot start with numeric literal"); errmsg = qApp->translate("QmlParser", "Identifier cannot start with numeric literal");
} }
// terminate string // terminate string
@@ -855,11 +869,16 @@ bool Lexer::isLineTerminator() const
bool Lexer::isIdentLetter(ushort c) bool Lexer::isIdentLetter(ushort c)
{ {
/* TODO: allow other legitimate unicode chars */ // ASCII-biased, since all reserved words are ASCII, aand hence the
return ((c >= 'a' && c <= 'z') // bulk of content to be parsed.
if ((c >= 'a' && c <= 'z')
|| (c >= 'A' && c <= 'Z') || (c >= 'A' && c <= 'Z')
|| c == '$' || c == '$'
|| c == '_'); || c == '_')
return true;
if (c < 128)
return false;
return QChar(c).isLetterOrNumber();
} }
bool Lexer::isDecimalDigit(ushort c) bool Lexer::isDecimalDigit(ushort c)
@@ -1087,7 +1106,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix)
while (1) { while (1) {
if (isLineTerminator() || current == 0) { if (isLineTerminator() || current == 0) {
errmsg = QLatin1String("Unterminated regular expression literal"); errmsg = qApp->translate("QmlParser", "Unterminated regular expression literal");
return false; return false;
} }
else if (current != '/' || lastWasEscape == true) else if (current != '/' || lastWasEscape == true)
@@ -1111,7 +1130,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix)
while (isIdentLetter(current)) { while (isIdentLetter(current)) {
int flag = Ecma::RegExp::flagFromChar(current); int flag = Ecma::RegExp::flagFromChar(current);
if (flag == 0) { if (flag == 0) {
errmsg = QString::fromLatin1("Invalid regular expression flag '%0'") errmsg = qApp->translate("QmlParser", "Invalid regular expression flag '%0'")
.arg(QChar(current)); .arg(QChar(current));
return false; return false;
} }

View File

@@ -1,20 +1,18 @@
/************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtScript module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,10 +20,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMLJSLEXER_P_H #ifndef QMLJSLEXER_P_H
#define QMLJSLEXER_P_H #define QMLJSLEXER_P_H

View File

@@ -1,20 +1,18 @@
/**************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtDeclarative module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,10 +20,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMLJSMEMORYPOOL_P_H #ifndef QMLJSMEMORYPOOL_P_H
#define QMLJSMEMORYPOOL_P_H #define QMLJSMEMORYPOOL_P_H

View File

@@ -1,20 +1,18 @@
/************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtDeclarative module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -22,10 +20,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMLJSNODEPOOL_P_H #ifndef QMLJSNODEPOOL_P_H
#define QMLJSNODEPOOL_P_H #define QMLJSNODEPOOL_P_H
@@ -104,11 +116,17 @@ public:
inline QString fileName() const { return m_fileName; } inline QString fileName() const { return m_fileName; }
inline Engine *engine() const { return m_engine; } inline Engine *engine() const { return m_engine; }
#ifndef J_SCRIPT_NO_EVENT_NOTIFY
inline qint64 id() const { return m_id; }
#endif
private: private:
QHash<AST::Node*, Code*> m_codeCache; QHash<AST::Node*, Code*> m_codeCache;
QString m_fileName; QString m_fileName;
Engine *m_engine; Engine *m_engine;
#ifndef J_SCRIPT_NO_EVENT_NOTIFY
qint64 m_id;
#endif
private: private:
Q_DISABLE_COPY(NodePool) Q_DISABLE_COPY(NodePool)

View File

@@ -2,21 +2,19 @@
/**************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtScript module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -24,12 +22,27 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtCore/QtDebug> #include <QtCore/QtDebug>
#include <QtGui/QApplication>
#include <string.h> #include <string.h>
@@ -1711,7 +1724,7 @@ case 337: {
yylloc.startColumn += yylloc.length; yylloc.startColumn += yylloc.length;
yylloc.length = 0; yylloc.length = 0;
//const QString msg = QString::fromUtf8("Missing `;'"); //const QString msg = qApp->translate("QmlParser", "Missing `;'");
//diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg)); //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg));
first_token = &token_buffer[0]; first_token = &token_buffer[0];
@@ -1736,7 +1749,7 @@ case 337: {
token_buffer[1].loc = yylloc = location(lexer); token_buffer[1].loc = yylloc = location(lexer);
if (t_action(errorState, yytoken)) { if (t_action(errorState, yytoken)) {
const QString msg = QString::fromUtf8("Unexpected token `%1'").arg(QLatin1String(spell[token_buffer[0].token])); const QString msg = qApp->translate("QmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token_buffer[0].token]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
action = errorState; action = errorState;
@@ -1764,7 +1777,7 @@ case 337: {
for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) { for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
int a = t_action(errorState, *tk); int a = t_action(errorState, *tk);
if (a > 0 && t_action(a, yytoken)) { if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Expected token `%1'").arg(QLatin1String(spell[*tk])); const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
yytoken = *tk; yytoken = *tk;
@@ -1787,7 +1800,7 @@ case 337: {
int a = t_action(errorState, tk); int a = t_action(errorState, tk);
if (a > 0 && t_action(a, yytoken)) { if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Expected token `%1'").arg(QLatin1String(spell[tk])); const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
yytoken = tk; yytoken = tk;
@@ -1800,7 +1813,7 @@ case 337: {
} }
} }
const QString msg = QString::fromUtf8("Syntax error"); const QString msg = qApp->translate("QmlParser", "Syntax error");
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
} }

View File

@@ -2,21 +2,19 @@
/**************************************************************************** /****************************************************************************
** **
** This file is part of Qt Creator ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** This file is part of the QtScript module of the Qt Toolkit.
** **
** Contact: Nokia Corporation (qt-info@nokia.com) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** Commercial Usage ** This file contains pre-release code and may not be distributed.
** ** You may use this file in accordance with the terms and conditions
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
@@ -24,10 +22,24 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://qt.nokia.com/contact. ** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
** **
**************************************************************************/ ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
// //
// W A R N I N G // W A R N I N G