diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-02-16 00:06:28 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-02-16 00:06:28 +0100 |
commit | 4150695c5fff0504cf19ad74b3f185bd67397497 (patch) | |
tree | 9cf5744503e83c3deea72820cd26cdd4d39fde0b /src/main.cpp | |
parent | Modified adjam's mail (diff) | |
download | rekonq-4150695c5fff0504cf19ad74b3f185bd67397497.tar.xz |
new singleton Application class.
Try 1..
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9a779783..a97bb0d5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,11 +23,12 @@ #include <KAboutData> #include <KCmdLineArgs> +#include <KDebug> static const char description[] = I18N_NOOP("KDE Browser Webkit Based"); -static const char version[] = "0.0.3"; +static const char version[] = "0.0.4"; int main(int argc, char **argv) { @@ -53,13 +54,14 @@ int main(int argc, char **argv) KCmdLineOptions options; options.add( "+URL" , ki18n("Location to open") ); KCmdLineArgs::addCmdLineOptions( options ); + Application::addCmdLineOptions(); - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - - Application app(args, "rekonq"); - if (!app.isTheOnlyBrowser()) - return 0; - app.newMainWindow(); + if (!Application::start()) + { + kWarning() << "rekonq is already running!"; + return 0; + } + Application app; return app.exec(); } |