#include "downloadmodel.h"
#include "video.h"
#include "constants.h"
+#include "MainWindow.h"
static DownloadManager *downloadManagerInstance = 0;
void DownloadManager::addItem(Video *video) {
// qDebug() << __FUNCTION__ << video->title();
-
+
#ifdef APP_DEMO
if (video->duration() >= 60*4) {
- QMessageBox msgBox(dynamic_cast<QWidget*>(parent())->window());
+ QMessageBox msgBox(MainWindow::instance());
msgBox.setIconPixmap(QPixmap(":/images/app.png").scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation));
msgBox.setText(tr("This is just the demo version of %1.").arg(Constants::NAME));
msgBox.setInformativeText(
return;
}
#endif
-
DownloadItem *item = itemForVideo(video);
if (item != 0) {