diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2012-06-18 22:22:32 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2012-06-18 22:22:32 +0000 |
commit | efe33691e27b77379f366e202226d8fa29358066 (patch) | |
tree | 413df66857927be175c6bde8091f6151b9b699c3 /app-editors/kile/files | |
parent | USE=c++0x is gone from qt-webkit. (diff) | |
download | gentoo-2-efe33691e27b77379f366e202226d8fa29358066.tar.gz gentoo-2-efe33691e27b77379f366e202226d8fa29358066.tar.bz2 gentoo-2-efe33691e27b77379f366e202226d8fa29358066.zip |
Add fix for kdebug 301808, incorrect working dir used
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'app-editors/kile/files')
-rw-r--r-- | app-editors/kile/files/kile-2.1.2-cwd.patch | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/app-editors/kile/files/kile-2.1.2-cwd.patch b/app-editors/kile/files/kile-2.1.2-cwd.patch new file mode 100644 index 000000000000..cf09b56c7c5c --- /dev/null +++ b/app-editors/kile/files/kile-2.1.2-cwd.patch @@ -0,0 +1,89 @@ +diff -ruN kile-2.1.2.orig/src/main.cpp kile-2.1.2/src/main.cpp +--- kile-2.1.2.orig/src/main.cpp 2012-04-22 18:54:51.000000000 +0200 ++++ kile-2.1.2/src/main.cpp 2012-06-19 00:10:46.096292174 +0200 +@@ -43,19 +43,19 @@ + * Complete a relative paths to absolute ones. + * Also accepts URLs of the form file:relativepath. + */ +-QString completePath(const QString &path) ++QString completePath(const QString &path, const QString& currentPath) + { + QString fullpath(path); + + KILE_DEBUG() << "==complete path is " << path; +- if( QDir::isRelativePath(path) ) { ++ if(QDir::isRelativePath(path)) { + if(path.startsWith("file:")) { + KUrl url(path); +- url.setFileName(completePath(url.toLocalFile())); ++ url.setFileName(completePath(url.toLocalFile(), currentPath)); + fullpath = url.url(); + } + else if(path.indexOf(QRegExp("^[a-z]+:")) == -1) { +- fullpath = QDir::currentPath() + QDir::separator() + path; ++ fullpath = currentPath + QDir::separator() + path; + } + } + +@@ -138,6 +138,10 @@ + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + bool running = false; + ++ // we save the current path here to avoid problems when it's (erroneously) changed later ++ // (for instance, when a new KonsoleWidget is created, see #301808) ++ const QString currentPath = QDir::currentPath(); ++ + // this has to go before the DBus connection + KApplication app; + +@@ -151,13 +155,13 @@ + for(int i = 0; i < args->count(); ++i) { + //FIXME: check whether this can be used to open Urls + if(isProject(args->arg(i))) { +- kile->openProject(completePath(args->arg(i))); ++ kile->openProject(completePath(args->arg(i), currentPath)); + } + else if(args->arg(i) == "-"){ + kile->openDocument(readDataFromStdin()); + } + else { +- kile->openDocument(completePath(args->arg(i))); ++ kile->openDocument(completePath(args->arg(i), currentPath)); + } + } + +@@ -175,16 +179,16 @@ + + for ( int i = 0; i < args->count(); ++i ) { + QString path = args->arg(i); +- path = completePath(path); ++ path = completePath(path, currentPath); + +- if ( isProject(args->arg(i)) ){ +- interface->call("openProject",path); ++ if (isProject(args->arg(i))) { ++ interface->call("openProject", path); + } +- else if(args->arg(i) == "-"){ +- interface->call("openDocument",readDataFromStdin()); ++ else if(args->arg(i) == "-") { ++ interface->call("openDocument", readDataFromStdin()); + } + else { +- interface->call("openDocument",path); ++ interface->call("openDocument", path); + } + } + +diff -ruN kile-2.1.2.orig/src/widgets/konsolewidget.cpp kile-2.1.2/src/widgets/konsolewidget.cpp +--- kile-2.1.2.orig/src/widgets/konsolewidget.cpp 2012-04-22 18:54:51.000000000 +0200 ++++ kile-2.1.2/src/widgets/konsolewidget.cpp 2012-06-19 00:12:18.451297729 +0200 +@@ -78,8 +78,6 @@ + layout()->addWidget(m_part->widget()); + setFocusProxy(m_part->widget()); + connect(m_part, SIGNAL(destroyed()), this, SLOT(slotDestroyed())); +- +- m_term->showShellInDir(QString()); + } + + |