Temporarily disabling tabcompletion in order to find out if it's the cause for Quasse...
[quassel.git] / src / uisupport / tabcompleter.cpp
index 60a74fb..547bba0 100644 (file)
@@ -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<NetworkId>();
   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;