diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/locater.cpp | 18 | ||||
-rw-r--r-- | src/locater.h | 3 | ||||
-rw-r--r-- | src/tdeio_locate.cpp | 44 |
3 files changed, 31 insertions, 34 deletions
diff --git a/src/locater.cpp b/src/locater.cpp index 68c1d75..b74dfd8 100644 --- a/src/locater.cpp +++ b/src/locater.cpp @@ -34,7 +34,7 @@ Locater::Locater(TQObject *parent, const char *name) : TQObject(parent, name), m_process(TQTextCodec::codecForLocale()) { - DEBUGSTR << "Locater::Locater" << endl; + kdDebug(7134) << "Locater::Locater" << endl; connect(&m_process, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(finished(TDEProcess*))); @@ -47,13 +47,13 @@ Locater::Locater(TQObject *parent, const char *name) Locater::~Locater() { - DEBUGSTR << "Locater::~Locater" << endl; + kdDebug(7134) << "Locater::~Locater" << endl; } void Locater::setupLocate(const TQString& binary, const TQString& additionalArguments) { - DEBUGSTR << "Locater::setupLocate(" << binary << ", " << additionalArguments << ")" << endl; + kdDebug(7134) << "Locater::setupLocate(" << binary << ", " << additionalArguments << ")" << endl; // Automatically choose the correct binary if not specified. if (binary.isEmpty()) { @@ -64,7 +64,7 @@ void Locater::setupLocate(const TQString& binary, const TQString& additionalArgu } else { m_binary = "locate"; } - DEBUGSTR << "Using binary:" << m_binary << endl; + kdDebug(7134) << "Using binary:" << m_binary << endl; } else { m_binary = binary; } @@ -75,7 +75,7 @@ void Locater::setupLocate(const TQString& binary, const TQString& additionalArgu bool Locater::locate(const TQString& pattern, bool ignoreCase, bool regExp) { - DEBUGSTR << "Locater::locate(" << pattern << "," << ignoreCase << "," << regExp << ")" << endl; + kdDebug(7134) << "Locater::locate(" << pattern << "," << ignoreCase << "," << regExp << ")" << endl; m_process.resetAll(); m_process << m_binary; @@ -96,7 +96,7 @@ bool Locater::locate(const TQString& pattern, bool ignoreCase, bool regExp) void Locater::stop() { - DEBUGSTR << "Locater::stop()" << endl; + kdDebug(7134) << "Locater::stop()" << endl; m_process.kill(); emit finished(); @@ -105,13 +105,13 @@ void Locater::stop() void Locater::gotOutput(KProcIO* /*proc*/) { - //DEBUGSTR << "Locater::gotOutput" << endl; + //kdDebug(7134) << "Locater::gotOutput" << endl; TQStringList items; TQString line; while (m_process.readln(line) != -1) { - //DEBUGSTR << "OUTPUT>> '" << line << "'" << endl; + //kdDebug(7134) << "OUTPUT>> '" << line << "'" << endl; items << line; } @@ -122,7 +122,7 @@ void Locater::gotOutput(KProcIO* /*proc*/) void Locater::finished(TDEProcess* /*proc*/) { - DEBUGSTR << "Locater::finished" << endl; + kdDebug(7134) << "Locater::finished" << endl; emit finished(); } diff --git a/src/locater.h b/src/locater.h index 229f3f2..cde2c5d 100644 --- a/src/locater.h +++ b/src/locater.h @@ -32,9 +32,6 @@ #include <kprocio.h> -#define DEBUGSTR kdDebug(7199) - - /** * Interface to the locate command. * diff --git a/src/tdeio_locate.cpp b/src/tdeio_locate.cpp index ff4d7b2..6f40170 100644 --- a/src/tdeio_locate.cpp +++ b/src/tdeio_locate.cpp @@ -98,7 +98,7 @@ static TQString convertWildcardsToRegExp(TQString s) // Walk through the string, converting \wildcard to regexp and // \\\wildcard back to \wildcard. for (unsigned i = 1; i < s.length(); ++i) { - //DEBUGSTR << s.left(i+1) << endl; + //kdDebug(7134) << s.left(i+1) << endl; if (i < 3 || s[i-3] != '\\' || s[i-2] != '\\') { // If it was an unescaped character (now possibly escaped once) if (s[i-1] == '\\') { @@ -266,7 +266,7 @@ static const UDSEntry pathToUDSEntry(const TQString& path, const TQString& displ LocateProtocol::LocateProtocol(const TQCString &pool_socket, const TQCString &app_socket) : SlaveBase("tdeio_locate", pool_socket, app_socket) { - DEBUGSTR << "LocateProtocol::LocateProtocol()" << endl; + kdDebug(7134) << "LocateProtocol::LocateProtocol()" << endl; connect(&m_locater, TQT_SIGNAL(found(const TQStringList&)), this, TQT_SLOT(processLocateOutput(const TQStringList&))); @@ -280,7 +280,7 @@ LocateProtocol::LocateProtocol(const TQCString &pool_socket, const TQCString &ap LocateProtocol::~LocateProtocol() { - DEBUGSTR << "LocateProtocol::~LocateProtocol()" << endl; + kdDebug(7134) << "LocateProtocol::~LocateProtocol()" << endl; delete m_baseDir; } @@ -330,7 +330,7 @@ void LocateProtocol::setUrl(const KURL& url) } m_url = newUrl; - DEBUGSTR << "Redirect: " << m_url << endl; + kdDebug(7134) << "Redirect: " << m_url << endl; } else { m_url = url; } @@ -340,7 +340,7 @@ void LocateProtocol::setUrl(const KURL& url) void LocateProtocol::get(const KURL& url) { - DEBUGSTR << "LocateProtocol::get(" << url << ")" << endl; + kdDebug(7134) << "LocateProtocol::get(" << url << ")" << endl; setUrl(url); @@ -364,7 +364,7 @@ void LocateProtocol::get(const KURL& url) void LocateProtocol::stat(const KURL& url) { - DEBUGSTR << "LocateProtocol::stat(" << url << ")" << endl ; + kdDebug(7134) << "LocateProtocol::stat(" << url << ")" << endl ; setUrl(url); @@ -388,7 +388,7 @@ void LocateProtocol::stat(const KURL& url) void LocateProtocol::listDir(const KURL& url) { - DEBUGSTR << "LocateProtocol::listDir(" << url << ")" << endl ; + kdDebug(7134) << "LocateProtocol::listDir(" << url << ")" << endl ; setUrl(url); @@ -405,7 +405,7 @@ void LocateProtocol::listDir(const KURL& url) void LocateProtocol::mimetype(const KURL& url) { - DEBUGSTR << "LocateProtocol::mimetype(" << url << ")" << endl ; + kdDebug(7134) << "LocateProtocol::mimetype(" << url << ")" << endl ; setUrl(url); @@ -505,8 +505,8 @@ void LocateProtocol::searchRequest() } } - DEBUGSTR << "Pattern: " << m_locatePattern << endl; - DEBUGSTR << "Directory: " << m_locateDirectory << endl; + kdDebug(7134) << "Pattern: " << m_locatePattern << endl; + kdDebug(7134) << "Directory: " << m_locateDirectory << endl; // We set up the regexp used to see whether the match was in the // directory part or the filename part of a path. @@ -518,7 +518,7 @@ void LocateProtocol::searchRequest() bool started = m_locater.locate(m_locatePattern, !isCaseSensitive(m_locatePattern), regexp); if (!started) { - DEBUGSTR << "Locate could not be found." << endl; + kdDebug(7134) << "Locate could not be found." << endl; finished(); } } @@ -542,7 +542,7 @@ bool LocateProtocol::isCaseSensitive(const TQString& text) void LocateProtocol::addHit(const TQString& path, int subItems) { - // DEBUGSTR << "LocateProtocol::addHit( " << path << ", " << subItems << " )" << endl; + // kdDebug(7134) << "LocateProtocol::addHit( " << path << ", " << subItems << " )" << endl; if (TQFile::exists(path)) { if (subItems > 0) { m_entries += pathToUDSEntry(path, pathToDisplay(path, subItems), makeLocaterUrl(path), iconToStringTable[m_config.m_collapsedIcon]); @@ -632,7 +632,7 @@ void LocateProtocol::locateFinished() } addPreviousLocateOutput(); - DEBUGSTR << "LocateProtocol::locateFinished" << endl; + kdDebug(7134) << "LocateProtocol::locateFinished" << endl; infoMessage(i18n("Finished.")); finished(); } @@ -640,7 +640,7 @@ void LocateProtocol::locateFinished() TQString LocateProtocol::partToPattern(const TQString& part, bool forLocate) { - DEBUGSTR << "BEG part: " << part << endl; + kdDebug(7134) << "BEG part: " << part << endl; TQString pattern = part; // Unescape whitespace. pattern.replace("\\ ", " "); @@ -690,7 +690,7 @@ TQString LocateProtocol::partToPattern(const TQString& part, bool forLocate) } pattern.replace("\\~", "~"); } - DEBUGSTR << "END part: " << pattern << endl; + kdDebug(7134) << "END part: " << pattern << endl; return pattern; } @@ -790,7 +790,7 @@ void LocateProtocol::configRequest() void LocateProtocol::configFinished() { - DEBUGSTR << "LocateProtocol::configFinished" << endl; + kdDebug(7134) << "LocateProtocol::configFinished" << endl; tqApp->exit_loop(); @@ -807,7 +807,7 @@ void LocateProtocol::configFinished() void LocateProtocol::updateConfig() { // It's not needed to update the config if it's still up to date. - DEBUGSTR << "LocateProtocol::updateConfig" << endl; + kdDebug(7134) << "LocateProtocol::updateConfig" << endl; KLocateConfig::self()->readConfig(); m_config.m_caseSensitivity = (LocateCaseSensitivity) KLocateConfig::caseSensitivity(); @@ -982,10 +982,10 @@ void LocateDirectory::debugTrace(int level) { TQString ws; ws.fill(' ', level); - DEBUGSTR << ws << m_path << endl; + kdDebug(7134) << ws << m_path << endl; LocateItems::ConstIterator item = m_items.begin(); for (; item != m_items.end(); ++item) { - DEBUGSTR << ws << "+ " << (*item).m_path << endl; + kdDebug(7134) << ws << "+ " << (*item).m_path << endl; } LocateDirectoriesIterator child(m_childs); for (; child.current(); ++child) { @@ -1020,17 +1020,17 @@ extern "C" TDEApplication::disableAutoDcopRegistration(); TDEApplication app(argc, argv, "tdeio_locate", false, true, false); - DEBUGSTR << "*** Starting tdeio_locate " << endl; + kdDebug(7134) << "*** Starting tdeio_locate " << endl; if (argc != 4) { - DEBUGSTR << "Usage: tdeio_locate protocol domain-socket1 domain-socket2" << endl; + kdDebug(7134) << "Usage: tdeio_locate protocol domain-socket1 domain-socket2" << endl; exit(-1); } LocateProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); - DEBUGSTR << "*** tdeio_locate Done" << endl; + kdDebug(7134) << "*** tdeio_locate Done" << endl; return 0; } } |