diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-16 21:55:24 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-16 21:55:24 (GMT) |
commit | 8776b276a828005f8b1ebfddf4d3e7a63f268866 (patch) | |
tree | 470f2d3ce6ccdff261c19f045eb25e53ecbcd08d /tools/qdoc3/cppcodemarker.cpp | |
parent | fd3f9dd0f31efeea3aa0ec28b54c70d85712c7ba (diff) | |
parent | b92dd64af875d62bf4f64097dedaa0b2224304db (diff) | |
download | Qt-8776b276a828005f8b1ebfddf4d3e7a63f268866.zip Qt-8776b276a828005f8b1ebfddf4d3e7a63f268866.tar.gz Qt-8776b276a828005f8b1ebfddf4d3e7a63f268866.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: (42 commits)
doc: Fixed some qdoc errors.
doc: Fixed some qdoc errors.
Fix copyright year.
Fix broken license headers.
doc: Fixed some qdoc errors.
Reusing sheets on Mac OS X 10.5 & above shows painting artifacts.
doc: Fixed some qdoc errors.
QNetworkAccessManager: add method to send custom requests
doc: Fixed some qdoc errors.
Optimization: Avoid calling out to public API function
Mac: submenu shows up at the wrong position
Add operator< and qHash for QSharedPointer and fix operator-.
Don't use QSystemLocale if QT_NO_SYSTEMLOCALE (like QWS)
Don't use QSystemLocale if QT_NO_SYSTEMLOCALE (like QWS)
Optimized QLocale to access system locale on demand.
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
...
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; |