summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/qextfileinfo.cpp84
-rw-r--r--lib/qextfileinfo.h8
2 files changed, 46 insertions, 46 deletions
diff --git a/lib/qextfileinfo.cpp b/lib/qextfileinfo.cpp
index 28f5a8e1..767e28b9 100644
--- a/lib/qextfileinfo.cpp
+++ b/lib/qextfileinfo.cpp
@@ -32,9 +32,9 @@
//app includes
#include "qextfileinfo.h"
-TQString TQExtFileInfo::lastErrorMsg = "";
+TQString QExtFileInfo::lastErrorMsg = "";
-TQString TQExtFileInfo::canonicalPath(const TQString& path)
+TQString QExtFileInfo::canonicalPath(const TQString& path)
{
if (!path.startsWith("/") || path == "/")
return path;
@@ -52,18 +52,18 @@ TQString TQExtFileInfo::canonicalPath(const TQString& path)
TQString s = u.path(-1) + "/";
if (s == "//") s = "/";
TQString s2 = path.mid(s.length());
- s2 = TQExtFileInfo::canonicalPath(s) + s2;
+ s2 = QExtFileInfo::canonicalPath(s) + s2;
return s2;
}
}
-TQString TQExtFileInfo::homeDirPath()
+TQString QExtFileInfo::homeDirPath()
{
return TQDir(TQDir::homeDirPath()).canonicalPath();
}
/** create a relative short url based in baseURL*/
-KURL TQExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, bool resolveSymlinks)
+KURL QExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, bool resolveSymlinks)
{
KURL urlToConvert = _urlToConvert;
KURL baseURL = _baseURL;
@@ -74,13 +74,13 @@ KURL TQExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, b
{
TQString path;
if (resolveSymlinks)
- path = TQExtFileInfo::canonicalPath(urlToConvert.path());
+ path = QExtFileInfo::canonicalPath(urlToConvert.path());
else
path = urlToConvert.path();
if (!path.isEmpty())
urlToConvert.setPath(path);
if (resolveSymlinks)
- path = TQExtFileInfo::canonicalPath(baseURL.path());
+ path = QExtFileInfo::canonicalPath(baseURL.path());
else
path = baseURL.path();
if (!path.isEmpty())
@@ -126,7 +126,7 @@ KURL TQExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, b
return resultURL;
}
/** convert relative filename to absolute */
-KURL TQExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL)
+KURL QExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL)
{
KURL urlToConvert = _urlToConvert;
KURL baseURL = _baseURL;
@@ -136,7 +136,7 @@ KURL TQExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL)
{
if (urlToConvert.isLocalFile())
{
- TQString path = TQExtFileInfo::canonicalPath(baseURL.path());
+ TQString path = QExtFileInfo::canonicalPath(baseURL.path());
if (!path.isEmpty())
baseURL.setPath(path);
}
@@ -161,34 +161,34 @@ KURL TQExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL)
This is needed for empty directory adding/handling. (Andras)
Currently works only for local directories
*/
-KURL::List TQExtFileInfo::allFiles( const KURL& path, const TQString& tqmask, TQWidget *window)
+KURL::List QExtFileInfo::allFiles( const KURL& path, const TQString& tqmask, TQWidget *window)
{
- TQExtFileInfo internalFileInfo;
+ QExtFileInfo internalFileInfo;
return internalFileInfo.allFilesInternal(path, tqmask, window);
}
-KURL::List TQExtFileInfo::allFilesRelative( const KURL& path, const TQString& tqmask, TQWidget *window, bool resolveSymlinks)
+KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const TQString& tqmask, TQWidget *window, bool resolveSymlinks)
{
- TQExtFileInfo internalFileInfo;
+ QExtFileInfo internalFileInfo;
KURL::List r = internalFileInfo.allFilesInternal(path, tqmask, window);
KURL::List::Iterator it;
for ( it = r.begin(); it != r.end(); ++it )
{
- *it = TQExtFileInfo::toRelative( *it, path, resolveSymlinks );
+ *it = QExtFileInfo::toRelative( *it, path, resolveSymlinks );
}
return r;
}
-TQDict<KFileItem> TQExtFileInfo::allFilesDetailed(const KURL& path, const TQString& tqmask, TQWidget *window)
+TQDict<KFileItem> QExtFileInfo::allFilesDetailed(const KURL& path, const TQString& tqmask, TQWidget *window)
{
- TQExtFileInfo internalFileInfo;
+ QExtFileInfo internalFileInfo;
return internalFileInfo.allFilesDetailedInternal(path, tqmask, window);
}
-bool TQExtFileInfo::createDir(const KURL& path, TQWidget *window)
+bool QExtFileInfo::createDir(const KURL& path, TQWidget *window)
{
int i = 0;
bool result;
@@ -223,7 +223,7 @@ bool TQExtFileInfo::createDir(const KURL& path, TQWidget *window)
return result;
}
-KURL TQExtFileInfo::cdUp(const KURL &url)
+KURL QExtFileInfo::cdUp(const KURL &url)
{
KURL u = url;
TQString dir = u.path(-1);
@@ -235,19 +235,19 @@ KURL TQExtFileInfo::cdUp(const KURL &url)
return u;
}
-TQString TQExtFileInfo::shortName(const TQString &fname)
+TQString QExtFileInfo::shortName(const TQString &fname)
{
return fname.section("/", -1);
}
-KURL TQExtFileInfo::path( const KURL &url )
+KURL QExtFileInfo::path( const KURL &url )
{
KURL result = url;
result.setPath(result.directory(false,false));
return result;
}
-KURL TQExtFileInfo::home()
+KURL QExtFileInfo::home()
{
KURL url;
url.setPath(TQDir::currentDirPath()+"/");
@@ -255,7 +255,7 @@ KURL TQExtFileInfo::home()
}
-bool TQExtFileInfo::exists(const KURL& a_url, bool readingOnly, TQWidget *window)
+bool QExtFileInfo::exists(const KURL& a_url, bool readingOnly, TQWidget *window)
{
// Andras: Don't use it now, as it brings up an extra dialog and need manual
// intervention when usign fish
@@ -267,21 +267,21 @@ bool TQExtFileInfo::exists(const KURL& a_url, bool readingOnly, TQWidget *window
return TQFile::exists(a_url.path());
} else
{
- TQExtFileInfo internalFileInfo;
+ QExtFileInfo internalFileInfo;
return internalFileInfo.internalExists(a_url, readingOnly, window);
}
}
/* Synchronous copy, like NetAccess::file_copy in KDE 3.2 */
-bool TQExtFileInfo::copy( const KURL& src, const KURL& target, int permissions,
+bool QExtFileInfo::copy( const KURL& src, const KURL& target, int permissions,
bool overwrite, bool resume, TQWidget* window )
{
- TQExtFileInfo internalFileInfo;
+ QExtFileInfo internalFileInfo;
return internalFileInfo.internalCopy( src, target, permissions, overwrite, resume, window );
}
/** No descriptions */
-KURL::List TQExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& tqmask, TQWidget *window)
+KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& tqmask, TQWidget *window)
{
if (startURL.isLocalFile())
return allLocalFiles(startURL.path(-1), tqmask);
@@ -320,7 +320,7 @@ KURL::List TQExtFileInfo::allFilesInternal(const KURL& startURL, const TQString&
}
/** No descriptions */
-TQDict<KFileItem> TQExtFileInfo::allFilesDetailedInternal(const KURL& startURL, const TQString& tqmask, TQWidget *window)
+TQDict<KFileItem> QExtFileInfo::allFilesDetailedInternal(const KURL& startURL, const TQString& tqmask, TQWidget *window)
{
detailedDirListItems.setAutoDelete(true);
detailedDirListItems.clear();
@@ -356,7 +356,7 @@ TQDict<KFileItem> TQExtFileInfo::allFilesDetailedInternal(const KURL& startURL,
return detailedDirListItems;
}
-KURL::List TQExtFileInfo::allLocalFiles(const TQString& startPath, const TQString& tqmask)
+KURL::List QExtFileInfo::allLocalFiles(const TQString& startPath, const TQString& tqmask)
{
KURL::List list;
TQDir d(startPath, tqmask);
@@ -387,12 +387,12 @@ KURL::List TQExtFileInfo::allLocalFiles(const TQString& startPath, const TQStrin
//Some hackery from KIO::NetAccess as they do not do exactly what we want
/* return true if the url exists*/
-bool TQExtFileInfo::internalExists(const KURL& url, bool readingOnly, TQWidget *window)
+bool QExtFileInfo::internalExists(const KURL& url, bool readingOnly, TQWidget *window)
{
bJobOK = true;
KURL url2 = url;
url2.adjustPath(-1);
- // kdDebug(24000)<<"TQExtFileInfo::internalExists"<<endl;
+ // kdDebug(24000)<<"QExtFileInfo::internalExists"<<endl;
KIO::StatJob * job = KIO::stat(url2, false);
job->setWindow(window);
job->setDetails(0);
@@ -402,13 +402,13 @@ bool TQExtFileInfo::internalExists(const KURL& url, bool readingOnly, TQWidget *
//To avoid lock-ups, start a timer.
TQTimer::singleShot(60*1000, this,TQT_SLOT(slotTimeout()));
- //kdDebug(24000)<<"TQExtFileInfo::internalExists:before enter_loop"<<endl;
+ //kdDebug(24000)<<"QExtFileInfo::internalExists:before enter_loop"<<endl;
enter_loop();
- //kdDebug(24000)<<"TQExtFileInfo::internalExists:after enter_loop"<<endl;
+ //kdDebug(24000)<<"QExtFileInfo::internalExists:after enter_loop"<<endl;
return bJobOK;
}
-bool TQExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
+bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
bool overwrite, bool resume, TQWidget* window)
{
bJobOK = true; // success unless further error occurs
@@ -437,27 +437,27 @@ bool TQExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permis
void qt_enter_modal( TQWidget *widget );
void qt_leave_modal( TQWidget *widget );
-void TQExtFileInfo::enter_loop()
+void QExtFileInfo::enter_loop()
{
TQWidget dummy(0,0,WType_Dialog | WShowModal);
dummy.setFocusPolicy( TQ_NoFocus );
qt_enter_modal(&dummy);
- //kdDebug(24000)<<"TQExtFileInfo::enter_loop:before tqApp->enter_loop()"<< endl;
+ //kdDebug(24000)<<"QExtFileInfo::enter_loop:before tqApp->enter_loop()"<< endl;
tqApp->enter_loop();
-// kdDebug(24000)<<"TQExtFileInfo::enter_loop:after tqApp->enter_loop()"<<endl;
+// kdDebug(24000)<<"QExtFileInfo::enter_loop:after tqApp->enter_loop()"<<endl;
qt_leave_modal(&dummy);
}
-void TQExtFileInfo::slotListResult(KIO::Job *job)
+void QExtFileInfo::slotListResult(KIO::Job *job)
{
m_listJobCount--;
if (m_listJobCount == 0)
slotResult(job);
}
-void TQExtFileInfo::slotResult(KIO::Job *job)
+void QExtFileInfo::slotResult(KIO::Job *job)
{
- //kdDebug(24000)<<"TQExtFileInfo::slotResult"<<endl;
+ //kdDebug(24000)<<"QExtFileInfo::slotResult"<<endl;
bJobOK = !job->error();
if ( !bJobOK )
{
@@ -469,7 +469,7 @@ void TQExtFileInfo::slotResult(KIO::Job *job)
tqApp->exit_loop();
}
-void TQExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
+void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
{
KURL url = static_cast<KIO::ListJob *>(job)->url();
url.adjustPath(-1);
@@ -543,7 +543,7 @@ void TQExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLi
}
}
-void TQExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
+void QExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
{
KURL url = static_cast<KIO::ListJob *>(job)->url();
url.adjustPath(-1);
@@ -611,7 +611,7 @@ void TQExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryLis
}
/** Timeout occurred while waiting for some network function to return. */
-void TQExtFileInfo::slotTimeout()
+void QExtFileInfo::slotTimeout()
{
bJobOK = false;
tqApp->exit_loop();
diff --git a/lib/qextfileinfo.h b/lib/qextfileinfo.h
index ca51123b..6a9e52c7 100644
--- a/lib/qextfileinfo.h
+++ b/lib/qextfileinfo.h
@@ -22,13 +22,13 @@
#include <tqdict.h>
#include <tqregexp.h>
-class TQExtFileInfo:public TQObject
+class QExtFileInfo:public TQObject
{
Q_OBJECT
TQ_OBJECT
public:
- TQExtFileInfo() {};
- ~TQExtFileInfo() {};
+ QExtFileInfo() {};
+ ~QExtFileInfo() {};
/**
* Works like TQDir::canonicalPath, but it does not return an empty
@@ -38,7 +38,7 @@ public:
* Example:
* /home/user/foo points to /mnt/foo
* /home/user/foo/foo2 does not exists
- * TQExtFileInfo::canonicalPath("/home/user/foo/foo2/") will return
+ * QExtFileInfo::canonicalPath("/home/user/foo/foo2/") will return
* /mnt/foo/foo2/ .
* @param path the path to resolve
* @return the canonical path (symlinks resolved)