summaryrefslogtreecommitdiffstats
path: root/quanta/components/debugger/pathmapper.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/components/debugger/pathmapper.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/components/debugger/pathmapper.cpp')
-rw-r--r--quanta/components/debugger/pathmapper.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/quanta/components/debugger/pathmapper.cpp b/quanta/components/debugger/pathmapper.cpp
index 194355d7..c38e2fec 100644
--- a/quanta/components/debugger/pathmapper.cpp
+++ b/quanta/components/debugger/pathmapper.cpp
@@ -23,12 +23,12 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <qextfileinfo.h>
-#include <qdom.h>
+#include <tqdom.h>
-PathMapper::PathMapper(QObject *parent, const char *name)
- : QObject(parent, name)
+PathMapper::PathMapper(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
}
@@ -38,9 +38,9 @@ PathMapper::PathMapper()
}
-QString PathMapper::translate(const QString & path, const QString & from, const QString &to)
+TQString PathMapper::translate(const TQString & path, const TQString & from, const TQString &to)
{
- QString translated = path;
+ TQString translated = path;
// Check if this dir is matched by the maps
if(path.startsWith(from, false))
@@ -52,7 +52,7 @@ QString PathMapper::translate(const QString & path, const QString & from, const
return translated;
}
-QString PathMapper::mapLocalPathToServer(const QString &localpath)
+TQString PathMapper::mapLocalPathToServer(const TQString &localpath)
{
if(localpath.isEmpty())
return localpath;
@@ -60,7 +60,7 @@ QString PathMapper::mapLocalPathToServer(const QString &localpath)
if(m_localBasedir == "/" && m_serverBasedir == "/")
return localpath;
- QString newpath = translate(localpath, m_localBasedir, m_serverBasedir);
+ TQString newpath = translate(localpath, m_localBasedir, m_serverBasedir);
// If no translation occurred, check and see if some of the other translations does
if(newpath == localpath)
@@ -89,7 +89,7 @@ QString PathMapper::mapLocalPathToServer(const QString &localpath)
for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ )
pmdlg.addHistory(m_serverlist[cnt], m_locallist[cnt]);
- if(pmdlg.exec() == QDialog::Accepted )
+ if(pmdlg.exec() == TQDialog::Accepted )
{
newpath = translate(localpath, pmdlg.localPath(), pmdlg.serverPath());
addHistory(pmdlg.localPath(), pmdlg.serverPath(), newpath != localpath);
@@ -101,9 +101,9 @@ QString PathMapper::mapLocalPathToServer(const QString &localpath)
return newpath;
}
-QString PathMapper::mapServerPathToLocal(const QString &serverpath)
+TQString PathMapper::mapServerPathToLocal(const TQString &serverpath)
{
- QString newpath;
+ TQString newpath;
if(serverpath.isEmpty())
return serverpath;
@@ -130,7 +130,7 @@ QString PathMapper::mapServerPathToLocal(const QString &serverpath)
for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ )
pmdlg.addHistory(m_serverlist[cnt], m_locallist[cnt]);
- if(pmdlg.exec() == QDialog::Accepted )
+ if(pmdlg.exec() == TQDialog::Accepted )
{
addHistory(pmdlg.localPath(), pmdlg.serverPath(), true);
newpath = translate(serverpath, pmdlg.localPath(), pmdlg.serverPath());
@@ -141,21 +141,21 @@ QString PathMapper::mapServerPathToLocal(const QString &serverpath)
return serverpath;
}
-void PathMapper::setLocalBasedir(const QString &localpath)
+void PathMapper::setLocalBasedir(const TQString &localpath)
{
m_localBasedir = localpath;
}
-void PathMapper::setServerBasedir(const QString &serverpath)
+void PathMapper::setServerBasedir(const TQString &serverpath)
{
m_serverBasedir = serverpath;
}
-QDomNode PathMapper::pathMapperNode()
+TQDomNode PathMapper::pathMapperNode()
{
- QDomNode nodeThisDbg;
- QDomDocument *dom = Project::ref()->sessionDom();
- QDomNode projectNode = dom->firstChild().firstChild();
- QDomNode nodeDbg = projectNode.namedItem("debuggers");
+ TQDomNode nodeThisDbg;
+ TQDomDocument *dom = Project::ref()->sessionDom();
+ TQDomNode projectNode = dom->firstChild().firstChild();
+ TQDomNode nodeDbg = projectNode.namedItem("debuggers");
if(nodeDbg.isNull())
{
nodeDbg = dom->createElement("debuggers");
@@ -173,7 +173,7 @@ QDomNode PathMapper::pathMapperNode()
return nodeThisDbg;
}
-void PathMapper::addHistory(const QString &localpath, const QString &serverpath, bool saveinproject)
+void PathMapper::addHistory(const TQString &localpath, const TQString &serverpath, bool saveinproject)
{
bool exists = false;
for (unsigned int cnt = 0; cnt < m_serverlist.count() && !exists; cnt++ )
@@ -184,12 +184,12 @@ void PathMapper::addHistory(const QString &localpath, const QString &serverpath,
{
if(saveinproject)
{
- QDomNode node = pathMapperNode();
- QDomNode newnode = Project::ref()->dom()->createElement("mapping");
+ TQDomNode node = pathMapperNode();
+ TQDomNode newnode = Project::ref()->dom()->createElement("mapping");
- QDomAttr serverattr = Project::ref()->dom()->createAttribute("serverpath");
+ TQDomAttr serverattr = Project::ref()->dom()->createAttribute("serverpath");
serverattr.setValue(serverpath);
- QDomAttr localattr = Project::ref()->dom()->createAttribute("localpath");
+ TQDomAttr localattr = Project::ref()->dom()->createAttribute("localpath");
localattr.setValue(localpath);
newnode.attributes().setNamedItem(serverattr);
@@ -207,12 +207,12 @@ void PathMapper::addHistory(const QString &localpath, const QString &serverpath,
void PathMapper::readConfig()
{
- QDomNode node = pathMapperNode();
+ TQDomNode node = pathMapperNode();
// Server
- QDomNode valuenode = node.namedItem("mappings");
- QDomNode child = valuenode.firstChild();
- QString serverpath, localpath;
+ TQDomNode valuenode = node.namedItem("mappings");
+ TQDomNode child = valuenode.firstChild();
+ TQString serverpath, localpath;
while(!child.isNull())
{
serverpath = child.attributes().namedItem("serverpath").nodeValue();