int main(int argc, char *argv[]) { KAboutData aboutData( "gwenview", /* appname */ 0, /* catalogName */ ki18n("Gwenview"), /* programName */ GWENVIEW_VERSION); /* version */ aboutData.setShortDescription(ki18n("An Image Viewer")); aboutData.setLicense(KAboutData::License_GPL); aboutData.setCopyrightStatement(ki18n("Copyright 2000-2010 Aurélien Gâteau")); aboutData.addAuthor( ki18n("Aurélien Gâteau"), ki18n("Main developer"), "*****@*****.**"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineOptions options; options.add("f", ki18n("Start in fullscreen mode")); options.add("s", ki18n("Start in slideshow mode")); options.add("+[file or folder]", ki18n("A starting file or folder")); KCmdLineArgs::addCmdLineOptions(options); KApplication app; Gwenview::ImageFormats::registerPlugins(); // startHelper must live for the whole live of the application StartHelper startHelper; if (app.isSessionRestored()) { kRestoreMainWindows<Gwenview::MainWindow>(); } else { startHelper.createMainWindow(); } return app.exec(); }
int main(int argc, char *argv[]) { QScopedPointer<KAboutData> aboutData( Gwenview::createAboutData( "gwenview", /* appname */ 0, /* catalogName */ ki18n("Gwenview") /* programName */ )); aboutData->setShortDescription(ki18n("An Image Viewer")); KCmdLineArgs::init(argc, argv, aboutData.data()); KCmdLineOptions options; options.add("f", ki18n("Start in fullscreen mode")); options.add("s", ki18n("Start in slideshow mode")); options.add("+[file or folder]", ki18n("A starting file or folder")); KCmdLineArgs::addCmdLineOptions(options); KApplication app; Gwenview::ImageFormats::registerPlugins(); // startHelper must live for the whole life of the application StartHelper startHelper; if (app.isSessionRestored()) { kRestoreMainWindows<Gwenview::MainWindow>(); } else { startHelper.createMainWindow(); } return app.exec(); }