changeset 13553:dfbc6a12c6fb

Removed all occurences of ProcessInfo.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Fri, 29 Jul 2011 18:57:59 +0200
parents 324adf6109e7
children df092b9e95ed
files gui/src/terminal/Session.cpp gui/src/terminal/Session.h
diffstat 2 files changed, 0 insertions(+), 156 deletions(-) [+]
line wrap: on
line diff
--- a/gui/src/terminal/Session.cpp	Fri Jul 29 18:53:35 2011 +0200
+++ b/gui/src/terminal/Session.cpp	Fri Jul 29 18:57:59 2011 +0200
@@ -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)
 {
 }
--- a/gui/src/terminal/Session.h	Fri Jul 29 18:53:35 2011 +0200
+++ b/gui/src/terminal/Session.h	Fri Jul 29 18:57:59 2011 +0200
@@ -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