- else if(action == opAction) { executeCommand(bufferInfo, QString("/OP %1").arg(nick)); }
- else if(action == deOpAction) { executeCommand(bufferInfo, QString("/DEOP %1").arg(nick)); }
- else if(action == voiceAction) { executeCommand(bufferInfo, QString("/VOICE %1").arg(nick)); }
- else if(action == deVoiceAction) { executeCommand(bufferInfo, QString("/DEVOICE %1").arg(nick)); }
+ 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();
+}