diff options
| author | Emmanuel Pescosta <[email protected]> | 2014-07-08 19:16:17 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2014-07-08 19:16:17 +0200 |
| commit | 00754dda30dc3982d3e8edc5996cdb11b62fd99d (patch) | |
| tree | ea4dfeae90299c5dcbfa19ff2f950e7e1e42347a /src/dolphinapplication.cpp | |
| parent | c25b5018989b8724ea6ad1b4d4971fccf0e75d09 (diff) | |
Avoid opening unused tabs which are closed again after startup has finished (when directory/file urls are given)
Instead of always opening a new tab with the home url and closing it again when directory/file urls are passed on,
we now use the given directories/files directly to open new tabs on startup.
Makes the code easier and we can reuse openDirectories/openFiles in future (if needed).
REVIEW: 118966
Diffstat (limited to 'src/dolphinapplication.cpp')
| -rw-r--r-- | src/dolphinapplication.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dolphinapplication.cpp b/src/dolphinapplication.cpp index 8e83a8592..a4b105b90 100644 --- a/src/dolphinapplication.cpp +++ b/src/dolphinapplication.cpp @@ -34,7 +34,6 @@ DolphinApplication::DolphinApplication() : m_mainWindow = new DolphinMainWindow(); m_mainWindow->setAttribute(Qt::WA_DeleteOnClose); - m_mainWindow->show(); KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); @@ -71,6 +70,9 @@ DolphinApplication::DolphinApplication() : } else { m_mainWindow->openDirectories(urls); } + } else { + const KUrl homeUrl(GeneralSettings::homeUrl()); + m_mainWindow->openNewActivatedTab(homeUrl); } if (resetSplitSettings) { @@ -78,6 +80,8 @@ DolphinApplication::DolphinApplication() : } args->clear(); + + m_mainWindow->show(); } DolphinApplication::~DolphinApplication() |
