summaryrefslogtreecommitdiffstats
path: root/kimagemapeditor/qextfileinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kimagemapeditor/qextfileinfo.cpp')
-rw-r--r--kimagemapeditor/qextfileinfo.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kimagemapeditor/qextfileinfo.cpp b/kimagemapeditor/qextfileinfo.cpp
index 4c10d102..19c638cf 100644
--- a/kimagemapeditor/qextfileinfo.cpp
+++ b/kimagemapeditor/qextfileinfo.cpp
@@ -32,10 +32,10 @@
//app includes
#include "qextfileinfo.h"
-TQString QExtFileInfo::lastErrorMsg = "";
+TQString TQExtFileInfo::lastErrorMsg = "";
/** create a relative short url based in baseURL*/
-KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
+KURL TQExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
{
KURL resultURL = urlToConvert;
if (urlToConvert.protocol() == baseURL.protocol())
@@ -52,8 +52,8 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
int pos1=0;
for (;;)
{
- pos=path.find("/");
- pos1=basePath.find("/");
+ pos=path.tqfind("/");
+ pos1=basePath.tqfind("/");
if ( pos<0 || pos1<0 ) break;
if ( path.left(pos+1 ) == basePath.left(pos1+1) )
{
@@ -65,7 +65,7 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
};
if ( basePath == "/" ) basePath="";
- int level = basePath.contains("/");
+ int level = basePath.tqcontains("/");
for (int i=0; i<level; i++)
{
path="../"+path;
@@ -79,7 +79,7 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
return resultURL;
}
/** convert relative filename to absolute */
-KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL)
+KURL TQExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL)
{
KURL resultURL = urlToConvert;
if (urlToConvert.protocol() == baseURL.protocol() && !urlToConvert.path().startsWith("/"))
@@ -87,11 +87,11 @@ KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL)
int pos;
TQString cutname = urlToConvert.path();
TQString cutdir = baseURL.path(1);
- while ( (pos = cutname.find("../")) >=0 )
+ while ( (pos = cutname.tqfind("../")) >=0 )
{
cutname.remove( 0, pos+3 );
cutdir.remove( cutdir.length()-1, 1 );
- cutdir.remove( cutdir.findRev('/')+1 , 1000);
+ cutdir.remove( cutdir.tqfindRev('/')+1 , 1000);
}
resultURL.setPath(TQDir::cleanDirPath(cutdir+cutname));
}
@@ -105,27 +105,27 @@ KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL)
This is needed for empty directory adding/handling. (Andras)
Currently works only for local directories
*/
-KURL::List QExtFileInfo::allFiles( const KURL& path, const TQString& mask)
+KURL::List TQExtFileInfo::allFiles( const KURL& path, const TQString& tqmask)
{
- QExtFileInfo internalFileInfo;
- return internalFileInfo.allFilesInternal(path, mask);
+ TQExtFileInfo internalFileInfo;
+ return internalFileInfo.allFilesInternal(path, tqmask);
}
-KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const TQString& mask)
+KURL::List TQExtFileInfo::allFilesRelative( const KURL& path, const TQString& tqmask)
{
- QExtFileInfo internalFileInfo;
- KURL::List r = internalFileInfo.allFilesInternal( path, mask);
+ TQExtFileInfo internalFileInfo;
+ KURL::List r = internalFileInfo.allFilesInternal( path, tqmask);
KURL::List::Iterator it;
for ( it = r.begin(); it != r.end(); ++it )
{
- *it = QExtFileInfo::toRelative( *it, path );
+ *it = TQExtFileInfo::toRelative( *it, path );
}
return r;
}
-bool QExtFileInfo::createDir( const KURL& path )
+bool TQExtFileInfo::createDir( const KURL& path )
{
int i=0;
bool result;
@@ -150,7 +150,7 @@ bool QExtFileInfo::createDir( const KURL& path )
return result;
}
-KURL QExtFileInfo::cdUp(const KURL &url)
+KURL TQExtFileInfo::cdUp(const KURL &url)
{
KURL u = url;
TQString dir = u.path(-1);
@@ -162,17 +162,17 @@ KURL QExtFileInfo::cdUp(const KURL &url)
return u;
}
-TQString QExtFileInfo::shortName(const TQString &fname)
+TQString TQExtFileInfo::shortName(const TQString &fname)
{
return fname.section("/",-1);
}
-KURL QExtFileInfo::path( const KURL &url )
+KURL TQExtFileInfo::path( const KURL &url )
{
return KURL( url.directory(false,false) );
}
-KURL QExtFileInfo::home()
+KURL TQExtFileInfo::home()
{
KURL url;
url.setPath(TQDir::currentDirPath()+"/");
@@ -180,7 +180,7 @@ KURL QExtFileInfo::home()
}
-bool QExtFileInfo::exists(const KURL& a_url)
+bool TQExtFileInfo::exists(const KURL& a_url)
{
// Andras: Don't use it now, as it brings up an extra dialog and need manual
// intervention when usign fish
@@ -192,21 +192,21 @@ bool QExtFileInfo::exists(const KURL& a_url)
return TQFile::exists( a_url.path() );
} else
{
- QExtFileInfo internalFileInfo;
+ TQExtFileInfo internalFileInfo;
return internalFileInfo.internalExists(a_url);
}
}
/* Synchronouse copy, like NetAccess::file_copy in KDE 3.2 */
-bool QExtFileInfo::copy( const KURL& src, const KURL& target, int permissions,
+bool TQExtFileInfo::copy( const KURL& src, const KURL& target, int permissions,
bool overwrite, bool resume, TQWidget* window )
{
- QExtFileInfo internalFileInfo;
+ TQExtFileInfo internalFileInfo;
return internalFileInfo.internalCopy( src, target, permissions, overwrite, resume, window );
}
/** No descriptions */
-KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& mask)
+KURL::List TQExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& tqmask)
{
dirListItems.clear();
if (internalExists(startURL))
@@ -214,7 +214,7 @@ KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString&
lstFilters.setAutoDelete(true);
lstFilters.clear();
// Split on white space
- TQStringList list = TQStringList::split( ' ', mask );
+ TQStringList list = TQStringList::split( ' ', tqmask );
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
lstFilters.append( new TQRegExp(*it, false, true ) );
@@ -240,10 +240,10 @@ KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString&
//Some hackery from KIO::NetAccess as they do not do exactly what we want
/* return true if the url exists*/
-bool QExtFileInfo::internalExists(const KURL& url)
+bool TQExtFileInfo::internalExists(const KURL& url)
{
bJobOK = true;
- // kdDebug(24000)<<"QExtFileInfo::internalExists"<<endl;
+ // kdDebug(24000)<<"TQExtFileInfo::internalExists"<<endl;
KIO::StatJob * job = KIO::stat( url, false);
job->setDetails(0);
job->setSide(false); //check the url for writing
@@ -252,13 +252,13 @@ bool QExtFileInfo::internalExists(const KURL& url)
//To avoid lock-ups, start a timer.
TQTimer::singleShot(10*1000, this,TQT_SLOT(slotTimeout()));
-// kdDebug(24000)<<"QExtFileInfo::internalExists:before enter_loop"<<endl;
+// kdDebug(24000)<<"TQExtFileInfo::internalExists:before enter_loop"<<endl;
enter_loop();
-// kdDebug(24000)<<"QExtFileInfo::internalExists:after enter_loop"<<endl;
+// kdDebug(24000)<<"TQExtFileInfo::internalExists:after enter_loop"<<endl;
return bJobOK;
}
-bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
+bool TQExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
bool overwrite, bool resume, TQWidget* window)
{
bJobOK = true; // success unless further error occurs
@@ -277,18 +277,18 @@ bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permiss
void qt_enter_modal( TQWidget *widget );
void qt_leave_modal( TQWidget *widget );
-void QExtFileInfo::enter_loop()
+void TQExtFileInfo::enter_loop()
{
TQWidget dummy(0,0,WType_Dialog | WShowModal);
- dummy.setFocusPolicy( TQWidget::NoFocus );
+ dummy.setFocusPolicy( TQ_NoFocus );
qt_enter_modal(&dummy);
-// kdDebug(24000)<<"QExtFileInfo::enter_loop:before qApp->enter_loop()"<<endl;
- qApp->enter_loop();
-// kdDebug(24000)<<"QExtFileInfo::enter_loop:after qApp->enter_loop()"<<endl;
+// kdDebug(24000)<<"TQExtFileInfo::enter_loop:before tqApp->enter_loop()"<<endl;
+ tqApp->enter_loop();
+// kdDebug(24000)<<"TQExtFileInfo::enter_loop:after tqApp->enter_loop()"<<endl;
qt_leave_modal(&dummy);
}
-void QExtFileInfo::slotResult( KIO::Job * job )
+void TQExtFileInfo::slotResult( KIO::Job * job )
{
bJobOK = !job->error();
if ( !bJobOK )
@@ -298,14 +298,14 @@ void QExtFileInfo::slotResult( KIO::Job * job )
}
if ( job->isA("KIO::StatJob") )
m_entry = static_cast<KIO::StatJob *>(job)->statResult();
- qApp->exit_loop();
+ tqApp->exit_loop();
}
-void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
+void TQExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
{
KURL url = static_cast<KIO::ListJob *>(job)->url();
url.adjustPath(-1);
- // avoid creating these QStrings again and again
+ // avoid creating these TQStrings again and again
static const TQString& dot = KGlobal::staticQString(".");
static const TQString& dotdot = KGlobal::staticQString("..");
@@ -339,9 +339,9 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis
}
/** Timeout occured while waiting for some network function to return. */
-void QExtFileInfo::slotTimeout()
+void TQExtFileInfo::slotTimeout()
{
bJobOK = false;
- qApp->exit_loop();
+ tqApp->exit_loop();
}
#include "qextfileinfo.moc"