Moved the initialization of QCoreApplication to main()