X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Ftabcompleter.cpp;h=2b60cdd6a2930ea367f8a9c86435790880a57e5e;hp=311801a6ce8c93fb29f30fb62e52db818c3831f3;hb=e049ffc61b5e260a49d73102a74c3821af827e77;hpb=865638f28fa7824f98ac3b438763aed5124d58ee diff --git a/src/uisupport/tabcompleter.cpp b/src/uisupport/tabcompleter.cpp index 311801a6..2b60cdd6 100644 --- a/src/uisupport/tabcompleter.cpp +++ b/src/uisupport/tabcompleter.cpp @@ -92,7 +92,7 @@ void TabCompleter::buildCompletionList() { } void TabCompleter::complete() { - NickCompletionSettings s; + TabCompletionSettings s; nickSuffix = s.completionSuffix(); if(!enabled) { @@ -150,7 +150,13 @@ bool TabCompleter::eventFilter(QObject *obj, QEvent *event) { // this determines the sort order bool TabCompleter::CompletionKey::operator<(const CompletionKey &other) const { IrcUser *thisUser = _currentNetwork->ircUser(this->nick); + if(thisUser && _currentNetwork->isMe(thisUser)) + return false; + IrcUser *thatUser = _currentNetwork->ircUser(other.nick); + if(thatUser && _currentNetwork->isMe(thatUser)) + return true; + if(!thisUser || !thatUser) return QString::localeAwareCompare(this->nick, other.nick) < 0;