Changeset View
Changeset View
Standalone View
Standalone View
app/main.cpp
Show All 32 Lines | |||||
33 | #include <KAboutData> | 33 | #include <KAboutData> | ||
34 | #include <KActionCollection> | 34 | #include <KActionCollection> | ||
35 | #include <KIO/CopyJob> | 35 | #include <KIO/CopyJob> | ||
36 | #include <KLocalizedString> | 36 | #include <KLocalizedString> | ||
37 | 37 | | |||
38 | // Local | 38 | // Local | ||
39 | #include <lib/about.h> | 39 | #include <lib/about.h> | ||
40 | #include <lib/imageformats/imageformats.h> | 40 | #include <lib/imageformats/imageformats.h> | ||
41 | #include <lib/gwenviewconfig.h> | ||||
41 | #include "mainwindow.h" | 42 | #include "mainwindow.h" | ||
42 | 43 | | |||
43 | #ifdef HAVE_FITS | 44 | #ifdef HAVE_FITS | ||
44 | // This hack is needed to include the fitsplugin moc file in main.cpp | 45 | // This hack is needed to include the fitsplugin moc file in main.cpp | ||
45 | // Otherwise the linker complains about: undefined reference to `qt_static_plugin_FitsPlugin()' | 46 | // Otherwise the linker complains about: undefined reference to `qt_static_plugin_FitsPlugin()' | ||
46 | // This symbol is defined in the moc file, but it is not a visible symbol after libgwenview is linked. | 47 | // This symbol is defined in the moc file, but it is not a visible symbol after libgwenview is linked. | ||
47 | // If Q_IMPORT_PLUGIN(FitsPlugin) is moved to the library, gwenview crashes on the first call to FitsPlugin() | 48 | // If Q_IMPORT_PLUGIN(FitsPlugin) is moved to the library, gwenview crashes on the first call to FitsPlugin() | ||
48 | // when the vtable is looked up in the plugin registration. | 49 | // when the vtable is looked up in the plugin registration. | ||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | 123 | { | |||
146 | parser.process(app); | 147 | parser.process(app); | ||
147 | aboutData.data()->processCommandLine(&parser); | 148 | aboutData.data()->processCommandLine(&parser); | ||
148 | 149 | | |||
149 | //KF5 TODO | 150 | //KF5 TODO | ||
150 | //Gwenview::ImageFormats::registerPlugins(); | 151 | //Gwenview::ImageFormats::registerPlugins(); | ||
151 | 152 | | |||
152 | // startHelper must live for the whole life of the application | 153 | // startHelper must live for the whole life of the application | ||
153 | StartHelper startHelper(parser.positionalArguments(), | 154 | StartHelper startHelper(parser.positionalArguments(), | ||
154 | parser.isSet(QStringLiteral("f")), | 155 | parser.isSet(QStringLiteral("f")) | ||
156 | ? true | ||||
157 | : Gwenview::GwenviewConfig::fullScreenModeActive(), | ||||
155 | parser.isSet(QStringLiteral("s"))); | 158 | parser.isSet(QStringLiteral("s"))); | ||
156 | if (app.isSessionRestored()) { | 159 | if (app.isSessionRestored()) { | ||
157 | kRestoreMainWindows<Gwenview::MainWindow>(); | 160 | kRestoreMainWindows<Gwenview::MainWindow>(); | ||
158 | } else { | 161 | } else { | ||
159 | startHelper.createMainWindow(); | 162 | startHelper.createMainWindow(); | ||
160 | } | 163 | } | ||
161 | 164 | | |||
162 | // Workaround for QTBUG-38613 | 165 | // Workaround for QTBUG-38613 | ||
Show All 10 Lines |