[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdewebdev/quanta/components/debugger
From:       Linus McCabe <Linus () mccabe ! nu>
Date:       2004-05-31 20:41:47
Message-ID: 20040531204147.03D02126E0 () office ! kde ! org
[Download RAW message or body]

CVS commit by linusmc: 

Fixed errors with mapX2Y methods, fixed error in protocol handling for commandme, \
changed behaviour when debugger requests a file that doesent exist


  M +7 -1      debuggermanager.cpp   1.12
  M +10 -6     gubed/quantadebuggergubed.cpp   1.11


--- kdewebdev/quanta/components/debugger/debuggermanager.cpp  #1.11:1.12
@@ -24,4 +24,5 @@
 #include <kiconloader.h>
 #include <kmessagebox.h>
+#include "qextfileinfo.h"
 
 #include "quanta.h"
@@ -364,5 +365,10 @@ bool DebuggerManager::setActiveLine (QSt
 
   // Find new position in editor
+  if(ViewManager::ref()->isOpened(filename) || QExtFileInfo::exists(filename))
   quantaApp->gotoFileAndLine(filename, line, 0);
+  else
+  {
+    kdDebug(24000) << k_lineinfo << "File does not exist: " << filename << endl;
+  }
 
   // Remove old active line mark

--- kdewebdev/quanta/components/debugger/gubed/quantadebuggergubed.cpp  #1.10:1.11
@@ -348,5 +348,6 @@ void QuantaDebuggerGubed::processCommand
   if(m_command == "commandme")
   {
-    sendCommand("sendactiveline", "");
+    //sendCommand("sendactiveline", "");
+    debuggerInterface()->setActiveLine(mapServerPathToLocal(data.left(data.find(':'))), \
data.mid(data.find(':') + 1).toLong());  sendWatches();
     if(m_executionState == RunDisplay)
@@ -516,5 +517,5 @@ void QuantaDebuggerGubed::sendWatches()
 bool QuantaDebuggerGubed::sendCommand(QString command, QString data)
 {
-  //kdDebug(24000) << k_funcinfo << ", command: " << command << ", data " << data << \
endl; +  kdDebug(24000) << k_lineinfo << ", command: " << command << ", data " << \
data << endl;  if(!m_socket || m_socket->socketStatus() != \
KExtendedSocket::connected)  return false;
@@ -753,7 +754,8 @@ QString QuantaDebuggerGubed::mapServerPa
 
   // Translate filename from server to local
-  if(serverpath.startsWith(m_serverBasedir, false))
-    serverpath.remove(0, m_serverBasedir.length());
+  if(!serverpath.startsWith(m_serverBasedir, false))
+  return serverpath;
 
+  serverpath.remove(0, m_serverBasedir.length());
   return m_localBasedir + serverpath;
 }
@@ -762,5 +764,7 @@ QString QuantaDebuggerGubed::mapServerPa
 QString QuantaDebuggerGubed::mapLocalPathToServer(QString localpath)
 {
-  if(localpath.startsWith(m_localBasedir, false))
+  if(!localpath.startsWith(m_localBasedir, false))
+    return localpath;
+
     localpath.remove(0, m_localBasedir.length());
   return m_serverBasedir + localpath;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic