# HG changeset patch # User Jacob Dawid # Date 1311958679 -7200 # Node ID dfbc6a12c6fb9a9420319b2d18203e84eeac702d # Parent 324adf6109e73cde58de09267a9d000d7e3ee89f Removed all occurences of ProcessInfo. diff --git a/gui/src/terminal/Session.cpp b/gui/src/terminal/Session.cpp --- a/gui/src/terminal/Session.cpp +++ b/gui/src/terminal/Session.cpp @@ -41,7 +41,6 @@ #include "kprocess.h" #include "kptydevice.h" -//#include "ProcessInfo.h" #include "Pty.h" #include "TerminalDisplay.h" #include "ShellCommand.h" @@ -262,25 +261,6 @@ _arguments = ShellCommand::expand (arguments); } -/* -QString -Session::currentWorkingDirectory () -{ - // only returned cached value - //if (_currentWorkingDir.isEmpty ()) - // updateWorkingDirectory (); - return _currentWorkingDir; -} -*/ -/* -ProcessInfo * -Session::updateWorkingDirectory () -{ - ProcessInfo *process = getProcessInfo (); - _currentWorkingDir = process->validCurrentDir (); - return process; -}*/ - QList < TerminalDisplay * >Session::views () const { return _views; @@ -928,97 +908,6 @@ return QString (); } -/* -ProcessInfo * -Session::getProcessInfo () -{ - ProcessInfo *process; - - if (isForegroundProcessActive ()) - process = _foregroundProcessInfo; - else - { - updateSessionProcessInfo (); - process = _sessionProcessInfo; - } - - return process; -}*/ - - -void -Session::updateSessionProcessInfo () -{ - /* - Q_ASSERT (_shellProcess); - if (!_sessionProcessInfo) - { - _sessionProcessInfo = ProcessInfo::newInstance (processId ()); - _sessionProcessInfo->setUserHomeDir (); - } - _sessionProcessInfo->update ();*/ -} - -bool -Session::updateForegroundProcessInfo () -{ - /* - bool valid = (_foregroundProcessInfo != 0); - - // has foreground process changed? - Q_ASSERT (_shellProcess); - int pid = _shellProcess->foregroundProcessGroup (); - if (pid != _foregroundPid) - { - if (valid) - delete _foregroundProcessInfo; - _foregroundProcessInfo = ProcessInfo::newInstance (pid); - _foregroundPid = pid; - valid = true; - } - - if (valid) - { - _foregroundProcessInfo->update (); - valid = _foregroundProcessInfo->isValid (); - } - - return valid;*/ - return true; -} - -bool -Session::isRemote () -{/* - ProcessInfo *process = getProcessInfo (); - - bool ok = false; - return (process->name (&ok) == "ssh" && ok); - */ - return false; -} - -QString -Session::getDynamicTitle () -{/* - // update current directory from process - ProcessInfo *process = updateWorkingDirectory (); - - // format tab titles using process info - bool ok = false; - QString title; - if (process->name (&ok) == "ssh" && ok) - { - SSHProcessInfo sshInfo (*process); - title = sshInfo.format (tabTitleFormat (Session::RemoteTabTitle)); - } - else - title = process->format (tabTitleFormat (Session::LocalTabTitle)); - - return title;*/ - return ""; -} - void Session::setIconName (const QString & iconName) { @@ -1236,44 +1125,6 @@ } } -/* -int -Session::foregroundProcessId () -{ - int pid; - - bool ok = false; - pid = getProcessInfo ()->pid (&ok); - if (!ok) - pid = -1; - - return pid; -}*/ - -bool -Session::isForegroundProcessActive () -{ - // foreground process info is always updated after this - return updateForegroundProcessInfo () && (processId () != _foregroundPid); -} - -/* -QString -Session::foregroundProcessName () -{ - QString name; - - if (updateForegroundProcessInfo ()) - { - bool ok = false; - name = _foregroundProcessInfo->name (&ok); - if (!ok) - name.clear (); - } - - return name; -}*/ - SessionGroup::SessionGroup (QObject * parent):QObject (parent), _masterMode (0) { } diff --git a/gui/src/terminal/Session.h b/gui/src/terminal/Session.h --- a/gui/src/terminal/Session.h +++ b/gui/src/terminal/Session.h @@ -38,7 +38,6 @@ class KUrl; class Emulation; class Pty; -//class ProcessInfo; class TerminalDisplay; //class ZModemDialog; /** @@ -602,10 +601,6 @@ // checks that the binary 'program' is available and can be executed // returns the binary name if available or an empty string otherwise QString checkProgram (const QString & program) const; - //ProcessInfo *getProcessInfo (); - void updateSessionProcessInfo (); - bool updateForegroundProcessInfo (); - //ProcessInfo *updateWorkingDirectory (); QUuid _uniqueIdentifier; // SHELL_SESSION_ID @@ -646,8 +641,6 @@ QString _initialWorkingDir; QString _currentWorkingDir; - //ProcessInfo *_sessionProcessInfo; - //ProcessInfo *_foregroundProcessInfo; int _foregroundPid; // ZModem