Skip to content

Commit

Permalink
Merge branch 'crms' of https://github.com/zcobell/MetOceanViewer into…
Browse files Browse the repository at this point in the history
… crms
  • Loading branch information
zcobell committed Jul 7, 2019
2 parents 66f1e74 + 7397dd8 commit f551181
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions MetOceanViewer/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ int main(int argc, char *argv[]) {

QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

//...Check for the internet connection
if (!Generic::isConnectedToNetwork()) {
QMessageBox::critical(nullptr,
QObject::tr("Internet Connection Not Detected"),
QObject::tr("No internet connection was detected.\n"
"The program will now be terminated."));
return 1;
}

Q_INIT_RESOURCE(resource_files);

//...Display the splash screen
Expand All @@ -46,15 +55,6 @@ int main(int argc, char *argv[]) {
//...Generate the config directory if required
Generic::createConfigDirectory();

//...Check for the internet connection
if (!Generic::isConnectedToNetwork()) {
QMessageBox::critical(nullptr,
QObject::tr("Internet Connection Not Detected"),
QObject::tr("No internet connection was detected.\n"
"The program will now be terminated."));
return 1;
}

// Check for drag/drop operations
if (argc == 2) {
sessionFile = QCoreApplication::arguments().at(1);
Expand Down

0 comments on commit f551181

Please sign in to comment.