Patch for CKDevelop::slotStartRun()

Etay Meiri cl1 at netvision.net.il
Tue Feb 26 23:08:02 UTC 2002


Hi,

I'de like to offer a tiny patch for the above function.
Basically it returns the current directory of the kdevelop
process to it's original after running an executable.
The patch is for KDE_2_2_BRANCH but may be required on other 
branches as well.

Index: ckdevelop.cpp
===================================================================
RCS file: /usr/local/anoncvs/kde/kdevelop/kdevelop/Attic/ckdevelop.cpp,v
retrieving revision 1.158.2.114.2.140.2.24
diff -u -3 -p -u -r1.158.2.114.2.140.2.24 ckdevelop.cpp
--- ckdevelop.cpp       2002/02/22 16:47:09     1.158.2.114.2.140.2.24
+++ ckdevelop.cpp       2002/02/26 21:58:34
@@ -1070,6 +1074,8 @@ void CKDevelop::slotStartRun(bool bWithA
                        runFromDir+="/";
                runFromDir+=prj->getSubDir();
        }
+
+  QString old_dir_path = QDir::currentDirPath();
   QDir::setCurrent(runFromDir);

   QString libtool     = prj->getLibtool();
@@ -1160,6 +1166,7 @@ void CKDevelop::slotStartRun(bool bWithA
     setToolMenuProcess(false);
     appl_process.start(KProcess::NotifyOnExit,KProcess::All);
   }
+  QDir::setCurrent(old_dir_path);
 }


-- 
Etay Meiri
cl1 at netvision.net.il




More information about the KDevelop-devel mailing list