diff options
author | Lorenz Haas <lykurg@gmail.com> | 2015-02-07 20:53:34 +0100 |
---|---|---|
committer | Lorenz Haas <lykurg@gmail.com> | 2015-02-17 13:16:14 +0000 |
commit | b4902e5f1beef4ccde7b2f4711be28295af5d23a (patch) | |
tree | 2af910030434d129ae867946e280a85882a83739 /src/plugins/cppeditor/cppdocumentationcommenthelper.cpp | |
parent | 5a3a940ad3b3984b308b539e7f0456ce11d4d90e (diff) | |
download | qt-creator-b4902e5f1beef4ccde7b2f4711be28295af5d23a.tar.gz |
CppEditor: Fix Doxygen continuation handling for "//!"
Change-Id: Ib1e3183a85b55a894964f56458512aca1fafc2ea
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/plugins/cppeditor/cppdocumentationcommenthelper.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppdocumentationcommenthelper.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/cppeditor/cppdocumentationcommenthelper.cpp b/src/plugins/cppeditor/cppdocumentationcommenthelper.cpp index 1bb5959b20..844c33afbc 100644 --- a/src/plugins/cppeditor/cppdocumentationcommenthelper.cpp +++ b/src/plugins/cppeditor/cppdocumentationcommenthelper.cpp @@ -170,15 +170,12 @@ bool handleDoxygenCppStyleContinuation(QTextCursor &cursor) // If the line does not start with the comment we don't // consider it as a continuation. Handles situations like: // void d(); ///<enter> - if (!(text.trimmed().startsWith(QLatin1String("///")) - || text.startsWith(QLatin1String("//!")))) { + const QStringRef commentMarker = text.midRef(offset, 3); + if (commentMarker != QLatin1String("///") && commentMarker != QLatin1String("//!")) return false; - } QString newLine(QLatin1Char('\n')); newLine.append(QString(offset, QLatin1Char(' '))); // indent correctly - - const QString commentMarker = text.mid(offset, 3); newLine.append(commentMarker); newLine.append(QLatin1Char(' ')); |