diff options
Diffstat (limited to 'tdecore')
32 files changed, 180 insertions, 180 deletions
diff --git a/tdecore/kallocator.cpp b/tdecore/kallocator.cpp index 16c1b3625..c02bbf3ff 100644 --- a/tdecore/kallocator.cpp +++ b/tdecore/kallocator.cpp @@ -183,9 +183,9 @@ void KZoneAllocator::delBlock(MemBlock *b) void * KZoneAllocator::allocate(size_t _size) { - // Use the size of (void *) as tqalignment - const size_t tqalignment = sizeof(void *) - 1; - _size = (_size + tqalignment) & ~tqalignment; + // Use the size of (void *) as alignment + const size_t alignment = sizeof(void *) - 1; + _size = (_size + alignment) & ~alignment; if ((unsigned long) _size + blockOffset > blockSize) { diff --git a/tdecore/kcalendarsystem.cpp b/tdecore/kcalendarsystem.cpp index 782b272e7..57898da84 100644 --- a/tdecore/kcalendarsystem.cpp +++ b/tdecore/kcalendarsystem.cpp @@ -90,10 +90,10 @@ static int stringToInteger(const TQString & sNum, int & iLength) unsigned int iPos = 0; int result = 0; - for (; sNum.length() > iPos && sNum.tqat(iPos).isDigit(); iPos++) + for (; sNum.length() > iPos && sNum.at(iPos).isDigit(); iPos++) { result *= 10; - result += sNum.tqat(iPos).digitValue(); + result += sNum.at(iPos).digitValue(); } iLength = iPos; diff --git a/tdecore/kclipboard.cpp b/tdecore/kclipboard.cpp index b6b4fc357..f3c5b2840 100644 --- a/tdecore/kclipboard.cpp +++ b/tdecore/kclipboard.cpp @@ -67,7 +67,7 @@ public: virtual const char *format( int i ) const { if ( i < (int) m_formats.count() ) - return m_formats.tqat( i ); + return m_formats.at( i ); else return 0L; } @@ -78,7 +78,7 @@ public: { int index = m_formats.find( format ); if ( index > -1 ) - return *(m_data.tqat( index )); + return *(m_data.at( index )); return TQByteArray(); } diff --git a/tdecore/kcmdlineargs.cpp b/tdecore/kcmdlineargs.cpp index a3a941494..0e1dc7ea9 100644 --- a/tdecore/kcmdlineargs.cpp +++ b/tdecore/kcmdlineargs.cpp @@ -1239,7 +1239,7 @@ KCmdLineArgs::arg(int n) const exit(255); } - return parsedArgList->tqat(n); + return parsedArgList->at(n); } KURL diff --git a/tdecore/kcompletion.cpp b/tdecore/kcompletion.cpp index 784ad017b..84a4cfca2 100644 --- a/tdecore/kcompletion.cpp +++ b/tdecore/kcompletion.cpp @@ -127,7 +127,7 @@ void KCompletion::addItem( const TQString& item, uint weight ) // nodes. for ( uint i = 0; i < len; i++ ) { - node = node->insert( item.tqat(i), sorted ); + node = node->insert( item.at(i), sorted ); if ( weighted ) node->confirm( weight -1 ); // node->insert() sets weighting to 1 } @@ -419,7 +419,7 @@ TQString KCompletion::findCompletion( const TQString& string ) // start at the tree-root and try to find the search-string for( uint i = 0; i < string.length(); i++ ) { - ch = string.tqat( i ); + ch = string.at( i ); node = node->find( ch ); if ( node ) @@ -508,7 +508,7 @@ void KCompletion::findAllCompletions(const TQString& string, // start at the tree-root and try to find the search-string for( uint i = 0; i < string.length(); i++ ) { - ch = string.tqat( i ); + ch = string.at( i ); node = node->find( ch ); if ( node ) @@ -595,7 +595,7 @@ void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node, return; } - TQChar ch1 = restString.tqat(0); + TQChar ch1 = restString.at(0); TQString newRest = restString.mid(1); KCompTreeNode *child1, *child2; @@ -725,7 +725,7 @@ void KCompTreeNode::remove( const TQString& str ) uint i = 0; for ( ; i < string.length(); i++ ) { - child = parent->find( string.tqat( i ) ); + child = parent->find( string.at( i ) ); if ( child ) deletables.insert( i + 1, child ); else @@ -736,8 +736,8 @@ void KCompTreeNode::remove( const TQString& str ) for ( ; i >= 1; i-- ) { - parent = deletables.tqat( i - 1 ); - child = deletables.tqat( i ); + parent = deletables.at( i - 1 ); + child = deletables.at( i ); if ( child->myChildren.count() == 0 ) delete parent->myChildren.remove( child ); } @@ -874,7 +874,7 @@ KCompTreeNode *KCompTreeNodeList::remove(KCompTreeNode *item) return item; } -KCompTreeNode *KCompTreeNodeList::tqat(uint index) const +KCompTreeNode *KCompTreeNodeList::at(uint index) const { KCompTreeNode *cur = first; while (index-- && cur) cur = cur->next; diff --git a/tdecore/kcompletion_private.h b/tdecore/kcompletion_private.h index bd199bdfd..3d72586f3 100644 --- a/tdecore/kcompletion_private.h +++ b/tdecore/kcompletion_private.h @@ -38,7 +38,7 @@ public: KCompTreeNode *begin() const { return first; } KCompTreeNode *end() const { return last; } - KCompTreeNode *tqat(uint index) const; + KCompTreeNode *at(uint index) const; void append(KCompTreeNode *item); void prepend(KCompTreeNode *item); void insert(KCompTreeNode *after, KCompTreeNode *item); @@ -119,7 +119,7 @@ public: return &myChildren; } inline const KCompTreeNode * childAt(int index) const { - return myChildren.tqat(index); + return myChildren.at(index); } inline const KCompTreeNode * firstChild() const { return myChildren.begin(); diff --git a/tdecore/kconfigbackend.cpp b/tdecore/kconfigbackend.cpp index 85e44ebaa..fe4dfda8e 100644 --- a/tdecore/kconfigbackend.cpp +++ b/tdecore/kconfigbackend.cpp @@ -496,7 +496,7 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1()); else #endif { - rFile.tqat(0); + rFile.at(0); data = rFile.readAll(); s = data.data(); eof = s + data.size(); diff --git a/tdecore/kconfigbase.cpp b/tdecore/kconfigbase.cpp index 0b3e05b35..9ad660037 100644 --- a/tdecore/kconfigbase.cpp +++ b/tdecore/kconfigbase.cpp @@ -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); } @@ -1040,10 +1040,10 @@ TQDateTime KConfigBase::readDateTimeEntry( const char *pKey, 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 ); } @@ -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 ); } @@ -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 ); } diff --git a/tdecore/kde-config.cpp.cmake b/tdecore/kde-config.cpp.cmake index 3a042705d..8b3dd7afd 100644 --- a/tdecore/kde-config.cpp.cmake +++ b/tdecore/kde-config.cpp.cmake @@ -201,7 +201,7 @@ int main(int argc, char **argv) if (helptexts[index]) { printf("%s - %s\n", helptexts[index], i18n(helptexts[index+1]).local8Bit().data()); } else { - printf("%s", i18n("%1 - unknown type\n").tqarg(*it).local8Bit().data()); + printf("%s", i18n("%1 - unknown type\n").arg(*it).local8Bit().data()); } } return 0; @@ -226,7 +226,7 @@ int main(int argc, char **argv) else if ( type == "document" ) printResult(KGlobalSettings::documentPath()); else - fprintf(stderr, "%s", i18n("%1 - unknown type of userpath\n").tqarg(type).local8Bit().data() ); + fprintf(stderr, "%s", i18n("%1 - unknown type of userpath\n").arg(type).local8Bit().data() ); return 0; } diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp index 2914881db..44a45245c 100644 --- a/tdecore/kdebug.cpp +++ b/tdecore/kdebug.cpp @@ -415,7 +415,7 @@ kdbgstream& kdbgstream::operator << (const TQWidget* widget) return *this; } output += string; - if (output.tqat(output.length() -1 ) == (QChar)'\n') + if (output.at(output.length() -1 ) == (QChar)'\n') { flush(); } @@ -454,7 +454,7 @@ kdbgstream& kdbgstream::operator<<( const TQRect& r ) { kdbgstream& kdbgstream::operator<<( const TQRegion& reg ) { *this<< "[ "; - TQMemArray<TQRect>rs=reg.tqrects(); + TQMemArray<TQRect>rs=reg.rects(); for (uint i=0;i<rs.size();++i) *this << TQString(TQString("[%1,%2 - %3x%4] ").arg(rs[i].x()).arg(rs[i].y()).arg(rs[i].width()).arg(rs[i].height() )) ; diff --git a/tdecore/kdebug.h b/tdecore/kdebug.h index a65667d1b..477e8e43f 100644 --- a/tdecore/kdebug.h +++ b/tdecore/kdebug.h @@ -216,7 +216,7 @@ class TDECORE_EXPORT kdbgstream { kdbgstream &operator<<(const TQString& string) { if (!print) return *this; output += string; - if (output.tqat(output.length() -1 ) == (TQChar)'\n') + if (output.at(output.length() -1 ) == (TQChar)'\n') flush(); return *this; } @@ -228,7 +228,7 @@ class TDECORE_EXPORT kdbgstream { kdbgstream &operator<<(const char *string) { if (!print) return *this; output += TQString::fromUtf8(string); - if (output.tqat(output.length() - 1) == (TQChar)'\n') + if (output.at(output.length() - 1) == (TQChar)'\n') flush(); return *this; } diff --git a/tdecore/kextsock.cpp b/tdecore/kextsock.cpp index fcda490b8..fc398ef2a 100644 --- a/tdecore/kextsock.cpp +++ b/tdecore/kextsock.cpp @@ -248,7 +248,7 @@ void KExtendedSocket::setSocketStatus(int newstatus) void KExtendedSocket::setError(int errorcode, int syserror) { - seStatus(errorcode); + setStatus(errorcode); d->syserror = syserror; } diff --git a/tdecore/kglobalaccel_x11.cpp b/tdecore/kglobalaccel_x11.cpp index ae1360391..ce248ae02 100644 --- a/tdecore/kglobalaccel_x11.cpp +++ b/tdecore/kglobalaccel_x11.cpp @@ -287,7 +287,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { KAccelAction* pAction = *it; kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16) - << (pAction ? TQString(" name: \"%1\" shortcut: %2").tqarg(pAction->name()).tqarg(pAction->shortcut().toStringInternal()) : TQString()) + << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString()) << endl; } #endif @@ -365,7 +365,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { KAccelAction* pAction = *it; kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16) - << (pAction ? TQString(" name: \"%1\" shortcut: %2").tqarg(pAction->name()).tqarg(pAction->shortcut().toStringInternal()) : TQString()) + << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString()) << endl; } #endif diff --git a/tdecore/kglobalsettings.cpp b/tdecore/kglobalsettings.cpp index d539f56c9..d257097bf 100644 --- a/tdecore/kglobalsettings.cpp +++ b/tdecore/kglobalsettings.cpp @@ -451,7 +451,7 @@ TQFont KGlobalSettings::taskbarFont() TQFont KGlobalSettings::largeFont(const TQString &text) { TQFontDatabase db; - TQStringList fam = db.tqfamilies(); + TQStringList fam = db.families(); // Move a bunch of preferred fonts to the front. if (fam.remove("Arial")) diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp index d866fa0d2..c8d088918 100644 --- a/tdecore/kiconeffect.cpp +++ b/tdecore/kiconeffect.cpp @@ -742,7 +742,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect) TQPainter p(widget); - // Use NotROP to avoid having to tqrepaint the pixmap each time. + // Use NotROP to avoid having to repaint the pixmap each time. p.setPen(TQPen(Qt::black, 2, Qt::DotLine)); p.setRasterOp(TQt::NotROP); diff --git a/tdecore/klocale.cpp b/tdecore/klocale.cpp index d47de5a03..f0e3b1f21 100644 --- a/tdecore/klocale.cpp +++ b/tdecore/klocale.cpp @@ -1103,7 +1103,7 @@ KLocale::SignPosition KLocale::negativeMonetarySignPosition() const static inline void put_it_in( TQChar *buffer, uint& index, const TQString &s ) { for ( uint l = 0; l < s.length(); l++ ) - buffer[index++] = s.tqat( l ); + buffer[index++] = s.at( l ); } static inline void put_it_in( TQChar *buffer, uint& index, int number ) @@ -1352,14 +1352,14 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const { if ( !escape ) { - if ( (TQChar(rst.tqat( format_index )).tqunicode()) == '%' ) + if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' ) escape = true; else - buffer.append(rst.tqat(format_index)); + buffer.append(rst.at(format_index)); } else { - switch ( TQChar(rst.tqat( format_index )).tqunicode() ) + switch ( TQChar(rst.at( format_index )).tqunicode() ) { case '%': buffer.append('%'); @@ -1401,7 +1401,7 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const buffer.append(calendar()->weekDayName(pDate, false)); break; default: - buffer.append(rst.tqat(format_index)); + buffer.append(rst.at(format_index)); break; } escape = false; @@ -1583,12 +1583,12 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const */ static int readInt(const TQString &str, uint &pos) { - if (!str.tqat(pos).isDigit()) return -1; + if (!str.at(pos).isDigit()) return -1; int result = 0; - for (; str.length() > pos && str.tqat(pos).isDigit(); pos++) + for (; str.length() > pos && str.at(pos).isDigit(); pos++) { result *= 10; - result += str.tqat(pos).digitValue(); + result += str.at(pos).digitValue(); } return result; @@ -1625,22 +1625,22 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok) while (fmt.length() > fmtpos && str.length() > strpos && !error) { - TQChar c = fmt.tqat(fmtpos++); + TQChar c = fmt.at(fmtpos++); if (c != (QChar)'%') { - if (c.isSpace() && str.tqat(strpos).isSpace()) + if (c.isSpace() && str.at(strpos).isSpace()) strpos++; - else if (c != str.tqat(strpos++)) + else if (c != str.at(strpos++)) error = true; } else { int j; // remove space at the beginning - if (str.length() > strpos && str.tqat(strpos).isSpace()) + if (str.length() > strpos && str.at(strpos).isSpace()) strpos++; - c = fmt.tqat(fmtpos++); + c = fmt.at(fmtpos++); switch (c) { case 'a': @@ -1765,22 +1765,22 @@ TQTime KLocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok) { if ( !(Format.length() > Formatpos && str.length() > strpos) ) goto error; - TQChar c = Format.tqat(Formatpos++); + TQChar c = Format.at(Formatpos++); if (c != (QChar)'%') { if (c.isSpace()) strpos++; - else if (c != str.tqat(strpos++)) + else if (c != str.at(strpos++)) goto error; continue; } // remove space at the beginning - if (str.length() > strpos && str.tqat(strpos).isSpace()) + if (str.length() > strpos && str.at(strpos).isSpace()) strpos++; - c = Format.tqat(Formatpos++); + c = Format.at(Formatpos++); switch (c) { case 'p': @@ -1876,14 +1876,14 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat { if ( !escape ) { - if ( (TQChar(rst.tqat( format_index )).tqunicode()) == '%' ) + if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' ) escape = true; else - buffer[index++] = rst.tqat( format_index ); + buffer[index++] = rst.at( format_index ); } else { - switch ( TQChar(rst.tqat( format_index )).tqunicode() ) + switch ( TQChar(rst.at( format_index )).tqunicode() ) { case '%': buffer[index++] = (QChar)'%'; @@ -1915,7 +1915,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat number = pTime.hour(); case 'l': // to share the code - if ( (TQChar(rst.tqat( format_index )).tqunicode()) == 'l' ) + if ( (TQChar(rst.at( format_index )).tqunicode()) == 'l' ) number = isDuration ? pTime.hour() : (pTime.hour() + 11) % 12 + 1; if ( number / 10 ) buffer[index++] = number / 10 + '0'; @@ -1932,7 +1932,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat } break; default: - buffer[index++] = rst.tqat( format_index ); + buffer[index++] = rst.at( format_index ); break; } escape = false; diff --git a/tdecore/kpalette.cpp b/tdecore/kpalette.cpp index 9cc7b5635..073dff626 100644 --- a/tdecore/kpalette.cpp +++ b/tdecore/kpalette.cpp @@ -176,7 +176,7 @@ KPalette::color(int index) if ((index < 0) || (index >= nrColors())) return TQColor(); - kolor *node = mKolorList.tqat(index); + kolor *node = mKolorList.at(index); if (!node) return TQColor(); @@ -202,7 +202,7 @@ KPalette::colorName(int index) if ((index < 0) || (index >= nrColors())) return TQString::null; - kolor *node = mKolorList.tqat(index); + kolor *node = mKolorList.at(index); if (!node) return TQString::null; @@ -227,7 +227,7 @@ KPalette::changeColor(int index, if ((index < 0) || (index >= nrColors())) return -1; - kolor *node = mKolorList.tqat(index); + kolor *node = mKolorList.at(index); if (!node) return -1; diff --git a/tdecore/kprocctrl.cpp b/tdecore/kprocctrl.cpp index 6774eee5f..d8170c0a8 100644 --- a/tdecore/kprocctrl.cpp +++ b/tdecore/kprocctrl.cpp @@ -214,7 +214,7 @@ void KProcessController::slotDoHousekeeping() if( waitpid( *uit, 0, WNOHANG ) > 0 ) { uit = unixProcessList.remove( uit ); - deref(); // counterpart to addProcess, can tqinvalidate 'this' + deref(); // counterpart to addProcess, can invalidate 'this' } else ++uit; } diff --git a/tdecore/krfcdate.cpp b/tdecore/krfcdate.cpp index dabdc7afa..d9a374d0c 100644 --- a/tdecore/krfcdate.cpp +++ b/tdecore/krfcdate.cpp @@ -394,7 +394,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) mday = l[2].toUInt(); // Z suffix means UTC. - if ((QChar)'Z' == timeString.tqat(timeString.length() - 1)) { + if ((QChar)'Z' == timeString.at(timeString.length() - 1)) { timeString.remove(timeString.length() - 1, 1); } diff --git a/tdecore/kstandarddirs.cpp b/tdecore/kstandarddirs.cpp index f9aaae586..55a3b5e8c 100644 --- a/tdecore/kstandarddirs.cpp +++ b/tdecore/kstandarddirs.cpp @@ -189,7 +189,7 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority ) return; TQString dir = _dir; - if (dir.tqat(dir.length() - 1) != QChar('/')) + if (dir.at(dir.length() - 1) != QChar('/')) dir += QChar('/'); if (!prefixes.contains(dir)) { @@ -209,7 +209,7 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority ) return; TQString dir = _dir; - if (dir.tqat(dir.length() - 1) != QChar('/')) + if (dir.at(dir.length() - 1) != QChar('/')) dir += QChar('/'); if (!d->xdgconf_prefixes.contains(dir)) { @@ -229,7 +229,7 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority ) return; TQString dir = _dir; - if (dir.tqat(dir.length() - 1) != QChar('/')) + if (dir.at(dir.length() - 1) != QChar('/')) dir += QChar('/'); if (!d->xdgdata_prefixes.contains(dir)) { @@ -271,7 +271,7 @@ bool KStandardDirs::addResourceType( const char *type, relatives.insert(type, rels); } TQString copy = relativename; - if (copy.tqat(copy.length() - 1) != QChar('/')) + if (copy.at(copy.length() - 1) != QChar('/')) copy += QChar('/'); if (!rels->contains(copy)) { if (priority) @@ -301,7 +301,7 @@ bool KStandardDirs::addResourceDir( const char *type, absolutes.insert(type, paths); } TQString copy = absdir; - if (copy.tqat(copy.length() - 1) != QChar('/')) + if (copy.at(copy.length() - 1) != QChar('/')) copy += QChar('/'); if (!paths->contains(copy)) { @@ -452,7 +452,7 @@ bool KStandardDirs::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.tqat(fullPath.length() - 1) != QChar('/')) { + if (fullPath.at(fullPath.length() - 1) != QChar('/')) { if (S_ISREG( buff.st_mode )) return true; } else @@ -478,9 +478,9 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, return; #ifdef Q_WS_WIN - assert(path.tqat(path.length() - 1) == QChar('/') || path.tqat(path.length() - 1) == QChar('\\')); + assert(path.at(path.length() - 1) == QChar('/') || path.at(path.length() - 1) == QChar('\\')); #else - assert(path.tqat(path.length() - 1) == QChar('/')); + assert(path.at(path.length() - 1) == QChar('/')); #endif struct dirent *ep; @@ -492,7 +492,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, while( ( ep = readdir( dp ) ) != 0L ) { TQString fn( TQFile::decodeName(ep->d_name)); - if (fn == _dot || fn == _dotdot || TQChar(fn.tqat(fn.length() - 1)).latin1() == TQChar('~').latin1()) + if (fn == _dot || fn == _dotdot || TQChar(fn.at(fn.length() - 1)).latin1() == TQChar('~').latin1()) continue; if (!recursive && !regexp.exactMatch(fn)) @@ -569,9 +569,9 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath, if (prefix.isEmpty()) //for sanity return; #ifdef Q_WS_WIN - assert(prefix.tqat(prefix.length() - 1) == QChar('/') || prefix.tqat(prefix.length() - 1) == QChar('\\')); + assert(prefix.at(prefix.length() - 1) == QChar('/') || prefix.at(prefix.length() - 1) == QChar('\\')); #else - assert(prefix.tqat(prefix.length() - 1) == QChar('/')); + assert(prefix.at(prefix.length() - 1) == QChar('/')); #endif KDE_struct_stat buff; @@ -591,7 +591,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.tqat(fn.length() - 1) == QChar('~')) + if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1) == QChar('~')) continue; if ( !pathExp.exactMatch(fn) ) @@ -1130,7 +1130,7 @@ TQString KStandardDirs::saveLocation(const char *type, if (KDE_stat(TQFile::encodeName(fullPath), &st) != 0 || !(S_ISDIR(st.st_mode))) { if(!create) { #ifndef NDEBUG - kdDebug() << TQString("save location %1 doesn't exist").tqarg(fullPath) << endl; + kdDebug() << TQString("save location %1 doesn't exist").arg(fullPath) << endl; #endif return fullPath; } @@ -1176,7 +1176,7 @@ bool KStandardDirs::makeDir(const TQString& dir, int mode) uint len = target.length(); // append trailing slash if missing - if (dir.tqat(len - 1) != QChar('/')) + if (dir.at(len - 1) != QChar('/')) target += QChar('/'); TQString base(""); diff --git a/tdecore/kstringhandler.cpp b/tdecore/kstringhandler.cpp index dfabb49ea..2af77edf1 100644 --- a/tdecore/kstringhandler.cpp +++ b/tdecore/kstringhandler.cpp @@ -62,7 +62,7 @@ TQString KStringHandler::word( const TQString &text , const char *range ) // Extract words // int wordsToExtract = cnt-pos+1; - TQStringList::Iterator it = list.tqat( pos); + TQStringList::Iterator it = list.at( pos); while ( (it != list.end()) && (wordsToExtract-- > 0)) { @@ -91,7 +91,7 @@ TQString KStringHandler::insword( const TQString &text , const TQString &word , if ( pos >= list.count() ) list.append( word ); else - list.insert( list.tqat(pos) , word ); + list.insert( list.at(pos) , word ); // Rejoin return list.join( " " ); @@ -112,7 +112,7 @@ TQString KStringHandler::setword( const TQString &text , const TQString &word , list.append( word ); else { - list.insert( list.remove( list.tqat(pos) ) , word ); + list.insert( list.remove( list.at(pos) ) , word ); } // Rejoin @@ -140,7 +140,7 @@ TQString KStringHandler::remrange( const TQString &text , const char *range ) // Remove that range of words // int wordsToDelete = cnt-pos+1; - TQStringList::Iterator it = list.tqat( pos); + TQStringList::Iterator it = list.at( pos); while ( (it != list.end()) && (wordsToDelete-- > 0)) it = list.remove( it ); @@ -159,7 +159,7 @@ TQString KStringHandler::remword( const TQString &text , uint pos ) TQStringList list = TQStringList::split( " ", text, true ); if ( pos < list.count() ) - list.remove( list.tqat( pos ) ); + list.remove( list.at( pos ) ); // Rejoin return list.join( " " ); diff --git a/tdecore/ksycoca.cpp b/tdecore/ksycoca.cpp index f95062fa0..09ad97224 100644 --- a/tdecore/ksycoca.cpp +++ b/tdecore/ksycoca.cpp @@ -230,7 +230,7 @@ void KSycoca::closeDatabase() { QIODevice *device = 0; if (m_str) - device = m_str->tqdevice(); + device = m_str->device(); #ifdef HAVE_MMAP if (device && m_sycoca_mmap) { @@ -288,7 +288,7 @@ TQDataStream * KSycoca::findEntry(int offset, KSycocaType &type) if ( !m_str ) openDatabase(); //kdDebug(7011) << TQString("KSycoca::_findEntry(offset=%1)").arg(offset,8,16) << endl; - m_str->tqdevice()->tqat(offset); + m_str->device()->at(offset); TQ_INT32 aType; (*m_str) >> aType; type = (KSycocaType) aType; @@ -306,7 +306,7 @@ bool KSycoca::checkVersion(bool abortOnError) // We should never get here... if a database was found then m_str shouldn't be 0L. assert(m_str); } - m_str->tqdevice()->tqat(0); + m_str->device()->at(0); TQ_INT32 aVersion; (*m_str) >> aVersion; if ( aVersion < KSYCOCA_VERSION ) @@ -361,7 +361,7 @@ TQDataStream * KSycoca::findFactory(KSycocaFactoryId id) if (aId == id) { //kdDebug(7011) << TQString("KSycoca::findFactory(%1) offset %2").arg((int)id).arg(aOffset) << endl; - m_str->tqdevice()->tqat(aOffset); + m_str->device()->at(aOffset); return m_str; } } diff --git a/tdecore/ksycocadict.cpp b/tdecore/ksycocadict.cpp index 11b16b08b..e58b81e5f 100644 --- a/tdecore/ksycocadict.cpp +++ b/tdecore/ksycocadict.cpp @@ -60,7 +60,7 @@ KSycocaDict::KSycocaDict(TQDataStream *str, int offset) : d(0), mStr(str), mOffset(offset) { TQ_UINT32 test1, test2; - str->tqdevice()->tqat(offset); + str->device()->at(offset); (*str) >> test1 >> test2; if ((test1 > 0x000fffff) || (test2 > 1024)) { @@ -70,10 +70,10 @@ KSycocaDict::KSycocaDict(TQDataStream *str, int offset) return; } - str->tqdevice()->tqat(offset); + str->device()->at(offset); (*str) >> mHashTableSize; (*str) >> mHashList; - mOffset = str->tqdevice()->tqat(); // Start of hashtable + mOffset = str->device()->at(); // Start of hashtable } KSycocaDict::~KSycocaDict() @@ -131,7 +131,7 @@ KSycocaDict::find_string(const TQString &key ) uint off = mOffset+sizeof(TQ_INT32)*hash; //kdDebug(7011) << TQString("off is %1").arg(off,8,16) << endl; - mStr->tqdevice()->tqat( off ); + mStr->device()->at( off ); TQ_INT32 offset; (*mStr) >> offset; @@ -146,7 +146,7 @@ KSycocaDict::find_string(const TQString &key ) // Lookup duplicate list. offset = -offset; - mStr->tqdevice()->tqat(offset); + mStr->device()->at(offset); //kdDebug(7011) << TQString("Looking up duplicate list at %1").arg(offset,8,16) << endl; while(true) @@ -286,7 +286,7 @@ KSycocaDict::save(TQDataStream &str) return; } - mOffset = str.tqdevice()->tqat(); + mOffset = str.device()->at(); //kdDebug(7011) << TQString("KSycocaDict: %1 entries.").arg(count()) << endl; @@ -402,12 +402,12 @@ KSycocaDict::save(TQDataStream &str) str << mHashTableSize; str << mHashList; - mOffset = str.tqdevice()->tqat(); // mOffset points to start of hashTable + mOffset = str.device()->at(); // mOffset points to start of hashTable //kdDebug(7011) << TQString("Start of Hash Table, offset = %1").arg(mOffset,8,16) << endl; for(int pass = 1; pass <= 2; pass++) { - str.tqdevice()->tqat(mOffset); + str.device()->at(mOffset); //kdDebug(7011) << TQString("Writing hash table (pass #%1)").arg(pass) << endl; for(uint i=0; i < mHashTableSize; i++) { @@ -421,7 +421,7 @@ KSycocaDict::save(TQDataStream &str) str << tmpid; //kdDebug(7011) << TQString("Hash table : %1").arg(tmpid,8,16) << endl; } - //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.tqdevice()->tqat(),8,16) << endl; + //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.device()->at(),8,16) << endl; //kdDebug(7011) << TQString("Writing duplicate lists (pass #%1)").arg(pass) << endl; for(uint i=0; i < mHashTableSize; i++) @@ -429,7 +429,7 @@ KSycocaDict::save(TQDataStream &str) if (hashTable[i].duplicates) { TQPtrList<string_entry> *dups = hashTable[i].duplicates; - hashTable[i].duplicate_offset = str.tqdevice()->tqat(); + hashTable[i].duplicate_offset = str.device()->at(); /*kdDebug(7011) << TQString("Duplicate lists: Offset = %1 list_size = %2") .arg(hashTable[i].duplicate_offset,8,16).arg(dups->count()) << endl; */ @@ -441,7 +441,7 @@ KSycocaDict::save(TQDataStream &str) str << (TQ_INT32) 0; // End of list marker (0) } } - //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.tqdevice()->tqat(),8,16) << endl; + //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.device()->at(),8,16) << endl; } //kdDebug(7011) << "Cleaning up hash table." << endl; diff --git a/tdecore/ksycocaentry.h b/tdecore/ksycocaentry.h index a3cb9595f..a3071ec5a 100644 --- a/tdecore/ksycocaentry.h +++ b/tdecore/ksycocaentry.h @@ -101,7 +101,7 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them */ virtual void save(TQDataStream &s) { - mOffset = s.tqdevice()->tqat(); // store position in member variable + mOffset = s.device()->at(); // store position in member variable s << (TQ_INT32) sycocaType() << mPath; } diff --git a/tdecore/ksycocafactory.cpp b/tdecore/ksycocafactory.cpp index da65619e6..c224ebe79 100644 --- a/tdecore/ksycocafactory.cpp +++ b/tdecore/ksycocafactory.cpp @@ -46,10 +46,10 @@ KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id) (*m_str) >> i; m_endEntryOffset = i; - int saveOffset = m_str->tqdevice()->tqat(); + int saveOffset = m_str->device()->at(); // Init index tables m_sycocaDict = new KSycocaDict(m_str, m_sycocaDictOffset); - saveOffset = m_str->tqdevice()->tqat(saveOffset); + saveOffset = m_str->device()->at(saveOffset); } } else @@ -78,7 +78,7 @@ void KSycocaFactory::saveHeader(TQDataStream &str) { // Write header - str.tqdevice()->tqat(mOffset); + str.device()->at(mOffset); str << (TQ_INT32) m_sycocaDictOffset; str << (TQ_INT32) m_beginEntryOffset; str << (TQ_INT32) m_endEntryOffset; @@ -91,13 +91,13 @@ KSycocaFactory::save(TQDataStream &str) // building database if (!m_sycocaDict) return; // Error! - mOffset = str.tqdevice()->tqat(); // store position in member variable + mOffset = str.device()->at(); // store position in member variable m_sycocaDictOffset = 0; // Write header (pass #1) saveHeader(str); - m_beginEntryOffset = str.tqdevice()->tqat(); + m_beginEntryOffset = str.device()->at(); // Write all entries. int entryCount = 0; @@ -110,7 +110,7 @@ KSycocaFactory::save(TQDataStream &str) entryCount++; } - m_endEntryOffset = str.tqdevice()->tqat(); + m_endEntryOffset = str.device()->at(); // Write indices... // Linear index @@ -124,16 +124,16 @@ KSycocaFactory::save(TQDataStream &str) } // Dictionary index - m_sycocaDictOffset = str.tqdevice()->tqat(); + m_sycocaDictOffset = str.device()->at(); m_sycocaDict->save(str); - int endOfFactoryData = str.tqdevice()->tqat(); + int endOfFactoryData = str.device()->at(); // Update header (pass #2) saveHeader(str); // Seek to end. - str.tqdevice()->tqat(endOfFactoryData); + str.device()->at(endOfFactoryData); } void @@ -169,7 +169,7 @@ KSycocaEntry::List KSycocaFactory::allEntries() // Assume we're NOT building a database - m_str->tqdevice()->tqat(m_endEntryOffset); + m_str->device()->at(m_endEntryOffset); TQ_INT32 entryCount; (*m_str) >> entryCount; diff --git a/tdecore/malloc/malloc.c b/tdecore/malloc/malloc.c index c25800f5d..dba0fdef0 100644 --- a/tdecore/malloc/malloc.c +++ b/tdecore/malloc/malloc.c @@ -85,7 +85,7 @@ int kde_malloc_is_used = 0; calloc(size_t n_elements, size_t element_size); free(Void_t* p); realloc(Void_t* p, size_t n); - memalign(size_t tqalignment, size_t n); + memalign(size_t alignment, size_t n); valloc(size_t n); mallinfo() mallopt(int parameter_number, int parameter_value) @@ -107,7 +107,7 @@ int kde_malloc_is_used = 0; You can adjust this by defining INTERNAL_SIZE_T Alignment: 2 * sizeof(size_t) (default) - (i.e., 8 byte tqalignment with 4byte size_t). This suffices for + (i.e., 8 byte alignment with 4byte size_t). This suffices for nearly all current machines and C compilers. However, you can define MALLOC_ALIGNMENT to be wider than this if necessary. @@ -146,7 +146,7 @@ int kde_malloc_is_used = 0; default used to obtain memory from system) accepts signed arguments, and may not be able to handle size_t-wide arguments with negative sign bit. Generally, values that would - appear as negative after accounting for overhead and tqalignment + appear as negative after accounting for overhead and alignment are supported only via mmap(), which does not have this limitation. @@ -394,7 +394,7 @@ extern "C" { expense of not being able to handle more than 2^32 of malloced space. If this limitation is acceptable, you are encouraged to set this unless you are on a platform requiring 16byte alignments. In - this case the tqalignment requirements turn out to negate any + this case the alignment requirements turn out to negate any potential advantages of decreasing size_t word size. Implementors: Beware of the possible combinations of: @@ -419,11 +419,11 @@ extern "C" { /* - MALLOC_ALIGNMENT is the minimum tqalignment for malloc'ed chunks. + MALLOC_ALIGNMENT is the minimum alignment for malloc'ed chunks. It must be a power of two at least 2 * SIZE_SZ, even on machines for which smaller alignments would suffice. It may be defined as larger than this though. Note however that code and data structures - are optimized for the case of 8-byte tqalignment. + are optimized for the case of 8-byte alignment. */ @@ -957,13 +957,13 @@ Void_t* public_rEALLOc(); #endif /* - memalign(size_t tqalignment, size_t n); + memalign(size_t alignment, size_t n); Returns a pointer to a newly allocated chunk of n bytes, aligned - in accord with the tqalignment argument. + in accord with the alignment argument. - The tqalignment argument should be a power of two. If the argument is + The alignment argument should be a power of two. If the argument is not a power of two, the nearest greater power is used. - 8-byte tqalignment is guaranteed by normal malloc calls, so don't + 8-byte alignment is guaranteed by normal malloc calls, so don't bother calling memalign with an argument of 8 or less. Overreliance on memalign is a sure way to fragment space. @@ -1228,7 +1228,7 @@ int public_mTRIm(); Returns the number of bytes you can actually use in an allocated chunk, which may be more than you requested (although - often not) due to tqalignment and minimum size constraints. + often not) due to alignment and minimum size constraints. You can use this many bytes without worrying about overwriting other allocated objects. This is not a particularly great programming practice. malloc_usable_size can be more useful in @@ -1252,8 +1252,8 @@ size_t public_mUSABLe(); number of bytes allocated via malloc (or realloc, etc) but not yet freed. Note that this is the number of bytes allocated, not the number requested. It will be larger than the number requested - because of tqalignment and bookkeeping overhead. Because it includes - tqalignment wastage as being in use, this figure may be greater than + because of alignment and bookkeeping overhead. Because it includes + alignment wastage as being in use, this figure may be greater than zero even when no user-level chunks are allocated. The reported current and maximum system memory can be inaccurate if @@ -1290,7 +1290,7 @@ void public_mSTATs(); fragmentation without improving speed. M_MXFAST is set in REQUEST size units. It is internally used in - chunksize units, which adds padding and tqalignment. You can reduce + chunksize units, which adds padding and alignment. You can reduce M_MXFAST to 0 to disable all use of fastbins. This causes the malloc algorithm to be a closer approximation of fifo-best-fit in all cases, not just for larger requests, but will generally cause it to be @@ -1434,7 +1434,7 @@ void public_mSTATs(); 1. The space cannot be reclaimed, consolidated, and then used to service later requests, as happens with normal chunks. - 2. It can lead to more wastage because of mmap page tqalignment + 2. It can lead to more wastage because of mmap page alignment requirements 3. It causes malloc performance to be more dependent on host system memory management support routines which may vary in @@ -1614,12 +1614,12 @@ Void_t* public_rEALLOc(Void_t* m, size_t bytes) { return m; } -Void_t* public_mEMALIGn(size_t tqalignment, size_t bytes) { +Void_t* public_mEMALIGn(size_t alignment, size_t bytes) { Void_t* m; if (MALLOC_PREACTION != 0) { return 0; } - m = mEMALIGn(tqalignment, bytes); + m = mEMALIGn(alignment, bytes); if (MALLOC_POSTACTION != 0) { } return m; @@ -1956,7 +1956,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ /* - ---------- Size and tqalignment checks and conversions ---------- + ---------- Size and alignment checks and conversions ---------- */ /* conversion from malloc headers to user pointers, and back */ @@ -1972,7 +1972,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define MINSIZE \ (unsigned long)(((MIN_CHUNK_SIZE+MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK)) -/* Check if m has acceptable tqalignment */ +/* Check if m has acceptable alignment */ #define aligned_OK(m) (((unsigned long)((m)) & (MALLOC_ALIGN_MASK)) == 0) @@ -2641,7 +2641,7 @@ static void do_check_remalloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s; /* Legal size ... */ assert((sz & MALLOC_ALIGN_MASK) == 0); assert((unsigned long)(sz) >= MINSIZE); - /* ... and tqalignment */ + /* ... and alignment */ assert(aligned_OK(chunk2mem(p))); /* chunk is less than MINSIZE more than request */ assert((long)(sz) - (long)(s) >= 0); @@ -2704,7 +2704,7 @@ static void do_check_malloc_state() /* internal size_t must be no wider than pointer type */ assert(sizeof(INTERNAL_SIZE_T) <= sizeof(char*)); - /* tqalignment is a power of 2 */ + /* alignment is a power of 2 */ assert((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-1)) == 0); /* cannot run remaining checks until fully initialized */ @@ -3209,7 +3209,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; /* The offset to the start of the mmapped region is stored in the prev_size field of the chunk. This allows us to adjust - returned start address to meet tqalignment requirements here + returned start address to meet alignment requirements here and in memalign(), and still be able to compute proper address argument for later munmap in free() and realloc(). */ @@ -3288,7 +3288,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; Round to a multiple of page size. If MORECORE is not contiguous, this ensures that we only call it with whole-page arguments. And if MORECORE is contiguous and - this is not first time through, this preserves page-tqalignment of + this is not first time through, this preserves page-alignment of previous calls. Otherwise, we correct to page-align below. */ @@ -3384,7 +3384,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; /* handle contiguous cases */ if (contiguous(av)) { - /* Guarantee tqalignment of first new chunk made from this space */ + /* Guarantee alignment of first new chunk made from this space */ front_misalign = (INTERNAL_SIZE_T)chunk2mem(brk) & MALLOC_ALIGN_MASK; if (front_misalign > 0) { @@ -3554,7 +3554,7 @@ Void_t* mALLOc(size_t bytes) /* Convert request size to internal form by adding SIZE_SZ bytes - overhead plus possibly more to obtain necessary tqalignment and/or + overhead plus possibly more to obtain necessary alignment and/or to obtain a size of at least MINSIZE, the smallest allocatable size. Also, checked_request2size traps (returning 0) request sizes that are so large that they wrap around zero when padded and @@ -4127,54 +4127,54 @@ Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes; INLINE #if __STD_C -Void_t* mEMALIGn(size_t tqalignment, size_t bytes) +Void_t* mEMALIGn(size_t alignment, size_t bytes) #else -Void_t* mEMALIGn(tqalignment, bytes) size_t tqalignment; size_t bytes; +Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes; #endif { INTERNAL_SIZE_T nb; /* padded request size */ char* m; /* memory returned by malloc call */ mchunkptr p; /* corresponding chunk */ - char* brk; /* tqalignment point within p */ + char* brk; /* alignment point within p */ mchunkptr newp; /* chunk to return */ INTERNAL_SIZE_T newsize; /* its size */ - INTERNAL_SIZE_T leadsize; /* leading space before tqalignment point */ + INTERNAL_SIZE_T leadsize; /* leading space before alignment point */ mchunkptr remainder; /* spare room at end to split off */ unsigned long remainder_size; /* its size */ INTERNAL_SIZE_T size; - /* If need less tqalignment than we give anyway, just relay to malloc */ + /* If need less alignment than we give anyway, just relay to malloc */ - if (tqalignment <= MALLOC_ALIGNMENT) return mALLOc(bytes); + if (alignment <= MALLOC_ALIGNMENT) return mALLOc(bytes); /* Otherwise, ensure that it is at least a minimum chunk size */ - if (tqalignment < MINSIZE) tqalignment = MINSIZE; + if (alignment < MINSIZE) alignment = MINSIZE; - /* Make sure tqalignment is power of 2 (in case MINSIZE is not). */ - if ((tqalignment & (tqalignment - 1)) != 0) { + /* Make sure alignment is power of 2 (in case MINSIZE is not). */ + if ((alignment & (alignment - 1)) != 0) { size_t a = MALLOC_ALIGNMENT * 2; - while ((unsigned long)a < (unsigned long)tqalignment) a <<= 1; - tqalignment = a; + while ((unsigned long)a < (unsigned long)alignment) a <<= 1; + alignment = a; } checked_request2size(bytes, nb); /* - Strategy: find a spot within that chunk that meets the tqalignment + Strategy: find a spot within that chunk that meets the alignment request, and then possibly free the leading and trailing space. */ - /* Call malloc with worst case padding to hit tqalignment. */ + /* Call malloc with worst case padding to hit alignment. */ - m = (char*)(mALLOc(nb + tqalignment + MINSIZE)); + m = (char*)(mALLOc(nb + alignment + MINSIZE)); if (m == 0) return 0; /* propagate failure */ p = mem2chunk(m); - if ((((unsigned long)(m)) % tqalignment) != 0) { /* misaligned */ + if ((((unsigned long)(m)) % alignment) != 0) { /* misaligned */ /* Find an aligned spot inside chunk. Since we need to give back @@ -4184,10 +4184,10 @@ Void_t* mEMALIGn(tqalignment, bytes) size_t tqalignment; size_t bytes; total room so that this is always possible. */ - brk = (char*)mem2chunk(((unsigned long)(m + tqalignment - 1)) & - -((signed long) tqalignment)); + brk = (char*)mem2chunk(((unsigned long)(m + alignment - 1)) & + -((signed long) alignment)); if ((unsigned long)(brk - (char*)(p)) < MINSIZE) - brk += tqalignment; + brk += alignment; newp = (mchunkptr)brk; leadsize = brk - (char*)(p); @@ -4208,7 +4208,7 @@ Void_t* mEMALIGn(tqalignment, bytes) size_t tqalignment; size_t bytes; p = newp; assert (newsize >= nb && - (((unsigned long)(chunk2mem(p))) % tqalignment) == 0); + (((unsigned long)(chunk2mem(p))) % alignment) == 0); } /* Also give back spare room at the end */ @@ -4375,7 +4375,7 @@ static Void_t** iALLOc(n_elements, sizes, opts, chunks) size_t n_elements; size_ contents_size += request2size(sizes[i]); } - /* subtract out tqalignment bytes from total to minimize overallocation */ + /* subtract out alignment bytes from total to minimize overallocation */ size = contents_size + array_size - MALLOC_ALIGN_MASK; /* @@ -5356,7 +5356,7 @@ History: and Anonymous. * Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for helping test this.) - * memalign: check tqalignment arg + * memalign: check alignment arg * realloc: don't try to shift chunks backwards, since this leads to more fragmentation in some programs and doesn't seem to help in any others. @@ -5409,7 +5409,7 @@ History: * Support another case of realloc via move into top * Fix error occurring when initial sbrk_base not word-aligned. * Rely on page size for units instead of SBRK_UNIT to - avoid surprises about sbrk tqalignment conventions. + avoid surprises about sbrk alignment conventions. * Add mallinfo, mallopt. Thanks to Raymond Nijssen (raymond@es.ele.tue.nl) for the suggestion. * Add `pad' argument to malloc_trim and top_pad mallopt parameter. @@ -5569,7 +5569,7 @@ Void_t* public_rEALLOc(Void_t* m, size_t bytes) { #endif } -Void_t* public_mEMALIGn(size_t tqalignment, size_t bytes) { +Void_t* public_mEMALIGn(size_t alignment, size_t bytes) { #ifndef KDE_MALLOC_FULL if( malloc_type == 1 ) { @@ -5578,16 +5578,16 @@ Void_t* public_mEMALIGn(size_t tqalignment, size_t bytes) { if (MALLOC_PREACTION != 0) { return 0; } - m = mEMALIGn(tqalignment, bytes); + m = mEMALIGn(alignment, bytes); if (MALLOC_POSTACTION != 0) { } return m; #ifndef KDE_MALLOC_FULL } if( malloc_type == 2 ) - return libc_memalign( tqalignment, bytes ); + return libc_memalign( alignment, bytes ); init_malloc_type(); - return public_mEMALIGn( tqalignment, bytes ); + return public_mEMALIGn( alignment, bytes ); #endif } @@ -5728,7 +5728,7 @@ int public_mALLOPt(int p, int v) { #endif int -posix_memalign (void **memptr, size_t tqalignment, size_t size) +posix_memalign (void **memptr, size_t alignment, size_t size) { void *mem; @@ -5737,7 +5737,7 @@ posix_memalign (void **memptr, size_t tqalignment, size_t size) if (size % sizeof (void *) != 0 || (size & (size - 1)) != 0) return EINVAL; - mem = memalign (tqalignment, size); + mem = memalign (alignment, size); if (mem != NULL) { *memptr = mem; diff --git a/tdecore/network/ksocketaddress.cpp b/tdecore/network/ksocketaddress.cpp index dccac12bd..7ceeba99d 100644 --- a/tdecore/network/ksocketaddress.cpp +++ b/tdecore/network/ksocketaddress.cpp @@ -270,7 +270,7 @@ public: { addr.generic = 0L; curlen = 0; - tqinvalidate(); + invalidate(); } ~KSocketAddressData() @@ -282,7 +282,7 @@ public: inline bool invalid() const { return reallen == 0; } - inline void tqinvalidate() + inline void invalidate() { reallen = 0; } void dup(const sockaddr* sa, TQ_UINT16 len, bool clear = true); @@ -348,7 +348,7 @@ void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear) if (len < MIN_SOCKADDR_LEN) { // certainly invalid - tqinvalidate(); + invalidate(); return; } @@ -359,7 +359,7 @@ void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear) (sa->sa_family == AF_UNIX && len < MIN_SOCKADDR_UN_LEN))) { // also invalid - tqinvalidate(); + invalidate(); return; } @@ -444,7 +444,7 @@ KSocketAddress& KSocketAddress::operator =(const KSocketAddress& other) if (other.d && !other.d->invalid()) d->dup(other.d->addr.generic, other.d->reallen); else - d->tqinvalidate(); + d->invalidate(); return *this; } @@ -467,7 +467,7 @@ KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len) if (sa != 0L && len >= MIN_SOCKADDR_LEN) d->dup(sa, len); else - d->tqinvalidate(); + d->invalidate(); return *this; } @@ -788,7 +788,7 @@ KInetSocketAddress& KInetSocketAddress::setHost(const KIpAddress& ip) default: // empty - d->tqinvalidate(); + d->invalidate(); } return *this; @@ -832,7 +832,7 @@ KInetSocketAddress& KInetSocketAddress::setPort(TQ_UINT16 port) #endif default: - d->tqinvalidate(); // setting the port on something else + d->invalidate(); // setting the port on something else } return *this; @@ -897,7 +897,7 @@ void KInetSocketAddress::update() return; #endif else - d->tqinvalidate(); + d->invalidate(); } KUnixSocketAddress::KUnixSocketAddress() @@ -908,7 +908,7 @@ KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len) : KSocketAddress(sa, len) { if (!d->invalid() && d->addr.un->sun_family != AF_UNIX) - d->tqinvalidate(); + d->invalidate(); } KUnixSocketAddress::KUnixSocketAddress(const KUnixSocketAddress& other) diff --git a/tdecore/network/ksocketaddress.h b/tdecore/network/ksocketaddress.h index d02a6984c..a57d11e82 100644 --- a/tdecore/network/ksocketaddress.h +++ b/tdecore/network/ksocketaddress.h @@ -511,7 +511,7 @@ public: * buffer to fit needs. This function should not be used except for handling * unknown socket address structures. * - * Also note that this function may tqinvalidate the socket if a known + * Also note that this function may invalidate the socket if a known * family is set (Internet or Unix socket) and the new length would be * too small to hold the system's sockaddr_* structure. If unsure, reset * the family: @@ -535,7 +535,7 @@ public: /** * Sets the family of this object. * - * Note: setting the family will probably tqinvalidate any address data + * Note: setting the family will probably invalidate any address data * contained in this object. Use this function with care. * * @param family the new family to set diff --git a/tdecore/network/ksocketbase.cpp b/tdecore/network/ksocketbase.cpp index 8449dbdc8..ca4725a9f 100644 --- a/tdecore/network/ksocketbase.cpp +++ b/tdecore/network/ksocketbase.cpp @@ -309,7 +309,7 @@ int KActiveSocketBase::putch(int ch) void KActiveSocketBase::setError(int status, SocketError error) { KSocketBase::setError(error); - seStatus(status); + setStatus(status); } void KActiveSocketBase::resetError() diff --git a/tdecore/network/ksrvresolverworker.cpp b/tdecore/network/ksrvresolverworker.cpp index 31eaa1f1e..f3166b982 100644 --- a/tdecore/network/ksrvresolverworker.cpp +++ b/tdecore/network/ksrvresolverworker.cpp @@ -85,7 +85,7 @@ bool KSrvResolverWorker::preprocess() return false; protoname = "_"; - protoname += names.tqat(0); + protoname += names.at(0); } else if (sockettype == SOCK_STREAM || sockettype == 0) protoname = "_tcp"; diff --git a/tdecore/svgicons/ksvgiconengine.cpp b/tdecore/svgicons/ksvgiconengine.cpp index d035972ef..42ca8557c 100644 --- a/tdecore/svgicons/ksvgiconengine.cpp +++ b/tdecore/svgicons/ksvgiconengine.cpp @@ -225,9 +225,9 @@ printf("[FIXME] *current = matrix * *current locks up under Qt4; bypassing for n TQPtrList<TQDomNamedNodeMap> applyList; applyList.setAutoDelete(true); - TQDomNode tqshape = node.parentNode(); - for(; !tqshape.isNull() ; tqshape = tqshape.parentNode()) - applyList.prepend(new TQDomNamedNodeMap(tqshape.attributes())); + TQDomNode shape = node.parentNode(); + for(; !shape.isNull() ; shape = shape.parentNode()) + applyList.prepend(new TQDomNamedNodeMap(shape.attributes())); // Apply parent attributes for(TQDomNamedNodeMap *map = applyList.first(); map != 0; map = applyList.next()) diff --git a/tdecore/tests/kurltest.cpp b/tdecore/tests/kurltest.cpp index bcee63ac3..e5176aa9a 100644 --- a/tdecore/tests/kurltest.cpp +++ b/tdecore/tests/kurltest.cpp @@ -384,7 +384,7 @@ int main(int argc, char *argv[]) check("KURL::setFileName()", u2.url(), "file:///home/dfaure/myotherfile.txt"); // more tricky, renaming a directory (kpropsdlg.cc, line ~ 238) TQString tmpurl = "file:/home/dfaure/myolddir/"; - if ( tmpurl.tqat(tmpurl.length() - 1) == '/') + if ( tmpurl.at(tmpurl.length() - 1) == '/') // It's a directory, so strip the trailing slash first tmpurl.truncate( tmpurl.length() - 1); KURL newUrl = tmpurl; |