summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qtextstream.cpp3
-rw-r--r--src/declarative/extra/qmlxmllistmodel.cpp11
-rw-r--r--src/declarative/extra/qmlxmllistmodel.h2
-rw-r--r--src/declarative/fx/qfxpathview.cpp6
-rw-r--r--src/declarative/fx/qfxwebview.cpp28
-rw-r--r--src/declarative/qml/parser/javascript.g59
-rw-r--r--src/declarative/qml/parser/javascriptgrammar.cpp1222
-rw-r--r--src/declarative/qml/parser/javascriptgrammar_p.h14
-rw-r--r--src/declarative/qml/parser/javascriptparser.cpp448
-rw-r--r--src/declarative/qml/parser/javascriptparser_p.h17
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp4
-rw-r--r--src/declarative/qml/qmlvme.cpp7
-rw-r--r--src/gui/dialogs/qabstractprintdialog.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp44
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h7
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp6
-rw-r--r--src/gui/image/qimagereader.cpp1
-rw-r--r--src/gui/itemviews/qtreeview.cpp38
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm18
-rw-r--r--src/gui/kernel/qcocoaview_mac_p.h3
-rw-r--r--src/gui/kernel/qformlayout.cpp6
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm23
-rw-r--r--src/gui/kernel/qwidget.cpp2
-rw-r--r--src/gui/kernel/qwidget_mac.mm4
-rw-r--r--src/gui/kernel/qx11embed_x11.cpp19
-rw-r--r--src/gui/painting/qblendfunctions.cpp12
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp6
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp26
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp2
-rw-r--r--src/gui/text/qfontengine.cpp39
-rw-r--r--src/gui/text/qfontengine_ft.cpp8
-rw-r--r--src/gui/text/qfontengine_p.h2
-rw-r--r--src/gui/text/qtextcursor.cpp5
-rw-r--r--src/gui/text/qtextdocument.cpp2
-rw-r--r--src/gui/text/qtextobject.cpp2
-rw-r--r--src/gui/widgets/qmainwindow.cpp3
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2
-rw-r--r--src/gui/widgets/qtabbar.cpp3
-rw-r--r--src/network/access/qnetworkdiskcache.cpp8
-rw-r--r--src/network/socket/qlocalserver.cpp8
-rw-r--r--src/network/socket/qlocalserver.h8
-rw-r--r--src/network/socket/qlocalserver_p.h61
-rw-r--r--src/network/socket/qlocalserver_unix.cpp6
-rw-r--r--src/network/socket/qlocalserver_win.cpp221
-rw-r--r--src/network/ssl/qsslcipher.cpp2
-rw-r--r--src/opengl/qglshaderprogram.cpp302
-rw-r--r--src/opengl/qglshaderprogram.h67
-rw-r--r--src/opengl/qpaintengine_opengl.cpp5
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp6
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp16
-rw-r--r--src/testlib/qtestlogger.cpp5
-rw-r--r--src/testlib/qtestxmlstreamer.cpp2
-rw-r--r--src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp2
53 files changed, 1550 insertions, 1275 deletions
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index 3c015da..f63d29e 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -67,7 +67,8 @@ static const int QTEXTSTREAM_BUFFERSIZE = 16384;
\snippet doc/src/snippets/code/src_corelib_io_qtextstream.cpp 1
Note that you cannot use QTextStream::atEnd(), which returns true when you
- have reached the end of the data stream, with stdin.
+ have reached the end of the data stream, with stdin because as long as the
+ application is running, stdin has no end.
Besides using QTextStream's constructors, you can also set the
device or string QTextStream operates on by calling setDevice() or
diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp
index badc6fb..af72ecc 100644
--- a/src/declarative/extra/qmlxmllistmodel.cpp
+++ b/src/declarative/extra/qmlxmllistmodel.cpp
@@ -239,12 +239,15 @@ void QmlXmlListModel::classComplete()
void QmlXmlListModel::fetch()
{
Q_D(QmlXmlListModel);
+
+ //clear existing data
+ d->size = 0;
+ int count = d->data.count();
+ d->data.clear();
+ emit itemsRemoved(0, count);
+
if (d->src.isEmpty()) {
qWarning() << "Can't fetch empty src string";
- //clear existing data?
- //int count = d->data.count();
- //d->data.clear();
- //emit itemsRemoved(0, count);
return;
}
diff --git a/src/declarative/extra/qmlxmllistmodel.h b/src/declarative/extra/qmlxmllistmodel.h
index d06cabf..acc54a9 100644
--- a/src/declarative/extra/qmlxmllistmodel.h
+++ b/src/declarative/extra/qmlxmllistmodel.h
@@ -116,6 +116,8 @@ public:
void setNamespaceDeclarations(const QString&);
virtual void classComplete();
+
+public Q_SLOTS:
void fetch();
protected:
diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp
index 810a359..715ae5a 100644
--- a/src/declarative/fx/qfxpathview.cpp
+++ b/src/declarative/fx/qfxpathview.cpp
@@ -699,6 +699,12 @@ void QFxPathView::itemsRemoved(int modelIndex, int count)
d->regenerate();
}
+ if (d->model->count() == 0) {
+ d->currentIndex = -1;
+ d->moveOffset.setValue(0);
+ return;
+ }
+
// make sure the current item is still at the snap position
if (d->currentIndex >= d->model->count())
d->currentIndex = d->model->count() - 1;
diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp
index 3f05846..7998711 100644
--- a/src/declarative/fx/qfxwebview.cpp
+++ b/src/declarative/fx/qfxwebview.cpp
@@ -848,20 +848,20 @@ QWebPage *QFxWebView::page() const
// The QObject interface to settings().
/*!
- \qmlproperty bool WebView::settings::autoLoadImages
- \qmlproperty bool WebView::settings::javascriptEnabled
- \qmlproperty bool WebView::settings::javaEnabled
- \qmlproperty bool WebView::settings::pluginsEnabled
- \qmlproperty bool WebView::settings::privateBrowsingEnabled
- \qmlproperty bool WebView::settings::javascriptCanOpenWindows
- \qmlproperty bool WebView::settings::javascriptCanAccessClipboard
- \qmlproperty bool WebView::settings::developerExtrasEnabled
- \qmlproperty bool WebView::settings::linksIncludedInFocusChain
- \qmlproperty bool WebView::settings::zoomTextOnly
- \qmlproperty bool WebView::settings::printElementBackgrounds
- \qmlproperty bool WebView::settings::offlineStorageDatabaseEnabled
- \qmlproperty bool WebView::settings::offlineWebApplicationCacheEnabled
- \qmlproperty bool WebView::settings::localStorageDatabaseEnabled
+ \qmlproperty bool WebView::settings.autoLoadImages
+ \qmlproperty bool WebView::settings.javascriptEnabled
+ \qmlproperty bool WebView::settings.javaEnabled
+ \qmlproperty bool WebView::settings.pluginsEnabled
+ \qmlproperty bool WebView::settings.privateBrowsingEnabled
+ \qmlproperty bool WebView::settings.javascriptCanOpenWindows
+ \qmlproperty bool WebView::settings.javascriptCanAccessClipboard
+ \qmlproperty bool WebView::settings.developerExtrasEnabled
+ \qmlproperty bool WebView::settings.linksIncludedInFocusChain
+ \qmlproperty bool WebView::settings.zoomTextOnly
+ \qmlproperty bool WebView::settings.printElementBackgrounds
+ \qmlproperty bool WebView::settings.offlineStorageDatabaseEnabled
+ \qmlproperty bool WebView::settings.offlineWebApplicationCacheEnabled
+ \qmlproperty bool WebView::settings.localStorageDatabaseEnabled
These properties give access to the settings controlling the web view.
diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g
index ec81a7a..d66266f 100644
--- a/src/declarative/qml/parser/javascript.g
+++ b/src/declarative/qml/parser/javascript.g
@@ -264,10 +264,10 @@ public:
enum Kind { Warning, Error };
DiagnosticMessage()
- : kind(Error), line(0), column(0) {}
+ : kind(Error) {}
- DiagnosticMessage(Kind kind, int line, int column, const QString &message)
- : kind(kind), line(line), column(column), message(message) {}
+ DiagnosticMessage(Kind kind, const JavaScript::AST::SourceLocation &loc, const QString &message)
+ : kind(kind), loc(loc), message(message) {}
bool isWarning() const
{ return kind == Warning; }
@@ -276,8 +276,7 @@ public:
{ return kind == Error; }
Kind kind;
- int line;
- int column;
+ JavaScript::AST::SourceLocation loc;
QString message;
};
@@ -307,10 +306,10 @@ public:
{ return diagnosticMessage().message; }
inline int errorLineNumber() const
- { return diagnosticMessage().line; }
+ { return diagnosticMessage().loc.startLine; }
inline int errorColumnNumber() const
- { return diagnosticMessage().column; }
+ { return diagnosticMessage().loc.startColumn; }
protected:
void reallocateStack();
@@ -471,7 +470,7 @@ bool JavaScriptParser::parse(JavaScriptEnginePrivate *driver)
-- Declarative UI
--------------------------------------------------------------------------------------------------------
-UiProgram: UiImportListOpt UiObjectMemberList ;
+UiProgram: UiImportListOpt UiRootMember ;
/.
case $rule_number: {
program = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList,
@@ -522,6 +521,13 @@ case $rule_number: {
} break;
./
+UiRootMember: UiObjectDefinition ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+./
+
UiObjectMemberList: UiObjectMember ;
/.
case $rule_number: {
@@ -587,9 +593,7 @@ case $rule_number: {
} break;
./
-UiArrayObjectMember: T_IDENTIFIER UiObjectInitializer ;
-/. case $rule_number: ./
-UiObjectMember: T_IDENTIFIER UiObjectInitializer ;
+UiObjectDefinition: T_IDENTIFIER UiObjectInitializer ;
/.
case $rule_number: {
AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).sval,
@@ -599,6 +603,9 @@ case $rule_number: {
} break;
./
+UiArrayObjectMember: UiObjectDefinition ;
+UiObjectMember: UiObjectDefinition ;
+
UiArrayObjectMember: UiQualifiedId T_COLON T_LBRACKET UiArrayMemberList T_RBRACKET ;
/. case $rule_number: ./
UiObjectMember: UiQualifiedId T_COLON T_LBRACKET UiArrayMemberList T_RBRACKET ;
@@ -865,9 +872,8 @@ PrimaryExpression: T_DIVIDE_ ;
case $rule_number: {
bool rx = lexer->scanRegExp(Lexer::NoPrefix);
if (!rx) {
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(),
- lexer->startColumnNo(), lexer->errorMessage()));
- return false;
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false; // ### remove me
}
AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
node->literalToken = loc(1);
@@ -883,9 +889,8 @@ PrimaryExpression: T_DIVIDE_EQ ;
case $rule_number: {
bool rx = lexer->scanRegExp(Lexer::EqualPrefix);
if (!rx) {
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(),
- lexer->startColumnNo(), lexer->errorMessage()));
- return false;
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false;
}
AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
node->literalToken = loc(1);
@@ -2695,10 +2700,8 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
yylloc.startColumn += yylloc.length;
yylloc.length = 0;
- const QString msg = QString::fromUtf8("Missing `;'");
-
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning,
- yylloc.startLine, yylloc.startColumn, msg));
+ //const QString msg = QString::fromUtf8("Missing `;'");
+ //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg));
first_token = &token_buffer[0];
last_token = &token_buffer[1];
@@ -2723,9 +2726,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
if (t_action(errorState, yytoken)) {
const QString msg = QString::fromUtf8("Unexpected token `%1'").arg(QLatin1String(spell[token_buffer[0].token]));
-
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
- token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
action = errorState;
goto _Lcheck_token;
@@ -2753,9 +2754,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
int a = t_action(errorState, *tk);
if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Expected token `%1'").arg(QLatin1String(spell[*tk]));
-
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
- token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
yytoken = *tk;
yylval = 0;
@@ -2777,8 +2776,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
int a = t_action(errorState, tk);
if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Expected token `%1'").arg(QLatin1String(spell[tk]));
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
- token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
yytoken = tk;
yylval = 0;
@@ -2791,8 +2789,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
}
const QString msg = QString::fromUtf8("Syntax error");
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
- token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
}
return false;
diff --git a/src/declarative/qml/parser/javascriptgrammar.cpp b/src/declarative/qml/parser/javascriptgrammar.cpp
index a33f343..cb98c36 100644
--- a/src/declarative/qml/parser/javascriptgrammar.cpp
+++ b/src/declarative/qml/parser/javascriptgrammar.cpp
@@ -55,622 +55,625 @@ const char *const JavaScriptGrammar::spell [] = {
0};
const int JavaScriptGrammar::lhs [] = {
- 91, 92, 92, 95, 95, 96, 96, 94, 93, 93,
- 98, 98, 100, 100, 99, 97, 99, 97, 99, 97,
- 102, 103, 103, 97, 99, 97, 105, 105, 105, 97,
- 97, 97, 97, 97, 97, 97, 101, 101, 109, 109,
- 109, 101, 101, 110, 110, 110, 110, 110, 110, 110,
- 110, 110, 110, 110, 110, 110, 110, 110, 112, 112,
- 116, 116, 111, 111, 114, 114, 117, 117, 117, 117,
- 117, 117, 118, 118, 118, 118, 118, 118, 118, 118,
- 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
- 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
- 118, 118, 118, 119, 119, 120, 120, 120, 120, 120,
- 123, 123, 124, 124, 124, 124, 122, 122, 125, 125,
- 126, 126, 127, 127, 127, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 129, 129, 129, 129, 130,
- 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
- 132, 132, 132, 133, 133, 133, 133, 133, 133, 134,
- 134, 134, 134, 134, 135, 135, 135, 135, 135, 136,
- 136, 137, 137, 138, 138, 139, 139, 140, 140, 141,
- 141, 142, 142, 143, 143, 144, 144, 145, 145, 146,
- 146, 147, 147, 115, 115, 148, 148, 149, 149, 149,
- 149, 149, 149, 149, 149, 149, 149, 149, 149, 106,
- 106, 150, 150, 151, 151, 152, 152, 104, 104, 104,
- 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
- 104, 104, 153, 168, 168, 167, 167, 108, 108, 169,
- 169, 170, 170, 172, 172, 171, 173, 176, 174, 174,
- 177, 175, 175, 154, 155, 155, 156, 156, 157, 157,
- 157, 157, 157, 157, 157, 158, 158, 158, 158, 159,
- 159, 159, 159, 160, 160, 161, 163, 178, 178, 181,
- 181, 179, 179, 182, 180, 162, 162, 162, 164, 164,
- 165, 165, 165, 183, 184, 166, 166, 107, 121, 188,
- 188, 185, 185, 186, 186, 189, 190, 190, 191, 191,
- 187, 187, 113, 113, 192};
+ 91, 92, 92, 95, 95, 96, 96, 94, 93, 98,
+ 98, 100, 100, 102, 102, 101, 99, 97, 101, 99,
+ 101, 99, 104, 105, 105, 99, 101, 99, 107, 107,
+ 107, 99, 99, 99, 99, 99, 99, 99, 103, 103,
+ 111, 111, 111, 103, 103, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
+ 114, 114, 118, 118, 113, 113, 116, 116, 119, 119,
+ 119, 119, 119, 119, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 121, 121, 122, 122, 122,
+ 122, 122, 125, 125, 126, 126, 126, 126, 124, 124,
+ 127, 127, 128, 128, 129, 129, 129, 130, 130, 130,
+ 130, 130, 130, 130, 130, 130, 130, 131, 131, 131,
+ 131, 132, 132, 132, 133, 133, 133, 133, 134, 134,
+ 134, 134, 134, 134, 134, 135, 135, 135, 135, 135,
+ 135, 136, 136, 136, 136, 136, 137, 137, 137, 137,
+ 137, 138, 138, 139, 139, 140, 140, 141, 141, 142,
+ 142, 143, 143, 144, 144, 145, 145, 146, 146, 147,
+ 147, 148, 148, 149, 149, 117, 117, 150, 150, 151,
+ 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
+ 151, 108, 108, 152, 152, 153, 153, 154, 154, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 155, 170, 170, 169, 169, 110,
+ 110, 171, 171, 172, 172, 174, 174, 173, 175, 178,
+ 176, 176, 179, 177, 177, 156, 157, 157, 158, 158,
+ 159, 159, 159, 159, 159, 159, 159, 160, 160, 160,
+ 160, 161, 161, 161, 161, 162, 162, 163, 165, 180,
+ 180, 183, 183, 181, 181, 184, 182, 164, 164, 164,
+ 166, 166, 167, 167, 167, 185, 186, 168, 168, 109,
+ 123, 190, 190, 187, 187, 188, 188, 191, 192, 192,
+ 193, 193, 189, 189, 115, 115, 194};
const int JavaScriptGrammar:: rhs[] = {
- 2, 1, 1, 1, 2, 3, 3, 0, 1, 2,
- 1, 3, 2, 3, 4, 4, 2, 2, 5, 5,
- 1, 2, 2, 3, 3, 3, 1, 1, 1, 2,
- 3, 4, 5, 6, 1, 1, 1, 1, 1, 1,
- 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 3, 3, 5, 3, 4, 3, 2, 4,
- 1, 2, 0, 1, 3, 5, 1, 1, 1, 1,
+ 2, 1, 1, 1, 2, 3, 3, 0, 1, 1,
+ 2, 1, 3, 2, 3, 4, 4, 2, 1, 1,
+ 5, 5, 1, 2, 2, 3, 3, 3, 1, 1,
+ 1, 2, 3, 4, 5, 6, 1, 1, 1, 1,
+ 1, 1, 1, 1, 3, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 3, 3, 5, 3, 4, 3,
+ 2, 4, 1, 2, 0, 1, 3, 5, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 4, 3, 5,
- 1, 2, 4, 4, 4, 3, 0, 1, 1, 3,
- 1, 1, 1, 2, 2, 1, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 3, 3, 3, 1,
- 3, 3, 1, 3, 3, 3, 1, 3, 3, 3,
- 3, 3, 3, 1, 3, 3, 3, 3, 3, 1,
- 3, 3, 3, 3, 1, 3, 3, 3, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
+ 3, 5, 1, 2, 4, 4, 4, 3, 0, 1,
+ 1, 3, 1, 1, 1, 2, 2, 1, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 1, 3, 3,
+ 3, 1, 3, 3, 1, 3, 3, 3, 1, 3,
+ 3, 3, 3, 3, 3, 1, 3, 3, 3, 3,
+ 3, 1, 3, 3, 3, 3, 1, 3, 3, 3,
3, 1, 3, 1, 3, 1, 3, 1, 3, 1,
3, 1, 3, 1, 3, 1, 3, 1, 3, 1,
- 5, 1, 5, 1, 3, 1, 3, 1, 1, 1,
+ 3, 1, 5, 1, 5, 1, 3, 1, 3, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 3, 0, 1, 1, 3, 0, 1, 1, 1, 1,
+ 1, 1, 3, 0, 1, 1, 3, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 3, 1, 2, 0, 1, 3, 3, 1,
- 1, 1, 3, 1, 3, 2, 2, 2, 0, 1,
- 2, 0, 1, 1, 2, 2, 7, 5, 7, 7,
- 5, 9, 10, 7, 8, 2, 2, 3, 3, 2,
- 2, 3, 3, 3, 3, 5, 5, 3, 5, 1,
- 2, 0, 1, 4, 3, 3, 3, 3, 3, 3,
- 3, 3, 4, 5, 2, 2, 2, 8, 8, 1,
- 3, 0, 1, 0, 1, 1, 1, 2, 1, 1,
- 0, 1, 0, 1, 2};
+ 1, 1, 1, 1, 3, 1, 2, 0, 1, 3,
+ 3, 1, 1, 1, 3, 1, 3, 2, 2, 2,
+ 0, 1, 2, 0, 1, 1, 2, 2, 7, 5,
+ 7, 7, 5, 9, 10, 7, 8, 2, 2, 3,
+ 3, 2, 2, 3, 3, 3, 3, 5, 5, 3,
+ 5, 1, 2, 0, 1, 4, 3, 3, 3, 3,
+ 3, 3, 3, 3, 4, 5, 2, 2, 2, 8,
+ 8, 1, 3, 0, 1, 0, 1, 1, 1, 2,
+ 1, 1, 0, 1, 0, 1, 2};
const int JavaScriptGrammar::action_default [] = {
8, 2, 0, 4, 3, 0, 0, 0, 6, 7,
- 5, 35, 42, 240, 0, 0, 39, 40, 37, 38,
- 41, 241, 9, 1, 0, 0, 36, 0, 29, 28,
- 27, 0, 32, 0, 143, 210, 174, 182, 178, 122,
- 194, 170, 34, 107, 45, 123, 186, 190, 111, 140,
- 121, 126, 106, 160, 147, 0, 51, 52, 48, 311,
- 39, 313, 63, 0, 0, 0, 0, 0, 46, 49,
- 0, 0, 40, 41, 50, 44, 0, 47, 0, 0,
- 136, 0, 0, 123, 142, 125, 124, 0, 0, 0,
- 138, 139, 137, 141, 0, 171, 0, 0, 0, 0,
- 161, 0, 0, 0, 0, 0, 0, 151, 0, 0,
- 0, 145, 146, 144, 149, 153, 152, 150, 148, 163,
- 162, 164, 0, 179, 0, 175, 0, 0, 117, 104,
- 116, 105, 73, 74, 75, 100, 76, 101, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
- 89, 102, 90, 91, 92, 93, 94, 95, 96, 97,
- 98, 99, 103, 0, 0, 115, 211, 118, 0, 119,
- 0, 120, 114, 0, 207, 200, 198, 205, 206, 204,
- 203, 209, 202, 201, 199, 208, 195, 0, 183, 0,
- 0, 187, 0, 0, 191, 0, 0, 117, 109, 0,
- 108, 0, 113, 127, 0, 312, 302, 303, 0, 300,
- 0, 301, 0, 304, 218, 225, 224, 232, 220, 0,
- 221, 305, 0, 310, 222, 223, 228, 226, 307, 306,
- 309, 229, 0, 0, 0, 0, 0, 311, 39, 0,
- 313, 40, 212, 254, 41, 0, 0, 0, 0, 0,
- 230, 231, 219, 227, 255, 256, 299, 308, 0, 270,
- 271, 272, 273, 0, 266, 267, 268, 269, 296, 297,
- 0, 0, 0, 0, 0, 259, 260, 216, 214, 176,
- 184, 180, 196, 172, 217, 0, 123, 188, 192, 165,
- 154, 0, 0, 173, 0, 0, 0, 0, 166, 0,
- 0, 0, 0, 0, 158, 156, 159, 157, 155, 168,
- 167, 169, 0, 181, 0, 177, 0, 215, 123, 0,
- 197, 212, 213, 0, 212, 0, 0, 262, 0, 0,
- 0, 264, 0, 185, 0, 0, 189, 0, 0, 193,
- 252, 0, 244, 253, 247, 0, 251, 0, 212, 245,
- 0, 212, 0, 0, 263, 0, 0, 0, 265, 312,
- 302, 0, 0, 304, 0, 298, 0, 288, 0, 0,
- 0, 258, 0, 257, 0, 314, 0, 72, 234, 237,
- 0, 73, 240, 76, 101, 78, 79, 48, 83, 84,
- 39, 85, 88, 46, 49, 40, 212, 41, 50, 91,
- 44, 93, 47, 95, 96, 241, 98, 99, 103, 0,
- 65, 0, 0, 67, 71, 69, 57, 68, 70, 0,
- 66, 56, 235, 233, 111, 112, 117, 0, 110, 0,
- 287, 0, 274, 275, 0, 286, 0, 0, 0, 277,
- 282, 280, 283, 0, 0, 281, 282, 0, 278, 0,
- 279, 236, 285, 0, 236, 284, 0, 289, 290, 0,
- 236, 291, 292, 0, 0, 293, 0, 0, 0, 294,
- 295, 129, 128, 0, 0, 0, 261, 0, 0, 0,
- 276, 0, 64, 0, 61, 63, 54, 0, 60, 55,
- 62, 59, 53, 0, 58, 133, 131, 135, 132, 130,
- 134, 0, 0, 18, 13, 0, 14, 10, 0, 31,
- 0, 33, 30, 0, 0, 26, 39, 63, 21, 0,
- 24, 16, 39, 0, 11, 0, 17, 0, 20, 12,
- 0, 25, 39, 63, 15, 0, 19, 22, 23, 43,
- 249, 242, 0, 250, 246, 0, 248, 238, 0, 239,
- 243, 315};
+ 5, 0, 9, 1, 0, 18, 37, 44, 242, 0,
+ 0, 41, 42, 14, 39, 40, 43, 243, 20, 10,
+ 0, 0, 0, 38, 0, 31, 30, 29, 0, 34,
+ 0, 145, 212, 176, 184, 180, 124, 196, 172, 36,
+ 109, 47, 125, 188, 192, 113, 142, 123, 128, 108,
+ 162, 149, 0, 53, 54, 50, 313, 41, 315, 65,
+ 0, 0, 0, 0, 0, 48, 51, 0, 0, 42,
+ 43, 52, 46, 0, 49, 0, 0, 138, 0, 0,
+ 125, 144, 127, 126, 0, 0, 0, 140, 141, 139,
+ 143, 0, 173, 0, 0, 0, 0, 163, 0, 0,
+ 0, 0, 0, 0, 153, 0, 0, 0, 147, 148,
+ 146, 151, 155, 154, 152, 150, 165, 164, 166, 0,
+ 181, 0, 177, 0, 0, 119, 106, 118, 107, 75,
+ 76, 77, 102, 78, 103, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 104, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, 105,
+ 0, 0, 117, 213, 120, 0, 121, 0, 122, 116,
+ 0, 209, 202, 200, 207, 208, 206, 205, 211, 204,
+ 203, 201, 210, 197, 0, 185, 0, 0, 189, 0,
+ 0, 193, 0, 0, 119, 111, 0, 110, 0, 115,
+ 129, 0, 314, 304, 305, 0, 302, 0, 303, 0,
+ 306, 220, 227, 226, 234, 222, 0, 223, 307, 0,
+ 312, 224, 225, 230, 228, 309, 308, 311, 231, 0,
+ 0, 0, 0, 0, 313, 41, 0, 315, 42, 214,
+ 256, 43, 0, 0, 0, 0, 0, 232, 233, 221,
+ 229, 257, 258, 301, 310, 0, 272, 273, 274, 275,
+ 0, 268, 269, 270, 271, 298, 299, 0, 0, 0,
+ 0, 0, 261, 262, 218, 216, 178, 186, 182, 198,
+ 174, 219, 0, 125, 190, 194, 167, 156, 0, 0,
+ 175, 0, 0, 0, 0, 168, 0, 0, 0, 0,
+ 0, 160, 158, 161, 159, 157, 170, 169, 171, 0,
+ 183, 0, 179, 0, 217, 125, 0, 199, 214, 215,
+ 0, 214, 0, 0, 264, 0, 0, 0, 266, 0,
+ 187, 0, 0, 191, 0, 0, 195, 254, 0, 246,
+ 255, 249, 0, 253, 0, 214, 247, 0, 214, 0,
+ 0, 265, 0, 0, 0, 267, 314, 304, 0, 0,
+ 306, 0, 300, 0, 290, 0, 0, 0, 260, 0,
+ 259, 0, 316, 0, 74, 236, 239, 0, 75, 242,
+ 78, 103, 80, 81, 50, 85, 86, 41, 87, 90,
+ 48, 51, 42, 214, 43, 52, 93, 46, 95, 49,
+ 97, 98, 243, 100, 101, 105, 0, 67, 0, 0,
+ 69, 73, 71, 59, 70, 72, 0, 68, 58, 237,
+ 235, 113, 114, 119, 0, 112, 0, 289, 0, 276,
+ 277, 0, 288, 0, 0, 0, 279, 284, 282, 285,
+ 0, 0, 283, 284, 0, 280, 0, 281, 238, 287,
+ 0, 238, 286, 0, 291, 292, 0, 238, 293, 294,
+ 0, 0, 295, 0, 0, 0, 296, 297, 131, 130,
+ 0, 0, 0, 263, 0, 0, 0, 278, 0, 66,
+ 0, 63, 65, 56, 0, 62, 57, 64, 61, 55,
+ 0, 60, 135, 133, 137, 134, 132, 136, 0, 0,
+ 33, 0, 35, 32, 15, 11, 0, 0, 28, 41,
+ 65, 23, 0, 26, 17, 0, 12, 19, 0, 0,
+ 22, 13, 0, 27, 41, 65, 16, 0, 21, 24,
+ 25, 45, 251, 244, 0, 252, 248, 0, 250, 240,
+ 0, 241, 245, 317};
const int JavaScriptGrammar::goto_default [] = {
- 6, 5, 23, 1, 4, 3, 22, 523, 524, 503,
- 24, 519, 520, 378, 508, 219, 11, 252, 44, 52,
- 483, 481, 376, 375, 35, 482, 374, 377, 130, 48,
- 43, 168, 50, 39, 167, 45, 51, 80, 49, 34,
- 54, 53, 289, 41, 283, 36, 279, 38, 281, 37,
- 280, 46, 287, 47, 288, 40, 282, 278, 319, 431,
- 284, 285, 214, 218, 220, 224, 225, 216, 215, 227,
- 253, 226, 231, 250, 251, 217, 380, 379, 25, 542,
- 541, 341, 342, 544, 344, 543, 343, 439, 443, 446,
- 442, 441, 461, 462, 208, 222, 204, 207, 221, 229,
- 228, 0};
+ 6, 5, 13, 1, 4, 3, 527, 30, 29, 525,
+ 526, 15, 528, 522, 523, 385, 509, 226, 230, 259,
+ 51, 59, 490, 488, 383, 382, 42, 489, 381, 384,
+ 137, 55, 50, 175, 57, 46, 174, 52, 58, 87,
+ 56, 41, 61, 60, 296, 48, 290, 43, 286, 45,
+ 288, 44, 287, 53, 294, 54, 295, 47, 289, 285,
+ 326, 438, 291, 292, 221, 225, 227, 231, 232, 223,
+ 222, 234, 260, 233, 238, 257, 258, 224, 387, 386,
+ 32, 544, 543, 348, 349, 546, 351, 545, 350, 446,
+ 450, 453, 449, 448, 468, 469, 215, 229, 211, 214,
+ 228, 236, 235, 0};
const int JavaScriptGrammar::action_index [] = {
- 62, -91, -18, -91, -40, 362, 44, 117, -91, -91,
- -91, -91, -91, -91, -12, 144, 20, 130, -91, -91,
- 14, -91, -91, 356, 127, 195, -91, 158, -91, -91,
- -91, 11, 34, 678, 125, -91, 41, -9, -27, 204,
- -91, 263, 58, -91, -91, 519, 61, 63, 220, 131,
- -91, -91, -91, 330, 159, 678, -91, -91, -91, 154,
- -91, 1176, 53, 678, 678, 678, 598, 678, -91, -91,
- 678, 678, -91, -91, -91, -91, 678, -91, 678, 678,
- -91, 678, 678, 118, 221, -91, -91, 678, 678, 678,
- -91, -91, -91, 217, 678, 269, 678, 678, 678, 678,
- 311, 678, 678, 678, 678, 678, 678, 228, 678, 678,
- 678, 104, 65, 64, 187, 164, 214, 295, 295, 431,
- 431, 345, 678, -7, 678, 90, 1089, 678, 678, -91,
+ -27, -91, 56, -91, -22, 60, 62, 109, -91, -91,
+ -91, 54, -91, -91, 438, -91, -91, -91, -91, 49,
+ 220, 53, 172, -91, -91, -91, 50, -91, -91, -91,
+ 415, 84, 207, -91, 226, -91, -91, -91, 61, 63,
+ 725, 80, -91, 68, 69, 59, 217, -91, 342, 74,
+ -91, -91, 566, 66, 72, 144, 140, -91, -91, -91,
+ 395, 160, 725, -91, -91, -91, 176, -91, 1223, 64,
+ 725, 725, 725, 645, 725, -91, -91, 725, 725, -91,
+ -91, -91, -91, 725, -91, 725, 725, -91, 725, 725,
+ 107, 178, -91, -91, 725, 725, 725, -91, -91, -91,
+ 187, 725, 342, 725, 725, 725, 725, 385, 725, 725,
+ 725, 725, 725, 725, 269, 725, 725, 725, 132, 113,
+ 79, 193, 269, 196, 199, 200, 370, 478, 478, 725,
+ 59, 725, 73, 1136, 725, 725, -91, -91, -91, -91,
-91, -91, -91, -91, -91, -91, -91, -91, -91, -91,
-91, -91, -91, -91, -91, -91, -91, -91, -91, -91,
-91, -91, -91, -91, -91, -91, -91, -91, -91, -91,
- -91, -91, -91, 113, 678, -91, -91, 42, -8, -91,
- 678, -91, -91, 678, -91, -91, -91, -91, -91, -91,
- -91, -91, -91, -91, -91, -91, -91, 678, 22, 678,
- 678, 29, 5, 678, -91, 1089, 678, 678, -91, 110,
- -91, 51, -91, -91, 36, -91, 184, 85, 60, -91,
- 151, -91, 56, 1437, -91, -91, -91, -91, -91, 166,
- -91, -91, 28, -91, -91, -91, -91, -91, -91, 1437,
- -91, -91, 290, 244, 102, 1350, 49, 178, 73, 39,
- 1698, 70, 678, -91, 72, 46, 678, 43, 37, 38,
- -91, -91, -91, -91, -91, -91, -91, -91, 68, -91,
- -91, -91, -91, 71, -91, -91, -91, -91, -91, -91,
- 50, 54, 678, 88, 66, -91, -91, 842, -91, 87,
- 47, 45, -91, 257, 59, 26, 486, 84, 146, 363,
- 295, 205, 678, 249, 678, 678, 678, 678, 363, 678,
- 678, 678, 678, 678, 295, 295, 295, 295, 295, 293,
- 363, 363, 678, -21, 678, 18, 678, -91, 519, 678,
- -91, 678, 13, -37, 678, -38, 1350, -91, 678, 98,
- 1350, -91, 678, -28, 678, 678, 16, 8, 678, -91,
- 0, 229, -15, -91, -91, 678, -91, 219, 678, -91,
- -34, 678, -32, 1350, -91, 678, 89, 1350, -91, -6,
- 197, -24, 1, 1437, -23, -91, 1350, -91, 678, 94,
- 1350, 17, 1350, -91, 6, 15, -26, -91, -91, 1350,
- -30, 231, 7, 278, 76, 678, 1350, -5, -36, 260,
- -3, -29, 598, -4, -1, -91, 762, -91, 3, 19,
- 4, 678, -2, -25, 678, 2, 678, -35, -10, 678,
- -91, 1263, 52, -91, -91, -91, -91, -91, -91, 678,
- -91, -91, -91, -91, 167, -91, 678, 21, -91, 1350,
- -91, 74, -91, -91, 1350, -91, 678, 91, 25, -91,
- 105, -91, 105, 97, 678, -91, 105, 55, -91, 23,
- -91, 1350, -91, 101, 1350, -91, 208, -91, -91, 92,
- 1350, 40, -91, 33, 35, -91, 180, 24, 31, -91,
- -91, -91, -91, 678, 86, 1350, -91, 678, 93, 1350,
- -91, 106, 57, 922, -91, 48, -91, 1002, -91, -91,
- -91, -91, -91, 132, -91, -91, -91, -91, -91, -91,
- -91, 10, 424, -91, -91, 421, -91, -91, 9, 30,
- 678, 27, -91, 1611, 156, -91, 134, 342, -91, 95,
- -91, -91, 12, 116, -91, 124, -91, 270, -91, -91,
- 1524, -91, 112, 352, -91, 114, -91, -91, -91, -91,
- 32, -91, 169, -91, -91, 678, -91, -91, 139, -91,
- -91, -91,
+ 94, 725, -91, -91, 65, 47, -91, 725, -91, -91,
+ 725, -91, -91, -91, -91, -91, -91, -91, -91, -91,
+ -91, -91, -91, -91, 725, 46, 725, 725, 55, 51,
+ 725, -91, 1136, 725, 725, -91, 95, -91, 38, -91,
+ -91, 35, -91, 210, 48, 32, -91, 223, -91, 34,
+ 1484, -91, -91, -91, -91, -91, 240, -91, -91, 33,
+ -91, -91, -91, -91, -91, -91, 1484, -91, -91, 281,
+ 266, 71, 1397, 39, 216, 52, 45, 1745, 58, 725,
+ -91, 57, 44, 725, 43, 41, 42, -91, -91, -91,
+ -91, -91, -91, -91, -91, 104, -91, -91, -91, -91,
+ 106, -91, -91, -91, -91, -91, -91, -28, 27, 725,
+ 117, 100, -91, -91, 805, -91, 83, 70, 67, -91,
+ 260, 77, -56, 503, 12, 119, 289, 231, 204, 725,
+ 285, 725, 725, 725, 725, 333, 725, 725, 725, 725,
+ 725, 181, 157, 169, 177, 269, 410, 339, 317, 725,
+ -65, 725, 15, 725, -91, 566, 725, -91, 725, 9,
+ -42, 725, -38, 1397, -91, 725, 116, 1397, -91, 725,
+ -48, 725, 725, 5, 120, 725, -91, 25, 203, 13,
+ -91, -91, 725, -91, 218, 725, -91, -1, 725, -8,
+ 1397, -91, 725, 103, 1397, -91, 19, 225, -19, 4,
+ 1484, -25, -91, 1397, -91, 725, 97, 1397, 24, 1397,
+ -91, 26, 31, -23, -91, -91, 1397, -24, 337, 22,
+ 324, 81, 725, 1397, 40, 10, 252, -3, -33, 645,
+ 2, 1, -91, 889, -91, 11, -13, 3, 725, 8,
+ 18, 725, 21, 725, -2, -10, 725, -91, 1310, 29,
+ -91, -91, -91, -91, -91, -91, 725, -91, -91, -91,
+ -91, 194, -91, 725, -6, -91, 1397, -91, 78, -91,
+ -91, 1397, -91, 725, 128, -12, -91, 6, -91, 7,
+ 91, 725, -91, -4, 36, -91, -53, -91, 1397, -91,
+ 105, 1397, -91, 130, -91, -91, 108, 1397, 0, -91,
+ 14, 16, -91, 150, 23, 20, -91, -91, -91, -91,
+ 725, 121, 1397, -91, 725, 126, 1397, -91, 85, 30,
+ 1049, -91, 37, -91, 969, -91, -91, -91, -91, -91,
+ 96, -91, -91, -91, -91, -91, -91, -91, -9, -5,
+ 28, 725, 17, -91, -91, -91, 1658, 146, -91, 102,
+ 406, -91, 86, -91, -91, 98, -91, -91, 93, 279,
+ -91, -91, 1571, -91, 90, 384, -91, 88, -91, -91,
+ -91, -91, -11, -91, 206, -91, -91, 725, -91, -91,
+ 232, -91, -91, -91,
- -102, -102, -102, -102, 34, 63, -102, -102, -102, -102,
- -102, -102, -102, -102, -102, 53, -102, -102, -102, -102,
- -102, -102, -102, 235, -102, 9, -102, 4, -102, -102,
- -102, -102, -102, -5, -102, -102, -102, -102, -102, -102,
- -102, -102, -102, -102, -102, -51, -102, -102, -102, -102,
- -102, -102, -102, -102, -102, 156, -102, -102, -102, 18,
- -102, -102, -102, -11, 95, 88, 90, 79, -102, -102,
- 80, 100, -102, -102, -102, -102, 114, -102, 101, 107,
- -102, 73, 131, -102, -102, -102, -102, 108, 111, 115,
- -102, -102, -102, -102, 165, -102, 83, 85, 118, 71,
- -102, 120, 144, 145, 143, 147, 159, -102, 122, 129,
- 66, -102, -102, -102, -102, -102, -102, -102, -102, -102,
- -102, -102, 41, -102, 65, -102, 77, 26, 19, -102,
- -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
- -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
- -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
- -102, -102, -102, -102, 27, -102, -102, -102, -102, -102,
- 28, -102, -102, 42, -102, -102, -102, -102, -102, -102,
- -102, -102, -102, -102, -102, -102, -102, 139, -102, 138,
- -1, -102, -102, 1, -102, 230, -10, 55, -102, -102,
- -102, -102, -102, -102, -102, -102, -3, -102, -102, -102,
- -4, -102, -102, 86, -102, -102, -102, -102, -102, -102,
- -102, -102, -102, -102, -102, -102, -102, -102, -102, 254,
- -102, -102, 56, 50, -102, 46, -102, -6, -102, -102,
- -102, -102, -2, -102, -102, -102, 17, -28, -102, -102,
- -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
- -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
- -102, -102, 5, -102, -102, -102, -102, 146, -102, -102,
- -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
- -102, 43, 225, -102, 237, 226, 197, 196, -102, 127,
- 136, 137, 135, 93, -102, -102, -102, -102, -102, -102,
- -102, -102, 174, -102, 180, -102, 170, -102, -102, 183,
- -102, 68, -102, -102, 70, -102, 49, -102, 48, -102,
- 47, -102, 193, -102, 161, 219, -102, -102, 189, -102,
- -102, -102, -102, -102, -102, 190, -102, 59, 72, -102,
- -102, 75, -102, 57, -102, 58, -102, 51, -102, -102,
- 64, -102, -102, 203, -102, -102, 44, -102, 32, -102,
- 31, -102, 29, -102, -102, -102, -102, -102, -102, 40,
- -102, 37, -102, 38, -102, 61, 36, -102, -102, 30,
- -102, -102, 62, -102, -102, -102, 35, -102, -102, -102,
- -102, 39, -102, 3, 128, -102, 155, -102, -102, 22,
- -102, 14, -102, -102, -102, -102, -102, -102, -102, 13,
- -102, -102, -102, -102, -102, -102, 123, -102, -102, 45,
- -102, -102, -102, -102, 25, -102, 52, -102, -102, -102,
- -102, -102, -80, -102, 54, -102, -72, -102, -102, -102,
- -102, -73, -102, -102, -76, -102, -102, -102, -102, -102,
- -102, -87, -102, -102, -45, -102, 12, -102, -31, -102,
- -102, -102, -102, 20, -102, 15, -102, 98, -102, 6,
- -102, -102, -102, 0, -102, 2, -102, -16, -102, -102,
- -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
- -102, -102, 232, -102, -102, 238, -102, -102, -102, -102,
- 11, -102, -102, 16, -9, -102, -7, 74, -102, -102,
- -102, -102, 24, -102, -102, -102, -102, 194, -102, -102,
- 8, -102, -8, 188, -102, -102, -102, -102, -102, -102,
- -102, -102, -102, -102, -102, 21, -102, -102, 60, -102,
- -102, -102};
+ -104, -104, -104, -104, -3, 5, -104, -104, -104, -104,
+ -104, -104, -104, -104, 241, -104, -104, -104, -104, -104,
+ 4, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+ 246, -104, 2, -104, 3, -104, -104, -104, -104, -104,
+ 15, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+ -104, -104, -45, -104, -104, -104, -104, -104, -104, -104,
+ -104, -104, 104, -104, -104, -104, -6, -104, -104, -104,
+ -14, 124, 119, 97, 113, -104, -104, 108, 112, -104,
+ -104, -104, -104, 127, -104, 120, 116, -104, 96, 85,
+ -104, -104, -104, -104, 128, 109, 105, -104, -104, -104,
+ -104, 89, -104, 146, 158, 143, 84, -104, 142, 136,
+ 135, 154, 145, 76, -104, 71, 134, 42, -104, -104,
+ -104, -104, -104, -104, -104, -104, -104, -104, -104, 70,
+ -104, 73, -104, 80, 37, 31, -104, -104, -104, -104,
+ -104, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+ -104, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+ -104, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+ -104, 34, -104, -104, -104, -104, -104, 27, -104, -104,
+ -18, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+ -104, -104, -104, -104, 123, -104, 132, 22, -104, -104,
+ 24, -104, 180, 23, 90, -104, -104, -104, -104, -104,
+ -104, -104, -104, 7, -104, -104, -104, -2, -104, -104,
+ 26, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+ -104, -104, -104, -104, -104, -104, 74, -104, -104, -8,
+ 19, -104, 28, -104, 1, -104, -104, -104, -104, 8,
+ -104, -104, -104, 17, -41, -104, -104, -104, -104, -104,
+ -104, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+ -104, -104, -104, -104, -104, -104, -104, -104, -104, 67,
+ -104, -104, -104, -104, 93, -104, -104, -104, -104, -104,
+ -104, -104, -104, -104, -104, -104, -104, -104, 32, 202,
+ -104, 198, 188, 192, 189, -104, 151, 201, 45, 60,
+ 69, -104, -104, -104, -104, -104, -104, -104, -104, 169,
+ -104, 176, -104, 204, -104, -104, 268, -104, 77, -104,
+ -104, 68, -104, 55, -104, 57, -104, 56, -104, 170,
+ -104, 160, 161, -104, -104, 162, -104, -104, -104, -104,
+ -104, -104, 186, -104, 53, 78, -104, -104, 79, -104,
+ 62, -104, 51, -104, 50, -104, -104, 94, -104, -104,
+ 65, -104, -104, 48, -104, 49, -104, 47, -104, 44,
+ -104, -104, -104, -104, -104, -104, 43, -104, 36, -104,
+ 41, -104, 66, 63, -104, -104, 52, -104, -104, 59,
+ -104, -104, -104, 64, -104, -104, -104, -104, 30, -104,
+ -29, 131, -104, 155, -104, -104, 38, -104, 39, -104,
+ -104, -104, -104, -104, -104, -104, 29, -104, -104, -104,
+ -104, -104, -104, 91, -104, -104, 61, -104, -104, -104,
+ -104, 54, -104, 58, -104, -104, -104, -104, -104, -57,
+ -104, -11, -104, -83, -104, -104, -104, -104, -73, -104,
+ -104, -68, -104, -104, -104, -104, -104, -104, -86, -104,
+ -104, -60, -104, -20, -104, -63, -104, -104, -104, -104,
+ 0, -104, 18, -104, 21, -104, 16, -104, -104, -104,
+ 11, -104, 20, -104, 25, -104, -104, -104, -104, -104,
+ -104, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+ -104, -1, -104, -104, -104, -104, 13, 10, -104, 9,
+ 6, -104, -104, -104, -104, -104, -104, -104, -104, 81,
+ -104, -104, 14, -104, 33, 95, -104, -104, -104, -104,
+ -104, -104, -104, -104, -104, -104, -104, -13, -104, -104,
+ 72, -104, -104, -104};
const int JavaScriptGrammar::action_info [] = {
- 277, 473, -81, -89, -67, -94, -71, 368, 460, -97,
- -70, -92, 193, 409, -100, 338, 355, 345, 332, 292,
- 312, 164, 326, 411, 324, 423, 477, 351, 353, 421,
- 360, 187, 365, 372, 363, 164, 362, 510, 509, 122,
- 32, 33, 94, 512, 551, 502, 360, 7, 2, 545,
- 170, 124, 172, 502, 27, 436, 484, 314, 440, 419,
- 464, 484, 451, 187, 460, 490, 164, 316, 460, 466,
- 122, 124, 206, 473, 477, 368, 460, 429, 450, 434,
- 366, 428, 436, 256, 468, 277, 332, 321, 292, 213,
- 272, 94, 0, 210, 164, 312, 164, 164, 463, 164,
- 0, 164, 164, 0, 81, 81, 164, 447, 454, 164,
- 444, 202, 464, 189, 485, 82, 82, 190, 164, 366,
- 212, 164, 527, 314, 527, 0, 271, 276, 275, 262,
- 261, 530, 267, 266, 513, 433, 432, 269, 268, 514,
- 164, 366, 514, 87, 81, 502, 475, 0, 274, 357,
- 2, 438, 448, 479, 370, 82, 538, 537, 330, 28,
- 85, 0, 486, 269, 268, 81, 200, 502, 60, 165,
- 536, 86, 528, 60, 164, 0, 82, 548, 9, 8,
- 60, 0, 195, 60, 108, 60, 109, 28, 88, 108,
- 0, 109, 494, 0, 89, 0, 334, 110, 0, 0,
- 335, 196, 110, 426, 30, 72, 73, 60, 0, 60,
- 72, 73, 108, 60, 109, 29, 164, 72, 73, 126,
- 72, 73, 72, 73, 60, 110, 60, 255, 254, 87,
- 549, 547, 30, 87, 60, 195, 0, 347, 127, 108,
- 128, 109, 0, 29, 72, 73, 72, 73, 60, 0,
- 72, 73, 110, 108, 196, 109, 197, 0, 0, 0,
- 60, 72, 73, 72, 73, 0, 110, 294, 295, 458,
- 457, 72, 73, 60, 88, 294, 295, 0, 88, 0,
- 89, 96, 97, 0, 89, 72, 73, 96, 97, 60,
- 348, 0, 260, 259, 296, 297, -311, 72, 73, 522,
- 0, 0, 296, 297, 0, 265, 264, 60, 98, 99,
- 72, 73, 0, 0, 98, 99, 299, 300, 0, 60,
- 108, 0, 109, 0, 0, 301, 72, 73, 302, 19,
- 303, 0, 0, 110, 101, 102, 72, 73, 0, 265,
- 264, 0, 103, 104, 72, 73, 105, 0, 106, 0,
- 484, 260, 259, 101, 102, 18, 72, 73, 0, 0,
- 484, 103, 104, 0, 0, 105, 14, 106, 101, 102,
- 0, 522, 14, 0, 0, 0, 103, 104, 15, 0,
- 105, 522, 106, 0, 15, 16, 299, 300, 0, 0,
- 0, 16, 0, 0, 0, 301, 0, 0, 302, 0,
- 303, 19, 0, 0, 0, 0, 0, 0, 72, 73,
- 0, 19, 0, 0, 0, 19, 0, 0, 72, 73,
- 0, 19, 17, 20, 0, 0, 0, 18, 17, 20,
- 21, 14, 0, 0, 14, 0, 21, 18, 0, 13,
- 0, 18, 0, 15, 0, 13, 15, 18, 0, 0,
- 16, 0, 0, 16, 101, 102, 0, 0, 0, 0,
- 0, 0, 103, 104, 0, 0, 105, 0, 106, 0,
- 0, 0, 0, 0, 0, 0, 506, 0, 0, 504,
- 19, 0, 0, 19, 0, 0, 0, 17, 20, 174,
- 17, 20, 0, 0, 0, 21, 0, 0, 21, 175,
- 0, 0, 0, 176, 13, 0, 18, 13, 0, 18,
- 0, 0, 177, 0, 178, 0, 0, 328, 0, 0,
- 0, 0, 174, 0, 0, 179, 0, 180, 85, 0,
- 0, 0, 175, 0, 0, 181, 176, 0, 182, 86,
- 0, 0, 0, 0, 183, 177, 0, 178, 0, 0,
- 184, 0, 0, 0, 0, 0, 0, 0, 179, 0,
- 180, 85, 0, 0, 0, 185, 0, 0, 181, 0,
- 0, 182, 86, 0, 0, 0, 0, 183, 0, 0,
- 0, 0, 0, 184, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 185, 0,
+ 319, 451, 457, 375, -69, 328, 547, 339, -73, -91,
+ -94, 451, 451, 321, 339, -96, 299, 171, -72, 331,
+ 471, 447, 333, 443, 510, 171, 484, 367, -99, -102,
+ 372, 430, 428, 416, 480, 511, 426, 370, 497, 418,
+ 379, 369, 352, 458, 362, 491, 284, -83, 278, 467,
+ 473, 467, 360, 467, 435, 367, 217, 194, 200, 373,
+ 358, 2, 553, 279, 441, 436, 2, 220, 194, 101,
+ 40, 213, 491, 177, 101, 284, 467, 480, 484, 513,
+ 443, 375, 171, 475, 299, 323, 14, 14, 263, 11,
+ 39, 516, 219, 492, 129, 0, 529, 373, 209, 517,
+ 532, 454, 171, 171, 171, 171, 529, 179, 517, 373,
+ 0, 171, 461, 171, 470, 34, 0, 129, 319, 88,
+ 88, 7, 196, 14, 171, 171, 197, 345, 471, 171,
+ 89, 89, 276, 275, 171, 14, 171, 131, 171, 440,
+ 439, 493, 276, 275, 538, 321, 455, 540, 539, 92,
+ 172, 207, 94, 88, 530, 0, 501, 377, 0, 202,
+ 93, 283, 282, 364, 89, 269, 268, 274, 273, 341,
+ 9, 8, 88, 342, 0, 67, 337, 281, 203, 67,
+ 204, 482, 115, 89, 116, 115, 486, 116, 445, 0,
+ 94, 465, 464, 0, 115, 117, 116, 95, 117, 94,
+ 0, 35, 115, 96, 116, 67, 115, 117, 116, 202,
+ 0, 354, 79, 80, 550, 117, 79, 80, 115, 117,
+ 116, 115, 0, 116, 115, 115, 116, 116, 203, 0,
+ 433, 117, 133, 67, 117, 95, 67, 117, 117, 67,
+ 0, 96, 79, 80, 95, 67, 37, 67, 171, 67,
+ 96, 134, 67, 135, 67, 35, 115, 36, 116, 0,
+ 0, 67, 0, 0, 355, 0, 0, 551, 549, 117,
+ 79, 80, 0, 79, 80, 0, 79, 80, 301, 302,
+ 0, 67, 79, 80, 79, 80, 79, 80, -313, 79,
+ 80, 79, 80, 0, 115, 67, 116, 0, 79, 80,
+ 37, 262, 261, 301, 302, 303, 304, 117, 21, 0,
+ 67, 36, 306, 307, 0, 0, 0, 0, 79, 80,
+ 0, 308, 0, 0, 309, 0, 310, 272, 271, 0,
+ 303, 304, 79, 80, 0, 0, 0, 0, 25, 0,
+ 306, 307, 267, 266, 0, 79, 80, 79, 80, 308,
+ 0, 0, 309, 67, 310, 0, 306, 307, 0, 0,
+ 103, 104, 306, 307, 24, 308, 67, 0, 309, 0,
+ 310, 308, 0, 0, 309, 0, 310, 0, 0, 0,
+ 0, 0, 0, 0, 0, 272, 271, 105, 106, 0,
+ 79, 80, 491, 108, 109, 0, 0, 0, 267, 266,
+ 0, 110, 111, 79, 80, 112, 0, 113, 108, 109,
+ 0, 0, 0, 21, 491, 0, 110, 111, 108, 109,
+ 112, 0, 113, 0, 0, 19, 110, 111, 0, 0,
+ 112, 0, 113, 306, 307, 21, 0, 20, 0, 0,
+ 0, 0, 308, 25, 21, 309, 0, 310, 19, 0,
+ 79, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 20, 0, 0, 0, 0, 25, 0, 21, 0, 24,
+ 514, 0, 79, 80, 25, 0, 0, 0, 0, 0,
+ 0, 22, 26, 0, 0, 0, 0, 0, 0, 27,
+ 0, 24, 0, 23, 0, 0, 0, 25, 18, 0,
+ 24, 108, 109, 0, 22, 26, 181, 0, 0, 110,
+ 111, 0, 27, 112, 0, 113, 182, 0, 0, 0,
+ 183, 18, 0, 24, 0, 0, 0, 0, 0, 184,
+ 0, 185, 0, 0, 335, 0, 0, 0, 0, 0,
+ 0, 0, 186, 0, 187, 92, 0, 0, 0, 0,
+ 0, 0, 188, 0, 0, 189, 93, 0, 0, 0,
+ 0, 190, 0, 0, 0, 0, 0, 191, 0, 181,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 0, 192, 183, 0, 0, 0, 0, 0, 0,
+ 0, 0, 184, 0, 185, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 186, 0, 187, 92, 0,
+ 0, 0, 0, 0, 0, 188, 0, 0, 189, 93,
+ 0, 0, 0, 0, 190, 0, 0, 0, 0, 0,
+ 191, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 192, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 63, 64, 0,
+ 0, 0, 0, 0, 0, 0, 0, 66, 0, 0,
+ 0, 0, 0, 0, 67, 0, 0, 0, 68, 69,
+ 0, 70, 0, 0, 0, 0, 0, 0, 73, 0,
+ 0, 0, 76, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 56, 57, 0, 0, 0, 0, 0, 0, 0, 0,
- 59, 0, 0, 0, 0, 0, 0, 60, 0, 0,
- 0, 61, 62, 0, 63, 0, 0, 0, 0, 0,
- 0, 66, 0, 0, 0, 69, 0, 0, 0, 0,
+ 81, 79, 80, 0, 82, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 75, 84, 65, 0, 0,
+ 0, 0, 0, 0, 0, 0, 62, 63, 64, 0,
+ 0, 0, 0, 0, 0, 0, 0, 66, 0, 0,
+ 0, 0, 0, 0, 67, 0, 0, 0, 68, 69,
+ 0, 70, 0, 0, 0, 71, 0, 72, 73, 74,
+ 0, 0, 76, 0, 0, 0, 77, 0, 78, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 74, 72, 73, 0, 75, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 68, 77,
- 58, 0, 0, 0, 0, 0, 0, 0, 0, 55,
- 56, 57, 0, 0, 0, 0, 0, 0, 0, 0,
- 59, 0, 0, 0, 0, 0, 0, 60, 0, 0,
- 0, 61, 62, 0, 63, 0, 0, 0, 64, 0,
- 65, 66, 67, 0, 0, 69, 0, 0, 0, 70,
- 0, 71, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 74, 72, 73, 0, 75, 0, 76,
- 0, 78, 0, 79, 0, 0, 0, 0, 68, 77,
- 58, 0, 0, 0, 0, 0, 0, 0, 0, -90,
- 0, 0, 0, 55, 56, 57, 0, 0, 0, 0,
- 0, 0, 0, 0, 59, 0, 0, 0, 0, 0,
- 0, 60, 0, 0, 0, 61, 62, 0, 63, 0,
- 0, 0, 64, 0, 65, 66, 67, 0, 0, 69,
- 0, 0, 0, 70, 0, 71, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 74, 72, 73,
- 0, 75, 0, 76, 0, 78, 0, 79, 0, 0,
- 0, 0, 68, 77, 58, 0, 0, 0, 0, 0,
- 0, 0, 0, 55, 56, 57, 0, 0, 0, 0,
- 0, 0, 0, 0, 59, 0, 0, 0, 0, 0,
- 0, 60, 0, 0, 0, 61, 62, 0, 63, 0,
- 0, 0, 64, 0, 65, 66, 67, 0, 0, 69,
- 0, 0, 0, 70, 0, 71, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 74, 72, 73,
- 0, 75, 0, 76, 0, 78, 291, 79, 0, 0,
- 0, 0, 68, 77, 58, 0, 0, 0, 0, 0,
- 0, 0, 0, 55, 56, 57, 0, 0, 0, 0,
- 0, 0, 0, 0, 59, 0, 0, 0, 0, 0,
- 0, 60, 0, 0, 0, 61, 62, 0, 63, 0,
- 0, 0, 64, 0, 65, 66, 67, 0, 0, 69,
- 0, 0, 0, 70, 0, 71, 0, 0, 492, 0,
- 0, 0, 0, 0, 0, 0, 0, 74, 72, 73,
- 0, 75, 0, 76, 0, 78, 0, 79, 0, 0,
- 0, 0, 68, 77, 58, 0, 0, 0, 0, 0,
- 0, 0, 0, 55, 56, 57, 0, 0, 0, 0,
- 0, 0, 0, 0, 59, 0, 0, 0, 0, 0,
- 0, 60, 0, 0, 0, 61, 62, 0, 63, 0,
- 0, 0, 64, 0, 65, 66, 67, 0, 0, 69,
- 0, 0, 0, 70, 0, 71, 0, 0, 489, 0,
- 0, 0, 0, 0, 0, 0, 0, 74, 72, 73,
- 0, 75, 0, 76, 0, 78, 0, 79, 0, 0,
- 0, 0, 68, 77, 58, 0, 0, 0, 0, 0,
- 0, 0, 0, 132, 133, 134, 0, 0, 136, 138,
- 139, 0, 0, 140, 0, 141, 0, 0, 0, 143,
- 144, 145, 0, 0, 0, 0, 0, 0, 60, 146,
- 147, 148, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 149, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 152, 0,
- 0, 0, 0, 0, 0, 72, 73, 153, 154, 155,
- 0, 157, 158, 159, 160, 161, 162, 0, 0, 150,
- 156, 142, 135, 137, 151, 0, 0, 0, 0, 0,
- 132, 133, 134, 0, 0, 136, 138, 139, 0, 0,
- 140, 0, 141, 0, 0, 0, 143, 144, 145, 0,
- 0, 0, 0, 0, 0, 413, 146, 147, 148, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 149,
- 0, 0, 0, 414, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 152, 0, 0, 0, 0,
- 0, 418, 415, 417, 153, 154, 155, 0, 157, 158,
- 159, 160, 161, 162, 0, 0, 150, 156, 142, 135,
- 137, 151, 0, 0, 0, 0, 0, 132, 133, 134,
- 0, 0, 136, 138, 139, 0, 0, 140, 0, 141,
- 0, 0, 0, 143, 144, 145, 0, 0, 0, 0,
- 0, 0, 413, 146, 147, 148, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 149, 0, 0, 0,
- 414, 0, 0, 0, 0, 0, 0, 0, 416, 0,
- 0, 0, 152, 0, 0, 0, 0, 0, 418, 415,
- 417, 153, 154, 155, 0, 157, 158, 159, 160, 161,
- 162, 0, 0, 150, 156, 142, 135, 137, 151, 0,
- 0, 0, 0, 0, 232, 0, 0, 0, 0, 233,
- 0, 55, 56, 57, 235, 0, 0, 0, 0, 0,
- 0, 236, 59, 0, 0, 0, 0, 0, 0, 238,
- 239, 0, 0, 240, 62, 0, 63, 0, 0, 0,
- 64, 0, 65, 66, 67, 0, 0, 69, 0, 0,
- 0, 70, 0, 71, 0, 0, 0, 0, 0, 242,
- 0, 243, 0, 0, 0, 74, 241, 244, 245, 75,
- 246, 76, 247, 78, 21, 79, 248, 249, 0, 0,
- 68, 77, 58, 13, 234, 0, 0, 0, 0, 0,
- 0, 232, 0, 0, 0, 0, 233, 0, 55, 56,
- 57, 235, 0, 0, 0, 0, 0, 0, 236, 237,
- 0, 0, 0, 0, 0, 0, 238, 239, 0, 0,
- 240, 62, 0, 63, 0, 0, 0, 64, 0, 65,
- 66, 67, 0, 0, 69, 0, 0, 0, 70, 0,
- 71, 0, 0, 0, 0, 0, 242, 0, 243, 0,
- 0, 0, 74, 241, 244, 245, 75, 246, 76, 247,
- 78, 21, 79, 248, 249, 0, 0, 68, 77, 58,
- 13, 234, 0, 0, 0, 0, 0, 0, 232, 0,
- 0, 0, 0, 233, 0, 55, 56, 57, 235, 0,
- 0, 0, 0, 0, 0, 236, 59, 0, 0, 0,
- 0, 0, 0, 532, 239, 0, 0, 240, 533, 0,
- 63, 0, 0, 0, 64, 0, 65, 66, 67, 0,
- 0, 69, 0, 0, 0, 70, 0, 71, 0, 0,
- 0, 0, 0, 242, 0, 243, 0, 0, 0, 74,
- 241, 244, 245, 75, 246, 76, 247, 78, 21, 79,
- 248, 249, 0, 0, 68, 77, 58, 13, 234, 0,
- 0, 0, 0, 0, 0, 232, 0, 0, 0, 0,
- 233, 0, 55, 56, 57, 235, 0, 0, 0, 0,
- 0, 0, 236, 59, 0, 0, 0, 0, 0, 0,
- 516, 239, 0, 0, 240, 517, 0, 63, 0, 0,
- 0, 64, 0, 65, 66, 67, 0, 0, 69, 0,
- 0, 0, 70, 0, 71, 0, 0, 0, 0, 0,
- 242, 0, 243, 0, 0, 0, 74, 241, 244, 245,
- 75, 246, 76, 247, 78, 21, 79, 248, 249, 0,
- 0, 68, 77, 58, 13, 234, 0, 518, 0, 0,
- 0, 0, 381, 133, 134, 0, 0, 383, 138, 385,
- 56, 57, 386, 0, 141, 0, 0, 0, 143, 388,
- 389, 0, 0, 0, 0, 0, 0, 390, 391, 147,
- 148, 240, 62, 0, 63, 0, 0, 0, 64, 0,
- 65, 392, 67, 0, 0, 394, 0, 0, 0, 70,
- 0, 71, 0, -236, 0, 0, 0, 396, 0, 243,
- 0, 0, 0, 398, 395, 397, 399, 400, 401, 76,
- 403, 404, 405, 406, 407, 408, 0, 0, 393, 402,
- 387, 382, 384, 151, 0, 0, 0, 0, 0,
+ 81, 79, 80, 0, 82, 0, 83, 0, 85, 0,
+ 86, 0, 0, 0, 0, 75, 84, 65, 0, 0,
+ 0, 0, 0, 0, 0, 0, 62, 63, 64, 0,
+ 0, 0, 0, 0, 0, 0, 0, 66, 0, 0,
+ 0, 0, 0, 0, 67, 0, 0, 0, 68, 69,
+ 0, 70, 0, 0, 0, 71, 0, 72, 73, 74,
+ 0, 0, 76, 0, 0, 0, 77, 0, 78, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 81, 79, 80, 0, 82, 0, 83, 0, 85, 298,
+ 86, 0, 0, 0, 0, 75, 84, 65, 0, 0,
+ 0, 0, 0, 0, 0, 0, -92, 0, 0, 0,
+ 62, 63, 64, 0, 0, 0, 0, 0, 0, 0,
+ 0, 66, 0, 0, 0, 0, 0, 0, 67, 0,
+ 0, 0, 68, 69, 0, 70, 0, 0, 0, 71,
+ 0, 72, 73, 74, 0, 0, 76, 0, 0, 0,
+ 77, 0, 78, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 81, 79, 80, 0, 82, 0,
+ 83, 0, 85, 0, 86, 0, 0, 0, 0, 75,
+ 84, 65, 0, 0, 0, 0, 0, 0, 0, 0,
+ 62, 63, 64, 0, 0, 0, 0, 0, 0, 0,
+ 0, 66, 0, 0, 0, 0, 0, 0, 67, 0,
+ 0, 0, 68, 69, 0, 70, 0, 0, 0, 71,
+ 0, 72, 73, 74, 0, 0, 76, 0, 0, 0,
+ 77, 0, 78, 0, 0, 496, 0, 0, 0, 0,
+ 0, 0, 0, 0, 81, 79, 80, 0, 82, 0,
+ 83, 0, 85, 0, 86, 0, 0, 0, 0, 75,
+ 84, 65, 0, 0, 0, 0, 0, 0, 0, 0,
+ 62, 63, 64, 0, 0, 0, 0, 0, 0, 0,
+ 0, 66, 0, 0, 0, 0, 0, 0, 67, 0,
+ 0, 0, 68, 69, 0, 70, 0, 0, 0, 71,
+ 0, 72, 73, 74, 0, 0, 76, 0, 0, 0,
+ 77, 0, 78, 0, 0, 499, 0, 0, 0, 0,
+ 0, 0, 0, 0, 81, 79, 80, 0, 82, 0,
+ 83, 0, 85, 0, 86, 0, 0, 0, 0, 75,
+ 84, 65, 0, 0, 0, 0, 0, 0, 0, 0,
+ 139, 140, 141, 0, 0, 143, 145, 146, 0, 0,
+ 147, 0, 148, 0, 0, 0, 150, 151, 152, 0,
+ 0, 0, 0, 0, 0, 67, 153, 154, 155, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 156,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 159, 0, 0, 0, 0,
+ 0, 0, 79, 80, 160, 161, 162, 0, 164, 165,
+ 166, 167, 168, 169, 0, 0, 157, 163, 149, 142,
+ 144, 158, 0, 0, 0, 0, 0, 139, 140, 141,
+ 0, 0, 143, 145, 146, 0, 0, 147, 0, 148,
+ 0, 0, 0, 150, 151, 152, 0, 0, 0, 0,
+ 0, 0, 420, 153, 154, 155, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 156, 0, 0, 0,
+ 421, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 159, 0, 0, 0, 0, 0, 425, 422,
+ 424, 160, 161, 162, 0, 164, 165, 166, 167, 168,
+ 169, 0, 0, 157, 163, 149, 142, 144, 158, 0,
+ 0, 0, 0, 0, 139, 140, 141, 0, 0, 143,
+ 145, 146, 0, 0, 147, 0, 148, 0, 0, 0,
+ 150, 151, 152, 0, 0, 0, 0, 0, 0, 420,
+ 153, 154, 155, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 156, 0, 0, 0, 421, 0, 0,
+ 0, 0, 0, 0, 0, 423, 0, 0, 0, 159,
+ 0, 0, 0, 0, 0, 425, 422, 424, 160, 161,
+ 162, 0, 164, 165, 166, 167, 168, 169, 0, 0,
+ 157, 163, 149, 142, 144, 158, 0, 0, 0, 0,
+ 0, 239, 0, 0, 0, 0, 240, 0, 62, 63,
+ 64, 242, 0, 0, 0, 0, 0, 0, 243, 66,
+ 0, 0, 0, 0, 0, 0, 245, 246, 0, 0,
+ 247, 69, 0, 70, 0, 0, 0, 71, 0, 72,
+ 73, 74, 0, 0, 76, 0, 0, 0, 77, 0,
+ 78, 0, 0, 0, 0, 0, 249, 0, 250, 0,
+ 0, 0, 81, 248, 251, 252, 82, 253, 83, 254,
+ 85, 27, 86, 255, 256, 0, 0, 75, 84, 65,
+ 18, 241, 0, 0, 0, 0, 0, 0, 239, 0,
+ 0, 0, 0, 240, 0, 62, 63, 64, 242, 0,
+ 0, 0, 0, 0, 0, 243, 244, 0, 0, 0,
+ 0, 0, 0, 245, 246, 0, 0, 247, 69, 0,
+ 70, 0, 0, 0, 71, 0, 72, 73, 74, 0,
+ 0, 76, 0, 0, 0, 77, 0, 78, 0, 0,
+ 0, 0, 0, 249, 0, 250, 0, 0, 0, 81,
+ 248, 251, 252, 82, 253, 83, 254, 85, 27, 86,
+ 255, 256, 0, 0, 75, 84, 65, 18, 241, 0,
+ 0, 0, 0, 0, 0, 239, 0, 0, 0, 0,
+ 240, 0, 62, 63, 64, 242, 0, 0, 0, 0,
+ 0, 0, 243, 66, 0, 0, 0, 0, 0, 0,
+ 534, 246, 0, 0, 247, 535, 0, 70, 0, 0,
+ 0, 71, 0, 72, 73, 74, 0, 0, 76, 0,
+ 0, 0, 77, 0, 78, 0, 0, 0, 0, 0,
+ 249, 0, 250, 0, 0, 0, 81, 248, 251, 252,
+ 82, 253, 83, 254, 85, 27, 86, 255, 256, 0,
+ 0, 75, 84, 65, 18, 241, 0, 0, 0, 0,
+ 0, 0, 239, 0, 0, 0, 0, 240, 0, 62,
+ 63, 64, 242, 0, 0, 0, 0, 0, 0, 243,
+ 66, 0, 0, 0, 0, 0, 0, 519, 246, 0,
+ 0, 247, 520, 0, 70, 0, 0, 0, 71, 0,
+ 72, 73, 74, 0, 0, 76, 0, 0, 0, 77,
+ 0, 78, 0, 0, 0, 0, 0, 249, 0, 250,
+ 0, 0, 0, 81, 248, 251, 252, 82, 253, 83,
+ 254, 85, 27, 86, 255, 256, 0, 0, 75, 84,
+ 65, 18, 241, 0, 521, 0, 0, 0, 0, 388,
+ 140, 141, 0, 0, 390, 145, 392, 63, 64, 393,
+ 0, 148, 0, 0, 0, 150, 395, 396, 0, 0,
+ 0, 0, 0, 0, 397, 398, 154, 155, 247, 69,
+ 0, 70, 0, 0, 0, 71, 0, 72, 399, 74,
+ 0, 0, 401, 0, 0, 0, 77, 0, 78, 0,
+ -238, 0, 0, 0, 403, 0, 250, 0, 0, 0,
+ 405, 402, 404, 406, 407, 408, 83, 410, 411, 412,
+ 413, 414, 415, 0, 0, 400, 409, 394, 389, 391,
+ 158, 0, 0, 0, 0, 0,
- 455, 534, 521, 452, 493, 199, 465, 173, 488, 539,
- 42, 445, 359, 322, 211, 209, 449, 470, 31, 480,
- 273, 531, 487, 192, 491, 194, 511, 540, 476, 515,
- 467, 469, 456, 526, 459, 474, 205, 420, 435, 10,
- 412, 163, 373, 169, 371, 546, 410, 369, 205, 270,
- 322, 166, 171, 422, 456, 258, 263, 367, 430, 270,
- 331, 340, 327, 329, 358, 459, 186, 437, 263, 453,
- 354, 501, 0, 356, 258, 0, 83, 340, 540, 169,
- 26, 12, 209, 322, 525, 322, 201, 322, 123, 0,
- 322, 424, 12, 0, 425, 129, 83, 0, 203, 230,
- 83, 83, 223, 0, 131, 113, 83, 0, 83, 0,
- 125, 84, 121, 478, 83, 83, 497, 498, 83, 424,
- 83, 0, 425, 83, 100, 496, 119, 323, 83, 325,
- 83, 350, 495, 308, 352, 83, 83, 499, 471, 0,
- 550, 349, 83, 83, 472, 90, 83, 169, 91, 83,
- 83, 500, 92, 83, 427, 83, 0, 83, 361, 120,
- 107, 111, 83, 83, 83, 471, 83, 304, 112, 93,
- 83, 83, 83, 83, 83, 307, 305, 306, 83, 83,
- 83, 286, 83, 116, 114, 115, 290, 117, 188, 191,
- 83, 83, 472, 203, 83, 535, 83, 0, 525, 118,
- 83, 290, 529, 0, 525, 318, 12, 0, 95, 83,
- 290, 0, 12, 336, 290, 83, 230, 0, 318, 223,
- 290, 0, 313, 290, 318, 318, 315, 317, 83, 290,
- 290, 83, 83, 290, 505, 0, 290, 290, 311, 310,
- 320, 507, 0, 333, 507, 0, 339, 346, 129, 26,
- 12, 0, 26, 12, 318, 26, 12, 131, 198, 290,
- 83, 83, 0, 0, 0, 290, 290, 230, 309, 293,
- 223, 0, 83, 0, 0, 0, 337, 290, 0, 298,
+ 474, 476, 10, 500, 477, 459, 460, 456, 193, 472,
+ 462, 12, 265, 548, 212, 180, 512, 481, 218, 38,
+ 524, 366, 542, 466, 508, 329, 17, 216, 518, 533,
+ 541, 487, 49, 483, 463, 466, 452, 498, 485, 270,
+ 206, 237, 494, 277, 536, 0, 0, 463, 199, 0,
+ 201, 495, 347, 178, 170, 427, 265, 176, 429, 380,
+ 173, 270, 378, 374, 417, 365, 376, 419, 363, 442,
+ 334, 338, 212, 347, 336, 444, 437, 361, 277, 90,
+ 237, 329, 90, 120, 280, 329, 0, 313, 0, 237,
+ 431, 531, 542, 432, 329, 329, 329, 90, 0, 0,
+ 136, 17, 314, 90, 537, 210, 90, 90, 90, 138,
+ 90, 315, 118, 90, 216, 17, 176, 176, 125, 130,
+ 132, 90, 90, 208, 434, 100, 90, 128, 431, 332,
+ 293, 432, 0, 90, 102, 297, 91, 356, 330, 357,
+ 359, 90, 90, 210, 99, 90, 90, 505, 98, 90,
+ 90, 506, 504, 90, 552, 479, 90, 90, 503, 478,
+ 90, 90, 371, 502, 90, 90, 507, 97, 90, 90,
+ 478, 90, 90, 90, 195, 119, 264, 122, 121, 90,
+ 90, 0, 90, 90, 114, 198, 127, 124, 90, 107,
+ 368, 90, 90, 311, 479, 90, 123, 90, 325, 325,
+ 136, 126, 297, 297, 297, 0, 90, 90, 0, 138,
+ 205, 297, 297, 90, 343, 0, 0, 0, 297, 320,
+ 344, 346, 340, 325, 322, 90, 90, 0, 297, 90,
+ 297, 297, 316, 318, 297, 90, 317, 0, 90, 90,
+ 297, 325, 305, 312, 297, 353, 297, 28, 300, 0,
+ 0, 0, 28, 31, 515, 0, 0, 0, 31, 16,
+ 33, 17, 0, 324, 16, 33, 17, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 364, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 325, 0, 0, 0, 0,
+ 297, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 327, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 257, 0};
+ 0, 0};
const int JavaScriptGrammar::action_check [] = {
- 36, 36, 7, 7, 7, 7, 7, 36, 33, 7,
- 7, 7, 7, 7, 7, 7, 31, 17, 2, 1,
- 48, 8, 60, 8, 61, 55, 36, 61, 60, 55,
- 36, 2, 55, 16, 33, 8, 60, 7, 29, 48,
- 29, 7, 1, 29, 0, 33, 36, 65, 88, 17,
- 8, 78, 60, 33, 66, 36, 8, 78, 33, 7,
- 20, 8, 7, 2, 33, 8, 8, 8, 33, 36,
- 48, 78, 36, 36, 36, 36, 33, 7, 55, 7,
- 7, 60, 36, 55, 60, 36, 2, 61, 1, 33,
- 36, 1, -1, 8, 8, 48, 8, 8, 6, 8,
- -1, 8, 8, -1, 40, 40, 8, 10, 7, 8,
- 5, 60, 20, 50, 8, 51, 51, 54, 8, 7,
- 60, 8, 8, 78, 8, -1, 76, 61, 62, 61,
- 62, 7, 61, 62, 7, 61, 62, 61, 62, 15,
- 8, 7, 15, 12, 40, 33, 60, -1, 60, 60,
- 88, 60, 55, 60, 60, 51, 61, 62, 60, 29,
- 42, -1, 56, 61, 62, 40, 56, 33, 29, 56,
- 56, 53, 56, 29, 8, -1, 51, 8, 61, 62,
- 29, -1, 15, 29, 25, 29, 27, 29, 57, 25,
- -1, 27, 60, -1, 63, -1, 50, 38, -1, -1,
- 54, 34, 38, 36, 74, 66, 67, 29, -1, 29,
- 66, 67, 25, 29, 27, 85, 8, 66, 67, 15,
- 66, 67, 66, 67, 29, 38, 29, 61, 62, 12,
- 61, 62, 74, 12, 29, 15, -1, 8, 34, 25,
- 36, 27, -1, 85, 66, 67, 66, 67, 29, -1,
- 66, 67, 38, 25, 34, 27, 36, -1, -1, -1,
- 29, 66, 67, 66, 67, -1, 38, 18, 19, 61,
- 62, 66, 67, 29, 57, 18, 19, -1, 57, -1,
- 63, 18, 19, -1, 63, 66, 67, 18, 19, 29,
- 61, -1, 61, 62, 45, 46, 36, 66, 67, 29,
- -1, -1, 45, 46, -1, 61, 62, 29, 45, 46,
- 66, 67, -1, -1, 45, 46, 23, 24, -1, 29,
- 25, -1, 27, -1, -1, 32, 66, 67, 35, 59,
- 37, -1, -1, 38, 23, 24, 66, 67, -1, 61,
- 62, -1, 31, 32, 66, 67, 35, -1, 37, -1,
- 8, 61, 62, 23, 24, 85, 66, 67, -1, -1,
- 8, 31, 32, -1, -1, 35, 10, 37, 23, 24,
- -1, 29, 10, -1, -1, -1, 31, 32, 22, -1,
- 35, 29, 37, -1, 22, 29, 23, 24, -1, -1,
- -1, 29, -1, -1, -1, 32, -1, -1, 35, -1,
- 37, 59, -1, -1, -1, -1, -1, -1, 66, 67,
- -1, 59, -1, -1, -1, 59, -1, -1, 66, 67,
- -1, 59, 66, 67, -1, -1, -1, 85, 66, 67,
- 74, 10, -1, -1, 10, -1, 74, 85, -1, 83,
- -1, 85, -1, 22, -1, 83, 22, 85, -1, -1,
- 29, -1, -1, 29, 23, 24, -1, -1, -1, -1,
- -1, -1, 31, 32, -1, -1, 35, -1, 37, -1,
- -1, -1, -1, -1, -1, -1, 55, -1, -1, 55,
- 59, -1, -1, 59, -1, -1, -1, 66, 67, 3,
- 66, 67, -1, -1, -1, 74, -1, -1, 74, 13,
- -1, -1, -1, 17, 83, -1, 85, 83, -1, 85,
- -1, -1, 26, -1, 28, -1, -1, 31, -1, -1,
- -1, -1, 3, -1, -1, 39, -1, 41, 42, -1,
- -1, -1, 13, -1, -1, 49, 17, -1, 52, 53,
- -1, -1, -1, -1, 58, 26, -1, 28, -1, -1,
- 64, -1, -1, -1, -1, -1, -1, -1, 39, -1,
- 41, 42, -1, -1, -1, 79, -1, -1, 49, -1,
- -1, 52, 53, -1, -1, -1, -1, 58, -1, -1,
- -1, -1, -1, 64, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 79, -1,
+ 48, 5, 55, 36, 7, 61, 17, 2, 7, 7,
+ 7, 5, 5, 78, 2, 7, 1, 8, 7, 61,
+ 20, 33, 60, 36, 29, 8, 36, 36, 7, 7,
+ 55, 55, 55, 7, 36, 7, 7, 33, 8, 8,
+ 16, 60, 17, 7, 31, 8, 36, 7, 76, 33,
+ 36, 33, 60, 33, 60, 36, 8, 2, 7, 7,
+ 61, 88, 0, 36, 7, 7, 88, 33, 2, 1,
+ 7, 36, 8, 8, 1, 36, 33, 36, 36, 29,
+ 36, 36, 8, 60, 1, 8, 33, 33, 55, 29,
+ 29, 7, 60, 8, 48, -1, 8, 7, 60, 15,
+ 7, 10, 8, 8, 8, 8, 8, 60, 15, 7,
+ -1, 8, 7, 8, 6, 66, -1, 48, 48, 40,
+ 40, 65, 50, 33, 8, 8, 54, 7, 20, 8,
+ 51, 51, 61, 62, 8, 33, 8, 78, 8, 61,
+ 62, 56, 61, 62, 56, 78, 55, 61, 62, 42,
+ 56, 56, 12, 40, 56, -1, 60, 60, -1, 15,
+ 53, 61, 62, 60, 51, 61, 62, 61, 62, 50,
+ 61, 62, 40, 54, -1, 29, 60, 60, 34, 29,
+ 36, 60, 25, 51, 27, 25, 60, 27, 60, -1,
+ 12, 61, 62, -1, 25, 38, 27, 57, 38, 12,
+ -1, 29, 25, 63, 27, 29, 25, 38, 27, 15,
+ -1, 8, 66, 67, 8, 38, 66, 67, 25, 38,
+ 27, 25, -1, 27, 25, 25, 27, 27, 34, -1,
+ 36, 38, 15, 29, 38, 57, 29, 38, 38, 29,
+ -1, 63, 66, 67, 57, 29, 74, 29, 8, 29,
+ 63, 34, 29, 36, 29, 29, 25, 85, 27, -1,
+ -1, 29, -1, -1, 61, -1, -1, 61, 62, 38,
+ 66, 67, -1, 66, 67, -1, 66, 67, 18, 19,
+ -1, 29, 66, 67, 66, 67, 66, 67, 36, 66,
+ 67, 66, 67, -1, 25, 29, 27, -1, 66, 67,
+ 74, 61, 62, 18, 19, 45, 46, 38, 29, -1,
+ 29, 85, 23, 24, -1, -1, -1, -1, 66, 67,
+ -1, 32, -1, -1, 35, -1, 37, 61, 62, -1,
+ 45, 46, 66, 67, -1, -1, -1, -1, 59, -1,
+ 23, 24, 61, 62, -1, 66, 67, 66, 67, 32,
+ -1, -1, 35, 29, 37, -1, 23, 24, -1, -1,
+ 18, 19, 23, 24, 85, 32, 29, -1, 35, -1,
+ 37, 32, -1, -1, 35, -1, 37, -1, -1, -1,
+ -1, -1, -1, -1, -1, 61, 62, 45, 46, -1,
+ 66, 67, 8, 23, 24, -1, -1, -1, 61, 62,
+ -1, 31, 32, 66, 67, 35, -1, 37, 23, 24,
+ -1, -1, -1, 29, 8, -1, 31, 32, 23, 24,
+ 35, -1, 37, -1, -1, 10, 31, 32, -1, -1,
+ 35, -1, 37, 23, 24, 29, -1, 22, -1, -1,
+ -1, -1, 32, 59, 29, 35, -1, 37, 10, -1,
+ 66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
+ 22, -1, -1, -1, -1, 59, -1, 29, -1, 85,
+ 55, -1, 66, 67, 59, -1, -1, -1, -1, -1,
+ -1, 66, 67, -1, -1, -1, -1, -1, -1, 74,
+ -1, 85, -1, 55, -1, -1, -1, 59, 83, -1,
+ 85, 23, 24, -1, 66, 67, 3, -1, -1, 31,
+ 32, -1, 74, 35, -1, 37, 13, -1, -1, -1,
+ 17, 83, -1, 85, -1, -1, -1, -1, -1, 26,
+ -1, 28, -1, -1, 31, -1, -1, -1, -1, -1,
+ -1, -1, 39, -1, 41, 42, -1, -1, -1, -1,
+ -1, -1, 49, -1, -1, 52, 53, -1, -1, -1,
+ -1, 58, -1, -1, -1, -1, -1, 64, -1, 3,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 13,
+ -1, -1, 79, 17, -1, -1, -1, -1, -1, -1,
+ -1, -1, 26, -1, 28, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 39, -1, 41, 42, -1,
+ -1, -1, -1, -1, -1, 49, -1, -1, 52, 53,
+ -1, -1, -1, -1, 58, -1, -1, -1, -1, -1,
+ 64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 79, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 12, 13, -1,
+ -1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
+ -1, -1, -1, -1, 29, -1, -1, -1, 33, 34,
+ -1, 36, -1, -1, -1, -1, -1, -1, 43, -1,
+ -1, -1, 47, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
- 22, -1, -1, -1, -1, -1, -1, 29, -1, -1,
- -1, 33, 34, -1, 36, -1, -1, -1, -1, -1,
- -1, 43, -1, -1, -1, 47, -1, -1, -1, -1,
+ 65, 66, 67, -1, 69, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 80, 81, 82, -1, -1,
+ -1, -1, -1, -1, -1, -1, 11, 12, 13, -1,
+ -1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
+ -1, -1, -1, -1, 29, -1, -1, -1, 33, 34,
+ -1, 36, -1, -1, -1, 40, -1, 42, 43, 44,
+ -1, -1, 47, -1, -1, -1, 51, -1, 53, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 65, 66, 67, -1, 69, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 80, 81,
- 82, -1, -1, -1, -1, -1, -1, -1, -1, 11,
- 12, 13, -1, -1, -1, -1, -1, -1, -1, -1,
- 22, -1, -1, -1, -1, -1, -1, 29, -1, -1,
- -1, 33, 34, -1, 36, -1, -1, -1, 40, -1,
- 42, 43, 44, -1, -1, 47, -1, -1, -1, 51,
- -1, 53, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 65, 66, 67, -1, 69, -1, 71,
- -1, 73, -1, 75, -1, -1, -1, -1, 80, 81,
- 82, -1, -1, -1, -1, -1, -1, -1, -1, 7,
- -1, -1, -1, 11, 12, 13, -1, -1, -1, -1,
- -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
- -1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
- -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
- -1, -1, -1, 51, -1, 53, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
- -1, 69, -1, 71, -1, 73, -1, 75, -1, -1,
- -1, -1, 80, 81, 82, -1, -1, -1, -1, -1,
- -1, -1, -1, 11, 12, 13, -1, -1, -1, -1,
- -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
- -1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
- -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
- -1, -1, -1, 51, -1, 53, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
- -1, 69, -1, 71, -1, 73, 74, 75, -1, -1,
- -1, -1, 80, 81, 82, -1, -1, -1, -1, -1,
- -1, -1, -1, 11, 12, 13, -1, -1, -1, -1,
- -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
- -1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
- -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
- -1, -1, -1, 51, -1, 53, -1, -1, 56, -1,
- -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
- -1, 69, -1, 71, -1, 73, -1, 75, -1, -1,
- -1, -1, 80, 81, 82, -1, -1, -1, -1, -1,
- -1, -1, -1, 11, 12, 13, -1, -1, -1, -1,
- -1, -1, -1, -1, 22, -1, -1, -1, -1, -1,
- -1, 29, -1, -1, -1, 33, 34, -1, 36, -1,
- -1, -1, 40, -1, 42, 43, 44, -1, -1, 47,
- -1, -1, -1, 51, -1, 53, -1, -1, 56, -1,
- -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
- -1, 69, -1, 71, -1, 73, -1, 75, -1, -1,
- -1, -1, 80, 81, 82, -1, -1, -1, -1, -1,
- -1, -1, -1, 4, 5, 6, -1, -1, 9, 10,
- 11, -1, -1, 14, -1, 16, -1, -1, -1, 20,
- 21, 22, -1, -1, -1, -1, -1, -1, 29, 30,
- 31, 32, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 43, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 59, -1,
- -1, -1, -1, -1, -1, 66, 67, 68, 69, 70,
- -1, 72, 73, 74, 75, 76, 77, -1, -1, 80,
- 81, 82, 83, 84, 85, -1, -1, -1, -1, -1,
+ 65, 66, 67, -1, 69, -1, 71, -1, 73, -1,
+ 75, -1, -1, -1, -1, 80, 81, 82, -1, -1,
+ -1, -1, -1, -1, -1, -1, 11, 12, 13, -1,
+ -1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
+ -1, -1, -1, -1, 29, -1, -1, -1, 33, 34,
+ -1, 36, -1, -1, -1, 40, -1, 42, 43, 44,
+ -1, -1, 47, -1, -1, -1, 51, -1, 53, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 65, 66, 67, -1, 69, -1, 71, -1, 73, 74,
+ 75, -1, -1, -1, -1, 80, 81, 82, -1, -1,
+ -1, -1, -1, -1, -1, -1, 7, -1, -1, -1,
+ 11, 12, 13, -1, -1, -1, -1, -1, -1, -1,
+ -1, 22, -1, -1, -1, -1, -1, -1, 29, -1,
+ -1, -1, 33, 34, -1, 36, -1, -1, -1, 40,
+ -1, 42, 43, 44, -1, -1, 47, -1, -1, -1,
+ 51, -1, 53, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 65, 66, 67, -1, 69, -1,
+ 71, -1, 73, -1, 75, -1, -1, -1, -1, 80,
+ 81, 82, -1, -1, -1, -1, -1, -1, -1, -1,
+ 11, 12, 13, -1, -1, -1, -1, -1, -1, -1,
+ -1, 22, -1, -1, -1, -1, -1, -1, 29, -1,
+ -1, -1, 33, 34, -1, 36, -1, -1, -1, 40,
+ -1, 42, 43, 44, -1, -1, 47, -1, -1, -1,
+ 51, -1, 53, -1, -1, 56, -1, -1, -1, -1,
+ -1, -1, -1, -1, 65, 66, 67, -1, 69, -1,
+ 71, -1, 73, -1, 75, -1, -1, -1, -1, 80,
+ 81, 82, -1, -1, -1, -1, -1, -1, -1, -1,
+ 11, 12, 13, -1, -1, -1, -1, -1, -1, -1,
+ -1, 22, -1, -1, -1, -1, -1, -1, 29, -1,
+ -1, -1, 33, 34, -1, 36, -1, -1, -1, 40,
+ -1, 42, 43, 44, -1, -1, 47, -1, -1, -1,
+ 51, -1, 53, -1, -1, 56, -1, -1, -1, -1,
+ -1, -1, -1, -1, 65, 66, 67, -1, 69, -1,
+ 71, -1, 73, -1, 75, -1, -1, -1, -1, 80,
+ 81, 82, -1, -1, -1, -1, -1, -1, -1, -1,
4, 5, 6, -1, -1, 9, 10, 11, -1, -1,
14, -1, 16, -1, -1, -1, 20, 21, 22, -1,
-1, -1, -1, -1, -1, 29, 30, 31, 32, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 43,
- -1, -1, -1, 47, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 59, -1, -1, -1, -1,
- -1, 65, 66, 67, 68, 69, 70, -1, 72, 73,
+ -1, -1, 66, 67, 68, 69, 70, -1, 72, 73,
74, 75, 76, 77, -1, -1, 80, 81, 82, 83,
84, 85, -1, -1, -1, -1, -1, 4, 5, 6,
-1, -1, 9, 10, 11, -1, -1, 14, -1, 16,
-1, -1, -1, 20, 21, 22, -1, -1, -1, -1,
-1, -1, 29, 30, 31, 32, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 43, -1, -1, -1,
- 47, -1, -1, -1, -1, -1, -1, -1, 55, -1,
+ 47, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 59, -1, -1, -1, -1, -1, 65, 66,
67, 68, 69, 70, -1, 72, 73, 74, 75, 76,
77, -1, -1, 80, 81, 82, 83, 84, 85, -1,
- -1, -1, -1, -1, 4, -1, -1, -1, -1, 9,
- -1, 11, 12, 13, 14, -1, -1, -1, -1, -1,
- -1, 21, 22, -1, -1, -1, -1, -1, -1, 29,
- 30, -1, -1, 33, 34, -1, 36, -1, -1, -1,
- 40, -1, 42, 43, 44, -1, -1, 47, -1, -1,
- -1, 51, -1, 53, -1, -1, -1, -1, -1, 59,
- -1, 61, -1, -1, -1, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 77, -1, -1,
- 80, 81, 82, 83, 84, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4, 5, 6, -1, -1, 9,
+ 10, 11, -1, -1, 14, -1, 16, -1, -1, -1,
+ 20, 21, 22, -1, -1, -1, -1, -1, -1, 29,
+ 30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 43, -1, -1, -1, 47, -1, -1,
+ -1, -1, -1, -1, -1, 55, -1, -1, -1, 59,
+ -1, -1, -1, -1, -1, 65, 66, 67, 68, 69,
+ 70, -1, 72, 73, 74, 75, 76, 77, -1, -1,
+ 80, 81, 82, 83, 84, 85, -1, -1, -1, -1,
-1, 4, -1, -1, -1, -1, 9, -1, 11, 12,
13, 14, -1, -1, -1, -1, -1, -1, 21, 22,
-1, -1, -1, -1, -1, -1, 29, 30, -1, -1,
@@ -696,51 +699,62 @@ const int JavaScriptGrammar::action_check [] = {
-1, -1, 51, -1, 53, -1, -1, -1, -1, -1,
59, -1, 61, -1, -1, -1, 65, 66, 67, 68,
69, 70, 71, 72, 73, 74, 75, 76, 77, -1,
- -1, 80, 81, 82, 83, 84, -1, 86, -1, -1,
- -1, -1, 4, 5, 6, -1, -1, 9, 10, 11,
- 12, 13, 14, -1, 16, -1, -1, -1, 20, 21,
- 22, -1, -1, -1, -1, -1, -1, 29, 30, 31,
- 32, 33, 34, -1, 36, -1, -1, -1, 40, -1,
+ -1, 80, 81, 82, 83, 84, -1, -1, -1, -1,
+ -1, -1, 4, -1, -1, -1, -1, 9, -1, 11,
+ 12, 13, 14, -1, -1, -1, -1, -1, -1, 21,
+ 22, -1, -1, -1, -1, -1, -1, 29, 30, -1,
+ -1, 33, 34, -1, 36, -1, -1, -1, 40, -1,
42, 43, 44, -1, -1, 47, -1, -1, -1, 51,
- -1, 53, -1, 55, -1, -1, -1, 59, -1, 61,
+ -1, 53, -1, -1, -1, -1, -1, 59, -1, 61,
-1, -1, -1, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, -1, -1, 80, 81,
- 82, 83, 84, 85, -1, -1, -1, -1, -1,
+ 82, 83, 84, -1, 86, -1, -1, -1, -1, 4,
+ 5, 6, -1, -1, 9, 10, 11, 12, 13, 14,
+ -1, 16, -1, -1, -1, 20, 21, 22, -1, -1,
+ -1, -1, -1, -1, 29, 30, 31, 32, 33, 34,
+ -1, 36, -1, -1, -1, 40, -1, 42, 43, 44,
+ -1, -1, 47, -1, -1, -1, 51, -1, 53, -1,
+ 55, -1, -1, -1, 59, -1, 61, -1, -1, -1,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, -1, -1, 80, 81, 82, 83, 84,
+ 85, -1, -1, -1, -1, -1,
- 76, 9, 9, 76, 15, 15, 93, 58, 24, 18,
- 15, 91, 18, 15, 18, 18, 88, 62, 14, 13,
- 15, 13, 20, 24, 24, 24, 15, 18, 13, 13,
- 18, 62, 15, 9, 62, 15, 18, 24, 13, 5,
- 26, 15, 13, 24, 13, 24, 24, 15, 18, 13,
- 15, 24, 24, 13, 15, 18, 18, 13, 13, 13,
- 13, 18, 13, 15, 13, 62, 24, 15, 18, 15,
- 13, 18, -1, 15, 18, -1, 35, 18, 18, 24,
- 17, 18, 18, 15, 10, 15, 31, 15, 47, -1,
- 15, 29, 18, -1, 32, 18, 35, -1, 37, 13,
- 35, 35, 16, -1, 27, 39, 35, -1, 35, -1,
- 45, 38, 41, 15, 35, 35, 37, 37, 35, 29,
- 35, -1, 32, 35, 41, 37, 41, 59, 35, 59,
- 35, 59, 37, 40, 59, 35, 35, 37, 37, -1,
- 80, 82, 35, 35, 37, 37, 35, 24, 37, 35,
- 35, 37, 37, 35, 31, 35, -1, 35, 94, 41,
- 40, 39, 35, 35, 35, 37, 35, 40, 39, 38,
- 35, 35, 35, 35, 35, 40, 40, 40, 35, 35,
- 35, 35, 35, 40, 40, 40, 40, 40, 49, 51,
- 35, 35, 37, 37, 35, 7, 35, -1, 10, 40,
- 35, 40, 8, -1, 10, 35, 18, -1, 43, 35,
- 40, -1, 18, 52, 40, 35, 13, -1, 35, 16,
- 40, -1, 48, 40, 35, 35, 46, 57, 35, 40,
- 40, 35, 35, 40, 2, -1, 40, 40, 42, 42,
- 57, 6, -1, 50, 6, -1, 57, 57, 18, 17,
- 18, -1, 17, 18, 35, 17, 18, 27, 28, 40,
- 35, 35, -1, -1, -1, 40, 40, 13, 42, 44,
- 16, -1, 35, -1, -1, -1, 57, 40, -1, 42,
+ 20, 64, 5, 17, 64, 78, 17, 90, 26, 95,
+ 78, 6, 20, 26, 20, 60, 17, 17, 20, 16,
+ 11, 20, 20, 64, 20, 17, 20, 20, 15, 15,
+ 20, 15, 17, 15, 17, 64, 93, 26, 17, 20,
+ 17, 15, 22, 15, 11, -1, -1, 17, 26, -1,
+ 26, 26, 20, 26, 17, 26, 20, 26, 15, 15,
+ 26, 20, 15, 15, 26, 15, 17, 28, 17, 15,
+ 15, 15, 20, 20, 17, 17, 15, 15, 15, 37,
+ 15, 17, 37, 41, 17, 17, -1, 42, -1, 15,
+ 31, 10, 20, 34, 17, 17, 17, 37, -1, -1,
+ 20, 20, 42, 37, 9, 39, 37, 37, 37, 29,
+ 37, 42, 41, 37, 20, 20, 26, 26, 42, 49,
+ 47, 37, 37, 33, 33, 40, 37, 43, 31, 61,
+ 37, 34, -1, 37, 45, 42, 40, 84, 61, 61,
+ 61, 37, 37, 39, 39, 37, 37, 39, 39, 37,
+ 37, 39, 39, 37, 82, 39, 37, 37, 39, 39,
+ 37, 37, 97, 39, 37, 37, 39, 39, 37, 37,
+ 39, 37, 37, 37, 51, 41, 102, 42, 42, 37,
+ 37, -1, 37, 37, 42, 53, 43, 42, 37, 43,
+ 96, 37, 37, 42, 39, 37, 42, 37, 37, 37,
+ 20, 43, 42, 42, 42, -1, 37, 37, -1, 29,
+ 30, 42, 42, 37, 54, -1, -1, -1, 42, 50,
+ 59, 59, 52, 37, 48, 37, 37, -1, 42, 37,
+ 42, 42, 44, 44, 42, 37, 44, -1, 37, 37,
+ 42, 37, 44, 42, 42, 59, 42, 6, 46, -1,
+ -1, -1, 6, 12, 8, -1, -1, -1, 12, 18,
+ 19, 20, -1, 59, 18, 19, 20, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 95, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 37, -1, -1, -1, -1,
+ 42, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 59, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 100, -1};
+ -1, -1};
diff --git a/src/declarative/qml/parser/javascriptgrammar_p.h b/src/declarative/qml/parser/javascriptgrammar_p.h
index c01d1cc..3b98238 100644
--- a/src/declarative/qml/parser/javascriptgrammar_p.h
+++ b/src/declarative/qml/parser/javascriptgrammar_p.h
@@ -150,15 +150,15 @@ public:
T_XOR = 78,
T_XOR_EQ = 79,
- ACCEPT_STATE = 551,
- RULE_COUNT = 315,
- STATE_COUNT = 552,
+ ACCEPT_STATE = 553,
+ RULE_COUNT = 317,
+ STATE_COUNT = 554,
TERMINAL_COUNT = 91,
- NON_TERMINAL_COUNT = 102,
+ NON_TERMINAL_COUNT = 104,
- GOTO_INDEX_OFFSET = 552,
- GOTO_INFO_OFFSET = 1789,
- GOTO_CHECK_OFFSET = 1789
+ GOTO_INDEX_OFFSET = 554,
+ GOTO_INFO_OFFSET = 1836,
+ GOTO_CHECK_OFFSET = 1836
};
static const char *const spell [];
diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp
index 897f0ce..0857eef 100644
--- a/src/declarative/qml/parser/javascriptparser.cpp
+++ b/src/declarative/qml/parser/javascriptparser.cpp
@@ -199,51 +199,55 @@ case 8: {
} break;
case 9: {
+ sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
+} break;
+
+case 10: {
AST::UiObjectMemberList *node = makeAstNode<AST:: UiObjectMemberList> (driver->nodePool(),
sym(1).UiObjectMemberList, sym(2).UiObjectMember);
sym(1).Node = node;
} break;
-case 10: {
+case 11: {
sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember);
} break;
-case 11: {
+case 12: {
AST::UiObjectMemberList *node = makeAstNode<AST:: UiObjectMemberList> (driver->nodePool(),
sym(1).UiObjectMemberList, sym(3).UiObjectMember);
sym(1).Node = node;
} break;
-case 12: {
+case 13: {
AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), (AST::UiObjectMemberList*)0);
node->lbraceToken = loc(1);
node->rbraceToken = loc(2);
sym(1).Node = node;
} break;
-case 13: {
+case 14: {
AST::UiObjectInitializer *node = makeAstNode<AST::UiObjectInitializer> (driver->nodePool(), sym(2).UiObjectMemberList->finish());
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
- case 14:
-case 15: {
+ case 15:
+case 16: {
AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(),
sym(3).sval, sym(4).UiObjectInitializer);
node->colonToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
- case 16:
+
case 17: {
AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).sval,
sym(2).UiObjectInitializer);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
- case 18:
-case 19: {
+ case 20:
+case 21: {
AST::UiArrayBinding *node = makeAstNode<AST::UiArrayBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(),
sym(4).UiObjectMemberList->finish());
node->colonToken = loc(2);
@@ -252,33 +256,33 @@ case 19: {
sym(1).Node = node;
} break;
-case 20: {
+case 22: {
AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval);
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 22: {
+case 24: {
AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
- case 23: case 24:
-case 25: {
+ case 25: case 26:
+case 27: {
AST::UiScriptBinding *node = makeAstNode<AST::UiScriptBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(),
sym(3).Statement);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 26:
+case 28:
-case 27: {
+case 29: {
sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
break;
}
-case 29: {
+case 31: {
AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (JavaScriptNameIdImpl *)0, sym(2).sval);
node->type = AST::UiPublicMember::Signal;
node->propertyToken = loc(1);
@@ -287,7 +291,7 @@ case 29: {
sym(1).Node = node;
} break;
-case 30: {
+case 32: {
AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval);
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -295,7 +299,7 @@ case 30: {
sym(1).Node = node;
} break;
-case 31: {
+case 33: {
AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval);
node->isDefaultMember = true;
node->defaultToken = loc(1);
@@ -305,7 +309,7 @@ case 31: {
sym(1).Node = node;
} break;
-case 32: {
+case 34: {
AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval,
sym(5).Expression);
node->propertyToken = loc(1);
@@ -315,7 +319,7 @@ case 32: {
sym(1).Node = node;
} break;
-case 33: {
+case 35: {
AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval,
sym(6).Expression);
node->isDefaultMember = true;
@@ -327,126 +331,124 @@ case 33: {
sym(1).Node = node;
} break;
-case 34: {
+case 36: {
sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
} break;
-case 35: {
+case 37: {
sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
} break;
-case 36:
-case 37:
+case 38:
+case 39:
{
AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()));
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 39: {
+case 41: {
QString s = QLatin1String(JavaScriptGrammar::spell[T_PROPERTY]);
sym(1).sval = driver->intern(s.constData(), s.length());
break;
}
-case 40: {
+case 42: {
QString s = QLatin1String(JavaScriptGrammar::spell[T_SIGNAL]);
sym(1).sval = driver->intern(s.constData(), s.length());
break;
}
-case 41: {
+case 43: {
AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).sval);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 42: {
+case 44: {
AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 43: {
+case 45: {
AST::ThisExpression *node = makeAstNode<AST::ThisExpression> (driver->nodePool());
node->thisToken = loc(1);
sym(1).Node = node;
} break;
-case 44: {
+case 46: {
AST::IdentifierExpression *node = makeAstNode<AST::IdentifierExpression> (driver->nodePool(), sym(1).sval);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 45: {
+case 47: {
AST::NullExpression *node = makeAstNode<AST::NullExpression> (driver->nodePool());
node->nullToken = loc(1);
sym(1).Node = node;
} break;
-case 46: {
+case 48: {
AST::TrueLiteral *node = makeAstNode<AST::TrueLiteral> (driver->nodePool());
node->trueToken = loc(1);
sym(1).Node = node;
} break;
-case 47: {
+case 49: {
AST::FalseLiteral *node = makeAstNode<AST::FalseLiteral> (driver->nodePool());
node->falseToken = loc(1);
sym(1).Node = node;
} break;
-case 48: {
+case 50: {
AST::NumericLiteral *node = makeAstNode<AST::NumericLiteral> (driver->nodePool(), sym(1).dval);
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 49: {
+case 51: {
AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval);
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 50: {
+case 52: {
bool rx = lexer->scanRegExp(Lexer::NoPrefix);
if (!rx) {
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(),
- lexer->startColumnNo(), lexer->errorMessage()));
- return false;
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false; // ### remove me
}
AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 51: {
+case 53: {
bool rx = lexer->scanRegExp(Lexer::EqualPrefix);
if (!rx) {
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(),
- lexer->startColumnNo(), lexer->errorMessage()));
- return false;
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
+ return false;
}
AST::RegExpLiteral *node = makeAstNode<AST::RegExpLiteral> (driver->nodePool(), lexer->pattern, lexer->flags);
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 52: {
+case 54: {
AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).Elision);
node->lbracketToken = loc(1);
node->rbracketToken = loc(3);
sym(1).Node = node;
} break;
-case 53: {
+case 55: {
AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish ());
node->lbracketToken = loc(1);
node->rbracketToken = loc(3);
sym(1).Node = node;
} break;
-case 54: {
+case 56: {
AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision);
node->lbracketToken = loc(1);
node->commaToken = loc(3);
@@ -454,7 +456,7 @@ case 54: {
sym(1).Node = node;
} break;
-case 55: {
+case 57: {
AST::ObjectLiteral *node = 0;
if (sym(2).Node)
node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
@@ -466,7 +468,7 @@ case 55: {
sym(1).Node = node;
} break;
-case 56: {
+case 58: {
AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
sym(2).PropertyNameAndValueList->finish ());
node->lbraceToken = loc(1);
@@ -474,51 +476,51 @@ case 56: {
sym(1).Node = node;
} break;
-case 57: {
+case 59: {
AST::NestedExpression *node = makeAstNode<AST::NestedExpression>(driver->nodePool(), sym(2).Expression);
node->lparenToken = loc(1);
node->rparenToken = loc(3);
sym(1).Node = node;
} break;
-case 58: {
+case 60: {
sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).Elision, sym(2).Expression);
} break;
-case 59: {
+case 61: {
AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, sym(3).Elision, sym(4).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 60: {
+case 62: {
AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool());
node->commaToken = loc(1);
sym(1).Node = node;
} break;
-case 61: {
+case 63: {
AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool(), sym(1).Elision);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 62: {
+case 64: {
sym(1).Node = 0;
} break;
-case 63: {
+case 65: {
sym(1).Elision = sym(1).Elision->finish ();
} break;
-case 64: {
+case 66: {
AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
sym(1).PropertyName, sym(3).Expression);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 65: {
+case 67: {
AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression);
node->commaToken = loc(2);
@@ -526,40 +528,36 @@ case 65: {
sym(1).Node = node;
} break;
-case 66: {
+case 68: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 67:
-case 68: {
+case 69:
+case 70: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()));
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 69: {
+case 71: {
AST::StringLiteralPropertyName *node = makeAstNode<AST::StringLiteralPropertyName> (driver->nodePool(), sym(1).sval);
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 70: {
+case 72: {
AST::NumericLiteralPropertyName *node = makeAstNode<AST::NumericLiteralPropertyName> (driver->nodePool(), sym(1).dval);
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 71: {
+case 73: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
node->propertyNameToken = loc(1);
sym(1).Node = node;
} break;
-case 72:
-
-case 73:
-
case 74:
case 75:
@@ -617,25 +615,29 @@ case 100:
case 101:
case 102:
+
+case 103:
+
+case 104:
{
sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
} break;
-case 107: {
+case 109: {
AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
node->lbracketToken = loc(2);
node->rbracketToken = loc(4);
sym(1).Node = node;
} break;
-case 108: {
+case 110: {
AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
node->dotToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 109: {
+case 111: {
AST::NewMemberExpression *node = makeAstNode<AST::NewMemberExpression> (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList);
node->newToken = loc(1);
node->lparenToken = loc(3);
@@ -643,316 +645,309 @@ case 109: {
sym(1).Node = node;
} break;
-case 111: {
+case 113: {
AST::NewExpression *node = makeAstNode<AST::NewExpression> (driver->nodePool(), sym(2).Expression);
node->newToken = loc(1);
sym(1).Node = node;
} break;
-case 112: {
+case 114: {
AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
node->lparenToken = loc(2);
node->rparenToken = loc(4);
sym(1).Node = node;
} break;
-case 113: {
+case 115: {
AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
node->lparenToken = loc(2);
node->rparenToken = loc(4);
sym(1).Node = node;
} break;
-case 114: {
+case 116: {
AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
node->lbracketToken = loc(2);
node->rbracketToken = loc(4);
sym(1).Node = node;
} break;
-case 115: {
+case 117: {
AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
node->dotToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 116: {
+case 118: {
sym(1).Node = 0;
} break;
-case 117: {
+case 119: {
sym(1).Node = sym(1).ArgumentList->finish();
} break;
-case 118: {
+case 120: {
sym(1).Node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).Expression);
} break;
-case 119: {
+case 121: {
AST::ArgumentList *node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 123: {
+case 125: {
AST::PostIncrementExpression *node = makeAstNode<AST::PostIncrementExpression> (driver->nodePool(), sym(1).Expression);
node->incrementToken = loc(2);
sym(1).Node = node;
} break;
-case 124: {
+case 126: {
AST::PostDecrementExpression *node = makeAstNode<AST::PostDecrementExpression> (driver->nodePool(), sym(1).Expression);
node->decrementToken = loc(2);
sym(1).Node = node;
} break;
-case 126: {
+case 128: {
AST::DeleteExpression *node = makeAstNode<AST::DeleteExpression> (driver->nodePool(), sym(2).Expression);
node->deleteToken = loc(1);
sym(1).Node = node;
} break;
-case 127: {
+case 129: {
AST::VoidExpression *node = makeAstNode<AST::VoidExpression> (driver->nodePool(), sym(2).Expression);
node->voidToken = loc(1);
sym(1).Node = node;
} break;
-case 128: {
+case 130: {
AST::TypeOfExpression *node = makeAstNode<AST::TypeOfExpression> (driver->nodePool(), sym(2).Expression);
node->typeofToken = loc(1);
sym(1).Node = node;
} break;
-case 129: {
+case 131: {
AST::PreIncrementExpression *node = makeAstNode<AST::PreIncrementExpression> (driver->nodePool(), sym(2).Expression);
node->incrementToken = loc(1);
sym(1).Node = node;
} break;
-case 130: {
+case 132: {
AST::PreDecrementExpression *node = makeAstNode<AST::PreDecrementExpression> (driver->nodePool(), sym(2).Expression);
node->decrementToken = loc(1);
sym(1).Node = node;
} break;
-case 131: {
+case 133: {
AST::UnaryPlusExpression *node = makeAstNode<AST::UnaryPlusExpression> (driver->nodePool(), sym(2).Expression);
node->plusToken = loc(1);
sym(1).Node = node;
} break;
-case 132: {
+case 134: {
AST::UnaryMinusExpression *node = makeAstNode<AST::UnaryMinusExpression> (driver->nodePool(), sym(2).Expression);
node->minusToken = loc(1);
sym(1).Node = node;
} break;
-case 133: {
+case 135: {
AST::TildeExpression *node = makeAstNode<AST::TildeExpression> (driver->nodePool(), sym(2).Expression);
node->tildeToken = loc(1);
sym(1).Node = node;
} break;
-case 134: {
+case 136: {
AST::NotExpression *node = makeAstNode<AST::NotExpression> (driver->nodePool(), sym(2).Expression);
node->notToken = loc(1);
sym(1).Node = node;
} break;
-case 136: {
+case 138: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Mul, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 137: {
+case 139: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Div, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 138: {
+case 140: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Mod, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 140: {
+case 142: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Add, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 141: {
+case 143: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Sub, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 143: {
+case 145: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::LShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 144: {
+case 146: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::RShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 145: {
+case 147: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::URShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 147: {
+case 149: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Lt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 148: {
+case 150: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Gt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 149: {
+case 151: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Le, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 150: {
+case 152: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Ge, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 151: {
+case 153: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::InstanceOf, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 152: {
+case 154: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::In, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 154: {
+case 156: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Lt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 155: {
+case 157: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Gt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 156: {
+case 158: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Le, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 157: {
+case 159: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Ge, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 158: {
+case 160: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::InstanceOf, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 160: {
+case 162: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Equal, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 161: {
+case 163: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::NotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 162: {
+case 164: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::StrictEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 163: {
+case 165: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::StrictNotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 165: {
+case 167: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Equal, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 166: {
+case 168: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::NotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 167: {
+case 169: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::StrictEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 168: {
- AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
- QSOperator::StrictNotEqual, sym(3).Expression);
- node->operatorToken = loc(2);
- sym(1).Node = node;
-} break;
-
case 170: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
- QSOperator::BitAnd, sym(3).Expression);
+ QSOperator::StrictNotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
@@ -966,7 +961,7 @@ case 172: {
case 174: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
- QSOperator::BitXor, sym(3).Expression);
+ QSOperator::BitAnd, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
@@ -980,7 +975,7 @@ case 176: {
case 178: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
- QSOperator::BitOr, sym(3).Expression);
+ QSOperator::BitXor, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
@@ -994,7 +989,7 @@ case 180: {
case 182: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
- QSOperator::And, sym(3).Expression);
+ QSOperator::BitOr, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
@@ -1008,7 +1003,7 @@ case 184: {
case 186: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
- QSOperator::Or, sym(3).Expression);
+ QSOperator::And, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
@@ -1021,6 +1016,13 @@ case 188: {
} break;
case 190: {
+ AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
+ QSOperator::Or, sym(3).Expression);
+ node->operatorToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 192: {
AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
sym(3).Expression, sym(5).Expression);
node->questionToken = loc(2);
@@ -1028,7 +1030,7 @@ case 190: {
sym(1).Node = node;
} break;
-case 192: {
+case 194: {
AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
sym(3).Expression, sym(5).Expression);
node->questionToken = loc(2);
@@ -1036,112 +1038,112 @@ case 192: {
sym(1).Node = node;
} break;
-case 194: {
+case 196: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
sym(2).ival, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 196: {
+case 198: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
sym(2).ival, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 197: {
+case 199: {
sym(1).ival = QSOperator::Assign;
} break;
-case 198: {
+case 200: {
sym(1).ival = QSOperator::InplaceMul;
} break;
-case 199: {
+case 201: {
sym(1).ival = QSOperator::InplaceDiv;
} break;
-case 200: {
+case 202: {
sym(1).ival = QSOperator::InplaceMod;
} break;
-case 201: {
+case 203: {
sym(1).ival = QSOperator::InplaceAdd;
} break;
-case 202: {
+case 204: {
sym(1).ival = QSOperator::InplaceSub;
} break;
-case 203: {
+case 205: {
sym(1).ival = QSOperator::InplaceLeftShift;
} break;
-case 204: {
+case 206: {
sym(1).ival = QSOperator::InplaceRightShift;
} break;
-case 205: {
+case 207: {
sym(1).ival = QSOperator::InplaceURightShift;
} break;
-case 206: {
+case 208: {
sym(1).ival = QSOperator::InplaceAnd;
} break;
-case 207: {
+case 209: {
sym(1).ival = QSOperator::InplaceXor;
} break;
-case 208: {
+case 210: {
sym(1).ival = QSOperator::InplaceOr;
} break;
-case 210: {
+case 212: {
AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 211: {
+case 213: {
sym(1).Node = 0;
} break;
-case 214: {
+case 216: {
AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 215: {
+case 217: {
sym(1).Node = 0;
} break;
-case 232: {
+case 234: {
AST::Block *node = makeAstNode<AST::Block> (driver->nodePool(), sym(2).StatementList);
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 233: {
+case 235: {
sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).Statement);
} break;
-case 234: {
+case 236: {
sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).StatementList, sym(2).Statement);
} break;
-case 235: {
+case 237: {
sym(1).Node = 0;
} break;
-case 236: {
+case 238: {
sym(1).Node = sym(1).StatementList->finish ();
} break;
-case 238: {
+case 240: {
AST::VariableStatement *node = makeAstNode<AST::VariableStatement> (driver->nodePool(),
sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST));
node->declarationKindToken = loc(1);
@@ -1149,76 +1151,76 @@ case 238: {
sym(1).Node = node;
} break;
-case 239: {
+case 241: {
sym(1).ival = T_CONST;
} break;
-case 240: {
+case 242: {
sym(1).ival = T_VAR;
} break;
-case 241: {
+case 243: {
sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
} break;
-case 242: {
+case 244: {
AST::VariableDeclarationList *node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(),
sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 243: {
+case 245: {
sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
} break;
-case 244: {
+case 246: {
sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
} break;
-case 245: {
+case 247: {
AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 246: {
+case 248: {
AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 247: {
+case 249: {
// ### TODO: AST for initializer
sym(1) = sym(2);
} break;
-case 248: {
+case 250: {
sym(1).Node = 0;
} break;
-case 250: {
+case 252: {
// ### TODO: AST for initializer
sym(1) = sym(2);
} break;
-case 251: {
+case 253: {
sym(1).Node = 0;
} break;
-case 253: {
+case 255: {
AST::EmptyStatement *node = makeAstNode<AST::EmptyStatement> (driver->nodePool());
node->semicolonToken = loc(1);
sym(1).Node = node;
} break;
-case 255: {
+case 257: {
AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 256: {
+case 258: {
AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement);
node->ifToken = loc(1);
node->lparenToken = loc(2);
@@ -1227,7 +1229,7 @@ case 256: {
sym(1).Node = node;
} break;
-case 257: {
+case 259: {
AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
node->ifToken = loc(1);
node->lparenToken = loc(2);
@@ -1235,7 +1237,7 @@ case 257: {
sym(1).Node = node;
} break;
-case 259: {
+case 261: {
AST::DoWhileStatement *node = makeAstNode<AST::DoWhileStatement> (driver->nodePool(), sym(2).Statement, sym(5).Expression);
node->doToken = loc(1);
node->whileToken = loc(3);
@@ -1245,7 +1247,7 @@ case 259: {
sym(1).Node = node;
} break;
-case 260: {
+case 262: {
AST::WhileStatement *node = makeAstNode<AST::WhileStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
node->whileToken = loc(1);
node->lparenToken = loc(2);
@@ -1253,7 +1255,7 @@ case 260: {
sym(1).Node = node;
} break;
-case 261: {
+case 263: {
AST::ForStatement *node = makeAstNode<AST::ForStatement> (driver->nodePool(), sym(3).Expression,
sym(5).Expression, sym(7).Expression, sym(9).Statement);
node->forToken = loc(1);
@@ -1264,7 +1266,7 @@ case 261: {
sym(1).Node = node;
} break;
-case 262: {
+case 264: {
AST::LocalForStatement *node = makeAstNode<AST::LocalForStatement> (driver->nodePool(),
sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression,
sym(8).Expression, sym(10).Statement);
@@ -1277,7 +1279,7 @@ case 262: {
sym(1).Node = node;
} break;
-case 263: {
+case 265: {
AST:: ForEachStatement *node = makeAstNode<AST::ForEachStatement> (driver->nodePool(), sym(3).Expression,
sym(5).Expression, sym(7).Statement);
node->forToken = loc(1);
@@ -1287,7 +1289,7 @@ case 263: {
sym(1).Node = node;
} break;
-case 264: {
+case 266: {
AST::LocalForEachStatement *node = makeAstNode<AST::LocalForEachStatement> (driver->nodePool(),
sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement);
node->forToken = loc(1);
@@ -1298,14 +1300,14 @@ case 264: {
sym(1).Node = node;
} break;
-case 266: {
+case 268: {
AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool());
node->continueToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 268: {
+case 270: {
AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool(), sym(2).sval);
node->continueToken = loc(1);
node->identifierToken = loc(2);
@@ -1313,14 +1315,14 @@ case 268: {
sym(1).Node = node;
} break;
-case 270: {
+case 272: {
AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool());
node->breakToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 272: {
+case 274: {
AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool(), sym(2).sval);
node->breakToken = loc(1);
node->identifierToken = loc(2);
@@ -1328,14 +1330,14 @@ case 272: {
sym(1).Node = node;
} break;
-case 274: {
+case 276: {
AST::ReturnStatement *node = makeAstNode<AST::ReturnStatement> (driver->nodePool(), sym(2).Expression);
node->returnToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 275: {
+case 277: {
AST::WithStatement *node = makeAstNode<AST::WithStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
node->withToken = loc(1);
node->lparenToken = loc(2);
@@ -1343,7 +1345,7 @@ case 275: {
sym(1).Node = node;
} break;
-case 276: {
+case 278: {
AST::SwitchStatement *node = makeAstNode<AST::SwitchStatement> (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock);
node->switchToken = loc(1);
node->lparenToken = loc(2);
@@ -1351,90 +1353,90 @@ case 276: {
sym(1).Node = node;
} break;
-case 277: {
+case 279: {
AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses);
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 278: {
+case 280: {
AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses);
node->lbraceToken = loc(1);
node->rbraceToken = loc(5);
sym(1).Node = node;
} break;
-case 279: {
+case 281: {
sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClause);
} break;
-case 280: {
+case 282: {
sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause);
} break;
-case 281: {
+case 283: {
sym(1).Node = 0;
} break;
-case 282: {
+case 284: {
sym(1).Node = sym(1).CaseClauses->finish ();
} break;
-case 283: {
+case 285: {
AST::CaseClause *node = makeAstNode<AST::CaseClause> (driver->nodePool(), sym(2).Expression, sym(4).StatementList);
node->caseToken = loc(1);
node->colonToken = loc(3);
sym(1).Node = node;
} break;
-case 284: {
+case 286: {
AST::DefaultClause *node = makeAstNode<AST::DefaultClause> (driver->nodePool(), sym(3).StatementList);
node->defaultToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 285:
-case 286: {
+case 287:
+case 288: {
AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(3).Statement);
node->identifierToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 287: {
+case 289: {
AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), sym(1).sval, sym(3).Statement);
node->identifierToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 289: {
+case 291: {
AST::ThrowStatement *node = makeAstNode<AST::ThrowStatement> (driver->nodePool(), sym(2).Expression);
node->throwToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 290: {
+case 292: {
AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 291: {
+case 293: {
AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Finally);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 292: {
+case 294: {
AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 293: {
+case 295: {
AST::Catch *node = makeAstNode<AST::Catch> (driver->nodePool(), sym(3).sval, sym(5).Block);
node->catchToken = loc(1);
node->lparenToken = loc(2);
@@ -1443,20 +1445,20 @@ case 293: {
sym(1).Node = node;
} break;
-case 294: {
+case 296: {
AST::Finally *node = makeAstNode<AST::Finally> (driver->nodePool(), sym(2).Block);
node->finallyToken = loc(1);
sym(1).Node = node;
} break;
-case 296: {
+case 298: {
AST::DebuggerStatement *node = makeAstNode<AST::DebuggerStatement> (driver->nodePool());
node->debuggerToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 297: {
+case 299: {
AST::FunctionDeclaration *node = makeAstNode<AST::FunctionDeclaration> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
node->functionToken = loc(1);
node->identifierToken = loc(2);
@@ -1467,7 +1469,7 @@ case 297: {
sym(1).Node = node;
} break;
-case 298: {
+case 300: {
AST::FunctionExpression *node = makeAstNode<AST::FunctionExpression> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
node->functionToken = loc(1);
if (sym(2).sval)
@@ -1479,56 +1481,56 @@ case 298: {
sym(1).Node = node;
} break;
-case 299: {
+case 301: {
AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).sval);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 300: {
+case 302: {
AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval);
node->commaToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 301: {
+case 303: {
sym(1).Node = 0;
} break;
-case 302: {
+case 304: {
sym(1).Node = sym(1).FormalParameterList->finish ();
} break;
-case 303: {
+case 305: {
sym(1).Node = 0;
} break;
-case 305: {
+case 307: {
sym(1).Node = makeAstNode<AST::FunctionBody> (driver->nodePool(), sym(1).SourceElements->finish ());
} break;
-case 306: {
+case 308: {
sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElement);
} break;
-case 307: {
+case 309: {
sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement);
} break;
-case 308: {
+case 310: {
sym(1).Node = makeAstNode<AST::StatementSourceElement> (driver->nodePool(), sym(1).Statement);
} break;
-case 309: {
+case 311: {
sym(1).Node = makeAstNode<AST::FunctionSourceElement> (driver->nodePool(), sym(1).FunctionDeclaration);
} break;
-case 310: {
+case 312: {
sym(1).sval = 0;
} break;
-case 312: {
+case 314: {
sym(1).Node = 0;
} break;
@@ -1552,10 +1554,8 @@ case 312: {
yylloc.startColumn += yylloc.length;
yylloc.length = 0;
- const QString msg = QString::fromUtf8("Missing `;'");
-
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning,
- yylloc.startLine, yylloc.startColumn, msg));
+ //const QString msg = QString::fromUtf8("Missing `;'");
+ //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg));
first_token = &token_buffer[0];
last_token = &token_buffer[1];
@@ -1581,8 +1581,7 @@ case 312: {
if (t_action(errorState, yytoken)) {
const QString msg = QString::fromUtf8("Unexpected token `%1'").arg(QLatin1String(spell[token_buffer[0].token]));
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
- token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
action = errorState;
goto _Lcheck_token;
@@ -1611,8 +1610,7 @@ case 312: {
if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Expected token `%1'").arg(QLatin1String(spell[*tk]));
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
- token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
yytoken = *tk;
yylval = 0;
@@ -1634,8 +1632,7 @@ case 312: {
int a = t_action(errorState, tk);
if (a > 0 && t_action(a, yytoken)) {
const QString msg = QString::fromUtf8("Expected token `%1'").arg(QLatin1String(spell[tk]));
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
- token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
yytoken = tk;
yylval = 0;
@@ -1648,8 +1645,7 @@ case 312: {
}
const QString msg = QString::fromUtf8("Syntax error");
- diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
- token_buffer[0].loc.startLine, token_buffer[0].loc.startColumn, msg));
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg));
}
return false;
diff --git a/src/declarative/qml/parser/javascriptparser_p.h b/src/declarative/qml/parser/javascriptparser_p.h
index 497fae8..5e68fe7 100644
--- a/src/declarative/qml/parser/javascriptparser_p.h
+++ b/src/declarative/qml/parser/javascriptparser_p.h
@@ -119,10 +119,10 @@ public:
enum Kind { Warning, Error };
DiagnosticMessage()
- : kind(Error), line(0), column(0) {}
+ : kind(Error) {}
- DiagnosticMessage(Kind kind, int line, int column, const QString &message)
- : kind(kind), line(line), column(column), message(message) {}
+ DiagnosticMessage(Kind kind, const JavaScript::AST::SourceLocation &loc, const QString &message)
+ : kind(kind), loc(loc), message(message) {}
bool isWarning() const
{ return kind == Warning; }
@@ -131,8 +131,7 @@ public:
{ return kind == Error; }
Kind kind;
- int line;
- int column;
+ JavaScript::AST::SourceLocation loc;
QString message;
};
@@ -162,10 +161,10 @@ public:
{ return diagnosticMessage().message; }
inline int errorLineNumber() const
- { return diagnosticMessage().line; }
+ { return diagnosticMessage().loc.startLine; }
inline int errorColumnNumber() const
- { return diagnosticMessage().column; }
+ { return diagnosticMessage().loc.startColumn; }
protected:
void reallocateStack();
@@ -206,9 +205,9 @@ protected:
};
-#define J_SCRIPT_REGEXPLITERAL_RULE1 50
+#define J_SCRIPT_REGEXPLITERAL_RULE1 52
-#define J_SCRIPT_REGEXPLITERAL_RULE2 51
+#define J_SCRIPT_REGEXPLITERAL_RULE2 53
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index 94a5ad2..4385601 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -652,8 +652,8 @@ bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url)
QmlError error;
error.setUrl(url);
error.setDescription(m.message);
- error.setLine(m.line);
- error.setColumn(m.column);
+ error.setLine(m.loc.startLine);
+ error.setColumn(m.loc.startColumn);
_errors << error;
}
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index 82df3bc..ca4f9c9 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -48,6 +48,7 @@
#include <private/qmlcustomparser_p.h>
#include <qperformancelog.h>
#include <QStack>
+#include <QWidget>
#include <private/qmlcompiledcomponent_p.h>
#include <QColor>
#include <QPointF>
@@ -274,7 +275,11 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in
}
if (!stack.isEmpty()) {
QObject *parent = stack.top();
- o->setParent(parent);
+ if (o->isWidgetType()) {
+ qobject_cast<QWidget*>(o)->setParent(qobject_cast<QWidget*>(parent));
+ } else {
+ o->setParent(parent);
+ }
}
stack.push(o);
}
diff --git a/src/gui/dialogs/qabstractprintdialog.cpp b/src/gui/dialogs/qabstractprintdialog.cpp
index 0dc16c9..5ed8852 100644
--- a/src/gui/dialogs/qabstractprintdialog.cpp
+++ b/src/gui/dialogs/qabstractprintdialog.cpp
@@ -400,7 +400,7 @@ void QAbstractPrintDialogPrivate::setPrinter(QPrinter *newPrinter)
QAbstractPrintDialog::setEnabledOptions() and
QAbstractPrintDialog::addEnabledOption() have no effect.
- In Qt 4.4, it was possible to use the satic functions to show a sheet on
+ In Qt 4.4, it was possible to use the static functions to show a sheet on
Mac OS X. This is no longer supported in Qt 4.5. If you want this
functionality, use QPrintDialog::open().
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 92be62f..bc9b2fa 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1966,7 +1966,7 @@ void QGraphicsItem::setOpacity(qreal opacity)
itemChange(ItemOpacityHasChanged, newOpacity);
// Update.
- d_ptr->fullUpdateHelper();
+ d_ptr->fullUpdateHelper(/*childrenOnly=*/false, /*maybeDirtyClipPath=*/false, /*ignoreOpacity=*/true);
}
/*!
@@ -3512,10 +3512,16 @@ bool QGraphicsItem::contains(const QPointF &point) const
}
/*!
- Returns true if this item collides with \a other; otherwise returns false.
- The ways items collide is determined by \a mode. The default value for \a
- mode is Qt::IntersectsItemShape; \a other collides with this item if it
- either intersects, contains, or is contained by this item's shape.
+
+ Returns true if this item collides with \a other; otherwise
+ returns false.
+
+ The \a mode is applied to \a other, and the resulting shape or
+ bounding rectangle is then compared to this item's shape. The
+ default value for \a mode is Qt::IntersectsItemShape; \a other
+ collides with this item if it either intersects, contains, or is
+ contained by this item's shape (see Qt::ItemSelectionMode for
+ details).
The default implementation is based on shape intersection, and it calls
shape() on both items. Because the complexity of arbitrary shape-shape
@@ -3570,6 +3576,11 @@ bool QGraphicsItem::collidesWithItem(const QGraphicsItem *other, Qt::ItemSelecti
Qt::IntersectsItemShape; \a path collides with this item if it either
intersects, contains, or is contained by this item's shape.
+ Note that this function checks whether the item's shape or
+ bounding rectangle (depending on \a mode) is contained within \a
+ path, and not whether \a path is contained within the items shape
+ or bounding rectangle.
+
\sa collidesWithItem(), contains(), shape()
*/
bool QGraphicsItem::collidesWithPath(const QPainterPath &path, Qt::ItemSelectionMode mode) const
@@ -3610,11 +3621,12 @@ bool QGraphicsItem::collidesWithPath(const QPainterPath &path, Qt::ItemSelection
/*!
Returns a list of all items that collide with this item.
- The way collisions are detected is determined by \a mode. The default
- value for \a mode is Qt::IntersectsItemShape; All items whose shape
- intersects or is contained by this item's shape are returned.
+ The way collisions are detected is determined by applying \a mode
+ to items that are compared to this item, i.e., each item's shape
+ or bounding rectangle is checked against this item's shape. The
+ default value for \a mode is Qt::IntersectsItemShape.
- \sa QGraphicsScene::collidingItems(), collidesWithItem()
+ \sa collidesWithItem()
*/
QList<QGraphicsItem *> QGraphicsItem::collidingItems(Qt::ItemSelectionMode mode) const
{
@@ -3898,9 +3910,8 @@ void QGraphicsItem::setBoundingRegionGranularity(qreal granularity)
\internal
Returns true if we can discard an update request; otherwise false.
*/
-bool QGraphicsItemPrivate::discardUpdateRequest(bool ignoreClipping,
- bool ignoreVisibleBit,
- bool ignoreDirtyBit) const
+bool QGraphicsItemPrivate::discardUpdateRequest(bool ignoreClipping, bool ignoreVisibleBit,
+ bool ignoreDirtyBit, bool ignoreOpacity) const
{
// No scene, or if the scene is updating everything, means we have nothing
// to do. The only exception is if the scene tracks the growing scene rect.
@@ -3909,7 +3920,7 @@ bool QGraphicsItemPrivate::discardUpdateRequest(bool ignoreClipping,
|| !scene
|| (scene->d_func()->updateAll && scene->d_func()->hasSceneRect)
|| (!ignoreClipping && (childrenClippedToShape() && isClippedAway()))
- || (childrenCombineOpacity() && isFullyTransparent());
+ || (!ignoreOpacity && childrenCombineOpacity() && isFullyTransparent());
}
/*!
@@ -3939,11 +3950,10 @@ void QGraphicsItemPrivate::updateHelper(const QRectF &rect, bool force, bool may
Propagates updates to \a item and all its children.
*/
-void QGraphicsItemPrivate::fullUpdateHelper(bool childrenOnly, bool maybeDirtyClipPath)
+void QGraphicsItemPrivate::fullUpdateHelper(bool childrenOnly, bool maybeDirtyClipPath, bool ignoreOpacity)
{
- if (discardUpdateRequest(/*ignoreClipping=*/maybeDirtyClipPath,
- /*ignoreVisibleBit=*/false,
- /*ignoreDirtyBit=*/true)) {
+ if (discardUpdateRequest(/*ignoreClipping=*/maybeDirtyClipPath, /*ignoreVisibleBit=*/false,
+ /*ignoreDirtyBit=*/true, ignoreOpacity)) {
return;
}
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index bcbd737..062274f 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -175,11 +175,10 @@ public:
void setPosHelper(const QPointF &pos);
void setVisibleHelper(bool newVisible, bool explicitly, bool update = true);
void setEnabledHelper(bool newEnabled, bool explicitly, bool update = true);
- bool discardUpdateRequest(bool ignoreClipping = false,
- bool ignoreVisibleBit = false,
- bool ignoreDirtyBit = false) const;
+ bool discardUpdateRequest(bool ignoreClipping = false, bool ignoreVisibleBit = false,
+ bool ignoreDirtyBit = false, bool ignoreOpacity = false) const;
void updateHelper(const QRectF &rect = QRectF(), bool force = false, bool maybeDirtyClipPath = false);
- void fullUpdateHelper(bool childrenOnly = false, bool maybeDirtyClipPath = false);
+ void fullUpdateHelper(bool childrenOnly = false, bool maybeDirtyClipPath = false, bool ignoreOpacity = false);
void updateEffectiveOpacity();
void resolveEffectiveOpacity(qreal effectiveParentOpacity);
void resolveDepth(int parentDepth);
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 644e843..2876016 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -1081,8 +1081,12 @@ QList<QGraphicsItem *> QGraphicsViewPrivate::findItems(const QRegion &exposedReg
QList<QGraphicsItem *> itemList(scene->items());
int i = 0;
while (i < itemList.size()) {
+ const QGraphicsItem *item = itemList.at(i);
// But we only want to include items that are visible
- if (!itemList.at(i)->isVisible())
+ // The following check is basically the same as item->d_ptr->isInvisible(), except
+ // that we don't check whether the item clips children to shape or propagates its
+ // opacity (we loop through all items, so those checks are wrong in this context).
+ if (!item->isVisible() || item->d_ptr->isClippedAway() || item->d_ptr->isFullyTransparent())
itemList.removeAt(i);
else
++i;
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 5de39d9..7f36be9 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -1337,6 +1337,7 @@ QByteArray QImageReader::imageFormat(QIODevice *device)
\row \o TIFF \o Tagged Image File Format
\row \o XBM \o X11 Bitmap
\row \o XPM \o X11 Pixmap
+ \row \o SVG \o Scalable Vector Graphics
\endtable
Reading and writing SVG files is supported through Qt's
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index 61f1b5b..ab03fea 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -680,10 +680,9 @@ void QTreeView::dataChanged(const QModelIndex &topLeft, const QModelIndex &botto
// refresh the height cache here; we don't really lose anything by getting the size hint,
// since QAbstractItemView::dataChanged() will get the visualRect for the items anyway
- QModelIndex top = topLeft.sibling(topLeft.row(), 0);
- int topViewIndex = d->viewIndex(top);
+ int topViewIndex = d->viewIndex(topLeft);
if (topViewIndex == 0)
- d->defaultItemHeight = indexRowSizeHint(top);
+ d->defaultItemHeight = indexRowSizeHint(topLeft);
bool sizeChanged = false;
if (topViewIndex != -1) {
if (topLeft == bottomRight) {
@@ -691,8 +690,7 @@ void QTreeView::dataChanged(const QModelIndex &topLeft, const QModelIndex &botto
d->invalidateHeightCache(topViewIndex);
sizeChanged = (oldHeight != d->itemHeight(topViewIndex));
} else {
- QModelIndex bottom = bottomRight.sibling(bottomRight.row(), 0);
- int bottomViewIndex = d->viewIndex(bottom);
+ int bottomViewIndex = d->viewIndex(bottomRight);
for (int i = topViewIndex; i <= bottomViewIndex; ++i) {
int oldHeight = d->itemHeight(i);
d->invalidateHeightCache(i);
@@ -1815,10 +1813,10 @@ void QTreeView::mouseDoubleClickEvent(QMouseEvent *event)
if (i == -1)
return; // user clicked outside the items
- const QModelIndex &index = d->viewItems.at(i).index;
+ const QPersistentModelIndex firstColumnIndex = d->viewItems.at(i).index;
int column = d->header->logicalIndexAt(event->x());
- QPersistentModelIndex persistent = index.sibling(index.row(), column);
+ QPersistentModelIndex persistent = firstColumnIndex.sibling(firstColumnIndex.row(), column);
if (d->pressedIndex != persistent) {
mousePressEvent(event);
@@ -1841,10 +1839,10 @@ void QTreeView::mouseDoubleClickEvent(QMouseEvent *event)
if (d->itemsExpandable
&& d->expandsOnDoubleClick
&& d->hasVisibleChildren(persistent)) {
- if (!((i < d->viewItems.count()) && (d->viewItems.at(i).index == persistent))) {
+ if (!((i < d->viewItems.count()) && (d->viewItems.at(i).index == firstColumnIndex))) {
// find the new index of the item
for (i = 0; i < d->viewItems.count(); ++i) {
- if (d->viewItems.at(i).index == persistent)
+ if (d->viewItems.at(i).index == firstColumnIndex)
break;
}
if (i == d->viewItems.count())
@@ -2422,14 +2420,10 @@ void QTreeView::rowsInserted(const QModelIndex &parent, int start, int end)
? d->viewItems.count()
: d->viewItems.at(parentItem).total) - 1;
- int firstColumn = 0;
- while (isColumnHidden(firstColumn) && firstColumn < header()->count() - 1)
- ++firstColumn;
-
const int delta = end - start + 1;
QVector<QTreeViewItem> insertedItems(delta);
for (int i = 0; i < delta; ++i) {
- insertedItems[i].index = d->model->index(i + start, firstColumn, parent);
+ insertedItems[i].index = d->model->index(i + start, 0, parent);
insertedItems[i].level = childLevel;
}
if (d->viewItems.isEmpty())
@@ -2612,7 +2606,7 @@ void QTreeView::expandAll()
d->viewItems[i].expanded = true;
d->layout(i);
QModelIndex idx = d->viewItems.at(i).index;
- d->expandedIndexes.insert(idx.sibling(idx.row(), 0));
+ d->expandedIndexes.insert(idx);
}
updateGeometries();
d->viewport->update();
@@ -3130,13 +3124,9 @@ void QTreeViewPrivate::layout(int i)
int last = 0;
int children = 0;
- int firstColumn = 0;
- while (header->isSectionHidden(firstColumn) && firstColumn < header->count())
- ++firstColumn;
-
for (int j = first; j < first + count; ++j) {
- current = model->index(j - first, firstColumn, parent);
- if (isRowHidden(current.sibling(current.row(), 0))) {
+ current = model->index(j - first, 0, parent);
+ if (isRowHidden(current)) {
++hidden;
last = j - hidden + children;
} else {
@@ -3319,15 +3309,11 @@ int QTreeViewPrivate::itemAtCoordinate(int coordinate) const
int QTreeViewPrivate::viewIndex(const QModelIndex &_index) const
{
- Q_Q(const QTreeView);
if (!_index.isValid() || viewItems.isEmpty())
return -1;
const int totalCount = viewItems.count();
- int firstColumn = 0;
- while (q->isColumnHidden(firstColumn) && firstColumn < header->count())
- ++firstColumn;
- const QModelIndex index = _index.sibling(_index.row(), firstColumn);
+ const QModelIndex index = _index.sibling(_index.row(), 0);
// A quick check near the last item to see if we are just incrementing
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 60ac062..1cbc960 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -199,6 +199,7 @@ extern "C" {
composingText = new QString();
composing = false;
sendKeyEvents = true;
+ currentCustomTypes = 0;
[self setHidden:YES];
return self;
}
@@ -213,10 +214,16 @@ extern "C" {
object:self];
}
--(void)registerDragTypes:(bool)accept
+-(void)registerDragTypes
{
QMacCocoaAutoReleasePool pool;
- if (accept) {
+ // Calling registerForDraggedTypes is slow, so only do it once for each widget
+ // or when the custom types change.
+ const QStringList& customTypes = qEnabledDraggedTypes();
+ if (currentCustomTypes == 0 || *currentCustomTypes != customTypes) {
+ if (currentCustomTypes == 0)
+ currentCustomTypes = new QStringList();
+ *currentCustomTypes = customTypes;
const NSString* mimeTypeGeneric = @"com.trolltech.qt.MimeTypeName";
NSMutableArray *supportedTypes = [NSMutableArray arrayWithObjects:NSColorPboardType,
NSFilenamesPboardType, NSStringPboardType,
@@ -228,13 +235,10 @@ extern "C" {
NSFilesPromisePboardType, NSInkTextPboardType,
NSMultipleTextSelectionPboardType, mimeTypeGeneric, nil];
// Add custom types supported by the application.
- const QStringList& customTypes = qEnabledDraggedTypes();
for (int i = 0; i < customTypes.size(); i++) {
[supportedTypes addObject:reinterpret_cast<const NSString *>(QCFString::toCFStringRef(customTypes[i]))];
}
[self registerForDraggedTypes:supportedTypes];
- } else {
- [self unregisterDraggedTypes];
}
}
@@ -283,6 +287,8 @@ extern "C" {
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
+ if (qwidget->testAttribute(Qt::WA_DropSiteRegistered) == false)
+ return NSDragOperationNone;
[self addDropData:sender];
QMimeData *mimeData = dropData;
if (QDragManager::self()->source())
@@ -416,6 +422,8 @@ extern "C" {
{
delete composingText;
[[NSNotificationCenter defaultCenter] removeObserver:self];
+ delete currentCustomTypes;
+ [self unregisterDraggedTypes];
[super dealloc];
}
diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h
index ec1281e..1d4e3e4 100644
--- a/src/gui/kernel/qcocoaview_mac_p.h
+++ b/src/gui/kernel/qcocoaview_mac_p.h
@@ -84,6 +84,7 @@ Q_GUI_EXPORT
int composingLength;
bool sendKeyEvents;
QString *composingText;
+ QStringList *currentCustomTypes;
}
- (id)initWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate;
- (void) finishInitWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate;
@@ -92,7 +93,7 @@ Q_GUI_EXPORT
- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender;
- (void)draggingExited:(id < NSDraggingInfo >)sender;
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
-- (void)registerDragTypes:(bool)accept;
+- (void)registerDragTypes;
- (void)removeDropData;
- (void)addDropData:(id <NSDraggingInfo>)sender;
- (void)setSupportedActions:(NSDragOperation)actions;
diff --git a/src/gui/kernel/qformlayout.cpp b/src/gui/kernel/qformlayout.cpp
index e2d6108..a665c89 100644
--- a/src/gui/kernel/qformlayout.cpp
+++ b/src/gui/kernel/qformlayout.cpp
@@ -689,12 +689,16 @@ void QFormLayoutPrivate::setupVerticalLayoutData(int width)
// are split.
maxLabelWidth = 0;
if (!wrapAllRows) {
+ int maxFieldMinWidth = 0; //the maximum minimum size of the field
for (int i = 0; i < rr; ++i) {
const QFormLayoutItem *label = m_matrix(i, 0);
const QFormLayoutItem *field = m_matrix(i, 1);
- if (label && (label->sizeHint.width() + (field ? field->minSize.width() : 0) <= width))
+ if (label && field && label->sideBySide)
maxLabelWidth = qMax(maxLabelWidth, label->sizeHint.width());
+ if (field)
+ maxFieldMinWidth = qMax(maxFieldMinWidth, field->minSize.width() + field->sbsHSpace);
}
+ maxLabelWidth = qMin(maxLabelWidth, width - maxFieldMinWidth);
} else {
maxLabelWidth = width;
}
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index f000292..9165836 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -826,13 +826,28 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev
QWidget *qwidget = [theView qt_qwidget];
QWidget *widgetToGetMouse = qwidget;
QWidget *popup = qAppInstance()->activePopupWidget();
- if (popup && popup != qwidget->window())
- widgetToGetMouse = popup;
NSView *tmpView = theView;
- if (widgetToGetMouse != qwidget) {
- tmpView = qt_mac_nativeview_for(widgetToGetMouse);
+
+ if (popup && popup != qwidget->window()) {
+ widgetToGetMouse = popup;
+ tmpView = qt_mac_nativeview_for(popup);
windowPoint = [[tmpView window] convertScreenToBase:globalPoint];
+
+ QPoint qWindowPoint(windowPoint.x, windowPoint.y);
+ if (widgetToGetMouse->rect().contains(qWindowPoint)) {
+ // Keeping the mouse pressed on a combobox button will make
+ // the popup pop in front of the mouse. But all mouse events
+ // will be sendt to the button. Since we want mouse events
+ // to be sendt to widgets inside the popup, we search for the
+ // widget in front of the mouse:
+ tmpView = [tmpView hitTest:windowPoint];
+ if (!tmpView)
+ return false;
+ widgetToGetMouse =
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(tmpView) qt_qwidget];
+ }
}
+
NSPoint localPoint = [tmpView convertPoint:windowPoint fromView:nil];
QPoint qlocalPoint(localPoint.x, localPoint.y);
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index dd95053..cbf9585 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -4810,7 +4810,7 @@ void QWidget::render(QPainter *painter, const QPoint &targetOffset,
Q_ASSERT(engine);
QPaintEnginePrivate *enginePriv = engine->d_func();
Q_ASSERT(enginePriv);
- QPaintDevice *target = painter->worldMatrixEnabled() ? engine->paintDevice() : painter->device();
+ QPaintDevice *target = engine->paintDevice();
Q_ASSERT(target);
// Render via a pixmap when dealing with non-opaque painters or printers.
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 9da0b6b..1896b97 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4491,8 +4491,8 @@ void QWidgetPrivate::registerDropSite(bool on)
SetControlDragTrackingEnabled(qt_mac_nativeview_for(q), on);
#else
NSView *view = qt_mac_nativeview_for(q);
- if ([view isKindOfClass:[QT_MANGLE_NAMESPACE(QCocoaView) class]]) {
- [static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(view) registerDragTypes:on];
+ if (on && [view isKindOfClass:[QT_MANGLE_NAMESPACE(QCocoaView) class]]) {
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(view) registerDragTypes];
}
#endif
}
diff --git a/src/gui/kernel/qx11embed_x11.cpp b/src/gui/kernel/qx11embed_x11.cpp
index 6329135..ae93efe 100644
--- a/src/gui/kernel/qx11embed_x11.cpp
+++ b/src/gui/kernel/qx11embed_x11.cpp
@@ -1297,9 +1297,6 @@ bool QX11EmbedContainer::eventFilter(QObject *o, QEvent *event)
// focus is set to our focus proxy. We want to intercept all
// keypresses.
if (o == window() && d->client) {
- if (!d->isEmbedded() && d->activeContainer == this)
- d->moveInputToProxy();
-
if (d->clientIsXEmbed) {
sendXEmbedMessage(d->client, x11Info().display(), XEMBED_WINDOW_ACTIVATE);
} else {
@@ -1307,6 +1304,8 @@ bool QX11EmbedContainer::eventFilter(QObject *o, QEvent *event)
if (hasFocus())
XSetInputFocus(x11Info().display(), d->client, XRevertToParent, x11Time());
}
+ if (!d->isEmbedded())
+ d->moveInputToProxy();
}
break;
case QEvent::WindowDeactivate:
@@ -1729,10 +1728,10 @@ void QX11EmbedContainerPrivate::acceptClient(WId window)
checkGrab();
if (q->hasFocus()) {
XSetInputFocus(q->x11Info().display(), client, XRevertToParent, x11Time());
- } else {
- if (!isEmbedded())
- moveInputToProxy();
}
+ } else {
+ if (!isEmbedded())
+ moveInputToProxy();
}
emit q->clientIsEmbedded();
@@ -1749,11 +1748,9 @@ void QX11EmbedContainerPrivate::acceptClient(WId window)
void QX11EmbedContainerPrivate::moveInputToProxy()
{
Q_Q(QX11EmbedContainer);
- WId focus;
- int revert_to;
- XGetInputFocus(q->x11Info().display(), &focus, &revert_to);
- if (focus != focusProxy->internalWinId())
- XSetInputFocus(q->x11Info().display(), focusProxy->internalWinId(), XRevertToParent, x11Time());
+ // Following Owen Taylor's advice from the XEmbed specification to
+ // always use CurrentTime when no explicit user action is involved.
+ XSetInputFocus(q->x11Info().display(), focusProxy->internalWinId(), XRevertToParent, CurrentTime);
}
/*! \internal
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index 16dd617..8f4a2bf 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -44,8 +44,6 @@
QT_BEGIN_NAMESPACE
-static const qreal aliasedCoordinateDelta = 0.5 - 0.015625;
-
struct SourceOnlyAlpha
{
inline uchar alpha(uchar src) const { return src; }
@@ -140,14 +138,11 @@ struct Blend_ARGB32_on_RGB16_SourceAndConstAlpha {
template <typename SRC, typename T>
void qt_scale_image_16bit(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
- const QRectF &target,
+ const QRectF &targetRect,
const QRectF &srcRect,
const QRect &clip,
T blender)
{
- const QRectF targetRect = target.translated(aliasedCoordinateDelta,
- aliasedCoordinateDelta);
-
qreal sx = targetRect.width() / (qreal) srcRect.width();
qreal sy = targetRect.height() / (qreal) srcRect.height();
@@ -617,14 +612,11 @@ struct Blend_ARGB32_on_ARGB32_SourceAndConstAlpha {
template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
- const QRectF &target,
+ const QRectF &targetRect,
const QRectF &srcRect,
const QRect &clip,
T blender)
{
- const QRectF targetRect = target.translated(aliasedCoordinateDelta,
- aliasedCoordinateDelta);
-
qreal sx = targetRect.width() / (qreal) srcRect.width();
qreal sy = targetRect.height() / (qreal) srcRect.height();
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 8077b9b..3428faf 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2577,7 +2577,11 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe
QRasterPaintEngineState *s = state();
const bool aa = s->flags.antialiased || s->flags.bilinear;
if (!aa && sr.size() == QSize(1, 1)) {
- fillRect(r, QColor::fromRgba(img.pixel(sr.x(), sr.y())));
+ // as fillRect will apply the aliased coordinate delta we need to
+ // subtract it here as we don't use it for image drawing
+ const QRectF targetRect = r.translated(-aliasedCoordinateDelta,
+ -aliasedCoordinateDelta);
+ fillRect(targetRect, QColor::fromRgba(img.pixel(sr.x(), sr.y())));
return;
}
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 4b2fbca..9cc9683 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -1543,6 +1543,8 @@ void QX11PaintEnginePrivate::fillPolygon_dev(const QPointF *polygonPoints, int p
QX11PaintEnginePrivate::GCMode gcMode,
QPaintEngine::PolygonDrawMode mode)
{
+ Q_Q(QX11PaintEngine);
+
int clippedCount = 0;
qt_float_point *clippedPoints = 0;
@@ -1617,7 +1619,29 @@ void QX11PaintEnginePrivate::fillPolygon_dev(const QPointF *polygonPoints, int p
} else
#endif
if (fill.style() != Qt::NoBrush) {
- if (clippedCount > 0) {
+ if (clippedCount > 200000) {
+ QPolygon poly;
+ for (int i = 0; i < clippedCount; ++i)
+ poly << QPoint(qFloor(clippedPoints[i].x), qFloor(clippedPoints[i].y));
+
+ const QRect bounds = poly.boundingRect();
+ const QRect aligned = bounds
+ & QRect(QPoint(), QSize(pdev->width(), pdev->height()));
+
+ QImage img(aligned.size(), QImage::Format_ARGB32_Premultiplied);
+ img.fill(0);
+
+ QPainter painter(&img);
+ painter.translate(-aligned.x(), -aligned.y());
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(fill);
+ if (gcMode == BrushGC)
+ painter.setBrushOrigin(q->painter()->brushOrigin());
+ painter.drawPolygon(poly);
+ painter.end();
+
+ q->drawImage(aligned, img, img.rect(), Qt::AutoColor);
+ } else if (clippedCount > 0) {
QVarLengthArray<XPoint> xpoints(clippedCount);
for (int i = 0; i < clippedCount; ++i) {
xpoints[i].x = qFloor(clippedPoints[i].x);
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index ebddfd5..dcc11b8 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -4758,7 +4758,7 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
case CT_LineEdit:
#ifndef QT_NO_SPINBOX
// ### hopelessly broken QAbstractSpinBox (part 2)
- if (QAbstractSpinBox *spinBox = qobject_cast<QAbstractSpinBox *>(w->parentWidget())) {
+ if (QAbstractSpinBox *spinBox = qobject_cast<QAbstractSpinBox *>(w ? w->parentWidget() : 0)) {
QRenderRule rule = renderRule(spinBox, opt);
if (rule.hasBox() || !rule.hasNativeBorder())
return csz;
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 47fe5c2..d7a9c23 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -624,6 +624,45 @@ QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, int /* margin */, const Q
return rgbMask;
}
+QImage QFontEngine::alphaMapForGlyph(glyph_t glyph)
+{
+ glyph_metrics_t gm = boundingBox(glyph);
+ int glyph_x = qFloor(gm.x.toReal());
+ int glyph_y = qFloor(gm.y.toReal());
+ int glyph_width = qCeil((gm.x + gm.width).toReal()) - glyph_x;
+ int glyph_height = qCeil((gm.y + gm.height).toReal()) - glyph_y;
+
+ if (glyph_width <= 0 || glyph_height <= 0)
+ return QImage();
+ QFixedPoint pt;
+ pt.x = 0;
+ pt.y = -glyph_y; // the baseline
+ QPainterPath path;
+ QImage im(glyph_width + qAbs(glyph_x) + 4, glyph_height, QImage::Format_ARGB32_Premultiplied);
+ im.fill(Qt::transparent);
+ QPainter p(&im);
+ p.setRenderHint(QPainter::Antialiasing);
+ addGlyphsToPath(&glyph, &pt, 1, &path, 0);
+ p.setPen(Qt::NoPen);
+ p.setBrush(Qt::black);
+ p.drawPath(path);
+ p.end();
+
+ QImage indexed(im.width(), im.height(), QImage::Format_Indexed8);
+ QVector<QRgb> colors(256);
+ for (int i=0; i<256; ++i)
+ colors[i] = qRgba(0, 0, 0, i);
+ indexed.setColorTable(colors);
+
+ for (int y=0; y<im.height(); ++y) {
+ uchar *dst = (uchar *) indexed.scanLine(y);
+ uint *src = (uint *) im.scanLine(y);
+ for (int x=0; x<im.width(); ++x)
+ dst[x] = qAlpha(src[x]);
+ }
+
+ return indexed;
+}
void QFontEngine::removeGlyphFromCache(glyph_t)
{
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index cb0b436..de03a3c 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1788,9 +1788,11 @@ QImage QFontEngineFT::alphaMapForGlyph(glyph_t g)
GlyphFormat glyph_format = antialias ? Format_A8 : Format_Mono;
- Glyph *glyph = loadGlyph(g, glyph_format);
- if (!glyph)
- return QImage();
+ Glyph *glyph = defaultGlyphSet.outline_drawing ? 0 : loadGlyph(g, glyph_format);
+ if (!glyph) {
+ unlockFace();
+ return QFontEngine::alphaMapForGlyph(g);
+ }
const int pitch = antialias ? (glyph->width + 3) & ~3 : ((glyph->width + 31)/32) * 4;
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 8f6b92a..92efb6c 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -178,7 +178,7 @@ public:
* Create a qimage with the alpha values for the glyph.
* Returns an image indexed_8 with index values ranging from 0=fully transparant to 255=opaque
*/
- virtual QImage alphaMapForGlyph(glyph_t) = 0;
+ virtual QImage alphaMapForGlyph(glyph_t);
virtual QImage alphaMapForGlyph(glyph_t, const QTransform &t);
virtual QImage alphaRGBMapForGlyph(glyph_t, int margin, const QTransform &t);
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index c327b9f..48963bb 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -1074,7 +1074,10 @@ QTextCursor::QTextCursor(const QTextCursor &cursor)
}
/*!
- Makes a copy of \a cursor and assigns it to this QTextCursor.
+ Makes a copy of \a cursor and assigns it to this QTextCursor. Note
+ that QTextCursor is an \l{Implicitly Shared Classes}{implicitly
+ shared} class.
+
*/
QTextCursor &QTextCursor::operator=(const QTextCursor &cursor)
{
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index e84b324..873f846 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -287,7 +287,7 @@ QTextCodec *Qt::codecForHtml(const QByteArray &ba)
that inform connected editor widgets about the state of the undo/redo
system.
- \sa QTextCursor QTextEdit \link richtext.html Rich Text Processing\endlink
+ \sa QTextCursor, QTextEdit, \link richtext.html Rich Text Processing\endlink , {Text Object Example}
*/
/*!
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index 3f4c8e5..71b68e0 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE
objects, you will also need to reimplement QTextDocument::createObject()
which acts as a factory method for creating text objects.
- \sa QTextDocument
+ \sa QTextDocument, {Text Object Example}
*/
/*!
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 1afb28a..502c1e9 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -480,9 +480,6 @@ void QMainWindow::setMenuBar(QMenuBar *menuBar)
oldMenuBar->hide();
oldMenuBar->deleteLater();
}
-#ifdef Q_WS_WINCE
- if (menuBar && menuBar->size().height() > 0)
-#endif
d->layout->setMenuBar(menuBar);
}
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index a51ed2d..14efd23 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -629,7 +629,7 @@ void QPlainTextEditPrivate::setTopBlock(int blockNumber, int lineNumber, int dx)
if (viewport->updatesEnabled() && viewport->isVisible()) {
int dy = 0;
- if (doc->findBlockByLineNumber(control->topBlock).isValid()) {
+ if (doc->findBlockByNumber(control->topBlock).isValid()) {
dy = (int)(-q->blockBoundingGeometry(block).y())
+ verticalOffset() - verticalOffset(blockNumber, lineNumber);
}
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index ce1ac09..0b4ce9d 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -1084,7 +1084,7 @@ void QTabBar::setTabData(int index, const QVariant & data)
}
/*!
- Returns the datad of the tab at position \a index, or a null
+ Returns the data of the tab at position \a index, or a null
variant if \a index is out of range.
*/
QVariant QTabBar::tabData(int index) const
@@ -2223,6 +2223,7 @@ void QTabBar::setTabButton(int index, ButtonPosition position, QWidget *widget)
d->tabList[index].rightWidget = widget;
}
d->layoutTabs();
+ d->refresh();
update();
}
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp
index 14a04f1..d42370d 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -193,7 +193,11 @@ QIODevice *QNetworkDiskCache::prepare(const QNetworkCacheMetaData &metaData)
} else {
QString templateName = d->tmpCacheFileName();
cacheItem->file = new QTemporaryFile(templateName, &cacheItem->data);
- cacheItem->file->open();
+ if (!cacheItem->file->open()) {
+ qWarning() << "QNetworkDiskCache::prepare() unable to open temporary file";
+ delete cacheItem;
+ return 0;
+ }
cacheItem->writeHeader(cacheItem->file);
device = cacheItem->file;
}
@@ -231,7 +235,7 @@ void QNetworkDiskCachePrivate::storeItem(QCacheItem *cacheItem)
if (QFile::exists(fileName)) {
if (!QFile::remove(fileName)) {
- qWarning() << "QNetworkDiskCache: could't remove the cache file " << fileName;
+ qWarning() << "QNetworkDiskCache: couldn't remove the cache file " << fileName;
return;
}
}
diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp
index d6b1507..77a999b 100644
--- a/src/network/socket/qlocalserver.cpp
+++ b/src/network/socket/qlocalserver.cpp
@@ -276,9 +276,13 @@ QLocalSocket *QLocalServer::nextPendingConnection()
if (d->pendingConnections.isEmpty())
return 0;
QLocalSocket *nextSocket = d->pendingConnections.dequeue();
+#ifndef QT_LOCALSOCKET_TCP
+ if (d->pendingConnections.size() <= d->maxPendingConnections)
#ifndef Q_OS_WIN
- d->socketNotifier->setEnabled(d->pendingConnections.size()
- <= d->maxPendingConnections);
+ d->socketNotifier->setEnabled(true);
+#else
+ d->connectionEventNotifier->setEnabled(true);
+#endif
#endif
return nextSocket;
}
diff --git a/src/network/socket/qlocalserver.h b/src/network/socket/qlocalserver.h
index 8e8babd..1488a75 100644
--- a/src/network/socket/qlocalserver.h
+++ b/src/network/socket/qlocalserver.h
@@ -86,15 +86,7 @@ protected:
private:
Q_DISABLE_COPY(QLocalServer)
-#if defined(QT_LOCALSOCKET_TCP)
Q_PRIVATE_SLOT(d_func(), void _q_onNewConnection())
-#elif defined(Q_OS_WIN)
- Q_PRIVATE_SLOT(d_func(), void _q_openSocket(HANDLE handle))
- Q_PRIVATE_SLOT(d_func(), void _q_stoppedListening())
- Q_PRIVATE_SLOT(d_func(), void _q_setError(QAbstractSocket::SocketError error, const QString &errorString))
-#else
- Q_PRIVATE_SLOT(d_func(), void _q_socketActivated())
-#endif
};
#endif // QT_NO_LOCALSERVER
diff --git a/src/network/socket/qlocalserver_p.h b/src/network/socket/qlocalserver_p.h
index 8e96401..7b31082 100644
--- a/src/network/socket/qlocalserver_p.h
+++ b/src/network/socket/qlocalserver_p.h
@@ -63,7 +63,7 @@
# include <qtcpserver.h>
#elif defined(Q_OS_WIN)
# include <qt_windows.h>
-# include <qthread.h>
+# include <private/qwineventnotifier_p.h>
#else
# include <private/qnativesocketengine_p.h>
# include <qsocketnotifier.h>
@@ -71,52 +71,13 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_WIN) && !defined(QT_LOCALSOCKET_TCP)
-
-/*!
- \internal
- QLocalServerThread exists because Windows does not have a
- way to provide notifications when there is a new connections to
- the server.
- */
-class QLocalServerThread : public QThread
-{
- Q_OBJECT
-
-Q_SIGNALS:
- void connected(HANDLE newSocket);
- void error(QAbstractSocket::SocketError error, const QString &errorString);
-
-public:
- QLocalServerThread(QObject *parent = 0);
- ~QLocalServerThread();
- void closeServer();
-
-public:
- QString setName(const QString &name);
- void run();
- void stop();
- bool makeHandle();
-
- HANDLE gotConnectionEvent;
- QQueue<HANDLE> pendingHandles;
- int maxPendingConnections;
-private:
- HANDLE stopEvent;
- QString fullServerName;
-};
-
-#endif
-
class QLocalServerPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QLocalServer)
public:
QLocalServerPrivate() :
-#if defined(Q_OS_WIN) && !defined(QT_LOCALSOCKET_TCP)
- inWaitingFunction(false),
-#elif !defined(QT_LOCALSOCKET_TCP)
+#if !defined(QT_LOCALSOCKET_TCP) && !defined(Q_OS_WIN)
listenSocket(-1), socketNotifier(0),
#endif
maxPendingConnections(30), error(QAbstractSocket::UnknownSocketError)
@@ -128,22 +89,26 @@ public:
static bool removeServer(const QString &name);
void closeServer();
void waitForNewConnection(int msec, bool *timedOut);
+ void _q_onNewConnection();
#if defined(QT_LOCALSOCKET_TCP)
- void _q_onNewConnection();
QTcpServer tcpServer;
QMap<quintptr, QTcpSocket*> socketMap;
#elif defined(Q_OS_WIN)
- void _q_openSocket(HANDLE socket);
- void _q_stoppedListening();
- void _q_setError(QAbstractSocket::SocketError error, const QString &errorString);
+ struct Listener {
+ HANDLE handle;
+ OVERLAPPED overlapped;
+ };
+
+ void setError(const QString &function);
+ bool addListener();
- QLocalServerThread waitForConnection;
- bool inWaitingFunction;
+ QList<Listener> listeners;
+ HANDLE eventHandle;
+ QWinEventNotifier *connectionEventNotifier;
#else
void setError(const QString &function);
- void _q_socketActivated();
int listenSocket;
QSocketNotifier *socketNotifier;
diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp
index e7d2252..53ee6b6 100644
--- a/src/network/socket/qlocalserver_unix.cpp
+++ b/src/network/socket/qlocalserver_unix.cpp
@@ -132,7 +132,7 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName)
socketNotifier = new QSocketNotifier(listenSocket,
QSocketNotifier::Read, q);
q->connect(socketNotifier, SIGNAL(activated(int)),
- q, SLOT(_q_socketActivated()));
+ q, SLOT(_q_onNewConnection()));
socketNotifier->setEnabled(maxPendingConnections > 0);
return true;
}
@@ -164,7 +164,7 @@ void QLocalServerPrivate::closeServer()
We have received a notification that we can read on the listen socket.
Accept the new socket.
*/
-void QLocalServerPrivate::_q_socketActivated()
+void QLocalServerPrivate::_q_onNewConnection()
{
Q_Q(QLocalServer);
if (-1 == listenSocket)
@@ -209,7 +209,7 @@ void QLocalServerPrivate::waitForNewConnection(int msec, bool *timedOut)
break;
}
if (result > 0)
- _q_socketActivated();
+ _q_onNewConnection();
}
if (timedOut)
*timedOut = (result == 0);
diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp
index 880cd7e..b14bbf7 100644
--- a/src/network/socket/qlocalserver_win.cpp
+++ b/src/network/socket/qlocalserver_win.cpp
@@ -44,68 +44,26 @@
#include "qlocalsocket.h"
#include <qdebug.h>
-#include <qdatetime.h>
-#include <qcoreapplication.h>
-#include <QMetaType>
// The buffer size need to be 0 otherwise data could be
// lost if the socket that has written data closes the connection
// before it is read. Pipewriter is used for write buffering.
#define BUFSIZE 0
-QT_BEGIN_NAMESPACE
-
-QLocalServerThread::QLocalServerThread(QObject *parent) : QThread(parent),
- maxPendingConnections(1)
-{
- stopEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- gotConnectionEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
-}
+// ###: This should be a property. Should replace the insane 50 on unix as well.
+#define SYSTEM_MAX_PENDING_SOCKETS 8
-QLocalServerThread::~QLocalServerThread()
-{
- stop();
- closeServer();
- CloseHandle(stopEvent);
- CloseHandle(gotConnectionEvent);
-}
-
-void QLocalServerThread::stop()
-{
- if (isRunning()) {
- SetEvent(stopEvent);
- wait();
- ResetEvent(stopEvent);
- }
-}
-
-void QLocalServerThread::closeServer()
-{
- while (!pendingHandles.isEmpty())
- CloseHandle(pendingHandles.dequeue());
-}
-
-QString QLocalServerThread::setName(const QString &name)
-{
- QString pipePath = QLatin1String("\\\\.\\pipe\\");
- if (name.startsWith(pipePath))
- fullServerName = name;
- else
- fullServerName = pipePath + name;
- for (int i = pendingHandles.count(); i < maxPendingConnections; ++i)
- if (!makeHandle())
- break;
- return fullServerName;
-}
+QT_BEGIN_NAMESPACE
-bool QLocalServerThread::makeHandle()
+bool QLocalServerPrivate::addListener()
{
- if (pendingHandles.count() >= maxPendingConnections)
- return false;
+ // The object must not change its address once the
+ // contained OVERLAPPED struct is passed to Windows.
+ listeners << Listener();
+ Listener &listener = listeners.last();
- HANDLE handle = INVALID_HANDLE_VALUE;
QT_WA({
- handle = CreateNamedPipeW(
+ listener.handle = CreateNamedPipeW(
(TCHAR*)fullServerName.utf16(), // pipe name
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access
PIPE_TYPE_MESSAGE | // message type pipe
@@ -117,7 +75,7 @@ bool QLocalServerThread::makeHandle()
3000, // client time-out
NULL);
}, {
- handle = CreateNamedPipeA(
+ listener.handle = CreateNamedPipeA(
fullServerName.toLocal8Bit().constData(), // pipe name
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access
PIPE_TYPE_MESSAGE | // message type pipe
@@ -129,68 +87,43 @@ bool QLocalServerThread::makeHandle()
3000, // client time-out
NULL);
});
-
- if (INVALID_HANDLE_VALUE == handle) {
+ if (listener.handle == INVALID_HANDLE_VALUE) {
+ setError(QLatin1String("QLocalServerPrivate::addListener"));
+ listeners.removeLast();
return false;
}
- pendingHandles.enqueue(handle);
+
+ memset(&listener.overlapped, 0, sizeof(listener.overlapped));
+ listener.overlapped.hEvent = eventHandle;
+ if (!ConnectNamedPipe(listener.handle, &listener.overlapped)) {
+ switch (GetLastError()) {
+ case ERROR_IO_PENDING:
+ break;
+ case ERROR_PIPE_CONNECTED:
+ SetEvent(eventHandle);
+ break;
+ default:
+ CloseHandle(listener.handle);
+ setError(QLatin1String("QLocalServerPrivate::addListener"));
+ listeners.removeLast();
+ return false;
+ }
+ } else {
+ Q_ASSERT_X(false, "QLocalServerPrivate::addListener", "The impossible happened");
+ SetEvent(eventHandle);
+ }
return true;
}
-void QLocalServerThread::run()
+void QLocalServerPrivate::setError(const QString &function)
{
- OVERLAPPED op;
- HANDLE handleArray[2];
- memset(&op, 0, sizeof(op));
- handleArray[0] = op.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- handleArray[1] = stopEvent;
- HANDLE handle = INVALID_HANDLE_VALUE;
-
- forever {
- if (INVALID_HANDLE_VALUE == handle) {
- makeHandle();
- if (!pendingHandles.isEmpty())
- handle = pendingHandles.dequeue();
- }
- if (INVALID_HANDLE_VALUE == handle) {
- int windowsError = GetLastError();
- QString function = QLatin1String("QLocalServer::run");
- QString errorString = QLocalServer::tr("%1: Unknown error %2").arg(function).arg(windowsError);
- emit error(QAbstractSocket::UnknownSocketError, errorString);
- CloseHandle(handleArray[0]);
- SetEvent(gotConnectionEvent);
- return;
- }
-
- BOOL isConnected = ConnectNamedPipe(handle, &op) ? TRUE : (GetLastError() == ERROR_PIPE_CONNECTED);
- if (!isConnected) {
- switch (WaitForMultipleObjects(2, handleArray, FALSE, INFINITE))
- {
- case WAIT_OBJECT_0 + 1:
- CloseHandle(handle);
- CloseHandle(handleArray[0]);
- return;
- }
- }
- emit connected(handle);
- handle = INVALID_HANDLE_VALUE;
- ResetEvent(handleArray[0]);
- SetEvent(gotConnectionEvent);
- }
+ int windowsError = GetLastError();
+ errorString = QString::fromLatin1("%1: %2").arg(function).arg(qt_error_string(windowsError));
+ error = QAbstractSocket::UnknownSocketError;
}
void QLocalServerPrivate::init()
{
- Q_Q(QLocalServer);
- qRegisterMetaType<HANDLE>("HANDLE");
- q->connect(&waitForConnection, SIGNAL(connected(HANDLE)),
- q, SLOT(_q_openSocket(HANDLE)), Qt::QueuedConnection);
- q->connect(&waitForConnection, SIGNAL(finished()),
- q, SLOT(_q_stoppedListening()), Qt::QueuedConnection);
- q->connect(&waitForConnection, SIGNAL(terminated()),
- q, SLOT(_q_stoppedListening()), Qt::QueuedConnection);
- q->connect(&waitForConnection, SIGNAL(error(QAbstractSocket::SocketError, const QString &)),
- q, SLOT(_q_setError(QAbstractSocket::SocketError, const QString &)));
}
bool QLocalServerPrivate::removeServer(const QString &name)
@@ -201,35 +134,71 @@ bool QLocalServerPrivate::removeServer(const QString &name)
bool QLocalServerPrivate::listen(const QString &name)
{
- fullServerName = waitForConnection.setName(name);
- serverName = name;
- waitForConnection.start();
- return true;
-}
+ Q_Q(QLocalServer);
-void QLocalServerPrivate::_q_setError(QAbstractSocket::SocketError e, const QString &eString)
-{
- error = e;
- errorString = eString;
-}
+ QString pipePath = QLatin1String("\\\\.\\pipe\\");
+ if (name.startsWith(pipePath))
+ fullServerName = name;
+ else
+ fullServerName = pipePath + name;
-void QLocalServerPrivate::_q_stoppedListening()
-{
- Q_Q(QLocalServer);
- if (!inWaitingFunction)
- q->close();
+ // Use only one event for all listeners of one socket.
+ // The idea is that listener events are rare, so polling all listeners once in a while is
+ // cheap compared to waiting for N additional events in each iteration of the main loop.
+ eventHandle = CreateEvent(NULL, TRUE, FALSE, NULL);
+ connectionEventNotifier = new QWinEventNotifier(eventHandle , q);
+ q->connect(connectionEventNotifier, SIGNAL(activated(HANDLE)), q, SLOT(_q_onNewConnection()));
+
+ for (int i = 0; i < SYSTEM_MAX_PENDING_SOCKETS; ++i)
+ if (!addListener())
+ return false;
+ return true;
}
-void QLocalServerPrivate::_q_openSocket(HANDLE handle)
+void QLocalServerPrivate::_q_onNewConnection()
{
Q_Q(QLocalServer);
- q->incomingConnection((int)handle);
+ DWORD dummy;
+
+ // Reset first, otherwise we could reset an event which was asserted
+ // immediately after we checked the conn status.
+ ResetEvent(eventHandle);
+
+ // Testing shows that there is indeed absolutely no guarantee which listener gets
+ // a client connection first, so there is no way around polling all of them.
+ for (int i = 0; i < listeners.size(); ) {
+ HANDLE handle = listeners[i].handle;
+ if (GetOverlappedResult(handle, &listeners[i].overlapped, &dummy, FALSE)) {
+ listeners.removeAt(i);
+
+ addListener();
+
+ if (pendingConnections.size() > maxPendingConnections)
+ connectionEventNotifier->setEnabled(false);
+
+ // Make this the last thing so connected slots can wreak the least havoc
+ q->incomingConnection((quintptr)handle);
+ } else {
+ if (GetLastError() != ERROR_IO_INCOMPLETE) {
+ setError(QLatin1String("QLocalServerPrivate::_q_onNewConnection"));
+ closeServer();
+ return;
+ }
+
+ ++i;
+ }
+ }
}
void QLocalServerPrivate::closeServer()
{
- waitForConnection.stop();
- waitForConnection.closeServer();
+ connectionEventNotifier->setEnabled(false); // Otherwise, closed handle is checked before deleter runs
+ connectionEventNotifier->deleteLater();
+ connectionEventNotifier = 0;
+ CloseHandle(eventHandle);
+ for (int i = 0; i < listeners.size(); ++i)
+ CloseHandle(listeners[i].handle);
+ listeners.clear();
}
void QLocalServerPrivate::waitForNewConnection(int msecs, bool *timedOut)
@@ -238,14 +207,12 @@ void QLocalServerPrivate::waitForNewConnection(int msecs, bool *timedOut)
if (!pendingConnections.isEmpty() || !q->isListening())
return;
- DWORD result = WaitForSingleObject(waitForConnection.gotConnectionEvent,
- (msecs == -1) ? INFINITE : msecs);
+ DWORD result = WaitForSingleObject(eventHandle, (msecs == -1) ? INFINITE : msecs);
if (result == WAIT_TIMEOUT) {
if (timedOut)
*timedOut = true;
} else {
- ResetEvent(waitForConnection.gotConnectionEvent);
- QCoreApplication::instance()->processEvents();
+ _q_onNewConnection();
}
}
diff --git a/src/network/ssl/qsslcipher.cpp b/src/network/ssl/qsslcipher.cpp
index 505c662..7fec2df 100644
--- a/src/network/ssl/qsslcipher.cpp
+++ b/src/network/ssl/qsslcipher.cpp
@@ -64,9 +64,9 @@
#ifndef QT_NO_DEBUG_STREAM
#include <QtCore/qdebug.h>
+#endif
QT_BEGIN_NAMESPACE
-#endif
/*!
Constructs an empty QSslCipher object.
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index cc91e55..d74b930 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -1,11 +1,41 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
-** This file is part of the $MODULE$ of the Qt Toolkit.
+** This file is part of the QtOpenGL module of the Qt Toolkit.
**
-** $TROLLTECH_DUAL_LICENSE$
+** $QT_BEGIN_LICENSE:LGPL$
+** No 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
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** 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
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
**
****************************************************************************/
@@ -19,7 +49,7 @@
QT_BEGIN_NAMESPACE
-#if !defined(QT_OPENGL_ES_1_CL)
+#if !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
/*!
\class QGLShaderProgram
@@ -231,7 +261,7 @@ public:
bool compiled;
bool isPartial;
bool hasPartialSource;
- QString errors;
+ QString log;
QByteArray partialSource;
bool create();
@@ -279,12 +309,12 @@ bool QGLShaderPrivate::compile()
value = 0;
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &value);
if (!compiled && value > 1) {
- char *log = new char [value];
+ char *logbuf = new char [value];
GLint len;
- glGetShaderInfoLog(shader, value, &len, log);
- errors = QString::fromLatin1(log);
- qWarning() << "QGLShader::compile:" << errors;
- delete [] log;
+ glGetShaderInfoLog(shader, value, &len, logbuf);
+ log = QString::fromLatin1(logbuf);
+ qWarning() << "QGLShader::compile:" << log;
+ delete [] logbuf;
}
return compiled;
}
@@ -543,9 +573,6 @@ bool QGLShader::setSourceCode(const QString& source)
*/
bool QGLShader::setSourceCodeFile(const QString& fileName)
{
- if (!d->shader)
- return false;
-
QFile file(fileName);
if (!file.open(QFile::ReadOnly)) {
qWarning() << "QGLShader: Unable to open file" << fileName;
@@ -669,13 +696,13 @@ bool QGLShader::isCompiled() const
}
/*!
- Returns the errors that occurred during the last compile.
+ Returns the errors and warnings that occurred during the last compile.
\sa setSourceCode()
*/
-QString QGLShader::errors() const
+QString QGLShader::log() const
{
- return d->errors;
+ return d->log;
}
/*!
@@ -719,7 +746,7 @@ public:
bool linked;
bool inited;
bool hasPartialShaders;
- QString errors;
+ QString log;
QList<QGLShader *> shaders;
QList<QGLShader *> anonShaders;
QGLShader *vertexShader;
@@ -819,13 +846,16 @@ bool QGLShaderProgram::addShader(QGLShader *shader)
return false;
if (d->shaders.contains(shader))
return true; // Already added to this shader program.
- if (d->program && shader && shader->d->shader) {
+ if (d->program && shader) {
if (!shader->d->compiled)
return false;
- if (!shader->d->isPartial)
+ if (!shader->d->isPartial) {
+ if (!shader->d->shader)
+ return false;
glAttachShader(d->program, shader->d->shader);
- else
+ } else {
d->hasPartialShaders = true;
+ }
d->linked = false; // Program needs to be relinked.
d->shaders.append(shader);
return true;
@@ -838,13 +868,13 @@ bool QGLShaderProgram::addShader(QGLShader *shader)
Compiles \a source as a shader of the specified \a type and
adds it to this shader program. Returns true if compilation
was successful, false otherwise. The compilation errors
- will be made available via errors().
+ and warnings will be made available via log().
This function is intended to be a short-cut for quickly
adding vertex and fragment shaders to a shader program without
creating an instance of QGLShader first.
- \sa removeShader(), link(), errors(), removeAllShaders()
+ \sa removeShader(), link(), log(), removeAllShaders()
*/
bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const char *source)
{
@@ -852,7 +882,7 @@ bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const char *source)
return false;
QGLShader *shader = new QGLShader(type, this);
if (!shader->setSourceCode(source)) {
- d->errors = shader->errors();
+ d->log = shader->log();
delete shader;
return false;
}
@@ -866,13 +896,13 @@ bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const char *source)
Compiles \a source as a shader of the specified \a type and
adds it to this shader program. Returns true if compilation
was successful, false otherwise. The compilation errors
- will be made available via errors().
+ and warnings will be made available via log().
This function is intended to be a short-cut for quickly
adding vertex and fragment shaders to a shader program without
creating an instance of QGLShader first.
- \sa removeShader(), link(), errors(), removeAllShaders()
+ \sa removeShader(), link(), log(), removeAllShaders()
*/
bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const QByteArray& source)
{
@@ -885,13 +915,13 @@ bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const QByteArray& s
Compiles \a source as a shader of the specified \a type and
adds it to this shader program. Returns true if compilation
was successful, false otherwise. The compilation errors
- will be made available via errors().
+ and warnings will be made available via log().
This function is intended to be a short-cut for quickly
adding vertex and fragment shaders to a shader program without
creating an instance of QGLShader first.
- \sa removeShader(), link(), errors(), removeAllShaders()
+ \sa removeShader(), link(), log(), removeAllShaders()
*/
bool QGLShaderProgram::addShader(QGLShader::ShaderType type, const QString& source)
{
@@ -1022,14 +1052,14 @@ bool QGLShaderProgram::setProgramBinary(int format, const QByteArray& binary)
d->linked = (value != 0);
value = 0;
glGetProgramiv(d->program, GL_INFO_LOG_LENGTH, &value);
- d->errors = QString();
+ d->log = QString();
if (value > 1) {
- char *log = new char [value];
+ char *logbuf = new char [value];
GLint len;
- glGetProgramInfoLog(d->program, value, &len, log);
- d->errors = QString::fromLatin1(log);
- qWarning() << "QGLShaderProgram::setProgramBinary:" << d->errors;
- delete [] log;
+ glGetProgramInfoLog(d->program, value, &len, logbuf);
+ d->log = QString::fromLatin1(logbuf);
+ qWarning() << "QGLShaderProgram::setProgramBinary:" << d->log;
+ delete [] logbuf;
}
return d->linked;
#else
@@ -1043,7 +1073,7 @@ bool QGLShaderProgram::setProgramBinary(int format, const QByteArray& binary)
Returns the list of program binary formats that are accepted by
this system for use with setProgramBinary().
- \sa programBinary, setProgramBinary()
+ \sa programBinary(), setProgramBinary()
*/
QList<int> QGLShaderProgram::programBinaryFormats()
{
@@ -1065,7 +1095,7 @@ QList<int> QGLShaderProgram::programBinaryFormats()
Links together the shaders that were added to this program with
addShader(). Returns true if the link was successful or
false otherwise. If the link failed, the error messages can
- be retrieved with errors().
+ be retrieved with log().
Subclasses can override this function to initialize attributes
and uniform variables for use in specific shader programs.
@@ -1073,7 +1103,7 @@ QList<int> QGLShaderProgram::programBinaryFormats()
If the shader program was already linked, calling this
function again will force it to be re-linked.
- \sa addShader(), errors()
+ \sa addShader(), log()
*/
bool QGLShaderProgram::link()
{
@@ -1101,7 +1131,7 @@ bool QGLShaderProgram::link()
new QGLShader(QGLShader::VertexShader, this);
}
if (!d->vertexShader->setSourceCode(vertexSource)) {
- d->errors = d->vertexShader->errors();
+ d->log = d->vertexShader->log();
return false;
}
glAttachShader(d->program, d->vertexShader->d->shader);
@@ -1118,7 +1148,7 @@ bool QGLShaderProgram::link()
new QGLShader(QGLShader::FragmentShader, this);
}
if (!d->fragmentShader->setSourceCode(fragmentSource)) {
- d->errors = d->fragmentShader->errors();
+ d->log = d->fragmentShader->log();
return false;
}
glAttachShader(d->program, d->fragmentShader->d->shader);
@@ -1130,14 +1160,14 @@ bool QGLShaderProgram::link()
d->linked = (value != 0);
value = 0;
glGetProgramiv(d->program, GL_INFO_LOG_LENGTH, &value);
- d->errors = QString();
+ d->log = QString();
if (value > 1) {
- char *log = new char [value];
+ char *logbuf = new char [value];
GLint len;
- glGetProgramInfoLog(d->program, value, &len, log);
- d->errors = QString::fromLatin1(log);
- qWarning() << "QGLShaderProgram::link:" << d->errors;
- delete [] log;
+ glGetProgramInfoLog(d->program, value, &len, logbuf);
+ d->log = QString::fromLatin1(logbuf);
+ qWarning() << "QGLShaderProgram::link:" << d->log;
+ delete [] logbuf;
}
return d->linked;
}
@@ -1153,14 +1183,14 @@ bool QGLShaderProgram::isLinked() const
}
/*!
- Returns the errors that occurred during the last link()
+ Returns the errors and warnings that occurred during the last link()
or addShader() with explicitly specified source code.
\sa link()
*/
-QString QGLShaderProgram::errors() const
+QString QGLShaderProgram::log() const
{
- return d->errors;
+ return d->log;
}
/*!
@@ -1181,8 +1211,11 @@ bool QGLShaderProgram::enable()
return true;
}
+#undef ctx
+#define ctx QGLContext::currentContext()
+
/*!
- Disables this shader program in the currently active QGLContext.
+ Disables the active shader program in the current QGLContext.
This is equivalent to calling \c{glUseProgram(0)}.
\sa enable()
@@ -1197,6 +1230,9 @@ void QGLShaderProgram::disable()
#endif
}
+#undef ctx
+#define ctx d->context
+
/*!
Returns the OpenGL identifier associated with this shader program.
@@ -1782,7 +1818,6 @@ void QGLShaderProgram::setUniformValue(const char *name, GLfloat value)
/*!
Sets the uniform variable at \a location in the current context to \a value.
- This function must be used when setting sampler values.
\sa setAttributeValue()
*/
@@ -1796,7 +1831,7 @@ void QGLShaderProgram::setUniformValue(int location, GLint value)
\overload
Sets the uniform variable called \a name in the current context
- to \a value. This function must be used when setting sampler values.
+ to \a value.
\sa setAttributeValue()
*/
@@ -1806,6 +1841,31 @@ void QGLShaderProgram::setUniformValue(const char *name, GLint value)
}
/*!
+ Sets the uniform variable at \a location in the current context to \a value.
+ This function should be used when setting sampler values.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValue(int location, GLuint value)
+{
+ if (location != -1)
+ glUniform1i(location, value);
+}
+
+/*!
+ \overload
+
+ Sets the uniform variable called \a name in the current context
+ to \a value. This function should be used when setting sampler values.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValue(const char *name, GLuint value)
+{
+ setUniformValue(uniformLocation(name), value);
+}
+
+/*!
Sets the uniform variable at \a location in the current context to
the 2D vector (\a x, \a y).
@@ -1990,6 +2050,114 @@ void QGLShaderProgram::setUniformValue(const char *name, const QColor& color)
}
/*!
+ Sets the uniform variable at \a location in the current context to
+ the x and y coordinates of \a point.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValue(int location, const QPoint& point)
+{
+ if (location != -1) {
+ GLfloat values[4] = {point.x(), point.y()};
+ glUniform2fv(location, 1, values);
+ }
+}
+
+/*!
+ \overload
+
+ Sets the uniform variable associated with \a name in the current
+ context to the x and y coordinates of \a point.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValue(const char *name, const QPoint& point)
+{
+ setUniformValue(uniformLocation(name), point);
+}
+
+/*!
+ Sets the uniform variable at \a location in the current context to
+ the x and y coordinates of \a point.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValue(int location, const QPointF& point)
+{
+ if (location != -1) {
+ GLfloat values[4] = {point.x(), point.y()};
+ glUniform2fv(location, 1, values);
+ }
+}
+
+/*!
+ \overload
+
+ Sets the uniform variable associated with \a name in the current
+ context to the x and y coordinates of \a point.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValue(const char *name, const QPointF& point)
+{
+ setUniformValue(uniformLocation(name), point);
+}
+
+/*!
+ Sets the uniform variable at \a location in the current context to
+ the width and height of the given \a size.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValue(int location, const QSize& size)
+{
+ if (location != -1) {
+ GLfloat values[4] = {size.width(), size.width()};
+ glUniform2fv(location, 1, values);
+ }
+}
+
+/*!
+ \overload
+
+ Sets the uniform variable associated with \a name in the current
+ context to the width and height of the given \a size.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValue(const char *name, const QSize& size)
+{
+ setUniformValue(uniformLocation(name), size);
+}
+
+/*!
+ Sets the uniform variable at \a location in the current context to
+ the width and height of the given \a size.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValue(int location, const QSizeF& size)
+{
+ if (location != -1) {
+ GLfloat values[4] = {size.width(), size.height()};
+ glUniform2fv(location, 1, values);
+ }
+}
+
+/*!
+ \overload
+
+ Sets the uniform variable associated with \a name in the current
+ context to the width and height of the given \a size.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValue(const char *name, const QSizeF& size)
+{
+ setUniformValue(uniformLocation(name), size);
+}
+
+/*!
Sets the uniform variable at \a location in the current context
to a 2x2 matrix \a value.
@@ -2351,8 +2519,7 @@ void QGLShaderProgram::setUniformValue
/*!
Sets the uniform variable array at \a location in the current
- context to the \a count elements of \a values. This overload
- must be used when setting an array of sampler values.
+ context to the \a count elements of \a values.
\sa setAttributeValue()
*/
@@ -2366,8 +2533,7 @@ void QGLShaderProgram::setUniformValueArray(int location, const GLint *values, i
\overload
Sets the uniform variable array called \a name in the current
- context to the \a count elements of \a values. This overload
- must be used when setting an array of sampler values.
+ context to the \a count elements of \a values.
\sa setAttributeValue()
*/
@@ -2379,6 +2545,34 @@ void QGLShaderProgram::setUniformValueArray
/*!
Sets the uniform variable array at \a location in the current
+ context to the \a count elements of \a values. This overload
+ should be used when setting an array of sampler values.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValueArray(int location, const GLuint *values, int count)
+{
+ if (location != -1)
+ glUniform1iv(location, count, reinterpret_cast<const GLint *>(values));
+}
+
+/*!
+ \overload
+
+ Sets the uniform variable array called \a name in the current
+ context to the \a count elements of \a values. This overload
+ should be used when setting an array of sampler values.
+
+ \sa setAttributeValue()
+*/
+void QGLShaderProgram::setUniformValueArray
+ (const char *name, const GLuint *values, int count)
+{
+ setUniformValueArray(uniformLocation(name), values, count);
+}
+
+/*!
+ Sets the uniform variable array at \a location in the current
context to the \a count elements of \a values. Each element
has \a size components. The \a size must be 1, 2, 3, or 4.
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index 047bb3c..b69d28e 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -1,28 +1,47 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
-** This file is part of the $MODULE$ of the Qt Toolkit.
+** This file is part of the QtOpenGL module of the Qt Toolkit.
**
-** $TROLLTECH_DUAL_LICENSE$
+** $QT_BEGIN_LICENSE:LGPL$
+** No 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
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** 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
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QGLSHADERPROGRAM_H
#define QGLSHADERPROGRAM_H
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
#include <QtOpenGL/qgl.h>
#include <QtGui/qvector2d.h>
#include <QtGui/qvector3d.h>
@@ -35,7 +54,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(OpenGL)
-#if !defined(QT_OPENGL_ES_1_CL) && !defined(QT_GL_FIXED_PREFERRED)
+#if !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
class QGLShaderProgram;
class QGLShaderPrivate;
@@ -77,7 +96,7 @@ public:
QByteArray sourceCode() const;
bool isCompiled() const;
- QString errors() const;
+ QString log() const;
GLuint shaderId() const;
@@ -117,10 +136,10 @@ public:
virtual bool link();
bool isLinked() const;
- QString errors() const;
+ QString log() const;
bool enable();
- void disable();
+ static void disable();
GLuint programId() const;
@@ -177,6 +196,7 @@ public:
void setUniformValue(int location, GLfloat value);
void setUniformValue(int location, GLint value);
+ void setUniformValue(int location, GLuint value);
void setUniformValue(int location, GLfloat x, GLfloat y);
void setUniformValue(int location, GLfloat x, GLfloat y, GLfloat z);
void setUniformValue(int location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
@@ -184,6 +204,10 @@ public:
void setUniformValue(int location, const QVector3D& value);
void setUniformValue(int location, const QVector4D& value);
void setUniformValue(int location, const QColor& color);
+ void setUniformValue(int location, const QPoint& point);
+ void setUniformValue(int location, const QPointF& point);
+ void setUniformValue(int location, const QSize& size);
+ void setUniformValue(int location, const QSizeF& size);
void setUniformValue(int location, const QMatrix2x2& value);
void setUniformValue(int location, const QMatrix2x3& value);
void setUniformValue(int location, const QMatrix2x4& value);
@@ -198,6 +222,7 @@ public:
void setUniformValue(const char *name, GLfloat value);
void setUniformValue(const char *name, GLint value);
+ void setUniformValue(const char *name, GLuint value);
void setUniformValue(const char *name, GLfloat x, GLfloat y);
void setUniformValue(const char *name, GLfloat x, GLfloat y, GLfloat z);
void setUniformValue(const char *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
@@ -205,6 +230,10 @@ public:
void setUniformValue(const char *name, const QVector3D& value);
void setUniformValue(const char *name, const QVector4D& value);
void setUniformValue(const char *name, const QColor& color);
+ void setUniformValue(const char *name, const QPoint& point);
+ void setUniformValue(const char *name, const QPointF& point);
+ void setUniformValue(const char *name, const QSize& size);
+ void setUniformValue(const char *name, const QSizeF& size);
void setUniformValue(const char *name, const QMatrix2x2& value);
void setUniformValue(const char *name, const QMatrix2x3& value);
void setUniformValue(const char *name, const QMatrix2x4& value);
@@ -219,6 +248,7 @@ public:
void setUniformValueArray(int location, const GLfloat *values, int count, int size);
void setUniformValueArray(int location, const GLint *values, int count);
+ void setUniformValueArray(int location, const GLuint *values, int count);
void setUniformValueArray(int location, const QVector2D *values, int count);
void setUniformValueArray(int location, const QVector3D *values, int count);
void setUniformValueArray(int location, const QVector4D *values, int count);
@@ -234,6 +264,7 @@ public:
void setUniformValueArray(const char *name, const GLfloat *values, int count, int size);
void setUniformValueArray(const char *name, const GLint *values, int count);
+ void setUniformValueArray(const char *name, const GLuint *values, int count);
void setUniformValueArray(const char *name, const QVector2D *values, int count);
void setUniformValueArray(const char *name, const QVector3D *values, int count);
void setUniformValueArray(const char *name, const QVector4D *values, int count);
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 77ff9fb..aee351d 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -5067,9 +5067,8 @@ void QOpenGLPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte
// fall back to drawing a polygon if the scale factor is large, or
// we use a gradient pen
- if (ti.fontEngine->fontDef.pixelSize >= 64
- || (d->matrix.det() > 1) || (d->pen_brush_style >= Qt::LinearGradientPattern
- && d->pen_brush_style <= Qt::ConicalGradientPattern)) {
+ if ((d->matrix.det() > 1) || (d->pen_brush_style >= Qt::LinearGradientPattern
+ && d->pen_brush_style <= Qt::ConicalGradientPattern)) {
QPaintEngine::drawTextItem(p, textItem);
return;
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 6d8f617..91a60e7 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -80,7 +80,7 @@ template <typename T> inline const T *ptr(const T &t) { return &t; }
template <> inline const bool* ptr<bool>(const bool &) { return 0; }
template <typename device, typename T1, typename T2, typename T3>
static void rasterFallbackWarn(const char *msg, const char *func, const device *dev,
- QDirectFBPaintEnginePrivate::Scale scale, bool matrixRotShear, bool simplePen,
+ int scale, bool matrixRotShear, bool simplePen,
bool dfbHandledClip, bool forceRasterPrimitives,
const char *nameOne, const T1 &one,
const char *nameTwo, const T2 &two,
@@ -211,6 +211,8 @@ static QCache<qint64, CachedImage> imageCache(4*1024*1024); // 4 MB
class QDirectFBPaintEnginePrivate : public QRasterPaintEnginePrivate
{
public:
+ enum Scale { NoScale, Scaled, NegativeScale };
+
QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p);
~QDirectFBPaintEnginePrivate();
@@ -266,7 +268,7 @@ private:
bool simplePen;
bool matrixRotShear;
- enum Scale { NoScale, Scaled, NegativeScale } scale;
+ Scale scale;
SurfaceCache *surfaceCache;
QTransform transform;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 25e24fd..f571d1b 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -818,7 +818,7 @@ static const QByteArray flagDescriptions(uint mask, const FlagDescription *flags
-static void printDirectFBInfo(IDirectFB *fb)
+static void printDirectFBInfo(IDirectFB *fb, IDirectFBSurface *primarySurface)
{
DFBResult result;
DFBGraphicsDeviceDescription dev;
@@ -829,10 +829,14 @@ static void printDirectFBInfo(IDirectFB *fb)
return;
}
- qDebug("Device: %s (%s), Driver: %s v%i.%i (%s)\n"
+ DFBSurfacePixelFormat pixelFormat;
+ primarySurface->GetPixelFormat(primarySurface, &pixelFormat);
+
+ qDebug("Device: %s (%s), Driver: %s v%i.%i (%s) Pixelformat: %d (%d)\n"
"acceleration: 0x%x%s\nblit: 0x%x%s\ndraw: 0x%0x%s\nvideo: %iKB\n",
dev.name, dev.vendor, dev.driver.name, dev.driver.major,
- dev.driver.minor, dev.driver.vendor, dev.acceleration_mask,
+ dev.driver.minor, dev.driver.vendor, DFB_PIXELFORMAT_INDEX(pixelFormat),
+ QDirectFBScreen::getImageFormat(primarySurface), dev.acceleration_mask,
::flagDescriptions(dev.acceleration_mask, accelerationDescriptions).constData(),
dev.blitting_flags, ::flagDescriptions(dev.blitting_flags, blitDescriptions).constData(),
dev.drawing_flags, ::flagDescriptions(dev.drawing_flags, drawDescriptions).constData(),
@@ -883,9 +887,6 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
return false;
}
- if (displayArgs.contains(QLatin1String("debug"), Qt::CaseInsensitive))
- printDirectFBInfo(d_ptr->dfb);
-
if (displayArgs.contains(QLatin1String("videoonly"), Qt::CaseInsensitive))
d_ptr->directFBFlags |= VideoOnly;
@@ -952,6 +953,9 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
return false;
}
+ if (displayArgs.contains(QLatin1String("debug"), Qt::CaseInsensitive))
+ printDirectFBInfo(d_ptr->dfb, d_ptr->dfbSurface);
+
// Work out what format we're going to use for surfaces with an alpha channel
d_ptr->alphaPixmapFormat = QDirectFBScreen::getImageFormat(d_ptr->dfbSurface);
setPixelFormat(d_ptr->alphaPixmapFormat);
diff --git a/src/testlib/qtestlogger.cpp b/src/testlib/qtestlogger.cpp
index c053c30..a1a6d52 100644
--- a/src/testlib/qtestlogger.cpp
+++ b/src/testlib/qtestlogger.cpp
@@ -158,7 +158,10 @@ void QTestLogger::addIncident(IncidentTypes type, const char *description,
if (type == QAbstractTestLogger::Fail || type == QAbstractTestLogger::XFail) {
QTestElement *failureElement = new QTestElement(QTest::LET_Failure);
failureElement->addAttribute(QTest::AI_Result, typeBuf);
- failureElement->addAttribute(QTest::AI_File, file);
+ if(file)
+ failureElement->addAttribute(QTest::AI_File, file);
+ else
+ failureElement->addAttribute(QTest::AI_File, "");
QTest::qt_snprintf(buf, sizeof(buf), "%i", line);
failureElement->addAttribute(QTest::AI_Line, buf);
failureElement->addAttribute(QTest::AI_Description, description);
diff --git a/src/testlib/qtestxmlstreamer.cpp b/src/testlib/qtestxmlstreamer.cpp
index cf99b96..055abe0 100644
--- a/src/testlib/qtestxmlstreamer.cpp
+++ b/src/testlib/qtestxmlstreamer.cpp
@@ -54,7 +54,7 @@ void QTestXmlStreamer::formatStart(const QTestElement *element, char *formatted)
QXmlTestLogger::xmlCdata(cdataTag, element->attributeValue(QTest::AI_Tag),
sizeof(cdataTag));
QTest::qt_snprintf(formatted, 1024, "<Incident type=\"%s\" %s>\n"
- " <DataTag><![CDATA[%s]]></Description>\n"
+ " <DataTag><![CDATA[%s]]></DataTag>\n"
" <Description><![CDATA[%s]]></Description>\n"
"</Incident>\n", element->attributeValue(QTest::AI_Result),
location, cdataTag, cdataDesc);
diff --git a/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp b/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp
index 4a5c219..9bd4425 100644
--- a/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp
+++ b/src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp
@@ -111,7 +111,7 @@ QNetworkReply *AccelTreeResourceLoader::load(const QUrl &uri,
networkLoop.connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(error(QNetworkReply::NetworkError)));
networkLoop.connect(reply, SIGNAL(finished()), SLOT(finished()));
- if(networkLoop.exec())
+ if(networkLoop.exec(QEventLoop::ExcludeUserInputEvents))
{
const QString errorMessage(escape(reply->errorString()));