Commit c316bcbf authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #266 from Susurrus/issue_261

No longer automatically connect UDP on startup.
parents 1517e8e5 e003dd7a
......@@ -160,37 +160,6 @@ QGCCore::QGCCore(int &argc, char* argv[]) : QApplication(argc, argv)
splashScreen->finish(mainWindow);
if (upgraded) mainWindow->showInfoMessage(tr("Default Settings Loaded"), tr("QGroundControl has been upgraded from version %1 to version %2. Some of your user preferences have been reset to defaults for safety reasons. Please adjust them where needed.").arg(lastApplicationVersion).arg(QGC_APPLICATION_VERSION));
// Check if link could be connected
if (!udpLink->connect())
{
QMessageBox msgBox;
msgBox.setIcon(QMessageBox::Critical);
msgBox.setText("Could not connect UDP port. Is an instance of " + qAppName() + "already running?");
msgBox.setInformativeText("You will not be able to receive data via UDP. Please check that you're running the right executable and then re-start " + qAppName() + ". Do you want to close the application?");
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::No);
int ret = msgBox.exec();
// Close the message box shortly after the click to prevent accidental clicks
QTimer::singleShot(15000, &msgBox, SLOT(reject()));
// Exit application
if (ret == QMessageBox::Yes)
{
//mainWindow->close();
QTimer::singleShot(200, mainWindow, SLOT(close()));
}
}
// forever
// {
// QGC::SLEEP::msleep(5000);
// }
// mainWindow->close();
// mainWindow->deleteLater();
// QGC::SLEEP::msleep(200);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment