diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2009-05-20 07:49:14 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-05-20 07:49:14 (GMT) |
commit | d5348b5fc3a6efe13fd1dbe585b28addfa4344b3 (patch) | |
tree | 0bc8b6acd3bcdc4c5c4ef5548ff69b7aed1c9df9 | |
parent | 023d03ca888cf0e335bcbd413ea57db92e2e2ab5 (diff) | |
parent | 23a0475c4676797de987c7a1e11e9593f57631a8 (diff) | |
download | Qt-d5348b5fc3a6efe13fd1dbe585b28addfa4344b3.zip Qt-d5348b5fc3a6efe13fd1dbe585b28addfa4344b3.tar.gz Qt-d5348b5fc3a6efe13fd1dbe585b28addfa4344b3.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
-rw-r--r-- | src/gui/itemviews/qitemdelegate.cpp | 2 | ||||
-rw-r--r-- | tools/linguist/shared/java.cpp | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp index bf9b5c5..3b7eb2d 100644 --- a/src/gui/itemviews/qitemdelegate.cpp +++ b/src/gui/itemviews/qitemdelegate.cpp @@ -218,7 +218,7 @@ QSizeF QItemDelegatePrivate::doTextLayout(int lineWidth) const editor widget, which is a widget that is placed on top of the view while editing takes place. Editors are created with a QItemEditorFactory; a default static instance provided by - QItemEditorFactory is installed on all item delagates. You can set + QItemEditorFactory is installed on all item delegates. You can set a custom factory using setItemEditorFactory() or set a new default factory with QItemEditorFactory::setDefaultFactory(). It is the data stored in the item model with the Qt::EditRole that is edited. diff --git a/tools/linguist/shared/java.cpp b/tools/linguist/shared/java.cpp index 912a8d7..4c244d2 100644 --- a/tools/linguist/shared/java.cpp +++ b/tools/linguist/shared/java.cpp @@ -58,7 +58,7 @@ enum { Tok_Eof, Tok_class, Tok_return, Tok_tr, Tok_Comment, Tok_String, Tok_Colon, Tok_Dot, Tok_LeftBrace, Tok_RightBrace, Tok_LeftParen, Tok_RightParen, Tok_Comma, Tok_Semicolon, - Tok_Integer, Tok_Plus, Tok_PlusPlus, Tok_PlusEq }; + Tok_Integer, Tok_Plus, Tok_PlusPlus, Tok_PlusEq, Tok_null }; class Scope { @@ -142,7 +142,11 @@ static int getToken() case 'c': if ( yyIdent == QLatin1String("class") ) return Tok_class; - break; + break; + case 'n': + if ( yyIdent == QLatin1String("null") ) + return Tok_null; + break; } } switch ( yyIdent.at(0).toLatin1() ) { @@ -382,9 +386,11 @@ static bool matchInteger( qlonglong *number) static bool matchStringOrNull(QString &s) { bool matches = matchString(s); - qlonglong num = 0; - if (!matches) matches = matchInteger(&num); - return matches && num == 0; + if (!matches) { + matches = (yyTok == Tok_null); + if (matches) yyTok = getToken(); + } + return matches; } /* |