diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-25 12:03:00 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-25 12:29:31 +0900 |
commit | 4c0dae60b2fbc60996fc8f4bd29ee6219b869527 (patch) | |
tree | 6aa583e34395f4d19d4b85f081b31513e5c9c19d /tdecore/kstandarddirs.cpp | |
parent | 066f257eadc5866386c2cfbdba1a93105cff67ae (diff) | |
download | tdelibs-4c0dae60b2fbc60996fc8f4bd29ee6219b869527.tar.gz tdelibs-4c0dae60b2fbc60996fc8f4bd29ee6219b869527.zip |
Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore/kstandarddirs.cpp')
-rw-r--r-- | tdecore/kstandarddirs.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/tdecore/kstandarddirs.cpp b/tdecore/kstandarddirs.cpp index 888ca5bc2..8f189e6d1 100644 --- a/tdecore/kstandarddirs.cpp +++ b/tdecore/kstandarddirs.cpp @@ -143,7 +143,7 @@ bool TDEStandardDirs::isRestrictedResource(const char *type, const TQString& rel void TDEStandardDirs::applyDataRestrictions(const TQString &relPath) const { TQString key; - int i = relPath.find(QChar('/')); + int i = relPath.find(TQChar('/')); if (i != -1) key = "data_"+relPath.left(i); else @@ -188,8 +188,8 @@ void TDEStandardDirs::addPrefix( const TQString& _dir, bool priority ) return; TQString dir = _dir; - if (dir.at(dir.length() - 1) != QChar('/')) - dir += QChar('/'); + if (dir.at(dir.length() - 1) != TQChar('/')) + dir += TQChar('/'); if (!prefixes.contains(dir)) { priorityAdd(prefixes, dir, priority); @@ -208,8 +208,8 @@ void TDEStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority ) return; TQString dir = _dir; - if (dir.at(dir.length() - 1) != QChar('/')) - dir += QChar('/'); + if (dir.at(dir.length() - 1) != TQChar('/')) + dir += TQChar('/'); if (!d->xdgconf_prefixes.contains(dir)) { priorityAdd(d->xdgconf_prefixes, dir, priority); @@ -228,8 +228,8 @@ void TDEStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority ) return; TQString dir = _dir; - if (dir.at(dir.length() - 1) != QChar('/')) - dir += QChar('/'); + if (dir.at(dir.length() - 1) != TQChar('/')) + dir += TQChar('/'); if (!d->xdgdata_prefixes.contains(dir)) { priorityAdd(d->xdgdata_prefixes, dir, priority); @@ -270,8 +270,8 @@ bool TDEStandardDirs::addResourceType( const char *type, relatives.insert(type, rels); } TQString copy = relativename; - if (copy.at(copy.length() - 1) != QChar('/')) - copy += QChar('/'); + if (copy.at(copy.length() - 1) != TQChar('/')) + copy += TQChar('/'); if (!rels->contains(copy)) { if (priority) rels->prepend(copy); @@ -300,8 +300,8 @@ bool TDEStandardDirs::addResourceDir( const char *type, absolutes.insert(type, paths); } TQString copy = absdir; - if (copy.at(copy.length() - 1) != QChar('/')) - copy += QChar('/'); + if (copy.at(copy.length() - 1) != TQChar('/')) + copy += TQChar('/'); if (!paths->contains(copy)) { if (priority) @@ -388,7 +388,7 @@ TQStringList TDEStandardDirs::findDirs( const char *type, if (reldir.endsWith("/")) list.append(reldir); else - list.append(reldir+QChar('/')); + list.append(reldir+TQChar('/')); } return list; } @@ -403,7 +403,7 @@ TQStringList TDEStandardDirs::findDirs( const char *type, it != candidates.end(); ++it) { testdir.setPath(*it + reldir); if (testdir.exists()) - list.append(testdir.absPath() + QChar('/')); + list.append(testdir.absPath() + TQChar('/')); } return list; @@ -451,7 +451,7 @@ bool TDEStandardDirs::exists(const TQString &fullPath) { KDE_struct_stat buff; if ((access(TQFile::encodeName(fullPath), R_OK) == 0) && (KDE_stat( TQFile::encodeName(fullPath), &buff ) == 0)) { - if (fullPath.at(fullPath.length() - 1) != QChar('/')) { + if (fullPath.at(fullPath.length() - 1) != TQChar('/')) { if (S_ISREG( buff.st_mode )) return true; } @@ -481,9 +481,9 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, return; #ifdef Q_WS_WIN - assert(path.at(path.length() - 1) == QChar('/') || path.at(path.length() - 1) == QChar('\\')); + assert(path.at(path.length() - 1) == TQChar('/') || path.at(path.length() - 1) == TQChar('\\')); #else - assert(path.at(path.length() - 1) == QChar('/')); + assert(path.at(path.length() - 1) == TQChar('/')); #endif struct dirent *ep; @@ -508,7 +508,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, } if ( recursive ) { if ( S_ISDIR( buff.st_mode )) { - lookupDirectory(pathfn + QChar('/'), relPart + fn + QChar('/'), regexp, list, relList, recursive, unique); + lookupDirectory(pathfn + TQChar('/'), relPart + fn + TQChar('/'), regexp, list, relList, recursive, unique); } if (!regexp.exactMatch(fn)) continue; // No match @@ -560,7 +560,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath, if (relpath.length()) { - int slash = relpath.find(QChar('/')); + int slash = relpath.find(TQChar('/')); if (slash < 0) rest = relpath.left(relpath.length() - 1); else { @@ -572,9 +572,9 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath, if (prefix.isEmpty()) //for sanity return; #ifdef Q_WS_WIN - assert(prefix.at(prefix.length() - 1) == QChar('/') || prefix.at(prefix.length() - 1) == QChar('\\')); + assert(prefix.at(prefix.length() - 1) == TQChar('/') || prefix.at(prefix.length() - 1) == TQChar('\\')); #else - assert(prefix.at(prefix.length() - 1) == QChar('/')); + assert(prefix.at(prefix.length() - 1) == TQChar('/')); #endif KDE_struct_stat buff; @@ -594,7 +594,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath, while( ( ep = readdir( dp ) ) != 0L ) { TQString fn( TQFile::decodeName(ep->d_name)); - if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1) == QChar('~')) + if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1) == TQChar('~')) continue; if ( !pathExp.exactMatch(fn) ) @@ -606,15 +606,15 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath, continue; // Couldn't stat (e.g. no permissions) } if ( S_ISDIR( buff.st_mode )) - lookupPrefix(fn + QChar('/'), rest, rfn + QChar('/'), regexp, list, relList, recursive, unique); + lookupPrefix(fn + TQChar('/'), rest, rfn + TQChar('/'), regexp, list, relList, recursive, unique); } closedir( dp ); } else { // Don't stat, if the dir doesn't exist we will find out // when we try to open it. - lookupPrefix(prefix + path + QChar('/'), rest, - relPart + path + QChar('/'), regexp, list, + lookupPrefix(prefix + path + TQChar('/'), rest, + relPart + path + TQChar('/'), regexp, list, relList, recursive, unique); } } @@ -789,7 +789,7 @@ void TDEStandardDirs::createSpecialResource(const char *type) } } #endif - addResourceDir(type, dir+QChar('/')); + addResourceDir(type, dir+TQChar('/')); } TQStringList TDEStandardDirs::resourceDirs(const char *type) const @@ -904,9 +904,9 @@ TQStringList TDEStandardDirs::systemPaths( const TQString& pstr ) { p = tokens[ i ]; - if ( p[ 0 ] == QChar('~') ) + if ( p[ 0 ] == TQChar('~') ) { - int len = p.find( QChar('/') ); + int len = p.find( TQChar('/') ); if ( len == -1 ) len = p.length(); if ( len == 1 ) @@ -1183,8 +1183,8 @@ bool TDEStandardDirs::makeDir(const TQString& dir, int mode) uint len = target.length(); // append trailing slash if missing - if (dir.at(len - 1) != QChar('/')) - target += QChar('/'); + if (dir.at(len - 1) != TQChar('/')) + target += TQChar('/'); TQString base(""); uint i = 1; @@ -1192,7 +1192,7 @@ bool TDEStandardDirs::makeDir(const TQString& dir, int mode) while( i < len ) { KDE_struct_stat st; - int pos = target.find(QChar('/'), i); + int pos = target.find(TQChar('/'), i); base += target.mid(i - 1, pos - i + 1); TQCString baseEncoded = TQFile::encodeName(base); // bail out if we encountered a problem @@ -1340,15 +1340,15 @@ void TDEStandardDirs::addKDEDefaults() } if (!localKdeDir.isEmpty()) { - if (localKdeDir[localKdeDir.length()-1] != QChar('/')) - localKdeDir += QChar('/'); + if (localKdeDir[localKdeDir.length()-1] != TQChar('/')) + localKdeDir += TQChar('/'); } else { localKdeDir = TQDir::homeDirPath() + "/.trinity/"; } - if (localKdeDir != QString("-/")) + if (localKdeDir != TQString("-/")) { localKdeDir = KShell::tildeExpand(localKdeDir); addPrefix(localKdeDir); @@ -1384,8 +1384,8 @@ void TDEStandardDirs::addKDEDefaults() TQString localXdgDir = readEnvPath("XDG_CONFIG_HOME"); if (!localXdgDir.isEmpty()) { - if (localXdgDir[localXdgDir.length()-1] != QChar('/')) - localXdgDir += QChar('/'); + if (localXdgDir[localXdgDir.length()-1] != TQChar('/')) + localXdgDir += TQChar('/'); } else { @@ -1416,8 +1416,8 @@ void TDEStandardDirs::addKDEDefaults() it != tdedirList.end(); ++it) { TQString dir = *it; - if (dir[dir.length()-1] != QChar('/')) - dir += QChar('/'); + if (dir[dir.length()-1] != TQChar('/')) + dir += TQChar('/'); xdgdirList.append(dir+"share/"); } @@ -1428,8 +1428,8 @@ void TDEStandardDirs::addKDEDefaults() localXdgDir = readEnvPath("XDG_DATA_HOME"); if (!localXdgDir.isEmpty()) { - if (localXdgDir[localXdgDir.length()-1] != QChar('/')) - localXdgDir += QChar('/'); + if (localXdgDir[localXdgDir.length()-1] != TQChar('/')) + localXdgDir += TQChar('/'); } else { |