[PC-BSD Commits] r21895 - pcbsd-projects/PCDM

svn at pcbsd.org svn at pcbsd.org
Mon Mar 18 09:26:17 PDT 2013


Author: kenmoore
Date: 2013-03-18 16:26:17 +0000 (Mon, 18 Mar 2013)
New Revision: 21895

Modified:
   pcbsd-projects/PCDM/main.cpp
   pcbsd-projects/PCDM/pcdm-xprocess.cpp
   pcbsd-projects/PCDM/pcdm-xprocess.h
Log:
Remove a duplicate QProcess in the xProcess class that is not used



Modified: pcbsd-projects/PCDM/main.cpp
===================================================================
--- pcbsd-projects/PCDM/main.cpp	2013-03-18 16:06:23 UTC (rev 21894)
+++ pcbsd-projects/PCDM/main.cpp	2013-03-18 16:26:17 UTC (rev 21895)
@@ -115,7 +115,7 @@
   }  // end of PCDM GUI running
   
   //Wait for the desktop session to finish before exiting
-  desktop.waitForFinished();
+  desktop.waitForSessionClosed();
   
   return returnCode;
 }

Modified: pcbsd-projects/PCDM/pcdm-xprocess.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-xprocess.cpp	2013-03-18 16:06:23 UTC (rev 21894)
+++ pcbsd-projects/PCDM/pcdm-xprocess.cpp	2013-03-18 16:26:17 UTC (rev 21895)
@@ -14,14 +14,14 @@
   xuser.clear();
   xcmd.clear();
   xhome.clear();
-  session = new QProcess();
+  //session = new QProcess();
 }
 
 XProcess::~XProcess(){
-  if( session->state() != QProcess::NotRunning){
-    session->terminate();
+  if( this->state() != QProcess::NotRunning){
+    this->terminate();
   }
-  session->close();
+  this->close();
 }
 
 void XProcess::setXUsername(QString username){
@@ -72,18 +72,18 @@
   environ.insert("MAIL","/var/mail/"+xuser); //Set the mail variable
   environ.insert("GROUP",xuser); //Set the proper group id
   environ.insert("SHLVL","1"); //Set the proper shell level
-  session->setProcessEnvironment(environ);
-  session->setWorkingDirectory(xhome); //set the current directory to the user's home directory
+  this->setProcessEnvironment(environ);
+  this->setWorkingDirectory(xhome); //set the current directory to the user's home directory
   //Log the DE startup outputs as well
-  session->setStandardOutputFile(xhome+"/.pcdm-startup.log",QIODevice::Truncate);
+  this->setStandardOutputFile(xhome+"/.pcdm-startup.log",QIODevice::Truncate);
   // Startup the process
-  session->start(cmd);
+  this->start(cmd);
 }
 
-void XProcess::waitForFinished(){
+void XProcess::waitForSessionClosed(){
   // CAUTION!! 
   // This function will pause the calling program to wait for the session to end!
-  if( session->state() != QProcess::NotRunning ){
-    session->waitForFinished(-1);
+  if( this->state() != QProcess::NotRunning ){
+    this->waitForFinished(-1);
   }
 }

Modified: pcbsd-projects/PCDM/pcdm-xprocess.h
===================================================================
--- pcbsd-projects/PCDM/pcdm-xprocess.h	2013-03-18 16:06:23 UTC (rev 21894)
+++ pcbsd-projects/PCDM/pcdm-xprocess.h	2013-03-18 16:26:17 UTC (rev 21895)
@@ -23,7 +23,7 @@
   public:
 	XProcess();
 	~XProcess();
-        void waitForFinished();
+        void waitForSessionClosed();
   
   public slots:
 	void setXUsername(QString);
@@ -33,7 +33,7 @@
   
   private:
 	QString xuser, xcmd, xhome;
-	QProcess* session;
+	//QProcess* session;
 
 };
 #endif



More information about the Commits mailing list