forked from qt-creator/qt-creator
... for member qualifiers. For instance, when doing completion on a non-const object, non-const member functions get a higher priority than const member functions. This does not seem particularly sensible and can make our list of completions appear unordered. As each matching qualifier only increases the priority by one and the base priorities are generally further apart, we can fix this problem by considering two priorities as equal if they are sufficiently close. Task-number: QTCREATORBUG-6242 Change-Id: I1d04fdf68869cf07cc00626aaac3030b360c2546 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
42 lines
594 B
C++
42 lines
594 B
C++
class Constructor {
|
|
public:
|
|
Constructor() = default;
|
|
Constructor(int) {}
|
|
};
|
|
|
|
void testConstructor() {
|
|
|
|
}
|
|
|
|
class Base {
|
|
virtual void bar(int a) const;
|
|
};
|
|
|
|
class DifferentPriorities : public Base {
|
|
public:
|
|
void foo();
|
|
void foo() const;
|
|
void bar(int a) const override;
|
|
void testBar() {
|
|
|
|
}
|
|
};
|
|
|
|
void testPriorities() {
|
|
DifferentPriorities d;
|
|
d.
|
|
}
|
|
|
|
class LexicographicalSorting
|
|
{
|
|
public:
|
|
void memberFuncBB();
|
|
void memberFuncC();
|
|
void memberFuncAAA() const;
|
|
};
|
|
|
|
void testLexicographicalSorting() {
|
|
LexicographicalSorting ls;
|
|
ls.memberFunc
|
|
}
|