diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-12 18:15:15 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-12 18:15:15 (GMT) |
commit | 15825196f5ba37f27c4a2e877e1c782407faece0 (patch) | |
tree | f75bfb5300503887437747287f38e643360ee0b6 /tools/qdoc3/cppcodemarker.cpp | |
parent | 7263810f4802a3a6755193f6f2692436600a5e53 (diff) | |
parent | c04fd421375562f2db8ab89d7bb9509d9b655dd2 (diff) | |
download | Qt-15825196f5ba37f27c4a2e877e1c782407faece0.zip Qt-15825196f5ba37f27c4a2e877e1c782407faece0.tar.gz Qt-15825196f5ba37f27c4a2e877e1c782407faece0.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (27 commits)
Fix QRegion under Mac OS X.
update according to Thiago's comments.
Changes: add functionality for dbus auto start to qt
Add license header to this file
readdir64 is not available on HP-UX
Fix bug in QDirPrivate::setPath, affecting QDir::cd, cdUp and setPath
qdoc3: Completed handling of the new \pagekeywords command.
Wrong cursor shown by the parent window after setOverrideCursor().
Fixed Mac OS X compile time error by using GLint for temp.
qdoc3: Added curly braces in switch statement for braindead compiler.
qdoc: Added a build rule for the documentation - disabled by default.
Doc: Added the qdoc manual to the repository for future maintenance.
qdoc3: Fixed bug in creation of qt.pageindex.
qdoc3: Added capability to create qt.pageindex.
Incorrect property setter generated by dumpcpp for Microsoft Word 2007.
Cocoa: Implement our own NSApplication subclass
Cocoa: Menu in menubar stays highlighted
qdoc: Made a temporary fix for comment highlighting.
Doc: Tidied up the class layout and removed an unnecessary image.
Doc/qdoc: Use Chinese titles; canonicalize titles with non-ASCII chars.
...
Diffstat (limited to 'tools/qdoc3/cppcodemarker.cpp')
-rw-r--r-- | tools/qdoc3/cppcodemarker.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index d9c767a..657cfbb 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -881,8 +881,7 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode, static QRegExp globalX("[\n{()=] *([a-zA-Z_][a-zA-Z_0-9]*)[ \n]*\\("); static QRegExp multiLineComment("/(?:( )?\\*(?:[^*]+|\\*(?! /))*\\*\\1/)"); multiLineComment.setMinimal(true); - static QRegExp singleLineCommentLine("(?:^|\n)(?:[^&]|&(?!quot;)|"(?:[^&\\\\]|&(?!quot;)|\\\\"|\\\\(?!"))*")*//(?!!)[^!\n]*"); - static QRegExp singleLineComment("//(?!!)[^!\n]*"); + static QRegExp singleLineComment("[^:]//(?!!)[^!\\n]*"); static QRegExp preprocessor("(?:^|\n)(#[ \t]*(?:include|if|elif|endif|error|pragma|define" "|warning)(?:(?:\\\\\n|\\n#)[^\n]*)*)"); static QRegExp literals(""(?:[^\\\\&]|\\\\[^\n]|&(?!quot;))*"" @@ -1057,8 +1056,7 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode, int mlpos; int slpos; int len; - int sllpos = singleLineCommentLine.indexIn(result, pos); - slpos = sllpos == -1 ? -1 : singleLineComment.indexIn(result, sllpos); + slpos = singleLineComment.indexIn(result, pos); mlpos = multiLineComment.indexIn(result, pos); if (slpos == -1 && mlpos == -1) @@ -1069,13 +1067,13 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode, len = multiLineComment.matchedLength(); } else if (mlpos == -1) { - pos = slpos; - len = singleLineComment.matchedLength(); + pos = slpos + 1; + len = singleLineComment.matchedLength() - 1; } else { if (slpos < mlpos) { - pos = slpos; - len = singleLineComment.matchedLength(); + pos = slpos + 1; + len = singleLineComment.matchedLength() - 1; } else { pos = mlpos; |