diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 00:08:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 00:08:01 -0600 |
commit | 2ec1b629e4a1e15db7d1563f6c5db1c307aa9ea7 (patch) | |
tree | 5bd270900f18fb85b4291d940a4945530a07141c /src | |
parent | a16d1de56d721613d5f07a67e46fd2ccab3adb83 (diff) | |
download | tdeio-locate-2ec1b629e4a1e15db7d1563f6c5db1c307aa9ea7.tar.gz tdeio-locate-2ec1b629e4a1e15db7d1563f6c5db1c307aa9ea7.zip |
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'src')
-rw-r--r-- | src/kio_locate.cpp | 52 | ||||
-rw-r--r-- | src/kio_locate.h | 4 |
2 files changed, 28 insertions, 28 deletions
diff --git a/src/kio_locate.cpp b/src/kio_locate.cpp index d1d72d0..38317bb 100644 --- a/src/kio_locate.cpp +++ b/src/kio_locate.cpp @@ -45,7 +45,7 @@ #include "klocateconfigfilterwidget.h" #include "klocateconfiglocatewidget.h" -using namespace KIO; +using namespace TDEIO; static const TQString queryQuery = "q"; @@ -202,26 +202,26 @@ static const UDSEntry pathToUDSEntry(const TQString& path, const TQString& displ const TQString& url = TQString(), const TQString& icon = TQString()) { UDSEntry entry; - addAtom(entry, KIO::UDS_NAME, display); + addAtom(entry, TDEIO::UDS_NAME, display); if (!path.isEmpty()) { KDE_struct_stat info; KDE_lstat(path.local8Bit(), &info); - addAtom(entry, KIO::UDS_SIZE, info.st_size); - addAtom(entry, KIO::UDS_ACCESS, info.st_mode); - addAtom(entry, KIO::UDS_MODIFICATION_TIME, info.st_mtime); - addAtom(entry, KIO::UDS_ACCESS_TIME, info.st_atime); - addAtom(entry, KIO::UDS_CREATION_TIME, info.st_ctime); + addAtom(entry, TDEIO::UDS_SIZE, info.st_size); + addAtom(entry, TDEIO::UDS_ACCESS, info.st_mode); + addAtom(entry, TDEIO::UDS_MODIFICATION_TIME, info.st_mtime); + addAtom(entry, TDEIO::UDS_ACCESS_TIME, info.st_atime); + addAtom(entry, TDEIO::UDS_CREATION_TIME, info.st_ctime); struct passwd * user = getpwuid(info.st_uid); struct group * group = getgrgid(info.st_gid); - addAtom(entry, KIO::UDS_USER, ((user != NULL) ? user->pw_name : "???" )); - addAtom(entry, KIO::UDS_GROUP, ((group != NULL) ? group->gr_name : "???" )); + addAtom(entry, TDEIO::UDS_USER, ((user != NULL) ? user->pw_name : "???" )); + addAtom(entry, TDEIO::UDS_GROUP, ((group != NULL) ? group->gr_name : "???" )); if (url.isEmpty()) { // List an existing file. - addAtom(entry, KIO::UDS_URL, "file:" + path); + addAtom(entry, TDEIO::UDS_URL, "file:" + path); mode_t type = info.st_mode; if (S_ISLNK(type)) { @@ -232,28 +232,28 @@ static const UDSEntry pathToUDSEntry(const TQString& path, const TQString& displ buff[n] = 0; slink = buff; } - addAtom(entry, KIO::UDS_LINK_DEST, slink); + addAtom(entry, TDEIO::UDS_LINK_DEST, slink); } else { type &= S_IFMT; } - addAtom(entry, KIO::UDS_FILE_TYPE, type); + addAtom(entry, TDEIO::UDS_FILE_TYPE, type); #ifdef HAVE_UDS_HIDDEN if (path.contains("/.")) { - addAtom(entry, KIO::UDS_HIDDEN, 1); + addAtom(entry, TDEIO::UDS_HIDDEN, 1); } #endif } else { // List a locate link. - addAtom(entry, KIO::UDS_URL, url); - addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, TDEIO::UDS_URL, url); + addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR); } } else { - addAtom(entry, KIO::UDS_URL, url); + addAtom(entry, TDEIO::UDS_URL, url); } if (!icon.isEmpty()) { - addAtom(entry, KIO::UDS_ICON_NAME, icon); + addAtom(entry, TDEIO::UDS_ICON_NAME, icon); } return entry; @@ -346,7 +346,7 @@ void LocateProtocol::get(const KURL& url) if (isSearchRequest()) { if (m_locater.binaryExists()) { - error(KIO::ERR_IS_DIRECTORY, TQString()); + error(TDEIO::ERR_IS_DIRECTORY, TQString()); } else { TQString html = i18n("<h1>\"%1\" could not be started.</h1><p>Please note that kio-locate can't be used on its own. You need an additional program for doing searches. Typically this is the command line tool <i>locate</i> that can be found in many distributions by default. You can check if the correct tool is used by looking at the <a href=\"locater:config\">setting</a> \"Locate Binary\".<p>Besides the mentioned tool <i>locate</i>, kio-locate can use any tool that uses the same syntax. In particular, it was reported to work with <i>slocate</i> and <i>rlocate</i>.").arg(m_locater.binary()); outputHtml(html); @@ -357,7 +357,7 @@ void LocateProtocol::get(const KURL& url) helpRequest(); } else { // What's this? - error(KIO::ERR_DOES_NOT_EXIST, TQString()); + error(TDEIO::ERR_DOES_NOT_EXIST, TQString()); } } @@ -373,15 +373,15 @@ void LocateProtocol::stat(const KURL& url) /// \todo Is UDS_NAME used for anything in stat? If so we should /// at least strip of the protocol part. UDSEntry entry; - addAtom(entry, KIO::UDS_NAME, url.decode_string(url.url())); - addAtom(entry, KIO::UDS_FILE_TYPE, isDir ? S_IFDIR : S_IFREG); + addAtom(entry, TDEIO::UDS_NAME, url.decode_string(url.url())); + addAtom(entry, TDEIO::UDS_FILE_TYPE, isDir ? S_IFDIR : S_IFREG); statEntry(entry); finished(); /// \todo Somehow locate: and locate:/ is thought to be a directory /// by konqueror anyway. How to change this? } else { // What's this? - error(KIO::ERR_DOES_NOT_EXIST, TQString()); + error(TDEIO::ERR_DOES_NOT_EXIST, TQString()); } } @@ -395,10 +395,10 @@ void LocateProtocol::listDir(const KURL& url) if (isSearchRequest()) { searchRequest(); } else if (isConfigRequest() || isHelpRequest()) { - error(KIO::ERR_IS_FILE, TQString()); + error(TDEIO::ERR_IS_FILE, TQString()); } else { // What's this? - error(KIO::ERR_DOES_NOT_EXIST, TQString()); + error(TDEIO::ERR_DOES_NOT_EXIST, TQString()); } } @@ -764,10 +764,10 @@ void LocateProtocol::configRequest() m_configUpdated = false; // Don't show it twice. During my tests I never got there however. - if(KConfigDialog::showDialog("settings")) + if(TDEConfigDialog::showDialog("settings")) return; - KConfigDialog *dialog = new KConfigDialog(0, "settings", KLocateConfig::self(), + TDEConfigDialog *dialog = new TDEConfigDialog(0, "settings", KLocateConfig::self(), KDialogBase::IconList, KDialogBase::Default|KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::Help, KDialogBase::Ok, true); diff --git a/src/kio_locate.h b/src/kio_locate.h index 79cb0eb..d02fdd9 100644 --- a/src/kio_locate.h +++ b/src/kio_locate.h @@ -93,7 +93,7 @@ enum LocateCollapsedIcon { iconBlue, iconGreen, iconGrey, iconOrange, iconRed, i * Enables you to enter "locate:pattern" wherever an URL can be used * in KDE. */ -class LocateProtocol : public TQObject, public KIO::SlaveBase +class LocateProtocol : public TQObject, public TDEIO::SlaveBase { Q_OBJECT @@ -179,7 +179,7 @@ class LocateProtocol : public TQObject, public KIO::SlaveBase LocateDirectory *m_baseDir; // The toplevel directory, e.g. "/usr/". LocateDirectory *m_curDir; // The current directory (while locating). - KIO::UDSEntryList m_entries; // Used to cache a lot of hits and list them all at once. + TDEIO::UDSEntryList m_entries; // Used to cache a lot of hits and list them all at once. TQString partToPattern(const TQString& part, bool forLocate); bool isMatching(const TQString& file); |