Initial release.
[dorian] / chaptersdialog.cpp
index 41aaf59..20f7824 100644 (file)
@@ -2,9 +2,9 @@
 
 #include "chaptersdialog.h"
 #include "book.h"
-#include "listview.h"
 
-ChaptersDialog::ChaptersDialog(Book *book, QWidget *parent): ListWindow(parent)
+ChaptersDialog::ChaptersDialog(Book *book, QWidget *parent):
+        ListWindow(tr("(No chapters)"), parent)
 {
     setWindowTitle(tr("Chapters"));
     if (book) {
@@ -15,9 +15,8 @@ ChaptersDialog::ChaptersDialog(Book *book, QWidget *parent): ListWindow(parent)
     }
     QStringListModel *model = new QStringListModel(data, this);
     setModel(model);
-    // FIXME
-    // connect(list, SIGNAL(activated(const QModelIndex &)),
-    //         this, SLOT(onItemActivated(const QModelIndex &)));
+    connect(this, SIGNAL(activated(const QModelIndex &)),
+            this, SLOT(onItemActivated(const QModelIndex &)));
 }
 
 void ChaptersDialog::onItemActivated(const QModelIndex &index)