Nothing, really.
authorAkos Polster <akos@pipacs.com>
Sun, 7 Nov 2010 01:22:55 +0000 (02:22 +0100)
committerAkos Polster <akos@pipacs.com>
Sun, 7 Nov 2010 01:22:55 +0000 (02:22 +0100)
main.cpp
mainwindow.cpp
model/extractzip.cpp
model/ncxhandler.h
model/opshandler.h
widgets/progressdialog.cpp
widgets/progressdialog.h

index 306ea83..1676a8e 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -41,7 +41,6 @@ int main(int argc, char *argv[])
 
     {
         MainWindow w;
-        w.show();
         ret = a.exec();
     }
 
index 33a730a..bfb9007 100755 (executable)
@@ -59,7 +59,7 @@ MainWindow::MainWindow(QWidget *parent):
     layout->addWidget(view);
 
     // Progress
-    progress = new Progress(central);
+    progress = new Progress(this);
 
     // Settings dialog
     settings = new QDialog(this);
index 98272bc..b9bdc82 100644 (file)
@@ -51,11 +51,12 @@ int doExtractCurrentFile(unzFile uf, const QStringList &excludedExtensions)
         QString name(fileNameInZip);
         for (int i = 0; i < excludedExtensions.length(); i++) {
             if (name.endsWith(excludedExtensions[i], Qt::CaseInsensitive)) {
-                qDebug() << "Skipping" << name;
+                qDebug() << "extractCurrentFile: Skipping" << name;
                 free(buf);
                 return UNZ_OK;
             }
         }
+        qDebug() << "extractCurrentFile: Extracting" << name;
 
         const char *writeFileName;
         int skip = 0;
index 1585942..6121992 100644 (file)
@@ -29,7 +29,6 @@ public:
             contentItem.size = 0;
             book.content[id] = contentItem;
             book.chapters.append(id);
-            qDebug() << "" << id << "name" << name << "href" << href;
             foreach (TreeItem *child, children) {
                 child->addToBook(book);
             }
@@ -62,10 +61,9 @@ public:
             }
         } else if (name == "navPoint") {
             if (currentItem) {
-                qDebug() << "NcxHandler::endElement  " << currentItem->id;
                 currentItem = currentItem->parent;
                 if (currentItem == 0) {
-                    qDebug() << " Root item reached, dumping tree";
+                    // Root navigation point reached, dump TOC tree
                     rootItem->addToBook(book);
                     delete rootItem;
                     rootItem = 0;
@@ -82,7 +80,6 @@ public:
         currentText = "";
         if (name == "navPoint") {
             TreeItem *item = new TreeItem(attrs.value("id"), currentItem);
-            qDebug() << "NcxHandler::startElement" << attrs.value("id");
             if (!rootItem) {
                 rootItem = item;
             }
index 8440afb..f764860 100644 (file)
@@ -47,11 +47,7 @@ public:
             QString key = attrs.value("id");
             book.content[key] = item;
             partCount++;
-            qDebug() << "OpsHandler::startElement: name" << item.name << "href"
-                    << attrs.value("href") << "id" << key;
         } else if (name == "itemref") {
-            qDebug() << "OpsHandler::startElement: parts[" << book.parts.size()
-                    << "]" << attrs.value("idref");
             book.parts.append(attrs.value("idref"));
         }
         return true;
index 492d5da..7d19f39 100644 (file)
@@ -23,3 +23,9 @@ void ProgressDialog::showWait()
     setValue(0);
     show();
 }
+
+void ProgressDialog::show()
+{
+    TRACE;
+    QProgressDialog::show();
+}
index 6303468..d38c7ff 100644 (file)
@@ -12,8 +12,12 @@ class ProgressDialog: public QProgressDialog
 public:
     explicit ProgressDialog(const QString &label, QWidget *parent = 0);
 
+public slots:
     /** Show wait animation instead of progress bar. */
     void showWait();
+
+    /** Show dialog, adjust position if needed. */
+    void show();
 };
 
 #endif // PROGRESSDIALOG_H