Clang: change global completions order

Give CamelCase completions lower priority

Task-number: QTCREATORBUG-18319
Change-Id: I812d22616e8ab0e3d186bcf7a6a569de22be2a07
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2017-06-02 09:17:51 +02:00
parent f3cd5cdb7e
commit 8922fbf4be
3 changed files with 33 additions and 7 deletions

View File

@@ -44,6 +44,14 @@ class TextEditorWidget;
class TEXTEDITOR_EXPORT AssistProposalItemInterface
{
public:
// We compare proposals by enum values, be careful changing their values
enum class PrefixMatch
{
Exact = 0,
Lower = 1,
None = 2
};
AssistProposalItemInterface() = default;
virtual ~AssistProposalItemInterface() Q_DECL_NOEXCEPT = default;
@@ -59,11 +67,14 @@ public:
virtual bool isValid() const = 0;
virtual quint64 hash() const = 0; // it is only for removing duplicates
int order() const { return m_order; }
void setOrder(int order) { m_order = order; }
inline int order() const { return m_order; }
inline void setOrder(int order) { m_order = order; }
inline PrefixMatch prefixMatch() { return m_prefixMatch; }
inline void setPrefixMatch(PrefixMatch match) { m_prefixMatch = match; }
private:
int m_order = 0;
PrefixMatch m_prefixMatch = PrefixMatch::None;
};
} // namespace TextEditor