mobile: application variable unused in main

Simplify starting application.
instead of declaring var. application, and the setting unused,
simple do the "new QApplication" without a variable.

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-05-21 20:57:10 +02:00 committed by Dirk Hohndel
parent 21ee440e5f
commit 99acff1b05
2 changed files with 6 additions and 4 deletions

View file

@ -40,8 +40,7 @@ int main(int argc, char **argv)
int i; int i;
bool no_filenames = true; bool no_filenames = true;
QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true")); QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
QApplication *application = new QApplication(argc, argv); new QApplication(argc, argv);
(void)application;
QStringList files; QStringList files;
QStringList importedFiles; QStringList importedFiles;
QStringList arguments = QCoreApplication::arguments(); QStringList arguments = QCoreApplication::arguments();

View file

@ -24,8 +24,11 @@ int main(int argc, char **argv)
int i; int i;
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true")); QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
QApplication *application = new QApplication(argc, argv);
(void)application; // Start application
new QApplication(argc, argv);
// and get comand line arguments
QStringList arguments = QCoreApplication::arguments(); QStringList arguments = QCoreApplication::arguments();
subsurface_console_init(); subsurface_console_init();