summaryrefslogtreecommitdiffstats
path: root/lib/util/rurl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/rurl.cpp')
-rw-r--r--lib/util/rurl.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/lib/util/rurl.cpp b/lib/util/rurl.cpp
index 1ec23434..0d631bda 100644
--- a/lib/util/rurl.cpp
+++ b/lib/util/rurl.cpp
@@ -1,4 +1,4 @@
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "rurl.h"
@@ -7,7 +7,7 @@ namespace Relative{
//class Name
-Name::Name( const QString & rurl, const Type type )
+Name::Name( const TQString & rurl, const Type type )
:m_rurl(rurl), m_type(type)
{
correct();
@@ -43,9 +43,9 @@ void Name::correct()
}
}
-QString Name::correctName( const QString & rurl, const Type type )
+TQString Name::correctName( const TQString & rurl, const Type type )
{
- QString temp = rurl;
+ TQString temp = rurl;
temp = Name::cleanName(temp);
if (temp[0] == '/')
temp = temp.mid(1);
@@ -65,21 +65,21 @@ QString Name::correctName( const QString & rurl, const Type type )
return temp;
}
-void Name::setRURL( const QString & rurl, const Type type )
+void Name::setRURL( const TQString & rurl, const Type type )
{
m_rurl = rurl;
m_type = type;
correct();
}
-QString Name::rurl( ) const
+TQString Name::rurl( ) const
{
return m_rurl;
}
-void Name::addPath( const QString & addendum )
+void Name::addPath( const TQString & addendum )
{
- QString temp = correctName(addendum, Directory);
+ TQString temp = correctName(addendum, Directory);
m_rurl = directory() + temp + fileName();
}
@@ -88,9 +88,9 @@ void Name::cleanRURL( )
m_rurl = cleanName(m_rurl);
}
-QString Name::cleanName( const QString & rurl )
+TQString Name::cleanName( const TQString & rurl )
{
- QString temp;
+ TQString temp;
bool wasSlash = false;
for (unsigned int i = 0; i < rurl.length(); ++i)
{
@@ -107,30 +107,30 @@ QString Name::cleanName( const QString & rurl )
return temp;
}
-QString Name::extension( bool complete ) const
+TQString Name::extension( bool complete ) const
{
if (m_type == File)
{
- QString temp = fileName();
+ TQString temp = fileName();
if (complete)
return temp.mid(temp.find('.')+1);
else
return temp.mid(temp.findRev('.')+1);
}
- return QString::null;
+ return TQString::null;
}
-QString Name::fileName( ) const
+TQString Name::fileName( ) const
{
if (m_type == File)
return m_rurl.section('/', -1);
- return QString::null;
+ return TQString::null;
}
-QString Name::directory( ) const
+TQString Name::directory( ) const
{
if ( (m_type == File) && (m_rurl.findRev('/') == -1) )
- return QString::null;
+ return TQString::null;
return m_rurl.mid(0, m_rurl.findRev('/')+1);
}
@@ -181,18 +181,18 @@ void Name::setType( const Type type )
m_type = type;
}
-Name Name::relativeName( const QString &base, const QString &url )
+Name Name::relativeName( const TQString &base, const TQString &url )
{
- QString dirUrl = base;
- QString fileUrl = url;
+ TQString dirUrl = base;
+ TQString fileUrl = url;
if (dirUrl.isEmpty() || (dirUrl == "/"))
return Name(fileUrl);
- QStringList dir = QStringList::split("/", dirUrl, false);
- QStringList file = QStringList::split("/", fileUrl, false);
+ TQStringList dir = TQStringList::split("/", dirUrl, false);
+ TQStringList file = TQStringList::split("/", fileUrl, false);
- QString resFileName = file.last();
+ TQString resFileName = file.last();
if (url.endsWith("/"))
resFileName += "/";
file.remove(file.last());
@@ -201,10 +201,10 @@ Name Name::relativeName( const QString &base, const QString &url )
while ( (i < dir.count()) && (i < (file.count())) && (dir[i] == file[i]) )
i++;
- QString result_up;
- QString result_down;
- QString currDir;
- QString currFile;
+ TQString result_up;
+ TQString result_down;
+ TQString currDir;
+ TQString currFile;
do
{
i >= dir.count() ? currDir = "" : currDir = dir[i];
@@ -237,7 +237,7 @@ URL::URL( KURL base, KURL url, Type type )
{
}
-URL::URL( KURL base, QString url, bool isUrlRelative, Type type )
+URL::URL( KURL base, TQString url, bool isUrlRelative, Type type )
:Name(isUrlRelative ? url : Name::relativeName(base.path(), url).rurl(), type), m_base(base)
{
}
@@ -247,7 +247,7 @@ void URL::setBase( const KURL & base )
m_base = base;
}
-void URL::setBase( const QString & base )
+void URL::setBase( const TQString & base )
{
KURL url;
url.setPath(base);
@@ -259,7 +259,7 @@ KURL URL::base( ) const
return m_base;
}
-QString URL::basePath( ) const
+TQString URL::basePath( ) const
{
return m_base.path(1);
}
@@ -272,7 +272,7 @@ KURL URL::url( ) const
return url;
}
-QString URL::urlPath( ) const
+TQString URL::urlPath( ) const
{
KURL url = m_base;
url.addPath(rurl());
@@ -285,7 +285,7 @@ QString URL::urlPath( ) const
return url.path(mod);
}
-QString URL::urlDirectory( ) const
+TQString URL::urlDirectory( ) const
{
KURL url = m_base;
url.addPath(rurl());
@@ -303,7 +303,7 @@ URL URL::relativeURL( KURL base, KURL url )
return URL(base, url);
}
-URL URL::relativeURL( KURL base, QString url, bool isUrlRelative )
+URL URL::relativeURL( KURL base, TQString url, bool isUrlRelative )
{
return URL(base, url, isUrlRelative);
}
@@ -327,17 +327,17 @@ Directory::Directory( KURL base, KURL url )
{
}
-Directory::Directory( KURL base, QString url, bool isRelativeUrl )
+Directory::Directory( KURL base, TQString url, bool isRelativeUrl )
:URL(base, url, isRelativeUrl, Name::Directory)
{
}
-void Directory::setRURL( QString rurl )
+void Directory::setRURL( TQString rurl )
{
URL::setRURL(rurl, Name::Directory);
}
-void Directory::setRURL( QString rurl, Type type )
+void Directory::setRURL( TQString rurl, Type type )
{
URL::setRURL(rurl, type);
}
@@ -351,17 +351,17 @@ File::File( KURL base, KURL url )
{
}
-File::File( KURL base, QString url, bool isRelativeUrl )
+File::File( KURL base, TQString url, bool isRelativeUrl )
:URL(base, url, isRelativeUrl, Name::File)
{
}
-void File::setRURL( QString rurl, Type type )
+void File::setRURL( TQString rurl, Type type )
{
URL::setRURL(rurl, type);
}
-void File::setRURL( QString rurl )
+void File::setRURL( TQString rurl )
{
URL::setRURL(rurl, Name::File);
}