From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/util/urlutil.cpp | 110 +++++++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 55 deletions(-) (limited to 'lib/util/urlutil.cpp') diff --git a/lib/util/urlutil.cpp b/lib/util/urlutil.cpp index fb451769..849cc555 100644 --- a/lib/util/urlutil.cpp +++ b/lib/util/urlutil.cpp @@ -18,10 +18,10 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include -#include -#include +#include +#include #include #include @@ -36,28 +36,28 @@ // Namespace URLUtil /////////////////////////////////////////////////////////////////////////////// -QString URLUtil::filename(const QString & name) { +TQString URLUtil::filename(const TQString & name) { int slashPos = name.findRev("/"); return slashPos<0 ? name : name.mid(slashPos+1); } /////////////////////////////////////////////////////////////////////////////// -QString URLUtil::directory(const QString & name) { +TQString URLUtil::directory(const TQString & name) { int slashPos = name.findRev("/"); - return slashPos<0 ? QString("") : name.left(slashPos); + return slashPos<0 ? TQString("") : name.left(slashPos); } /////////////////////////////////////////////////////////////////////////////// -QString URLUtil::getRelativePath(const QString& basepath, const QString& destpath) +TQString URLUtil::getRelativePath(const TQString& basepath, const TQString& destpath) { - QString relpath = "."; - if (!QFile::exists(basepath) || - !QFile::exists(destpath)) + TQString relpath = "."; + if (!TQFile::exists(basepath) || + !TQFile::exists(destpath)) return ""; - QStringList basedirs = QStringList::split(QString( QChar( QDir::separator() ) ),basepath); - QStringList destdirs = QStringList::split(QString( QChar( QDir::separator() ) ),destpath); + TQStringList basedirs = TQStringList::split(TQString( TQChar( TQDir::separator() ) ),basepath); + TQStringList destdirs = TQStringList::split(TQString( TQChar( TQDir::separator() ) ),destpath); int maxCompare=0; if (basedirs.count()>=destdirs.count()) @@ -72,23 +72,23 @@ QString URLUtil::getRelativePath(const QString& basepath, const QString& destpat lastCommonDir=i; } for (uint i=0;i= dir.count() ? currDir = "" : currDir = dir[i]; @@ -282,9 +282,9 @@ QString URLUtil::relativePathToFile( const QString & dirUrl, const QString & fil /////////////////////////////////////////////////////////////////////////////// //TODO: remove for KDE4 -QString URLUtil::canonicalPath( const QString & path ) +TQString URLUtil::canonicalPath( const TQString & path ) { - QDir dir(path); + TQDir dir(path); return dir.canonicalPath(); } @@ -292,7 +292,7 @@ QString URLUtil::canonicalPath( const QString & path ) //written by "Dawit A." //borrowed from his patch to KShell -QString URLUtil::envExpand ( const QString& str ) +TQString URLUtil::envExpand ( const TQString& str ) { uint len = str.length(); @@ -303,11 +303,11 @@ QString URLUtil::envExpand ( const QString& str ) if (pos < 0) pos = len; - char* ret = getenv( QConstString(str.unicode()+1, pos-1).string().local8Bit().data() ); + char* ret = getenv( TQConstString(str.unicode()+1, pos-1).string().local8Bit().data() ); if (ret) { - QString expandedStr ( QFile::decodeName( ret ) ); + TQString expandedStr ( TQFile::decodeName( ret ) ); if (pos < (int)len) expandedStr += str.mid(pos); return expandedStr; -- cgit v1.2.3