From 13281e2856a2ef43bbab78c5528470309c23aa77 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:48:49 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- tdecore/kconfigbase.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'tdecore/kconfigbase.cpp') diff --git a/tdecore/kconfigbase.cpp b/tdecore/kconfigbase.cpp index 20d3f023c..b9a89a70c 100644 --- a/tdecore/kconfigbase.cpp +++ b/tdecore/kconfigbase.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include @@ -969,7 +969,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey, TQString aValue = readEntry( pKey ); if( !aValue.isEmpty() ) { - if ( aValue.tqat(0) == (QChar)'#' ) + if ( aValue.at(0) == (QChar)'#' ) { aRetColor.setNamedColor(aValue); } @@ -1025,7 +1025,7 @@ TQDateTime KConfigBase::readDateTimeEntry( const TQString& pKey, return readDateTimeEntry(pKey.utf8().data(), pDefault); } -// ### tqcurrentDateTime() as fallback ? (Harri) +// ### currentDateTime() as fallback ? (Harri) TQDateTime KConfigBase::readDateTimeEntry( const char *pKey, const TQDateTime* pDefault ) const { @@ -1034,21 +1034,21 @@ TQDateTime KConfigBase::readDateTimeEntry( const char *pKey, if( pDefault ) return *pDefault; else - return TQDateTime::tqcurrentDateTime(); + return TQDateTime::currentDateTime(); } TQStrList list; int count = readListEntry( pKey, list, ',' ); if( count == 6 ) { - TQDate date( atoi( list.tqat( 0 ) ), atoi( list.tqat( 1 ) ), - atoi( list.tqat( 2 ) ) ); - TQTime time( atoi( list.tqat( 3 ) ), atoi( list.tqat( 4 ) ), - atoi( list.tqat( 5 ) ) ); + TQDate date( atoi( list.at( 0 ) ), atoi( list.at( 1 ) ), + atoi( list.at( 2 ) ) ); + TQTime time( atoi( list.at( 3 ) ), atoi( list.at( 4 ) ), + atoi( list.at( 5 ) ) ); return TQDateTime( date, time ); } - return TQDateTime::tqcurrentDateTime(); + return TQDateTime::currentDateTime(); } void KConfigBase::writeEntry( const TQString& pKey, const TQString& value, @@ -1121,7 +1121,7 @@ static bool cleanHomeDirPath( TQString &path, const TQString &homeDir ) unsigned int len = homeDir.length(); // replace by "$HOME" if possible if (len && (path.length() == len || path[len] == '/')) { - path.replace(0, len, TQString::tqfromLatin1("$HOME")); + path.replace(0, len, TQString::fromLatin1("$HOME")); return true; } else return false; @@ -1135,7 +1135,7 @@ static TQString translatePath( TQString path ) // only "our" $HOME should be interpreted path.replace('$', "$$"); - bool startsWithFile = path.tqstartsWith("file:", false); + bool startsWithFile = path.startsWith("file:", false); // return original path, if it refers to another type of URL (e.g. http:/), or // if the path is already relative to another directory @@ -1189,7 +1189,7 @@ void KConfigBase::writePathEntry ( const char *pKey, const TQStringList &list, { if( list.isEmpty() ) { - writeEntry( pKey, TQString::tqfromLatin1(""), bPersistent ); + writeEntry( pKey, TQString::fromLatin1(""), bPersistent ); return; } TQStringList new_list; @@ -1402,7 +1402,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list, { if( list.isEmpty() ) { - writeEntry( pKey, TQString::tqfromLatin1(""), bPersistent ); + writeEntry( pKey, TQString::fromLatin1(""), bPersistent ); return; } TQString str_list; @@ -1424,7 +1424,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list, } str_list += sep; } - if( str_list.tqat(str_list.length() - 1) == (QChar)sep ) + if( str_list.at(str_list.length() - 1) == (QChar)sep ) str_list.truncate( str_list.length() -1 ); writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS ); } @@ -1449,7 +1449,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list, { if( list.isEmpty() ) { - writeEntry( pKey, TQString::tqfromLatin1(""), bPersistent ); + writeEntry( pKey, TQString::fromLatin1(""), bPersistent ); return; } TQString str_list; @@ -1468,7 +1468,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list, } str_list += sep; } - if( str_list.tqat(str_list.length() - 1) == (QChar)sep ) + if( str_list.at(str_list.length() - 1) == (QChar)sep ) str_list.truncate( str_list.length() -1 ); writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS, bExpand ); } -- cgit v1.2.1