added debug helper for the networkmodel
authorMarcus Eggenberger <egs@quassel-irc.org>
Sun, 27 Jul 2008 12:07:46 +0000 (14:07 +0200)
committerMarcus Eggenberger <egs@quassel-irc.org>
Sun, 27 Jul 2008 12:07:46 +0000 (14:07 +0200)
src/qtui/mainwin.cpp
src/qtui/mainwin.h
src/qtui/ui/mainwin.ui

index deb3543..5dd20f8 100644 (file)
@@ -695,3 +695,12 @@ void MainWin::connectOrDisconnectFromNet() {
   else net->requestDisconnect();
 }
 
+
+
+void MainWin::on_actionDebugNetworkModel_triggered(bool) {
+  QTreeView *view = new QTreeView;
+  view->setAttribute(Qt::WA_DeleteOnClose);
+  view->setModel(Client::networkModel());
+  view->expandAll();
+  view->show();
+}
index a50976e..f352f7a 100644 (file)
@@ -83,6 +83,7 @@ class MainWin : public QMainWindow {
     void showManageViewsDlg();
     void showAboutDlg();
     void showDebugConsole();
+    void on_actionDebugNetworkModel_triggered(bool);
 
     void showCoreConnectionDlg(bool autoConnect = false);
     void coreConnectionDlgFinished(int result);
index e63a6bc..a64cfbd 100644 (file)
     <property name="title" >
      <string>&amp;Help</string>
     </property>
+    <widget class="QMenu" name="menuDebug" >
+     <property name="title" >
+      <string>Debug</string>
+     </property>
+     <addaction name="actionDebugNetworkModel" />
+    </widget>
     <addaction name="actionAboutQuassel" />
     <addaction name="actionAboutQt" />
+    <addaction name="menuDebug" />
    </widget>
    <addaction name="menuFile" />
    <addaction name="menuViews" />
     <string>&amp;Edit Networks...</string>
    </property>
   </action>
+  <action name="actionDebugNetworkModel" >
+   <property name="text" >
+    <string>NetworkModel</string>
+   </property>
+  </action>
  </widget>
  <customwidgets>
   <customwidget>