]> git.sur5r.net Git - minitube/commitdiff
lazy integrity check
authorFlavio Tordini <flavio.tordini@gmail.com>
Sun, 30 Aug 2015 09:42:12 +0000 (11:42 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Sun, 30 Aug 2015 09:42:12 +0000 (11:42 +0200)
src/main.cpp
src/mainwindow.cpp

index 53c19ba3d07b541c0625b71263606f64783b88c3..651506775cdda169d94e2aaa79dea71f7f87b741 100644 (file)
@@ -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();
 }
index a77ac272e2a470fc95249bf544350a38dadcb4bc..6eb56c95089e589d5984c42e9cde51ddfacff562 100644 (file)
@@ -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<View *> (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) {