mirror of
https://github.com/KDE/konsole.git
synced 2026-02-02 03:11:31 -05:00
Make new sessions start in the same directory as the previously active session. Does not apply when creating a new tab from a specific profile.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=670566
This commit is contained in:
@@ -192,6 +192,20 @@ void SessionController::snapshot()
|
||||
_session->setTitle(Session::DisplayedTitleRole,_session->title(Session::NameRole));
|
||||
}
|
||||
|
||||
QString SessionController::currentDir() const
|
||||
{
|
||||
ProcessInfo* info = ProcessInfo::newInstance(_session->processId());
|
||||
info->update();
|
||||
|
||||
bool ok = false;
|
||||
QString path = info->currentDir(&ok);
|
||||
|
||||
if ( ok )
|
||||
return path;
|
||||
else
|
||||
return QString();
|
||||
}
|
||||
|
||||
KUrl SessionController::url() const
|
||||
{
|
||||
ProcessInfo* info = ProcessInfo::newInstance(_session->processId());
|
||||
|
||||
Reference in New Issue
Block a user