From 208adbaacae89c50913dbba5901cd255725a6091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= <thorbjorn.lindeijer@nokia.com> Date: Thu, 26 Mar 2009 11:22:47 +0100 Subject: [PATCH] Improved check for "scope token" For example, don't keep triggering scope completion on bunch of colons. Done with Roberto Raggi. --- src/plugins/cpptools/cppcodecompletion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index 8b7f59de17a..9c54d4969d3 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -437,7 +437,7 @@ static int startOfOperator(TextEditor::ITextEditable *editor, } else if (wantFunctionCall && ch == QLatin1Char('(')) { k = T_LPAREN; --start; - } else if (ch2 == QLatin1Char(':') && ch == QLatin1Char(':')) { + } else if (ch3 != QLatin1Char(':') && ch2 == QLatin1Char(':') && ch == QLatin1Char(':')) { k = T_COLON_COLON; start -= 2; } else if (ch2 == QLatin1Char('-') && ch == QLatin1Char('>')) { -- GitLab