remove-qdialog.patch 1.26 KB
Newer Older
Philip Müller's avatar
Philip Müller committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
--- octopi-0.9.0/src/mainwindow_transaction.cpp.orig	2018-09-11 23:06:30.372366097 +0200
+++ octopi-0.9.0/src/mainwindow_transaction.cpp		2018-09-11 23:29:18.611088943 +0200
@@ -685,7 +685,6 @@ bool MainWindow::isInternetAvailable()
   //Test if Internet access exists
   if (!UnixCommand::hasInternetConnection())
   {
-    QMessageBox::critical(this, StrConstants::getError(), StrConstants::getInternetUnavailableError());
     res=false;
   }
 
--- octopi-0.9.0/notifier/octopi-notifier/mainwindow.cpp.orig	2018-09-11 23:06:30.322364559 +0200
+++ octopi-0.9.0/notifier/octopi-notifier/mainwindow.cpp	2018-09-11 23:14:31.120490388 +0200
@@ -630,20 +630,10 @@ bool MainWindow::isInternetAvailable()
 {
   bool res=true;
 
-  //First we create a fake window to act as about dialog's parent
-  //Otherwise the dialog appears at a random screen point!
-  QMainWindow *fake = new QMainWindow();
-  fake->setWindowIcon(m_icon);
-  fake->setVisible(false);
-  QScreen *sc = QGuiApplication::primaryScreen();
-  fake->setGeometry(sc->geometry());
-
   //Test if Internet access exists
   if (!UnixCommand::hasInternetConnection())
   {
-    QMessageBox::critical(fake, StrConstants::getError(), StrConstants::getInternetUnavailableError());
     res=false;
-    delete fake;
   }
 
   return res;