Code cleanup
[GPXSee.git] / src / main.cpp
blob0bfce86a8189437e292008728ec2bf5ef08ed7d3
1 #include <QtGlobal>
2 #include <QSurfaceFormat>
3 #include "GUI/app.h"
4 #include "GUI/timezoneinfo.h"
6 int main(int argc, char *argv[])
8 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
9 QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
10 QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
12 qRegisterMetaTypeStreamOperators<TimeZoneInfo>("TimeZoneInfo");
13 #else // QT6
14 qRegisterMetaType<TimeZoneInfo>("TimeZoneInfo");
15 #endif // QT6
17 QSurfaceFormat fmt;
18 fmt.setProfile(QSurfaceFormat::CoreProfile);
19 #ifdef Q_OS_ANDROID
20 fmt.setRenderableType(QSurfaceFormat::OpenGLES);
21 #else // Android
22 fmt.setVersion(3, 2);
23 fmt.setRenderableType(QSurfaceFormat::OpenGL);
24 #endif // Android
25 fmt.setDepthBufferSize(24);
26 fmt.setStencilBufferSize(8);
27 fmt.setSamples(4);
28 QSurfaceFormat::setDefaultFormat(fmt);
30 App app(argc, argv);
31 return app.run();