Bug 301808 - kile-2.1.2 (kde-4.8.90) regression: cannot open project with "kile file.kilepr"
Summary: kile-2.1.2 (kde-4.8.90) regression: cannot open project with "kile file.kilepr"
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-13 11:26 UTC by Andreas K. Huettel
Modified: 2012-06-19 20:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas K. Huettel 2012-06-13 11:26:53 UTC
Current working directory is $HOME/some/subdir, and in this subdir there is a kile project with project file paper.kilepr. 

When I try to open kile with that project, using the command
  kile paper.kilepr &
a dialog box pops up telling me "The project $HOME/paper.kilepr cannot be found. Remove from recently used....". (Note the path!) Kile opens "empty". 

This worked fine in 4.8.3.
Comment 1 Michel Ludwig 2012-06-17 19:30:49 UTC
Which version of Qt are you using?

I'm using Qt 4.8.2 here and 'QDir::currentPath()' seems to return the wrong path...
Comment 2 Andreas K. Huettel 2012-06-18 08:01:58 UTC
(In reply to comment #1)
> Which version of Qt are you using?
> 
> I'm using Qt 4.8.2 here and 'QDir::currentPath()' seems to return the wrong
> path...

Qt 4.8.2 here too...
Comment 3 Michel Ludwig 2012-06-18 20:35:10 UTC
Git commit f0c365b46be65093d5b33864553df500a985cbfe by Michel Ludwig.
Committed on 18/06/2012 at 22:29.
Pushed by mludwig into branch '2.1'.

Ensure that the current working directory isn't changed from within Kile

Otherwise, projects that are to be opened and which are given as relative path
arguments to Kile cannot be opened correctly.

Also, remove the warning about running sessions which originates from Konsole.

M  +16   -12   src/main.cpp
M  +0    -2    src/widgets/konsolewidget.cpp

http://commits.kde.org/kile/f0c365b46be65093d5b33864553df500a985cbfe
Comment 4 Michel Ludwig 2012-06-18 20:35:11 UTC
Git commit 0f44079d5ef7493587b35fb9edbca555de41539e by Michel Ludwig.
Committed on 18/06/2012 at 22:29.
Pushed by mludwig into branch 'master'.

Ensure that the current working directory isn't changed from within Kile

Otherwise, projects that are to be opened and which are given as relative path
arguments to Kile cannot be opened correctly.

Also, remove the warning about running sessions which originates from Konsole.

M  +16   -12   src/main.cpp
M  +0    -2    src/widgets/konsolewidget.cpp

http://commits.kde.org/kile/0f44079d5ef7493587b35fb9edbca555de41539e
Comment 5 Michel Ludwig 2012-06-18 20:37:10 UTC
Just for the record, the problem was located within Kile (and due to a slightly wrong usage of the Konsole widget). 'QDir::currentPath()' was working fine.
Comment 6 Andreas K. Huettel 2012-06-18 22:17:44 UTC
Awesome, thanks a lot. I've tried to backport this to our Gentoo kile-2.1.2, only thing I had to modify was the last chunk of the patch, see below for how it looks now. Seems to work fine, projects are loaded correctly. 

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());
        }
Comment 7 Michel Ludwig 2012-06-19 08:12:15 UTC
Yes, seems to look fine.
Comment 8 Michel Ludwig 2012-06-19 20:28:32 UTC
Git commit 98333619440d955ce55db8b48e6d3bd09ddc92ab by Michel Ludwig.
Committed on 19/06/2012 at 22:24.
Pushed by mludwig into branch '2.1'.

Use 'TerminalInterface::showShellInDir' again to avoid problems with older Konsole versions (4.5)

M  +3    -0    src/widgets/konsolewidget.cpp

http://commits.kde.org/kile/98333619440d955ce55db8b48e6d3bd09ddc92ab
Comment 9 Michel Ludwig 2012-06-19 20:28:34 UTC
Git commit 5b69812b8030084f5844812fa1eed71ccc4b9ac9 by Michel Ludwig.
Committed on 19/06/2012 at 22:24.
Pushed by mludwig into branch 'master'.

Use 'TerminalInterface::showShellInDir' again to avoid problems with older Konsole versions (4.5)

M  +3    -0    src/widgets/konsolewidget.cpp

http://commits.kde.org/kile/5b69812b8030084f5844812fa1eed71ccc4b9ac9