X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/6719072837f30c1822768da65e6ea222e987e32f..272aa65bb55dd31f58e8a8e24ea7bc8bd2712daa:/src/main.cpp diff --git a/src/main.cpp b/src/main.cpp index a4b1b1963..6e9ef0b2a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include @@ -38,7 +37,7 @@ #endif #include -extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) +int main(int argc, char **argv) { #ifndef Q_OS_WIN // Prohibit using sudo or kdesu (but allow using the root user directly) @@ -203,23 +202,17 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) // If the user passed any URLs to Dolphin, open those in the // window after session-restoring it if (startedWithURLs) { - mainWindow->openDirectories(urls, splitView); + if (openFiles) { + mainWindow->openFiles(urls, splitView); + } else { + mainWindow->openDirectories(urls, splitView); + } } - - // Now handle invalid locations in the set of active views to - // avoid issues like https://bugs.kde.org/show_bug.cgi?id=427619 - mainWindow->setViewsWithInvalidPathsToHome(); } else { qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!"; } } } - Qt::ToolBarArea area = mainWindow->toolBarArea(mainWindow->toolBar()); - if (area != Qt::TopToolBarArea && area != Qt::BottomToolBarArea) { - // Migrate users with disabled tool bar positions. - // Remove this a few years from now (2020). - mainWindow->addToolBar(Qt::TopToolBarArea, mainWindow->toolBar()); - } #ifdef HAVE_KUSERFEEDBACK auto feedbackProvider = DolphinFeedbackProvider::instance();