Add download info popup on Maemo. Fix a warning.
authorAkos Polster <akos@pipacs.com>
Sat, 30 Oct 2010 14:31:28 +0000 (16:31 +0200)
committerAkos Polster <akos@pipacs.com>
Sat, 30 Oct 2010 14:31:28 +0000 (16:31 +0200)
search.cpp
searchresultsdialog.cpp

index a2ca1ba..97755a0 100644 (file)
@@ -160,7 +160,7 @@ void Search::downloadFinished()
 
     // Handle download success
     QByteArray data = downloadReply->readAll();
-    quint64 size = (quint64)data.size();
+    qint64 size = (qint64)data.size();
     qDebug() << "Got" << size << "bytes";
     downloadReply->deleteLater();
     downloadReply = 0;
index 09bc217..754527a 100644 (file)
@@ -1,6 +1,10 @@
 #include <stdio.h>
 #include <QtGui>
 
+#ifdef Q_WS_MAEMO_5
+#include <QtMaemo5/QMaemo5InformationBox>
+#endif
+
 #include "listview.h"
 #include "searchresultsdialog.h"
 #include "searchresultinfodialog.h"
@@ -101,5 +105,10 @@ void SearchResultsDialog::onEndDownload(int status, const Search::Result &result
         if (-1 != row) {
             list->model()->removeRow(row);
         }
+#ifdef Q_WS_MAEMO_5
+        QMaemo5InformationBox::information(this,
+            tr("Downloaded \"%1\"\nand added to the library").arg(result.title),
+            QMaemo5InformationBox::DefaultTimeout);
+#endif
     }
 }