- else if(result == kickAction) { Client::instance()->userInput(bufferInfo, "/KICK " + username); }
- else if(result == kickBanAction) { Client::instance()->userInput(bufferInfo, "/KICKBAN " + username); }
- else if(result == queryAction) { Client::instance()->userInput(bufferInfo, "/QUERY " + username); }
+ QModelIndex topLevelIdx;
+ for(int i = 0; i < model()->rowCount(rootIndex()); i++) {
+ topLevelIdx = model()->index(i, 0, rootIndex());
+ if(isExpanded(topLevelIdx))
+ continue;
+ else {
+ expand(topLevelIdx);
+ if(i < model()->rowCount(rootIndex()) - 1)
+ QCoreApplication::postEvent(this, new ExpandAllEvent);
+ break;
+ }
+ }
+ event->accept();