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 c52c48b5..4c10d102 100644
--- a/kimagemapeditor/qextfileinfo.cpp
+++ b/kimagemapeditor/qextfileinfo.cpp
@@ -12,12 +12,12 @@
//qt includes
-#include <qdir.h>
-#include <qapplication.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
//kde includes
#include <kurl.h>
@@ -32,7 +32,7 @@
//app includes
#include "qextfileinfo.h"
-QString QExtFileInfo::lastErrorMsg = "";
+TQString QExtFileInfo::lastErrorMsg = "";
/** create a relative short url based in baseURL*/
KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
@@ -40,8 +40,8 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
KURL resultURL = urlToConvert;
if (urlToConvert.protocol() == baseURL.protocol())
{
- QString path = urlToConvert.path();
- QString basePath = baseURL.path(1);
+ TQString path = urlToConvert.path();
+ TQString basePath = baseURL.path(1);
if (path.startsWith("/"))
{
path.remove(0, 1);
@@ -72,7 +72,7 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
};
}
- resultURL.setPath(QDir::cleanDirPath(path));
+ resultURL.setPath(TQDir::cleanDirPath(path));
}
if (urlToConvert.path().endsWith("/")) resultURL.adjustPath(1);
@@ -85,15 +85,15 @@ KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL)
if (urlToConvert.protocol() == baseURL.protocol() && !urlToConvert.path().startsWith("/"))
{
int pos;
- QString cutname = urlToConvert.path();
- QString cutdir = baseURL.path(1);
+ TQString cutname = urlToConvert.path();
+ TQString cutdir = baseURL.path(1);
while ( (pos = cutname.find("../")) >=0 )
{
cutname.remove( 0, pos+3 );
cutdir.remove( cutdir.length()-1, 1 );
cutdir.remove( cutdir.findRev('/')+1 , 1000);
}
- resultURL.setPath(QDir::cleanDirPath(cutdir+cutname));
+ resultURL.setPath(TQDir::cleanDirPath(cutdir+cutname));
}
if (urlToConvert.path().endsWith("/")) resultURL.adjustPath(1);
@@ -105,13 +105,13 @@ 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 QString& mask)
+KURL::List QExtFileInfo::allFiles( const KURL& path, const TQString& mask)
{
QExtFileInfo internalFileInfo;
return internalFileInfo.allFilesInternal(path, mask);
}
-KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const QString& mask)
+KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const TQString& mask)
{
QExtFileInfo internalFileInfo;
KURL::List r = internalFileInfo.allFilesInternal( path, mask);
@@ -153,7 +153,7 @@ bool QExtFileInfo::createDir( const KURL& path )
KURL QExtFileInfo::cdUp(const KURL &url)
{
KURL u = url;
- QString dir = u.path(-1);
+ TQString dir = u.path(-1);
while ( !dir.isEmpty() && dir.right(1) != "/" )
{
dir.remove( dir.length()-1,1);
@@ -162,7 +162,7 @@ KURL QExtFileInfo::cdUp(const KURL &url)
return u;
}
-QString QExtFileInfo::shortName(const QString &fname)
+TQString QExtFileInfo::shortName(const TQString &fname)
{
return fname.section("/",-1);
}
@@ -175,7 +175,7 @@ KURL QExtFileInfo::path( const KURL &url )
KURL QExtFileInfo::home()
{
KURL url;
- url.setPath(QDir::currentDirPath()+"/");
+ url.setPath(TQDir::currentDirPath()+"/");
return url;
}
@@ -189,7 +189,7 @@ bool QExtFileInfo::exists(const KURL& a_url)
// No dialog when stating.
if ( a_url.isLocalFile() )
{
- return QFile::exists( a_url.path() );
+ return TQFile::exists( a_url.path() );
} else
{
QExtFileInfo internalFileInfo;
@@ -199,14 +199,14 @@ bool QExtFileInfo::exists(const KURL& a_url)
/* Synchronouse copy, like NetAccess::file_copy in KDE 3.2 */
bool QExtFileInfo::copy( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window )
+ bool overwrite, bool resume, TQWidget* window )
{
QExtFileInfo internalFileInfo;
return internalFileInfo.internalCopy( src, target, permissions, overwrite, resume, window );
}
/** No descriptions */
-KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const QString& mask)
+KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& mask)
{
dirListItems.clear();
if (internalExists(startURL))
@@ -214,16 +214,16 @@ KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const QString& m
lstFilters.setAutoDelete(true);
lstFilters.clear();
// Split on white space
- QStringList list = QStringList::split( ' ', mask );
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
- lstFilters.append( new QRegExp(*it, false, true ) );
+ TQStringList list = TQStringList::split( ' ', mask );
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ lstFilters.append( new TQRegExp(*it, false, true ) );
bJobOK = true;
KIO::ListJob *job = KIO::listRecursive(startURL, false, true);
- connect(job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList&)),
- this, SLOT(slotNewEntries(KIO::Job *, const KIO::UDSEntryList&)));
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect(job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList&)),
+ this, TQT_SLOT(slotNewEntries(KIO::Job *, const KIO::UDSEntryList&)));
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
// kdDebug(24000) << "Now listing: " << startURL.url() << endl;
enter_loop();
@@ -247,11 +247,11 @@ bool QExtFileInfo::internalExists(const KURL& url)
KIO::StatJob * job = KIO::stat( url, false);
job->setDetails(0);
job->setSide(false); //check the url for writing
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
//To avoid lock-ups, start a timer.
- QTimer::singleShot(10*1000, this,SLOT(slotTimeout()));
+ TQTimer::singleShot(10*1000, this,TQT_SLOT(slotTimeout()));
// kdDebug(24000)<<"QExtFileInfo::internalExists:before enter_loop"<<endl;
enter_loop();
// kdDebug(24000)<<"QExtFileInfo::internalExists:after enter_loop"<<endl;
@@ -259,28 +259,28 @@ bool QExtFileInfo::internalExists(const KURL& url)
}
bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window)
+ bool overwrite, bool resume, TQWidget* window)
{
bJobOK = true; // success unless further error occurs
KIO::Scheduler::checkSlaveOnHold(true);
KIO::Job * job = KIO::file_copy( src, target, permissions, overwrite, resume );
job->setWindow (window);
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
enter_loop();
return bJobOK;
}
-void qt_enter_modal( QWidget *widget );
-void qt_leave_modal( QWidget *widget );
+void qt_enter_modal( TQWidget *widget );
+void qt_leave_modal( TQWidget *widget );
void QExtFileInfo::enter_loop()
{
- QWidget dummy(0,0,WType_Dialog | WShowModal);
- dummy.setFocusPolicy( QWidget::NoFocus );
+ TQWidget dummy(0,0,WType_Dialog | WShowModal);
+ dummy.setFocusPolicy( TQWidget::NoFocus );
qt_enter_modal(&dummy);
// kdDebug(24000)<<"QExtFileInfo::enter_loop:before qApp->enter_loop()"<<endl;
qApp->enter_loop();
@@ -306,15 +306,15 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis
KURL url = static_cast<KIO::ListJob *>(job)->url();
url.adjustPath(-1);
// avoid creating these QStrings again and again
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dot = KGlobal::staticQString(".");
+ static const TQString& dotdot = KGlobal::staticQString("..");
KIO::UDSEntryListConstIterator it = udsList.begin();
KIO::UDSEntryListConstIterator end = udsList.end();
KURL itemURL;
for ( ; it != end; ++it )
{
- QString name;
+ TQString name;
// find out about the name
KIO::UDSEntry::ConstIterator entit = (*it).begin();
@@ -330,7 +330,7 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis
KFileItem* item = new KFileItem( *it, url, false, true );
itemURL = item->url();
if (item->isDir()) itemURL.adjustPath(1);
- for ( QPtrListIterator<QRegExp> filterIt( lstFilters ); filterIt.current(); ++filterIt )
+ for ( TQPtrListIterator<TQRegExp> filterIt( lstFilters ); filterIt.current(); ++filterIt )
if ( filterIt.current()->exactMatch( item->text() ) )
dirListItems.append(itemURL);
delete item;