/[gentoo-x86]/app-editors/kile/files/kile-2.1.2-cwd.patch
Gentoo

Contents of /app-editors/kile/files/kile-2.1.2-cwd.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Jun 18 22:22:32 2012 UTC (12 months ago) by dilfridge
Branch: MAIN
Add fix for kdebug 301808, incorrect working dir used

(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)

1 dilfridge 1.1 diff -ruN kile-2.1.2.orig/src/main.cpp kile-2.1.2/src/main.cpp
2     --- kile-2.1.2.orig/src/main.cpp 2012-04-22 18:54:51.000000000 +0200
3     +++ kile-2.1.2/src/main.cpp 2012-06-19 00:10:46.096292174 +0200
4     @@ -43,19 +43,19 @@
5     * Complete a relative paths to absolute ones.
6     * Also accepts URLs of the form file:relativepath.
7     */
8     -QString completePath(const QString &path)
9     +QString completePath(const QString &path, const QString& currentPath)
10     {
11     QString fullpath(path);
12    
13     KILE_DEBUG() << "==complete path is " << path;
14     - if( QDir::isRelativePath(path) ) {
15     + if(QDir::isRelativePath(path)) {
16     if(path.startsWith("file:")) {
17     KUrl url(path);
18     - url.setFileName(completePath(url.toLocalFile()));
19     + url.setFileName(completePath(url.toLocalFile(), currentPath));
20     fullpath = url.url();
21     }
22     else if(path.indexOf(QRegExp("^[a-z]+:")) == -1) {
23     - fullpath = QDir::currentPath() + QDir::separator() + path;
24     + fullpath = currentPath + QDir::separator() + path;
25     }
26     }
27    
28     @@ -138,6 +138,10 @@
29     KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
30     bool running = false;
31    
32     + // we save the current path here to avoid problems when it's (erroneously) changed later
33     + // (for instance, when a new KonsoleWidget is created, see #301808)
34     + const QString currentPath = QDir::currentPath();
35     +
36     // this has to go before the DBus connection
37     KApplication app;
38    
39     @@ -151,13 +155,13 @@
40     for(int i = 0; i < args->count(); ++i) {
41     //FIXME: check whether this can be used to open Urls
42     if(isProject(args->arg(i))) {
43     - kile->openProject(completePath(args->arg(i)));
44     + kile->openProject(completePath(args->arg(i), currentPath));
45     }
46     else if(args->arg(i) == "-"){
47     kile->openDocument(readDataFromStdin());
48     }
49     else {
50     - kile->openDocument(completePath(args->arg(i)));
51     + kile->openDocument(completePath(args->arg(i), currentPath));
52     }
53     }
54    
55     @@ -175,16 +179,16 @@
56    
57     for ( int i = 0; i < args->count(); ++i ) {
58     QString path = args->arg(i);
59     - path = completePath(path);
60     + path = completePath(path, currentPath);
61    
62     - if ( isProject(args->arg(i)) ){
63     - interface->call("openProject",path);
64     + if (isProject(args->arg(i))) {
65     + interface->call("openProject", path);
66     }
67     - else if(args->arg(i) == "-"){
68     - interface->call("openDocument",readDataFromStdin());
69     + else if(args->arg(i) == "-") {
70     + interface->call("openDocument", readDataFromStdin());
71     }
72     else {
73     - interface->call("openDocument",path);
74     + interface->call("openDocument", path);
75     }
76     }
77    
78     diff -ruN kile-2.1.2.orig/src/widgets/konsolewidget.cpp kile-2.1.2/src/widgets/konsolewidget.cpp
79     --- kile-2.1.2.orig/src/widgets/konsolewidget.cpp 2012-04-22 18:54:51.000000000 +0200
80     +++ kile-2.1.2/src/widgets/konsolewidget.cpp 2012-06-19 00:12:18.451297729 +0200
81     @@ -78,8 +78,6 @@
82     layout()->addWidget(m_part->widget());
83     setFocusProxy(m_part->widget());
84     connect(m_part, SIGNAL(destroyed()), this, SLOT(slotDestroyed()));
85     -
86     - m_term->showShellInDir(QString());
87     }
88    
89    

  ViewVC Help
Powered by ViewVC 1.1.20