diff options
| author | Luboš Luňák <[email protected]> | 2008-01-22 18:06:28 +0000 |
|---|---|---|
| committer | Luboš Luňák <[email protected]> | 2008-01-22 18:06:28 +0000 |
| commit | c624666b53b678de541ca2946565eaecefb52a4c (patch) | |
| tree | d42946a7a3a1e039d48c3396855f1a79918a33b2 /src | |
| parent | 87b59ecda385d6cce9dcc51c1eb4006d4da5e930 (diff) | |
- fix session restore
- newInstance() from KUniqueApplication is actually harmful here
svn path=/branches/KDE/4.0/kdebase/apps/; revision=764846
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinapplication.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dolphinapplication.cpp b/src/dolphinapplication.cpp index ea18db132..4bec27492 100644 --- a/src/dolphinapplication.cpp +++ b/src/dolphinapplication.cpp @@ -73,21 +73,21 @@ void DolphinApplication::refreshMainWindows() int DolphinApplication::newInstance() { - int exitValue = KUniqueApplication::newInstance(); - KCmdLineArgs::setCwd(QDir::currentPath().toUtf8()); KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); + static bool first = true; if (args->count() > 0) { for (int i = 0; i < args->count(); ++i) { openWindow(args->url(i)); } - } else { + } else if( !first || !isSessionRestored()) { openWindow(KUrl()); } + first = false; args->clear(); - return exitValue; + return 0; } int DolphinApplication::openWindow(const KUrl& url) |
