Commit 14428c15 authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by Tim Jenssen

Clang: Decrease order of snippets

The order is 0 by default and thus the snippet items were at the very
top, e.g.:

  enum EnumType { EnumValue };

  void f()
  {
      EnumType et = // Complete here and see snippet items at top
  }

Change-Id: I70a160d102b91a2589972354c50aa5f0b29323e8
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent 80352d70
......@@ -136,7 +136,8 @@ using namespace CPlusPlus;
using namespace TextEditor;
ClangCompletionAssistProcessor::ClangCompletionAssistProcessor()
: m_completionOperator(T_EOF_SYMBOL)
: CppCompletionAssistProcessor(100)
, m_completionOperator(T_EOF_SYMBOL)
{
}
......
......@@ -40,7 +40,7 @@ using namespace CPlusPlus;
namespace CppTools {
CppCompletionAssistProcessor::CppCompletionAssistProcessor()
CppCompletionAssistProcessor::CppCompletionAssistProcessor(int snippetItemOrder)
: m_positionForProposal(-1)
, m_preprocessorCompletions(QStringList()
<< QLatin1String("define")
......@@ -72,7 +72,8 @@ CppCompletionAssistProcessor::CppCompletionAssistProcessor()
<< QLatin1String("endif"))
, m_hintProposal(0)
, m_snippetCollector(QLatin1String(CppEditor::Constants::CPP_SNIPPETS_GROUP_ID),
QIcon(QLatin1String(":/texteditor/images/snippet.png")))
QIcon(QLatin1String(":/texteditor/images/snippet.png")),
snippetItemOrder)
{
}
......
......@@ -45,7 +45,7 @@ namespace CppTools {
class CPPTOOLS_EXPORT CppCompletionAssistProcessor : public TextEditor::IAssistProcessor
{
public:
CppCompletionAssistProcessor();
CppCompletionAssistProcessor(int snippetItemOrder = 0);
protected:
void addSnippets();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment