From 7307ecac10b3879d8dc5732c546deb178a089bd0 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 26 Jul 2012 11:46:03 +0200 Subject: This should fix local files launch by console when rekonq is just loaded --- src/application.cpp | 2 -- src/main.cpp | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/application.cpp b/src/application.cpp index 17682647..07cbb0b8 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -72,7 +72,6 @@ // Qt Includes #include -#include #include @@ -175,7 +174,6 @@ Application::~Application() int Application::newInstance() { - KCmdLineArgs::setCwd(QDir::currentPath().toUtf8()); KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); // not that easy, indeed diff --git a/src/main.cpp b/src/main.cpp index de312530..87eb7fa2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,6 +35,8 @@ #include #include +// Qt Includes +#include static const char description[] = I18N_NOOP("A lightweight Web Browser for KDE based on WebKit"); @@ -212,6 +214,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) QCoreApplication::setApplicationName(QL1S("rekonq")); QCoreApplication::setApplicationVersion(REKONQ_VERSION); + KCmdLineArgs::setCwd(QDir::currentPath().toUtf8()); + if (app.isSessionRestored()) for (int i = 1; MainWindow::canBeRestored(i); i++) app.newMainWindow(false)->restore(i); -- cgit v1.2.1