summaryrefslogtreecommitdiffstats
path: root/kdecore
diff options
context:
space:
mode:
Diffstat (limited to 'kdecore')
-rw-r--r--kdecore/kapplication.cpp2
-rw-r--r--kdecore/kcalendarsystem.cpp4
-rw-r--r--kdecore/kclipboard.cpp4
-rw-r--r--kdecore/kclipboard.h2
-rw-r--r--kdecore/kcmdlineargs.cpp2
-rw-r--r--kdecore/kcompletion.cpp16
-rw-r--r--kdecore/kcompletion_private.h4
-rw-r--r--kdecore/kconfigbackend.cpp2
-rw-r--r--kdecore/kconfigbase.cpp14
-rw-r--r--kdecore/kdebug.cpp2
-rw-r--r--kdecore/kdebug.h4
-rw-r--r--kdecore/kkeyserver_x11.cpp2
-rw-r--r--kdecore/klibloader.cpp14
-rw-r--r--kdecore/klocale.cpp44
-rw-r--r--kdecore/kpalette.cpp6
-rw-r--r--kdecore/krfcdate.cpp2
-rw-r--r--kdecore/kstandarddirs.cpp26
-rw-r--r--kdecore/kstringhandler.cpp10
-rw-r--r--kdecore/ksycoca.cpp12
-rw-r--r--kdecore/ksycocadict.cpp22
-rw-r--r--kdecore/ksycocaentry.h2
-rw-r--r--kdecore/ksycocafactory.cpp20
-rw-r--r--kdecore/kurl.cpp10
-rw-r--r--kdecore/network/ksrvresolverworker.cpp2
-rw-r--r--kdecore/svgicons/ksvgiconengine.cpp4
-rw-r--r--kdecore/tests/kurltest.cpp2
26 files changed, 120 insertions, 114 deletions
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp
index 3b6b78367..ddbfd4a05 100644
--- a/kdecore/kapplication.cpp
+++ b/kdecore/kapplication.cpp
@@ -850,7 +850,7 @@ void KApplication::init(bool GUIenabled)
// kdialog itself.
// * Don't warn if we run with a read-only $HOME
TQCString readOnly = getenv("KDE_HOME_READONLY");
- if (readOnly.isEmpty() && (qstrcmp(name(), "kdialog") != 0))
+ if (readOnly.isEmpty() && (tqstrcmp(name(), "kdialog") != 0))
{
KConfigGroupSaver saver(config, "KDE Action Restrictions");
if (config->readBoolEntry("warn_unwritable_config",true))
diff --git a/kdecore/kcalendarsystem.cpp b/kdecore/kcalendarsystem.cpp
index 57898da84..782b272e7 100644
--- a/kdecore/kcalendarsystem.cpp
+++ b/kdecore/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.at(iPos).isDigit(); iPos++)
+ for (; sNum.length() > iPos && sNum.tqat(iPos).isDigit(); iPos++)
{
result *= 10;
- result += sNum.at(iPos).digitValue();
+ result += sNum.tqat(iPos).digitValue();
}
iLength = iPos;
diff --git a/kdecore/kclipboard.cpp b/kdecore/kclipboard.cpp
index 244b43541..03a4f916f 100644
--- a/kdecore/kclipboard.cpp
+++ b/kdecore/kclipboard.cpp
@@ -67,7 +67,7 @@ public:
virtual const char *format( int i ) const {
if ( i < (int) m_formats.count() )
- return m_formats.at( i );
+ return m_formats.tqat( i );
else
return 0L;
}
@@ -78,7 +78,7 @@ public:
{
int index = m_formats.tqfind( format );
if ( index > -1 )
- return *(m_data.at( index ));
+ return *(m_data.tqat( index ));
return TQByteArray();
}
diff --git a/kdecore/kclipboard.h b/kdecore/kclipboard.h
index aecfccf52..9432d70aa 100644
--- a/kdecore/kclipboard.h
+++ b/kdecore/kclipboard.h
@@ -103,7 +103,7 @@ private:
KClipboardSynchronizer( TQObject *parent = 0, const char *name = 0L );
void setupSignals();
- static void setClipboard( TQMimeSource* data, QClipboard::Mode mode );
+ static void setClipboard( TQMimeSource* data, TQClipboard::Mode mode );
static KClipboardSynchronizer *s_self;
static bool s_sync;
diff --git a/kdecore/kcmdlineargs.cpp b/kdecore/kcmdlineargs.cpp
index 7219163a8..93da1470b 100644
--- a/kdecore/kcmdlineargs.cpp
+++ b/kdecore/kcmdlineargs.cpp
@@ -1239,7 +1239,7 @@ KCmdLineArgs::arg(int n) const
exit(255);
}
- return parsedArgList->at(n);
+ return parsedArgList->tqat(n);
}
KURL
diff --git a/kdecore/kcompletion.cpp b/kdecore/kcompletion.cpp
index 2876e9138..ce2f3c3b5 100644
--- a/kdecore/kcompletion.cpp
+++ b/kdecore/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.at(i), sorted );
+ node = node->insert( item.tqat(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.at( i );
+ ch = string.tqat( 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.at( i );
+ ch = string.tqat( i );
node = node->find( ch );
if ( node )
@@ -595,7 +595,7 @@ void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node,
return;
}
- TQChar ch1 = restString.at(0);
+ TQChar ch1 = restString.tqat(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.at( i ) );
+ child = parent->find( string.tqat( 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.at( i - 1 );
- child = deletables.at( i );
+ parent = deletables.tqat( i - 1 );
+ child = deletables.tqat( i );
if ( child->myChildren.count() == 0 )
delete parent->myChildren.remove( child );
}
@@ -874,7 +874,7 @@ KCompTreeNode *KCompTreeNodeList::remove(KCompTreeNode *item)
return item;
}
-KCompTreeNode *KCompTreeNodeList::at(uint index) const
+KCompTreeNode *KCompTreeNodeList::tqat(uint index) const
{
KCompTreeNode *cur = first;
while (index-- && cur) cur = cur->next;
diff --git a/kdecore/kcompletion_private.h b/kdecore/kcompletion_private.h
index f4363ae95..1ce613faa 100644
--- a/kdecore/kcompletion_private.h
+++ b/kdecore/kcompletion_private.h
@@ -38,7 +38,7 @@ public:
KCompTreeNode *begin() const { return first; }
KCompTreeNode *end() const { return last; }
- KCompTreeNode *at(uint index) const;
+ KCompTreeNode *tqat(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 * tqchildAt(int index) const {
- return myChildren.at(index);
+ return myChildren.tqat(index);
}
inline const KCompTreeNode * firstChild() const {
return myChildren.begin();
diff --git a/kdecore/kconfigbackend.cpp b/kdecore/kconfigbackend.cpp
index 192ef9b20..4fc63ebe6 100644
--- a/kdecore/kconfigbackend.cpp
+++ b/kdecore/kconfigbackend.cpp
@@ -496,7 +496,7 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
else
#endif
{
- rFile.at(0);
+ rFile.tqat(0);
data = rFile.readAll();
s = data.data();
eof = s + data.size();
diff --git a/kdecore/kconfigbase.cpp b/kdecore/kconfigbase.cpp
index 8319e3aa1..0b35f91e0 100644
--- a/kdecore/kconfigbase.cpp
+++ b/kdecore/kconfigbase.cpp
@@ -969,7 +969,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey,
TQString aValue = readEntry( pKey );
if( !aValue.isEmpty() )
{
- if ( aValue.at(0) == (QChar)'#' )
+ if ( aValue.tqat(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.at( 0 ) ), atoi( list.at( 1 ) ),
- atoi( list.at( 2 ) ) );
- TQTime time( atoi( list.at( 3 ) ), atoi( list.at( 4 ) ),
- atoi( list.at( 5 ) ) );
+ 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 ) ) );
return TQDateTime( date, time );
}
@@ -1424,7 +1424,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list,
}
str_list += sep;
}
- if( str_list.at(str_list.length() - 1) == (QChar)sep )
+ if( str_list.tqat(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.at(str_list.length() - 1) == (QChar)sep )
+ if( str_list.tqat(str_list.length() - 1) == (QChar)sep )
str_list.truncate( str_list.length() -1 );
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS, bExpand );
}
diff --git a/kdecore/kdebug.cpp b/kdecore/kdebug.cpp
index b76444b3c..75f2864f9 100644
--- a/kdecore/kdebug.cpp
+++ b/kdecore/kdebug.cpp
@@ -415,7 +415,7 @@ kdbgstream& kdbgstream::operator << (const TQWidget* widget)
return *this;
}
output += string;
- if (output.at(output.length() -1 ) == (QChar)'\n')
+ if (output.tqat(output.length() -1 ) == (QChar)'\n')
{
flush();
}
diff --git a/kdecore/kdebug.h b/kdecore/kdebug.h
index 8e749b24d..0a7d2546f 100644
--- a/kdecore/kdebug.h
+++ b/kdecore/kdebug.h
@@ -216,7 +216,7 @@ class KDECORE_EXPORT kdbgstream {
kdbgstream &operator<<(const TQString& string) {
if (!print) return *this;
output += string;
- if (output.at(output.length() -1 ) == (QChar)'\n')
+ if (output.tqat(output.length() -1 ) == (QChar)'\n')
flush();
return *this;
}
@@ -228,7 +228,7 @@ class KDECORE_EXPORT kdbgstream {
kdbgstream &operator<<(const char *string) {
if (!print) return *this;
output += TQString::fromUtf8(string);
- if (output.at(output.length() - 1) == (QChar)'\n')
+ if (output.tqat(output.length() - 1) == (QChar)'\n')
flush();
return *this;
}
diff --git a/kdecore/kkeyserver_x11.cpp b/kdecore/kkeyserver_x11.cpp
index 8263d2735..65e0e7215 100644
--- a/kdecore/kkeyserver_x11.cpp
+++ b/kdecore/kkeyserver_x11.cpp
@@ -671,7 +671,7 @@ bool modXToModQt( uint modX, int& modQt )
return modToModQt( modX, modQt );
}
-KDECORE_EXPORT int qtButtonStateToMod( Qt::ButtonState s )
+KDECORE_EXPORT int qtButtonStateToMod( TQt::ButtonState s )
{
int modQt = 0;
if (s & Qt::ShiftButton) modQt |= KKey::SHIFT;
diff --git a/kdecore/klibloader.cpp b/kdecore/klibloader.cpp
index 80c5e6377..3af226886 100644
--- a/kdecore/klibloader.cpp
+++ b/kdecore/klibloader.cpp
@@ -549,17 +549,17 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
We need to make sure to clear the clipboard before unloading a DSO
because the DSO could have defined an object derived from QMimeSource
and placed that on the clipboard. */
- /*kapp->clipboard()->clear();*/
+ /*kapp->tqclipboard()->clear();*/
/* Well.. let's do something more subtle... convert the clipboard context
to text. That should be safe as it only uses objects defined by Qt. */
- if( kapp->clipboard()->ownsSelection()) {
- kapp->clipboard()->setText(
- kapp->clipboard()->text( QClipboard::Selection ), QClipboard::Selection );
+ if( kapp->tqclipboard()->ownsSelection()) {
+ kapp->tqclipboard()->setText(
+ kapp->tqclipboard()->text( TQClipboard::Selection ), TQClipboard::Selection );
}
- if( kapp->clipboard()->ownsClipboard()) {
- kapp->clipboard()->setText(
- kapp->clipboard()->text( QClipboard::Clipboard ), QClipboard::Clipboard );
+ if( kapp->tqclipboard()->ownsClipboard()) {
+ kapp->tqclipboard()->setText(
+ kapp->tqclipboard()->text( TQClipboard::Clipboard ), TQClipboard::Clipboard );
}
}
diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp
index 567c9a7f5..f9de79b52 100644
--- a/kdecore/klocale.cpp
+++ b/kdecore/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.at( l );
+ buffer[index++] = s.tqat( 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.at( format_index )).tqunicode()) == '%' )
+ if ( (TQChar(rst.tqat( format_index )).tqunicode()) == '%' )
escape = true;
else
- buffer.append(rst.at(format_index));
+ buffer.append(rst.tqat(format_index));
}
else
{
- switch ( TQChar(rst.at( format_index )).tqunicode() )
+ switch ( TQChar(rst.tqat( 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.at(format_index));
+ buffer.append(rst.tqat(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.at(pos).isDigit()) return -1;
+ if (!str.tqat(pos).isDigit()) return -1;
int result = 0;
- for (; str.length() > pos && str.at(pos).isDigit(); pos++)
+ for (; str.length() > pos && str.tqat(pos).isDigit(); pos++)
{
result *= 10;
- result += str.at(pos).digitValue();
+ result += str.tqat(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.at(fmtpos++);
+ TQChar c = fmt.tqat(fmtpos++);
if (c != (QChar)'%') {
- if (c.isSpace() && str.at(strpos).isSpace())
+ if (c.isSpace() && str.tqat(strpos).isSpace())
strpos++;
- else if (c != str.at(strpos++))
+ else if (c != str.tqat(strpos++))
error = true;
}
else
{
int j;
// remove space at the beginning
- if (str.length() > strpos && str.at(strpos).isSpace())
+ if (str.length() > strpos && str.tqat(strpos).isSpace())
strpos++;
- c = fmt.at(fmtpos++);
+ c = fmt.tqat(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.at(Formatpos++);
+ TQChar c = Format.tqat(Formatpos++);
if (c != (QChar)'%')
{
if (c.isSpace())
strpos++;
- else if (c != str.at(strpos++))
+ else if (c != str.tqat(strpos++))
goto error;
continue;
}
// remove space at the beginning
- if (str.length() > strpos && str.at(strpos).isSpace())
+ if (str.length() > strpos && str.tqat(strpos).isSpace())
strpos++;
- c = Format.at(Formatpos++);
+ c = Format.tqat(Formatpos++);
switch (c)
{
case 'p':
@@ -1876,14 +1876,14 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
{
if ( !escape )
{
- if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' )
+ if ( (TQChar(rst.tqat( format_index )).tqunicode()) == '%' )
escape = true;
else
- buffer[index++] = rst.at( format_index );
+ buffer[index++] = rst.tqat( format_index );
}
else
{
- switch ( TQChar(rst.at( format_index )).tqunicode() )
+ switch ( TQChar(rst.tqat( 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.at( format_index )).tqunicode()) == 'l' )
+ if ( (TQChar(rst.tqat( 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.at( format_index );
+ buffer[index++] = rst.tqat( format_index );
break;
}
escape = false;
diff --git a/kdecore/kpalette.cpp b/kdecore/kpalette.cpp
index 1a828fe4d..f07ac4228 100644
--- a/kdecore/kpalette.cpp
+++ b/kdecore/kpalette.cpp
@@ -176,7 +176,7 @@ KPalette::color(int index)
if ((index < 0) || (index >= nrColors()))
return TQColor();
- kolor *node = mKolorList.at(index);
+ kolor *node = mKolorList.tqat(index);
if (!node)
return TQColor();
@@ -202,7 +202,7 @@ KPalette::colorName(int index)
if ((index < 0) || (index >= nrColors()))
return TQString::null;
- kolor *node = mKolorList.at(index);
+ kolor *node = mKolorList.tqat(index);
if (!node)
return TQString::null;
@@ -227,7 +227,7 @@ KPalette::changeColor(int index,
if ((index < 0) || (index >= nrColors()))
return -1;
- kolor *node = mKolorList.at(index);
+ kolor *node = mKolorList.tqat(index);
if (!node)
return -1;
diff --git a/kdecore/krfcdate.cpp b/kdecore/krfcdate.cpp
index ebb12aa62..9d7c0b7ab 100644
--- a/kdecore/krfcdate.cpp
+++ b/kdecore/krfcdate.cpp
@@ -394,7 +394,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ )
mday = l[2].toUInt();
// Z suffix means UTC.
- if ((QChar)'Z' == timeString.at(timeString.length() - 1)) {
+ if ((QChar)'Z' == timeString.tqat(timeString.length() - 1)) {
timeString.remove(timeString.length() - 1, 1);
}
diff --git a/kdecore/kstandarddirs.cpp b/kdecore/kstandarddirs.cpp
index 91a178a53..46939d032 100644
--- a/kdecore/kstandarddirs.cpp
+++ b/kdecore/kstandarddirs.cpp
@@ -189,7 +189,7 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority )
return;
TQString dir = _dir;
- if (dir.at(dir.length() - 1) != QChar('/'))
+ if (dir.tqat(dir.length() - 1) != QChar('/'))
dir += QChar('/');
if (!prefixes.tqcontains(dir)) {
@@ -209,7 +209,7 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
return;
TQString dir = _dir;
- if (dir.at(dir.length() - 1) != QChar('/'))
+ if (dir.tqat(dir.length() - 1) != QChar('/'))
dir += QChar('/');
if (!d->xdgconf_prefixes.tqcontains(dir)) {
@@ -229,7 +229,7 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
return;
TQString dir = _dir;
- if (dir.at(dir.length() - 1) != QChar('/'))
+ if (dir.tqat(dir.length() - 1) != QChar('/'))
dir += QChar('/');
if (!d->xdgdata_prefixes.tqcontains(dir)) {
@@ -271,7 +271,7 @@ bool KStandardDirs::addResourceType( const char *type,
relatives.insert(type, rels);
}
TQString copy = relativename;
- if (copy.at(copy.length() - 1) != QChar('/'))
+ if (copy.tqat(copy.length() - 1) != QChar('/'))
copy += QChar('/');
if (!rels->tqcontains(copy)) {
if (priority)
@@ -301,7 +301,7 @@ bool KStandardDirs::addResourceDir( const char *type,
absolutes.insert(type, paths);
}
TQString copy = absdir;
- if (copy.at(copy.length() - 1) != QChar('/'))
+ if (copy.tqat(copy.length() - 1) != QChar('/'))
copy += QChar('/');
if (!paths->tqcontains(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.at(fullPath.length() - 1) != QChar('/')) {
+ if (fullPath.tqat(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.at(path.length() - 1) == QChar('/') || path.at(path.length() - 1) == QChar('\\'));
+ assert(path.tqat(path.length() - 1) == QChar('/') || path.tqat(path.length() - 1) == QChar('\\'));
#else
- assert(path.at(path.length() - 1) == QChar('/'));
+ assert(path.tqat(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.at(fn.length() - 1)).latin1() == TQChar('~').latin1())
+ if (fn == _dot || fn == _dotdot || TQChar(fn.tqat(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.at(prefix.length() - 1) == QChar('/') || prefix.at(prefix.length() - 1) == QChar('\\'));
+ assert(prefix.tqat(prefix.length() - 1) == QChar('/') || prefix.tqat(prefix.length() - 1) == QChar('\\'));
#else
- assert(prefix.at(prefix.length() - 1) == QChar('/'));
+ assert(prefix.tqat(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.at(fn.length() - 1) == QChar('~'))
+ if (fn == _dot || fn == _dotdot || fn.tqat(fn.length() - 1) == QChar('~'))
continue;
if ( !pathExp.exactMatch(fn) )
@@ -1176,7 +1176,7 @@ bool KStandardDirs::makeDir(const TQString& dir, int mode)
uint len = target.length();
// append trailing slash if missing
- if (dir.at(len - 1) != QChar('/'))
+ if (dir.tqat(len - 1) != QChar('/'))
target += QChar('/');
TQString base("");
diff --git a/kdecore/kstringhandler.cpp b/kdecore/kstringhandler.cpp
index e37d1a3ce..e309ea6f0 100644
--- a/kdecore/kstringhandler.cpp
+++ b/kdecore/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.at( pos);
+ TQStringList::Iterator it = list.tqat( 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.at(pos) , word );
+ list.insert( list.tqat(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.at(pos) ) , word );
+ list.insert( list.remove( list.tqat(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.at( pos);
+ TQStringList::Iterator it = list.tqat( 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.at( pos ) );
+ list.remove( list.tqat( pos ) );
// Rejoin
return list.join( " " );
diff --git a/kdecore/ksycoca.cpp b/kdecore/ksycoca.cpp
index 255763ef0..0846c5c95 100644
--- a/kdecore/ksycoca.cpp
+++ b/kdecore/ksycoca.cpp
@@ -177,7 +177,8 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
{
// We open a dummy database instead.
//kdDebug(7011) << "No database, opening a dummy one." << endl;
- TQBuffer *buffer = new TQBuffer( TQByteArray() );
+ TQBuffer *buffer = new TQBuffer();
+ buffer->tqsetBufferFromCopy(TQByteArray());
buffer->open(IO_ReadWrite);
m_str = new TQDataStream( buffer);
(*m_str) << (TQ_INT32) KSYCOCA_VERSION;
@@ -229,7 +230,7 @@ void KSycoca::closeDatabase()
{
QIODevice *device = 0;
if (m_str)
- device = m_str->device();
+ device = m_str->tqdevice();
#ifdef HAVE_MMAP
if (device && m_sycoca_mmap)
{
@@ -248,6 +249,7 @@ void KSycoca::closeDatabase()
if (TQT_TQIODEVICE(d->database) != device)
delete d->database;
if (m_barray) delete m_barray;
+ m_barray = 0;
device = 0;
d->database = 0;
// It is very important to delete all factories here
@@ -286,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()->at(offset);
+ m_str->tqdevice()->tqat(offset);
TQ_INT32 aType;
(*m_str) >> aType;
type = (KSycocaType) aType;
@@ -304,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()->at(0);
+ m_str->tqdevice()->tqat(0);
TQ_INT32 aVersion;
(*m_str) >> aVersion;
if ( aVersion < KSYCOCA_VERSION )
@@ -359,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()->at(aOffset);
+ m_str->tqdevice()->tqat(aOffset);
return m_str;
}
}
diff --git a/kdecore/ksycocadict.cpp b/kdecore/ksycocadict.cpp
index 76124e76a..11b16b08b 100644
--- a/kdecore/ksycocadict.cpp
+++ b/kdecore/ksycocadict.cpp
@@ -60,7 +60,7 @@ KSycocaDict::KSycocaDict(TQDataStream *str, int offset)
: d(0), mStr(str), mOffset(offset)
{
TQ_UINT32 test1, test2;
- str->tqdevice()->at(offset);
+ str->tqdevice()->tqat(offset);
(*str) >> test1 >> test2;
if ((test1 > 0x000fffff) || (test2 > 1024))
{
@@ -70,10 +70,10 @@ KSycocaDict::KSycocaDict(TQDataStream *str, int offset)
return;
}
- str->tqdevice()->at(offset);
+ str->tqdevice()->tqat(offset);
(*str) >> mHashTableSize;
(*str) >> mHashList;
- mOffset = str->tqdevice()->at(); // Start of hashtable
+ mOffset = str->tqdevice()->tqat(); // 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()->at( off );
+ mStr->tqdevice()->tqat( off );
TQ_INT32 offset;
(*mStr) >> offset;
@@ -146,7 +146,7 @@ KSycocaDict::find_string(const TQString &key )
// Lookup duplicate list.
offset = -offset;
- mStr->tqdevice()->at(offset);
+ mStr->tqdevice()->tqat(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()->at();
+ mOffset = str.tqdevice()->tqat();
//kdDebug(7011) << TQString("KSycocaDict: %1 entries.").arg(count()) << endl;
@@ -402,12 +402,12 @@ KSycocaDict::save(TQDataStream &str)
str << mHashTableSize;
str << mHashList;
- mOffset = str.tqdevice()->at(); // mOffset points to start of hashTable
+ mOffset = str.tqdevice()->tqat(); // 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()->at(mOffset);
+ str.tqdevice()->tqat(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()->at(),8,16) << endl;
+ //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.tqdevice()->tqat(),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()->at();
+ hashTable[i].duplicate_offset = str.tqdevice()->tqat();
/*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()->at(),8,16) << endl;
+ //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.tqdevice()->tqat(),8,16) << endl;
}
//kdDebug(7011) << "Cleaning up hash table." << endl;
diff --git a/kdecore/ksycocaentry.h b/kdecore/ksycocaentry.h
index 2b4611cc2..1d5f1845a 100644
--- a/kdecore/ksycocaentry.h
+++ b/kdecore/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()->at(); // store position in member variable
+ mOffset = s.tqdevice()->tqat(); // store position in member variable
s << (TQ_INT32) sycocaType() << mPath;
}
diff --git a/kdecore/ksycocafactory.cpp b/kdecore/ksycocafactory.cpp
index 122dd9405..da65619e6 100644
--- a/kdecore/ksycocafactory.cpp
+++ b/kdecore/ksycocafactory.cpp
@@ -46,10 +46,10 @@ KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id)
(*m_str) >> i;
m_endEntryOffset = i;
- int saveOffset = m_str->tqdevice()->at();
+ int saveOffset = m_str->tqdevice()->tqat();
// Init index tables
m_sycocaDict = new KSycocaDict(m_str, m_sycocaDictOffset);
- saveOffset = m_str->tqdevice()->at(saveOffset);
+ saveOffset = m_str->tqdevice()->tqat(saveOffset);
}
}
else
@@ -78,7 +78,7 @@ void
KSycocaFactory::saveHeader(TQDataStream &str)
{
// Write header
- str.tqdevice()->at(mOffset);
+ str.tqdevice()->tqat(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()->at(); // store position in member variable
+ mOffset = str.tqdevice()->tqat(); // store position in member variable
m_sycocaDictOffset = 0;
// Write header (pass #1)
saveHeader(str);
- m_beginEntryOffset = str.tqdevice()->at();
+ m_beginEntryOffset = str.tqdevice()->tqat();
// Write all entries.
int entryCount = 0;
@@ -110,7 +110,7 @@ KSycocaFactory::save(TQDataStream &str)
entryCount++;
}
- m_endEntryOffset = str.tqdevice()->at();
+ m_endEntryOffset = str.tqdevice()->tqat();
// Write indices...
// Linear index
@@ -124,16 +124,16 @@ KSycocaFactory::save(TQDataStream &str)
}
// Dictionary index
- m_sycocaDictOffset = str.tqdevice()->at();
+ m_sycocaDictOffset = str.tqdevice()->tqat();
m_sycocaDict->save(str);
- int endOfFactoryData = str.tqdevice()->at();
+ int endOfFactoryData = str.tqdevice()->tqat();
// Update header (pass #2)
saveHeader(str);
// Seek to end.
- str.tqdevice()->at(endOfFactoryData);
+ str.tqdevice()->tqat(endOfFactoryData);
}
void
@@ -169,7 +169,7 @@ KSycocaEntry::List KSycocaFactory::allEntries()
// Assume we're NOT building a database
- m_str->tqdevice()->at(m_endEntryOffset);
+ m_str->tqdevice()->tqat(m_endEntryOffset);
TQ_INT32 entryCount;
(*m_str) >> entryCount;
diff --git a/kdecore/kurl.cpp b/kdecore/kurl.cpp
index 428ab2f20..cc7c3fddb 100644
--- a/kdecore/kurl.cpp
+++ b/kdecore/kurl.cpp
@@ -1687,14 +1687,14 @@ TQString KURL::fileName( bool _strip_trailing_slash ) const
if ( _strip_trailing_slash )
{
- while ( len >= 1 && path[ len - 1 ] == (QChar)'/' )
+ while ( len >= 1 && path[ len - 1 ] == TQChar('/') )
len--;
}
- else if ( path[ len - 1 ] == (QChar)'/' )
+ else if ( path[ len - 1 ] == TQChar('/') )
return fname;
// Does the path only consist of '/' characters ?
- if ( len == 1 && path[ 0 ] == (QChar)'/' )
+ if ( len == 1 && path[ 0 ] == TQChar('/') )
return fname;
// Skip last n slashes
@@ -1704,13 +1704,13 @@ TQString KURL::fileName( bool _strip_trailing_slash ) const
// This is hairy, we need the last unencoded slash.
// Count in the encoded string how many encoded slashes follow the last
// unencoded one.
- int i = m_strPath_encoded.tqfindRev( (QChar)'/', len - 1 );
+ int i = m_strPath_encoded.tqfindRev( TQChar('/'), len - 1 );
TQString fileName_encoded = m_strPath_encoded.mid(i+1);
n += fileName_encoded.tqcontains("%2f", false);
}
int i = len;
do {
- i = path.tqfindRev( (QChar)'/', i - 1 );
+ i = path.tqfindRev( TQChar('/'), i - 1 );
}
while (--n && (i > 0));
diff --git a/kdecore/network/ksrvresolverworker.cpp b/kdecore/network/ksrvresolverworker.cpp
index c1df59bde..e217507f3 100644
--- a/kdecore/network/ksrvresolverworker.cpp
+++ b/kdecore/network/ksrvresolverworker.cpp
@@ -85,7 +85,7 @@ bool KSrvResolverWorker::preprocess()
return false;
protoname = "_";
- protoname += names.at(0);
+ protoname += names.tqat(0);
}
else if (sockettype == SOCK_STREAM || sockettype == 0)
protoname = "_tcp";
diff --git a/kdecore/svgicons/ksvgiconengine.cpp b/kdecore/svgicons/ksvgiconengine.cpp
index faca9d967..2dcd1c226 100644
--- a/kdecore/svgicons/ksvgiconengine.cpp
+++ b/kdecore/svgicons/ksvgiconengine.cpp
@@ -202,7 +202,11 @@ public:
TQWMatrix matrix = m_engine->painter()->parseTransform(transform);
TQWMatrix *current = m_engine->painter()->tqworldMatrix();
+#ifdef USE_QT4
+printf("[FIXME] *current = matrix * *current locks up under Qt4; bypassing for now\n\r");
+#else // USE_QT4
*current = matrix * *current;
+#endif // USE_QT4
}
void parseCommonAttributes(TQDomNode &node)
diff --git a/kdecore/tests/kurltest.cpp b/kdecore/tests/kurltest.cpp
index e80561d2c..c8e5bcced 100644
--- a/kdecore/tests/kurltest.cpp
+++ b/kdecore/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.at(tmpurl.length() - 1) == '/')
+ if ( tmpurl.tqat(tmpurl.length() - 1) == '/')
// It's a directory, so strip the trailing slash first
tmpurl.truncate( tmpurl.length() - 1);
KURL newUrl = tmpurl;