From: Flavio Tordini Date: Sun, 30 Aug 2015 09:42:12 +0000 (+0200) Subject: lazy integrity check X-Git-Tag: 2.5~29 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8cdf4662f16ad0496b2883ae6bd02470c7365887;p=minitube lazy integrity check --- diff --git a/src/main.cpp b/src/main.cpp index 53c19ba..6515067 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -128,10 +128,7 @@ int main(int argc, char **argv) { // all string literals are UTF-8 // QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); -#ifdef APP_INTEGRITY - if (Extra::integrityCheck()) -#endif - showWindow(app, dataDir); + showWindow(app, dataDir); return app.exec(); } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index a77ac27..6eb56c9 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -221,15 +221,22 @@ void MainWindow::lazyInit() { JsFunctions::instance(); - checkForUpdate(); - // Hack to give focus to searchlineedit QMetaObject::invokeMethod(views->currentWidget(), "appear"); View* view = qobject_cast (views->currentWidget()); QString desc = view->metadata().value("description").toString(); if (!desc.isEmpty()) showMessage(desc); +#ifdef APP_INTEGRITY + if (!Extra::integrityCheck()) { + deleteLater(); + return; + } +#endif + ChannelAggregator::instance()->start(); + + checkForUpdate(); } void MainWindow::changeEvent(QEvent *e) {