X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Ftabcompleter.cpp;h=547bba08999f4a1c18450e4fb92e4217944eed3b;hp=60a74fb880597c10fbe4a591f723e1dfca5593c0;hb=86a93bd97a174c311656cc4e3bc00036e7bcf3b7;hpb=50706d89d4d60e258ebb6873d3778383621898e4 diff --git a/src/uisupport/tabcompleter.cpp b/src/uisupport/tabcompleter.cpp index 60a74fb8..547bba08 100644 --- a/src/uisupport/tabcompleter.cpp +++ b/src/uisupport/tabcompleter.cpp @@ -37,15 +37,17 @@ TabCompleter::TabCompleter(InputLine *inputLine_) } void TabCompleter::buildCompletionList() { + completionList.clear(); + nextCompletion = completionList.begin(); // this is the first time tab is pressed -> build up the completion list and it's iterator QModelIndex currentIndex = Client::bufferModel()->currentIndex(); if(!currentIndex.data(NetworkModel::BufferIdRole).isValid()) return; - NetworkId networkId = currentIndex.data(NetworkModel::NetworkIdRole).toUInt(); + NetworkId networkId = currentIndex.data(NetworkModel::NetworkIdRole).value(); QString channelName = currentIndex.sibling(currentIndex.row(), 0).data().toString(); - Network *network = Client::network(networkId); + const Network *network = Client::network(networkId); if(!network) return; @@ -70,7 +72,6 @@ void TabCompleter::buildCompletionList() { completionList.sort(); nextCompletion = completionList.begin(); lastCompletionLength = tabAbbrev.length(); - } void TabCompleter::ircUserJoinedOrParted(IrcUser *ircUser) { @@ -79,6 +80,7 @@ void TabCompleter::ircUserJoinedOrParted(IrcUser *ircUser) { } void TabCompleter::complete() { + return; // FIXME if(!enabled) { buildCompletionList(); enabled = true;