summaryrefslogtreecommitdiffstats
path: root/kio/kio
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
commitf7e71d47719ab6094cf4a9fafffa5ea351973522 (patch)
tree30834aa632d442019e14f88685001d94657d060b /kio/kio
parentb31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff)
downloadtdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz
tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio/kio')
-rw-r--r--kio/kio/authinfo.cpp28
-rw-r--r--kio/kio/chmodjob.cpp2
-rw-r--r--kio/kio/connection.h2
-rw-r--r--kio/kio/dataprotocol.cpp6
-rw-r--r--kio/kio/dataslave.cpp2
-rw-r--r--kio/kio/defaultprogress.cpp12
-rw-r--r--kio/kio/forwardingslavebase.cpp26
-rw-r--r--kio/kio/global.cpp30
-rw-r--r--kio/kio/global.h6
-rw-r--r--kio/kio/job.cpp100
-rw-r--r--kio/kio/jobclasses.h6
-rw-r--r--kio/kio/kacl.cpp16
-rw-r--r--kio/kio/kar.cpp6
-rw-r--r--kio/kio/karchive.cpp14
-rw-r--r--kio/kio/karchive.h8
-rw-r--r--kio/kio/kautomount.h8
-rw-r--r--kio/kio/kdatatool.cpp14
-rw-r--r--kio/kio/kdatatool.h4
-rw-r--r--kio/kio/kdirlister.cpp24
-rw-r--r--kio/kio/kdirlister.h2
-rw-r--r--kio/kio/kdirwatch.cpp26
-rw-r--r--kio/kio/kdirwatch.h2
-rw-r--r--kio/kio/kdirwatch_p.h4
-rw-r--r--kio/kio/kfileitem.cpp10
-rw-r--r--kio/kio/kfilemetainfo.cpp76
-rw-r--r--kio/kio/kfilemetainfo.h2
-rw-r--r--kio/kio/kfileshare.cpp10
-rw-r--r--kio/kio/kfileshare.h2
-rw-r--r--kio/kio/kfilterdev.cpp52
-rw-r--r--kio/kio/kfilterdev.h10
-rw-r--r--kio/kio/kimageio.cpp34
-rw-r--r--kio/kio/klimitediodevice.h14
-rw-r--r--kio/kio/kmimemagic.cpp8
-rw-r--r--kio/kio/kmimetype.cpp24
-rw-r--r--kio/kio/kmimetypechooser.cpp26
-rw-r--r--kio/kio/kmimetypechooser.h2
-rw-r--r--kio/kio/kmimetyperesolver.h2
-rw-r--r--kio/kio/knfsshare.cpp8
-rw-r--r--kio/kio/kprotocolmanager.cpp12
-rw-r--r--kio/kio/kremoteencoding.cpp4
-rw-r--r--kio/kio/krun.cpp26
-rw-r--r--kio/kio/krun.h4
-rw-r--r--kio/kio/ksambashare.cpp6
-rw-r--r--kio/kio/kscan.cpp8
-rw-r--r--kio/kio/kservice.cpp54
-rw-r--r--kio/kio/kservicefactory.cpp26
-rw-r--r--kio/kio/kservicegroup.cpp28
-rw-r--r--kio/kio/kservicegroupfactory.cpp8
-rw-r--r--kio/kio/kservicetype.cpp22
-rw-r--r--kio/kio/kservicetypefactory.cpp32
-rw-r--r--kio/kio/kservicetypefactory.h2
-rw-r--r--kio/kio/kshellcompletion.cpp8
-rw-r--r--kio/kio/ktar.cpp28
-rw-r--r--kio/kio/ktar.h4
-rw-r--r--kio/kio/ktrader.h2
-rw-r--r--kio/kio/ktraderparsetree.cpp10
-rw-r--r--kio/kio/kurifilter.cpp14
-rw-r--r--kio/kio/kurifilter.h3
-rw-r--r--kio/kio/kurlcompletion.cpp16
-rw-r--r--kio/kio/kuserprofile.cpp8
-rw-r--r--kio/kio/kzip.cpp34
-rw-r--r--kio/kio/kzip.h16
-rw-r--r--kio/kio/metainfojob.cpp2
-rw-r--r--kio/kio/netaccess.cpp20
-rw-r--r--kio/kio/netaccess.h4
-rw-r--r--kio/kio/passdlg.cpp34
-rw-r--r--kio/kio/paste.cpp22
-rw-r--r--kio/kio/previewjob.cpp26
-rw-r--r--kio/kio/renamedlg.cpp12
-rw-r--r--kio/kio/renamedlg.h2
-rw-r--r--kio/kio/renamedlgplugin.h2
-rw-r--r--kio/kio/scheduler.cpp36
-rw-r--r--kio/kio/sessiondata.cpp12
-rw-r--r--kio/kio/sessiondata.h2
-rw-r--r--kio/kio/skipdlg.cpp12
-rw-r--r--kio/kio/slave.cpp8
-rw-r--r--kio/kio/slavebase.cpp32
-rw-r--r--kio/kio/slavebase.h12
-rw-r--r--kio/kio/slaveconfig.cpp16
-rw-r--r--kio/kio/slaveconfig.h2
-rw-r--r--kio/kio/slaveinterface.cpp18
-rw-r--r--kio/kio/slaveinterface.h6
-rw-r--r--kio/kio/statusbarprogress.cpp6
-rw-r--r--kio/kio/tcpslavebase.cpp2
84 files changed, 655 insertions, 636 deletions
diff --git a/kio/kio/authinfo.cpp b/kio/kio/authinfo.cpp
index d4aa27353..318e99277 100644
--- a/kio/kio/authinfo.cpp
+++ b/kio/kio/authinfo.cpp
@@ -76,17 +76,17 @@ TQDataStream& KIO::operator<< (TQDataStream& s, const AuthInfo& a)
{
s << a.url << a.username << a.password << a.prompt << a.caption
<< a.comment << a.commentLabel << a.realmValue << a.digestInfo
- << Q_UINT8(a.verifyPath ? 1:0) << Q_UINT8(a.readOnly ? 1:0)
- << Q_UINT8(a.keepPassword ? 1:0) << Q_UINT8(a.modified ? 1:0);
+ << TQ_UINT8(a.verifyPath ? 1:0) << TQ_UINT8(a.readOnly ? 1:0)
+ << TQ_UINT8(a.keepPassword ? 1:0) << TQ_UINT8(a.modified ? 1:0);
return s;
}
TQDataStream& KIO::operator>> (TQDataStream& s, AuthInfo& a)
{
- Q_UINT8 verify = 0;
- Q_UINT8 ro = 0;
- Q_UINT8 keep = 0;
- Q_UINT8 mod = 0;
+ TQ_UINT8 verify = 0;
+ TQ_UINT8 ro = 0;
+ TQ_UINT8 keep = 0;
+ TQ_UINT8 mod = 0;
s >> a.url >> a.username >> a.password >> a.prompt >> a.caption
>> a.comment >> a.commentLabel >> a.realmValue >> a.digestInfo
@@ -146,7 +146,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
return false;
}
- if ( !loginMap.contains( type ) )
+ if ( !loginMap.tqcontains( type ) )
return false;
LoginList l = loginMap[type];
@@ -158,7 +158,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
AutoLogin &log = *it;
if ( (mode & defaultOnly) == defaultOnly &&
- log.machine == TQString::fromLatin1("default") &&
+ log.machine == TQString::tqfromLatin1("default") &&
(login.login.isEmpty() || login.login == log.login) )
{
login.type = log.type;
@@ -169,7 +169,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
}
if ( (mode & presetOnly) == presetOnly &&
- log.machine == TQString::fromLatin1("preset") &&
+ log.machine == TQString::tqfromLatin1("preset") &&
(login.login.isEmpty() || login.login == log.login) )
{
login.type = log.type;
@@ -237,7 +237,7 @@ TQString NetRC::extract( const char* buf, const char* key, int& pos )
if ( idx > start )
{
pos = idx;
- return TQString::fromLatin1( buf+start, idx-start);
+ return TQString::tqfromLatin1( buf+start, idx-start);
}
}
}
@@ -280,7 +280,7 @@ bool NetRC::parse( int fd )
while( buf[tail-1] == '\n' || buf[tail-1] =='\r' )
tail--;
- TQString mac = TQString::fromLatin1(buf, tail).stripWhiteSpace();
+ TQString mac = TQString::tqfromLatin1(buf, tail).stripWhiteSpace();
if ( !mac.isEmpty() )
loginMap[type][index].macdef[macro].append( mac );
@@ -294,12 +294,12 @@ bool NetRC::parse( int fd )
if (strncasecmp(buf+pos, "default", 7) == 0 )
{
pos += 7;
- l.machine = TQString::fromLatin1("default");
+ l.machine = TQString::tqfromLatin1("default");
}
else if (strncasecmp(buf+pos, "preset", 6) == 0 )
{
pos += 6;
- l.machine = TQString::fromLatin1("preset");
+ l.machine = TQString::tqfromLatin1("preset");
}
}
// kdDebug() << "Machine: " << l.machine << endl;
@@ -314,7 +314,7 @@ bool NetRC::parse( int fd )
type = l.type = extract( buf, "type", pos );
if ( l.type.isEmpty() && !l.machine.isEmpty() )
- type = l.type = TQString::fromLatin1("ftp");
+ type = l.type = TQString::tqfromLatin1("ftp");
// kdDebug() << "Type: " << l.type << endl;
macro = extract( buf, "macdef", pos );
diff --git a/kio/kio/chmodjob.cpp b/kio/kio/chmodjob.cpp
index e1d343c10..56c24b072 100644
--- a/kio/kio/chmodjob.cpp
+++ b/kio/kio/chmodjob.cpp
@@ -121,7 +121,7 @@ void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
break;
}
}
- if ( !isLink && relativePath != TQString::fromLatin1("..") )
+ if ( !isLink && relativePath != TQString::tqfromLatin1("..") )
{
ChmodInfo info;
info.url = m_lstItems.first()->url(); // base directory
diff --git a/kio/kio/connection.h b/kio/kio/connection.h
index 6858c8422..758202968 100644
--- a/kio/kio/connection.h
+++ b/kio/kio/connection.h
@@ -46,7 +46,7 @@ namespace KIO {
* It handles a queue of commands to be sent which makes it possible to
* queue data before an actual connection has been established.
*/
- class KIO_EXPORT Connection : public QObject
+ class KIO_EXPORT Connection : public TQObject
{
Q_OBJECT
public:
diff --git a/kio/kio/dataprotocol.cpp b/kio/kio/dataprotocol.cpp
index 161c82296..bcbd3191e 100644
--- a/kio/kio/dataprotocol.cpp
+++ b/kio/kio/dataprotocol.cpp
@@ -121,7 +121,7 @@ inline TQString extract(const TQString &buf, int &pos, TQChar c1,
TQChar c2 = '\0', TQChar c3 = '\0') {
int oldpos = pos;
pos = find(buf,oldpos,c1,c2,c3);
- return TQString(buf.unicode() + oldpos, pos - oldpos);
+ return TQString(buf.tqunicode() + oldpos, pos - oldpos);
}
/** ignores all whitespaces
@@ -186,11 +186,11 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
header_info.is_base64 = false;
// decode url and save it
- TQString &raw_url = header_info.url = TQString::fromLatin1("data:") + url.path();
+ TQString &raw_url = header_info.url = TQString::tqfromLatin1("data:") + url.path();
int raw_url_len = (int)raw_url.length();
// jump over scheme part (must be "data:", we don't even check that)
- header_info.data_offset = raw_url.find(':');
+ header_info.data_offset = raw_url.tqfind(':');
header_info.data_offset++; // jump over colon or to begin if scheme was missing
// read mime type
diff --git a/kio/kio/dataslave.cpp b/kio/kio/dataslave.cpp
index d16ecc0d4..8ec90b2a7 100644
--- a/kio/kio/dataslave.cpp
+++ b/kio/kio/dataslave.cpp
@@ -137,7 +137,7 @@ void DataSlave::send(int cmd, const TQByteArray &arr) {
break;
default:
error(ERR_UNSUPPORTED_ACTION,
- unsupportedActionErrorString(TQString::fromLatin1("data"),cmd));
+ unsupportedActionErrorString(TQString::tqfromLatin1("data"),cmd));
}/*end switch*/
}
diff --git a/kio/kio/defaultprogress.cpp b/kio/kio/defaultprogress.cpp
index 8293901ae..fea74a037 100644
--- a/kio/kio/defaultprogress.cpp
+++ b/kio/kio/defaultprogress.cpp
@@ -98,7 +98,7 @@ void DefaultProgress::init()
topLayout->addStrut( 360 ); // makes dlg at least that wide
TQGridLayout *grid = new TQGridLayout( 2, 3 );
- topLayout->addLayout(grid);
+ topLayout->addLayout(TQT_TQLAYOUT(grid));
grid->addColSpacing(1, KDialog::spacingHint());
// filenames or action name
grid->addWidget(new TQLabel(i18n("Source:"), this), 0, 0);
@@ -130,9 +130,9 @@ void DefaultProgress::init()
hBox->addWidget(resumeLabel);
progressLabel = new TQLabel( this );
-/* progressLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+/* progressLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
TQSizePolicy::Preferred ) );*/
- progressLabel->setAlignment( TQLabel::AlignRight );
+ progressLabel->tqsetAlignment( TQLabel::AlignRight );
hBox->addWidget( progressLabel );
hBox = new TQHBoxLayout();
@@ -171,8 +171,8 @@ void DefaultProgress::init()
connect( d->cancelClose, TQT_SIGNAL( clicked() ), TQT_SLOT( slotStop() ) );
hBox->addWidget( d->cancelClose );
- resize( sizeHint() );
- setMaximumHeight(sizeHint().height());
+ resize( tqsizeHint() );
+ setMaximumHeight(tqsizeHint().height());
d->keepOpenChecked = false;
d->noCaptionYet = true;
@@ -273,7 +273,7 @@ void DefaultProgress::slotPercent( KIO::Job*, unsigned long percent )
void DefaultProgress::slotInfoMessage( KIO::Job*, const TQString & msg )
{
speedLabel->setText( msg );
- speedLabel->setAlignment( speedLabel->alignment() & ~Qt::WordBreak );
+ speedLabel->tqsetAlignment( speedLabel->tqalignment() & ~TQt::WordBreak );
}
diff --git a/kio/kio/forwardingslavebase.cpp b/kio/kio/forwardingslavebase.cpp
index 5caa08465..c83d5750c 100644
--- a/kio/kio/forwardingslavebase.cpp
+++ b/kio/kio/forwardingslavebase.cpp
@@ -126,7 +126,7 @@ void ForwardingSlaveBase::get(const KURL &url)
KIO::TransferJob *job = KIO::get(new_url, false, false);
connectTransferJob(job);
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -142,7 +142,7 @@ void ForwardingSlaveBase::put(const KURL &url, int permissions,
resume, false);
connectTransferJob(job);
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -156,7 +156,7 @@ void ForwardingSlaveBase::stat(const KURL &url)
KIO::SimpleJob *job = KIO::stat(new_url, false);
connectSimpleJob(job);
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -170,7 +170,7 @@ void ForwardingSlaveBase::mimetype(const KURL &url)
KIO::TransferJob *job = KIO::mimetype(new_url, false);
connectTransferJob(job);
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -184,7 +184,7 @@ void ForwardingSlaveBase::listDir(const KURL &url)
KIO::ListJob *job = KIO::listDir(new_url, false);
connectListJob(job);
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -198,7 +198,7 @@ void ForwardingSlaveBase::mkdir(const KURL &url, int permissions)
KIO::SimpleJob *job = KIO::mkdir(new_url, permissions);
connectSimpleJob(job);
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -213,7 +213,7 @@ void ForwardingSlaveBase::rename(const KURL &src, const KURL &dest,
KIO::Job *job = KIO::rename(new_src, new_dest, overwrite);
connectJob(job);
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -228,7 +228,7 @@ void ForwardingSlaveBase::symlink(const TQString &target, const KURL &dest,
KIO::SimpleJob *job = KIO::symlink(target, new_dest, overwrite, false);
connectSimpleJob(job);
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -242,7 +242,7 @@ void ForwardingSlaveBase::chmod(const KURL &url, int permissions)
KIO::SimpleJob *job = KIO::chmod(new_url, permissions);
connectSimpleJob(job);
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -258,7 +258,7 @@ void ForwardingSlaveBase::copy(const KURL &src, const KURL &dest,
overwrite, false);
connectJob(job);
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -280,7 +280,7 @@ void ForwardingSlaveBase::del(const KURL &url, bool isfile)
connectSimpleJob(job);
}
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
}
@@ -363,7 +363,7 @@ void ForwardingSlaveBase::slotResult(KIO::Job *job)
finished();
}
- qApp->eventLoop()->exitLoop();
+ tqApp->eventLoop()->exitLoop();
}
void ForwardingSlaveBase::slotWarning(KIO::Job* /*job*/, const TQString &msg)
@@ -399,7 +399,7 @@ void ForwardingSlaveBase::slotRedirection(KIO::Job *job, const KURL &url)
job->kill( true );
finished();
- qApp->eventLoop()->exitLoop();
+ tqApp->eventLoop()->exitLoop();
}
void ForwardingSlaveBase::slotEntries(KIO::Job* /*job*/,
diff --git a/kio/kio/global.cpp b/kio/kio/global.cpp
index f99219524..6cf30c505 100644
--- a/kio/kio/global.cpp
+++ b/kio/kio/global.cpp
@@ -97,7 +97,7 @@ KIO_EXPORT TQString KIO::number( KIO::filesize_t size )
{
char charbuf[256];
sprintf(charbuf, "%lld", size);
- return TQString::fromLatin1(charbuf);
+ return TQString::tqfromLatin1(charbuf);
}
KIO_EXPORT unsigned int KIO::calculateRemainingSeconds( KIO::filesize_t totalSize,
@@ -167,12 +167,12 @@ KIO_EXPORT TQString KIO::encodeFileName( const TQString & _str )
TQString str( _str );
int i = 0;
- while ( ( i = str.find( "%", i ) ) != -1 )
+ while ( ( i = str.tqfind( "%", i ) ) != -1 )
{
str.replace( i, 1, "%%");
i += 2;
}
- while ( ( i = str.find( "/" ) ) != -1 )
+ while ( ( i = str.tqfind( "/" ) ) != -1 )
str.replace( i, 1, "%2f");
return str;
}
@@ -284,7 +284,7 @@ KIO_EXPORT TQString KIO::buildErrorString(int errorCode, const TQString &errorTe
result = i18n( "Could not create socket for accessing %1." ).arg( errorText );
break;
case KIO::ERR_COULD_NOT_CONNECT:
- result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::fromLatin1("localhost") : errorText );
+ result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::tqfromLatin1("localhost") : errorText );
break;
case KIO::ERR_CONNECTION_BROKEN:
result = i18n( "Connection to host %1 is broken." ).arg( errorText );
@@ -477,16 +477,16 @@ KIO_EXPORT TQStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0
url = i18n( "(unknown)" );
}
- datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(),
+ datetime = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(),
false );
ret << errorName;
- ret << TQString::fromLatin1( "<qt><p><b>" ) + errorName +
- TQString::fromLatin1( "</b></p><p>" ) + description +
- TQString::fromLatin1( "</p>" );
- ret2 = TQString::fromLatin1( "<qt><p>" );
+ ret << TQString::tqfromLatin1( "<qt><p><b>" ) + errorName +
+ TQString::tqfromLatin1( "</b></p><p>" ) + description +
+ TQString::tqfromLatin1( "</p>" );
+ ret2 = TQString::tqfromLatin1( "<qt><p>" );
if ( !techName.isEmpty() )
- ret2 += i18n( "<b>Technical reason</b>: " ) + techName + TQString::fromLatin1( "</p>" );
+ ret2 += i18n( "<b>Technical reason</b>: " ) + techName + TQString::tqfromLatin1( "</p>" );
ret2 += i18n( "</p><p><b>Details of the request</b>:" );
ret2 += i18n( "</p><ul><li>URL: %1</li>" ).arg( url );
if ( !protocol.isEmpty() ) {
@@ -497,12 +497,12 @@ KIO_EXPORT TQStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0
if ( !causes.isEmpty() ) {
ret2 += i18n( "<p><b>Possible causes</b>:</p><ul><li>" );
ret2 += causes.join( "</li><li>" );
- ret2 += TQString::fromLatin1( "</li></ul>" );
+ ret2 += TQString::tqfromLatin1( "</li></ul>" );
}
if ( !solutions.isEmpty() ) {
ret2 += i18n( "<p><b>Possible solutions</b>:</p><ul><li>" );
ret2 += solutions.join( "</li><li>" );
- ret2 += TQString::fromLatin1( "</li></ul>" );
+ ret2 += TQString::tqfromLatin1( "</li></ul>" );
}
ret << ret2;
return ret;
@@ -559,7 +559,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT
protocol = i18n( "(unknown)" );
}
- datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(),
+ datetime = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(),
false );
TQString errorName, techName, description;
@@ -1738,7 +1738,7 @@ static TQString get_mount_info(const TQString& filename,
if ( is_my_mountpoint( mounted[i].f_mntonname, realname, max ) )
{
mountPoint = TQFile::decodeName(mounted[i].f_mntonname);
- fstype = TQString::fromLatin1(mounttype);
+ fstype = TQString::tqfromLatin1(mounttype);
check_mount_point( mounttype, mounted[i].f_mntfromname,
isautofs, isslow );
// keep going, looking for a potentially better one
@@ -1805,7 +1805,7 @@ static TQString get_mount_info(const TQString& filename,
if ( is_my_mountpoint( mountedto, realname, max ) )
{
mountPoint = TQFile::decodeName(mountedto);
- fstype = TQString::fromLatin1(ent->vfsent_name);
+ fstype = TQString::tqfromLatin1(ent->vfsent_name);
check_mount_point(ent->vfsent_name, device_name, isautofs, isslow);
if (ismanual == Unseen)
diff --git a/kio/kio/global.h b/kio/kio/global.h
index 402d7b431..ea42f3e1d 100644
--- a/kio/kio/global.h
+++ b/kio/kio/global.h
@@ -34,9 +34,9 @@
namespace KIO
{
/// 64-bit file offset
- typedef Q_LLONG fileoffset_t;
+ typedef TQ_LLONG fileoffset_t;
/// 64-bit file size
- typedef Q_ULLONG filesize_t;
+ typedef TQ_ULLONG filesize_t;
/**
* Converts @p size from bytes to the string representation.
@@ -536,7 +536,7 @@ public:
it != metaData.end();
++it)
{
- replace(it.key(), it.data());
+ tqreplace(it.key(), it.data());
}
return *this;
}
diff --git a/kio/kio/job.cpp b/kio/kio/job.cpp
index b20c09c10..2b82d2411 100644
--- a/kio/kio/job.cpp
+++ b/kio/kio/job.cpp
@@ -318,10 +318,10 @@ void Job::showErrorDialog( TQWidget * parent )
}
}
-void Job::setAutoErrorHandlingEnabled( bool enable, TQWidget *parentWidget )
+void Job::setAutoErrorHandlingEnabled( bool enable, TQWidget *tqparentWidget )
{
d->m_autoErrorHandling = enable;
- d->m_errorParentWidget = parentWidget;
+ d->m_errorParentWidget = tqparentWidget;
}
bool Job::isAutoErrorHandlingEnabled() const
@@ -392,7 +392,7 @@ MetaData Job::metaData() const
TQString Job::queryMetaData(const TQString &key)
{
- if (!m_incomingMetaData.contains(key))
+ if (!m_incomingMetaData.tqcontains(key))
return TQString::null;
return m_incomingMetaData[key];
}
@@ -758,7 +758,7 @@ SimpleJob *KIO::mkdir( const KURL& url, int permissions )
SimpleJob *KIO::rmdir( const KURL& url )
{
//kdDebug(7007) << "rmdir " << url << endl;
- KIO_ARGS << url << Q_INT8(false); // isFile is false
+ KIO_ARGS << url << TQ_INT8(false); // isFile is false
return new SimpleJob(url, CMD_DEL, packedArgs, false);
}
@@ -772,14 +772,14 @@ SimpleJob *KIO::chmod( const KURL& url, int permissions )
SimpleJob *KIO::rename( const KURL& src, const KURL & dest, bool overwrite )
{
//kdDebug(7007) << "rename " << src << " " << dest << endl;
- KIO_ARGS << src << dest << (Q_INT8) overwrite;
+ KIO_ARGS << src << dest << (TQ_INT8) overwrite;
return new SimpleJob(src, CMD_RENAME, packedArgs, false);
}
SimpleJob *KIO::symlink( const TQString& target, const KURL & dest, bool overwrite, bool showProgressInfo )
{
//kdDebug(7007) << "symlink target=" << target << " " << dest << endl;
- KIO_ARGS << target << dest << (Q_INT8) overwrite;
+ KIO_ARGS << target << dest << (TQ_INT8) overwrite;
return new SimpleJob(dest, CMD_SYMLINK, packedArgs, showProgressInfo);
}
@@ -791,8 +791,8 @@ SimpleJob *KIO::special(const KURL& url, const TQByteArray & data, bool showProg
SimpleJob *KIO::mount( bool ro, const char *fstype, const TQString& dev, const TQString& point, bool showProgressInfo )
{
- KIO_ARGS << int(1) << Q_INT8( ro ? 1 : 0 )
- << TQString::fromLatin1(fstype) << dev << point;
+ KIO_ARGS << int(1) << TQ_INT8( ro ? 1 : 0 )
+ << TQString::tqfromLatin1(fstype) << dev << point;
SimpleJob *job = special( KURL("file:/"), packedArgs, showProgressInfo );
if ( showProgressInfo )
Observer::self()->mounting( job, dev, point );
@@ -821,8 +821,8 @@ StatJob::StatJob( const KURL& url, int command,
void StatJob::start(Slave *slave)
{
- m_outgoingMetaData.replace( "statSide", m_bSource ? "source" : "dest" );
- m_outgoingMetaData.replace( "details", TQString::number(m_details) );
+ m_outgoingMetaData.tqreplace( "statSide", m_bSource ? "source" : "dest" );
+ m_outgoingMetaData.tqreplace( "details", TQString::number(m_details) );
connect( slave, TQT_SIGNAL( statEntry( const KIO::UDSEntry& ) ),
TQT_SLOT( slotStatEntry( const KIO::UDSEntry & ) ) );
@@ -946,7 +946,7 @@ void TransferJob::slotRedirection( const KURL &url)
// Some websites keep redirecting to themselves where each redirection
// acts as the stage in a state-machine. We define "endless redirections"
// as 5 redirections to the same URL.
- if (m_redirectionList.contains(url) > 5)
+ if (m_redirectionList.tqcontains(url) > 5)
{
kdDebug(7007) << "TransferJob::slotRedirection: CYCLIC REDIRECTION!" << endl;
m_error = ERR_CYCLIC_LINK;
@@ -997,7 +997,7 @@ void TransferJob::slotFinished()
}
case CMD_PUT: {
int permissions;
- Q_INT8 iOverwrite, iResume;
+ TQ_INT8 iOverwrite, iResume;
istream >> dummyUrl >> iOverwrite >> iResume >> permissions;
m_packedArgs.truncate(0);
TQDataStream stream( m_packedArgs, IO_WriteOnly );
@@ -1328,7 +1328,7 @@ TransferJob *KIO::http_post( const KURL& url, const TQByteArray &postData, bool
for( TQValueList< int >::ConstIterator it = overriden_ports->begin();
it != overriden_ports->end();
++it )
- if( overriden_ports->contains( url.port()))
+ if( overriden_ports->tqcontains( url.port()))
_error = 0;
}
@@ -1380,7 +1380,7 @@ void TransferJob::slotPostRedirection()
TransferJob *KIO::put( const KURL& url, int permissions,
bool overwrite, bool resume, bool showProgressInfo )
{
- KIO_ARGS << url << Q_INT8( overwrite ? 1 : 0 ) << Q_INT8( resume ? 1 : 0 ) << permissions;
+ KIO_ARGS << url << TQ_INT8( overwrite ? 1 : 0 ) << TQ_INT8( resume ? 1 : 0 ) << permissions;
TransferJob * job = new TransferJob( url, CMD_PUT, packedArgs, TQByteArray(), showProgressInfo );
return job;
}
@@ -1413,7 +1413,7 @@ void StoredTransferJob::slotStoredData( KIO::Job *, const TQByteArray &data )
if ( data.size() == 0 )
return;
unsigned int oldSize = m_data.size();
- m_data.resize( oldSize + data.size(), TQGArray::SpeedOptim );
+ m_data.tqresize( oldSize + data.size(), TQGArray::SpeedOptim );
memcpy( m_data.data() + oldSize, data.data(), data.size() );
}
@@ -1451,7 +1451,7 @@ StoredTransferJob *KIO::storedGet( const KURL& url, bool reload, bool showProgre
StoredTransferJob *KIO::storedPut( const TQByteArray& arr, const KURL& url, int permissions,
bool overwrite, bool resume, bool showProgressInfo )
{
- KIO_ARGS << url << Q_INT8( overwrite ? 1 : 0 ) << Q_INT8( resume ? 1 : 0 ) << permissions;
+ KIO_ARGS << url << TQ_INT8( overwrite ? 1 : 0 ) << TQ_INT8( resume ? 1 : 0 ) << permissions;
StoredTransferJob * job = new StoredTransferJob( url, CMD_PUT, packedArgs, TQByteArray(), showProgressInfo );
job->setData( arr );
return job;
@@ -1480,7 +1480,7 @@ void MimetypeJob::slotFinished( )
// Due to the "protocol doesn't support listing" code in KRun, we
// assumed it was a file.
kdDebug(7007) << "It is in fact a directory!" << endl;
- m_mimetype = TQString::fromLatin1("inode/directory");
+ m_mimetype = TQString::tqfromLatin1("inode/directory");
emit TransferJob::mimetype( this, m_mimetype );
m_error = 0;
}
@@ -1663,7 +1663,7 @@ void FileCopyJob::startCopyJob()
void FileCopyJob::startCopyJob(const KURL &slave_url)
{
//kdDebug(7007) << "FileCopyJob::startCopyJob()" << endl;
- KIO_ARGS << m_src << m_dest << m_permissions << (Q_INT8) m_overwrite;
+ KIO_ARGS << m_src << m_dest << m_permissions << (TQ_INT8) m_overwrite;
m_copyJob = new DirectCopyJob(slave_url, CMD_COPY, packedArgs, false);
addSubjob( m_copyJob );
connectSubjob( m_copyJob );
@@ -1673,7 +1673,7 @@ void FileCopyJob::startCopyJob(const KURL &slave_url)
void FileCopyJob::startRenameJob(const KURL &slave_url)
{
- KIO_ARGS << m_src << m_dest << (Q_INT8) m_overwrite;
+ KIO_ARGS << m_src << m_dest << (TQ_INT8) m_overwrite;
m_moveJob = new SimpleJob(slave_url, CMD_RENAME, packedArgs, false);
addSubjob( m_moveJob );
connectSubjob( m_moveJob );
@@ -1974,7 +1974,7 @@ FileCopyJob *KIO::file_move( const KURL& src, const KURL& dest, int permissions,
SimpleJob *KIO::file_delete( const KURL& src, bool showProgressInfo)
{
- KIO_ARGS << src << Q_INT8(true); // isFile
+ KIO_ARGS << src << TQ_INT8(true); // isFile
return new SimpleJob(src, CMD_DEL, packedArgs, showProgressInfo );
}
@@ -2571,11 +2571,11 @@ void CopyJob::slotEntries(KIO::Job* job, const UDSEntryList& list)
KProtocolInfo::fileNameUsedForCopying( url ) == KProtocolInfo::FromURL ) {
//destFileName = url.fileName(); // Doesn't work for recursive listing
// Count the number of prefixes used by the recursive listjob
- int numberOfSlashes = displayName.contains( '/' ); // don't make this a find()!
+ int numberOfSlashes = displayName.tqcontains( '/' ); // don't make this a find()!
TQString path = url.path();
int pos = 0;
for ( int n = 0; n < numberOfSlashes + 1; ++n ) {
- pos = path.findRev( '/', pos - 1 );
+ pos = path.tqfindRev( '/', pos - 1 );
if ( pos == -1 ) { // error
kdWarning(7007) << "kioslave bug: not enough slashes in UDS_URL " << path << " - looking for " << numberOfSlashes << " slashes" << endl;
break;
@@ -2763,7 +2763,7 @@ void CopyJob::startRenameJob( const KURL& slave_url )
files.append(info);
emit aboutToCreate( this, files );
- KIO_ARGS << m_currentSrcURL << dest << (Q_INT8) false /*no overwrite*/;
+ KIO_ARGS << m_currentSrcURL << dest << (TQ_INT8) false /*no overwrite*/;
SimpleJob * newJob = new SimpleJob(slave_url, CMD_RENAME, packedArgs, false);
Scheduler::scheduleJob(newJob);
addSubjob( newJob );
@@ -2789,7 +2789,7 @@ void CopyJob::skip( const KURL & sourceUrl )
// Check if this is one if toplevel sources
// If yes, remove it from m_srcList, for a correct FilesRemoved() signal
//kdDebug(7007) << "CopyJob::skip: looking for " << sourceUrl << endl;
- KURL::List::Iterator sit = m_srcList.find( sourceUrl );
+ KURL::List::Iterator sit = m_srcList.tqfind( sourceUrl );
if ( sit != m_srcList.end() )
{
//kdDebug(7007) << "CopyJob::skip: removing " << sourceUrl << " from list" << endl;
@@ -2967,7 +2967,7 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
TQString path = (*renamedirit).uDest.path();
if ( path.left(oldPath.length()) == oldPath ) {
TQString n = path;
- n.replace( 0, oldPath.length(), newPath );
+ n.tqreplace( 0, oldPath.length(), newPath );
kdDebug(7007) << "dirs list: " << (*renamedirit).uSource.path()
<< " was going to be " << path
<< ", changed into " << n << endl;
@@ -2981,7 +2981,7 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
TQString path = (*renamefileit).uDest.path();
if ( path.left(oldPath.length()) == oldPath ) {
TQString n = path;
- n.replace( 0, oldPath.length(), newPath );
+ n.tqreplace( 0, oldPath.length(), newPath );
kdDebug(7007) << "files list: " << (*renamefileit).uSource.path()
<< " was going to be " << path
<< ", changed into " << n << endl;
@@ -3107,7 +3107,7 @@ void CopyJob::slotResultCopyingFiles( Job * job )
}
else
{
- if ( m_bCurrentOperationIsLink && ::qt_cast<KIO::DeleteJob*>( job ) )
+ if ( m_bCurrentOperationIsLink && ::tqqt_cast<KIO::DeleteJob*>( job ) )
{
// Very special case, see a few lines below
// We are deleting the source of a symlink we successfully moved... ignore error
@@ -3124,7 +3124,7 @@ void CopyJob::slotResultCopyingFiles( Job * job )
{
// Special case for moving links. That operation needs two jobs, unlike others.
if ( m_bCurrentOperationIsLink && m_mode == Move
- && !::qt_cast<KIO::DeleteJob *>( job ) // Deleting source not already done
+ && !::tqqt_cast<KIO::DeleteJob *>( job ) // Deleting source not already done
)
{
subjobs.remove( job );
@@ -3359,7 +3359,7 @@ void CopyJob::copyNextFile()
bool devicesOk=false;
// if the source is a devices url, handle it a littlebit special
- if ((*it).uSource.protocol()==TQString::fromLatin1("devices"))
+ if ((*it).uSource.protocol()==TQString::tqfromLatin1("devices"))
{
TQByteArray data;
TQByteArray param;
@@ -3395,20 +3395,20 @@ void CopyJob::copyNextFile()
config.setDesktopGroup();
KURL url = (*it).uSource;
url.setPass( "" );
- config.writePathEntry( TQString::fromLatin1("URL"), url.url() );
- config.writeEntry( TQString::fromLatin1("Name"), url.url() );
- config.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") );
+ config.writePathEntry( TQString::tqfromLatin1("URL"), url.url() );
+ config.writeEntry( TQString::tqfromLatin1("Name"), url.url() );
+ config.writeEntry( TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("Link") );
TQString protocol = (*it).uSource.protocol();
- if ( protocol == TQString::fromLatin1("ftp") )
- config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("ftp") );
- else if ( protocol == TQString::fromLatin1("http") )
- config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("www") );
- else if ( protocol == TQString::fromLatin1("info") )
- config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("info") );
- else if ( protocol == TQString::fromLatin1("mailto") ) // sven:
- config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("kmail") ); // added mailto: support
+ if ( protocol == TQString::tqfromLatin1("ftp") )
+ config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("ftp") );
+ else if ( protocol == TQString::tqfromLatin1("http") )
+ config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("www") );
+ else if ( protocol == TQString::tqfromLatin1("info") )
+ config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("info") );
+ else if ( protocol == TQString::tqfromLatin1("mailto") ) // sven:
+ config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("kmail") ); // added mailto: support
else
- config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("unknown") );
+ config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("unknown") );
config.sync();
files.remove( it );
m_processedFiles++;
@@ -4305,7 +4305,7 @@ void DeleteJob::slotResult( Job *job )
{
// Add toplevel dir in list of dirs
dirs.append( url );
- if ( url.isLocalFile() && !m_parentDirs.contains( url.path(-1) ) )
+ if ( url.isLocalFile() && !m_parentDirs.tqcontains( url.path(-1) ) )
m_parentDirs.append( url.path(-1) );
if ( !KProtocolInfo::canDeleteRecursive( url ) ) {
@@ -4334,7 +4334,7 @@ void DeleteJob::slotResult( Job *job )
//kdDebug(7007) << " Target is a file" << endl;
files.append( url );
}
- if ( url.isLocalFile() && !m_parentDirs.contains( url.directory(false) ) )
+ if ( url.isLocalFile() && !m_parentDirs.tqcontains( url.directory(false) ) )
m_parentDirs.append( url.directory(false) );
++m_currentStat;
statNextSrc();
@@ -4435,7 +4435,7 @@ void MultiGetJob::flushQueue(TQPtrList<GetRequest> &queue)
}
}
// Send number of URLs, (URL, metadata)*
- KIO_ARGS << (Q_INT32) queue.count();
+ KIO_ARGS << (TQ_INT32) queue.count();
for(entry = queue.first(); entry; entry = queue.next())
{
stream << entry->url << entry->metaData;
@@ -4585,12 +4585,12 @@ TQString CacheInfo::cachedFileName()
TQString CEF = m_url.path();
- int p = CEF.find('/');
+ int p = CEF.tqfind('/');
while(p != -1)
{
CEF[p] = separator;
- p = CEF.find('/', p);
+ p = CEF.tqfind('/', p);
}
TQString host = m_url.host().lower();
@@ -4651,7 +4651,7 @@ TQFile *CacheInfo::cachedFile()
ok = false;
time_t date;
- time_t currentDate = time(0);
+ time_t tqcurrentDate = time(0);
// URL
if (ok && (!fgets(buffer, 400, fs)))
@@ -4673,10 +4673,10 @@ TQFile *CacheInfo::cachedFile()
if (ok)
{
date = (time_t) strtoul(buffer, 0, 10);
- if (m_maxCacheAge && (difftime(currentDate, date) > m_maxCacheAge))
+ if (m_maxCacheAge && (difftime(tqcurrentDate, date) > m_maxCacheAge))
{
m_bMustRevalidate = true;
- m_expireDate = currentDate;
+ m_expireDate = tqcurrentDate;
}
}
@@ -4690,7 +4690,7 @@ TQFile *CacheInfo::cachedFile()
{
date = (time_t) strtoul(buffer, 0, 10);
// After the expire date we need to revalidate.
- if (!date || difftime(currentDate, date) >= 0)
+ if (!date || difftime(tqcurrentDate, date) >= 0)
m_bMustRevalidate = true;
m_expireDate = date;
}
diff --git a/kio/kio/jobclasses.h b/kio/kio/jobclasses.h
index 03ff3d452..6651565f1 100644
--- a/kio/kio/jobclasses.h
+++ b/kio/kio/jobclasses.h
@@ -155,17 +155,17 @@ namespace KIO {
/**
* Enable or disable the automatic error handling. When automatic
* error handling is enabled and an error occurs, then showErrorDialog()
- * is called with the specified @p parentWidget (if supplied) , right before
+ * is called with the specified @p tqparentWidget (if supplied) , right before
* the emission of the result signal.
*
* The default is false.
*
* @param enable enable or disable automatic error handling
- * @param parentWidget the parent widget, passed to showErrorDialog.
+ * @param tqparentWidget the parent widget, passed to showErrorDialog.
* Can be 0 for top-level
* @see isAutoErrorHandlingEnabled(), showErrorDialog()
*/
- void setAutoErrorHandlingEnabled( bool enable, TQWidget *parentWidget = 0 );
+ void setAutoErrorHandlingEnabled( bool enable, TQWidget *tqparentWidget = 0 );
/**
* Returns whether automatic error handling is enabled or disabled.
diff --git a/kio/kio/kacl.cpp b/kio/kio/kacl.cpp
index 432a50d31..4d12bf3e9 100644
--- a/kio/kio/kacl.cpp
+++ b/kio/kio/kacl.cpp
@@ -447,7 +447,7 @@ bool KACL::KACLPrivate::setAllUsersOrGroups( const TQValueList< QPair<TQString,
if ( currentTag == type ) {
acl_delete_entry( newACL, entry );
// we have to start from the beginning, the iterator is
- // invalidated, on deletion
+ // tqinvalidated, on deletion
ret = acl_get_entry( newACL, ACL_FIRST_ENTRY, &entry );
} else {
ret = acl_get_entry( newACL, ACL_NEXT_ENTRY, &entry );
@@ -619,12 +619,12 @@ TQString KACL::asString() const
TQString KACL::KACLPrivate::getUserName( uid_t uid ) const
{
TQString *temp;
- temp = m_usercache.find( uid );
+ temp = m_usercache.tqfind( uid );
if ( !temp ) {
struct passwd *user = getpwuid( uid );
if ( user ) {
- m_usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) );
- return TQString::fromLatin1( user->pw_name );
+ m_usercache.insert( uid, new TQString(TQString::tqfromLatin1(user->pw_name)) );
+ return TQString::tqfromLatin1( user->pw_name );
}
else
return TQString::number( uid );
@@ -637,12 +637,12 @@ TQString KACL::KACLPrivate::getUserName( uid_t uid ) const
TQString KACL::KACLPrivate::getGroupName( gid_t gid ) const
{
TQString *temp;
- temp = m_groupcache.find( gid );
+ temp = m_groupcache.tqfind( gid );
if ( !temp ) {
struct group *grp = getgrgid( gid );
if ( grp ) {
- m_groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) );
- return TQString::fromLatin1( grp->gr_name );
+ m_groupcache.insert( gid, new TQString(TQString::tqfromLatin1(grp->gr_name)) );
+ return TQString::tqfromLatin1( grp->gr_name );
}
else
return TQString::number( gid );
@@ -654,7 +654,7 @@ TQString KACL::KACLPrivate::getGroupName( gid_t gid ) const
static TQString aclAsString(const acl_t acl)
{
char *aclString = acl_to_text( acl, 0 );
- TQString ret = TQString::fromLatin1( aclString );
+ TQString ret = TQString::tqfromLatin1( aclString );
acl_free( (void*)aclString );
return ret;
}
diff --git a/kio/kio/kar.cpp b/kio/kio/kar.cpp
index 9f9435294..92f923343 100644
--- a/kio/kio/kar.cpp
+++ b/kio/kio/kar.cpp
@@ -45,7 +45,7 @@ KAr::KAr( const TQString& filename )
//kdDebug(7042) << "KAr(filename) reached." << endl;
m_filename = filename;
d = new KArPrivate;
- setDevice( new TQFile( filename ) );
+ setDevice( TQT_TQIODEVICE(new TQFile( filename )) );
}
KAr::KAr( TQIODevice * dev )
@@ -86,7 +86,7 @@ bool KAr::openArchive( int mode )
char magic[8];
dev->readBlock (magic, 8);
- if (qstrncmp(magic, "!<arch>", 7) != 0) {
+ if (tqstrncmp(magic, "!<arch>", 7) != 0) {
kdWarning(7042) << "Invalid main magic" << endl;
return false;
}
@@ -140,7 +140,7 @@ bool KAr::openArchive( int mode )
return false;
}
name = &ar_longnames[name.mid(1, 15).toInt()];
- name = name.left(name.find("/"));
+ name = name.left(name.tqfind("/"));
}
}
if (skip_entry) continue;
diff --git a/kio/kio/karchive.cpp b/kio/kio/karchive.cpp
index 592e513d4..9f1ec3c79 100644
--- a/kio/kio/karchive.cpp
+++ b/kio/kio/karchive.cpp
@@ -90,7 +90,7 @@ KArchive::~KArchive()
bool KArchive::open( int mode )
{
- if ( m_dev && !m_dev->open( mode ) )
+ if ( m_dev && !m_dev->tqopen( mode ) )
return false;
if ( m_open )
@@ -362,7 +362,7 @@ bool KArchive::writeData( const char* data, uint size )
bool KArchive::writeData_impl( const char* data, uint size )
{
Q_ASSERT( device() );
- return device()->writeBlock( data, size ) == (Q_LONG)size;
+ return device()->writeBlock( data, size ) == (TQ_LONG)size;
}
KArchiveDirectory * KArchive::rootDir()
@@ -375,7 +375,7 @@ KArchiveDirectory * KArchive::rootDir()
TQString username = pw ? TQFile::decodeName(pw->pw_name) : TQString::number( getuid() );
TQString groupname = grp ? TQFile::decodeName(grp->gr_name) : TQString::number( getgid() );
- d->rootDir = new KArchiveDirectory( this, TQString::fromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, TQString::null );
+ d->rootDir = new KArchiveDirectory( this, TQString::tqfromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, TQString::null );
}
return d->rootDir;
}
@@ -406,7 +406,7 @@ KArchiveDirectory * KArchive::findOrCreate( const TQString & path )
}
// Otherwise go up and try again
- int pos = path.findRev( '/' );
+ int pos = path.tqfindRev( '/' );
KArchiveDirectory * parent;
TQString dirname;
if ( pos == -1 ) // no more slash => create in root dir
@@ -548,13 +548,13 @@ KArchiveEntry* KArchiveDirectory::entry( TQString name )
// not "const TQString & name" since we want a local copy
// (to remove leading slash if any)
{
- int pos = name.find( '/' );
+ int pos = name.tqfind( '/' );
if ( pos == 0 ) // ouch absolute path (see also KArchive::findOrCreate)
{
if (name.length()>1)
{
name = name.mid( 1 ); // remove leading slash
- pos = name.find( '/' ); // look again
+ pos = name.tqfind( '/' ); // look again
}
else // "/"
return this;
@@ -563,7 +563,7 @@ KArchiveEntry* KArchiveDirectory::entry( TQString name )
if ( pos != -1 && pos == (int)name.length()-1 )
{
name = name.left( pos );
- pos = name.find( '/' ); // look again
+ pos = name.tqfind( '/' ); // look again
}
if ( pos != -1 )
{
diff --git a/kio/kio/karchive.h b/kio/kio/karchive.h
index dbfe02bff..ff1fe1f7c 100644
--- a/kio/kio/karchive.h
+++ b/kio/kio/karchive.h
@@ -512,12 +512,12 @@ public:
* Position of the data in the [uncompressed] archive.
* @return the position of the file
*/
- int position() const; // TODO use Q_LONG in KDE-4.0
+ int position() const; // TODO use TQ_LONG in KDE-4.0
/**
* Size of the data.
* @return the size of the file
*/
- int size() const; // TODO use Q_LONG in KDE-4.0
+ int size() const; // TODO use TQ_LONG in KDE-4.0
/**
* Set size of data, usually after writing the file.
* @param s the new size of the file
@@ -555,8 +555,8 @@ public:
void copyTo(const TQString& dest) const;
private:
- int m_pos; // TODO use Q_LONG in KDE-4.0
- int m_size; // TODO use Q_LONG in KDE-4.0
+ int m_pos; // TODO use TQ_LONG in KDE-4.0
+ int m_size; // TODO use TQ_LONG in KDE-4.0
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/kautomount.h b/kio/kio/kautomount.h
index 1d8662590..e73edec35 100644
--- a/kio/kio/kautomount.h
+++ b/kio/kio/kautomount.h
@@ -24,6 +24,10 @@
#include <kdelibs_export.h>
+#ifdef Q_MOC_RUN
+#define Q_OS_UNIX
+#endif // Q_MOC_RUN
+
#ifdef Q_OS_UNIX
namespace KIO {
@@ -38,7 +42,7 @@ class Job;
*
* @short This class implements synchronous mounting of devices.
*/
-class KIO_EXPORT KAutoMount : public QObject
+class KIO_EXPORT KAutoMount : public TQObject
{
Q_OBJECT
friend class gcc_gives_a_warning_without_this;
@@ -83,7 +87,7 @@ private:
*
* @short This class implements synchronous unmounting of devices,
*/
-class KIO_EXPORT KAutoUnmount : public QObject
+class KIO_EXPORT KAutoUnmount : public TQObject
{
Q_OBJECT
friend class gcc_gives_a_warning_without_this;
diff --git a/kio/kio/kdatatool.cpp b/kio/kio/kdatatool.cpp
index bb6462006..9708234d1 100644
--- a/kio/kio/kdatatool.cpp
+++ b/kio/kio/kdatatool.cpp
@@ -47,7 +47,7 @@ KDataToolInfo::KDataToolInfo( const KService::Ptr& service, KInstance* instance
m_service = service;
m_instance = instance;
- if ( !!m_service && !m_service->serviceTypes().contains( "KDataTool" ) )
+ if ( !!m_service && !m_service->serviceTypes().tqcontains( "KDataTool" ) )
{
kdDebug(30003) << "The service " << m_service->name().latin1()
<< " does not feature the service type KDataTool" << endl;
@@ -130,7 +130,7 @@ TQString KDataToolInfo::iconName() const
TQStringList KDataToolInfo::commands() const
{
if ( !m_service )
- return TQString::null;
+ return TQString();
return m_service->property( "Commands" ).toStringList();
}
@@ -138,7 +138,7 @@ TQStringList KDataToolInfo::commands() const
TQStringList KDataToolInfo::userCommands() const
{
if ( !m_service )
- return TQString::null;
+ return TQString();
return TQStringList::split( ',', m_service->comment() );
}
@@ -167,11 +167,11 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const
if ( !datatype.isEmpty() )
{
- constr = TQString::fromLatin1( "DataType == '%1'" ).arg( datatype );
+ constr = TQString::tqfromLatin1( "DataType == '%1'" ).arg( datatype );
}
if ( !mimetype.isEmpty() )
{
- TQString tmp = TQString::fromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype );
+ TQString tmp = TQString::tqfromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype );
if ( constr.isEmpty() )
constr = tmp;
else
@@ -180,7 +180,7 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const
/* Bug in KTrader ? Test with HEAD-kdelibs!
if ( instance )
{
- TQString tmp = TQString::fromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() );
+ TQString tmp = TQString::tqfromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() );
if ( constr.isEmpty() )
constr = tmp;
else
@@ -196,7 +196,7 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const
{
// Temporary replacement for the non-working trader query above
if ( !instance || !(*it)->property("ExcludeFrom").toStringList()
- .contains( instance->instanceName() ) )
+ .tqcontains( instance->instanceName() ) )
lst.append( KDataToolInfo( *it, instance ) );
else
kdDebug() << (*it)->entryPath() << " excluded." << endl;
diff --git a/kio/kio/kdatatool.h b/kio/kio/kdatatool.h
index 69751db79..ec76ca5b2 100644
--- a/kio/kio/kdatatool.h
+++ b/kio/kio/kdatatool.h
@@ -194,6 +194,7 @@ private:
class KIO_EXPORT KDataToolAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a new KDataToolAction.
@@ -250,9 +251,10 @@ private:
* @see KDataToolAction, and for activating a tool, passing it the data
* (and possibly getting modified data from it).
*/
-class KIO_EXPORT KDataTool : public QObject
+class KIO_EXPORT KDataTool : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp
index 901f382b8..11721f751 100644
--- a/kio/kio/kdirlister.cpp
+++ b/kio/kio/kdirlister.cpp
@@ -113,7 +113,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
lister->d->rootFileItem = 0;
}
- else if ( lister->d->lstDirs.find( _url ) != lister->d->lstDirs.end() )
+ else if ( lister->d->lstDirs.tqfind( _url ) != lister->d->lstDirs.end() )
{
// stop the job listing _url for this lister
stop( lister, _url );
@@ -311,7 +311,7 @@ void KDirListerCache::stop( KDirLister *lister )
TQPtrList<KDirLister> *listers;
while ( (listers = it.current()) )
{
- if ( listers->findRef( lister ) > -1 )
+ if ( listers->tqfindRef( lister ) > -1 )
{
// lister is listing url
TQString url = it.currentKey();
@@ -457,7 +457,7 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not
// that itemsInUse doesn't. When emitting the canceled signals lstDirs must
// not contain anything that itemsInUse does not contain. (otherwise it
// might crash in findByName()).
- lister->d->lstDirs.remove( lister->d->lstDirs.find( url ) );
+ lister->d->lstDirs.remove( lister->d->lstDirs.tqfind( url ) );
DirItem *item = itemsInUse[urlStr];
@@ -670,7 +670,7 @@ KFileItem *KDirListerCache::findByURL( const KDirLister *lister, const KURL& _u
parentDir.setPath( parentDir.directory() );
// If lister is set, check that it contains this dir
- if ( lister && !lister->d->lstDirs.contains( parentDir ) )
+ if ( lister && !lister->d->lstDirs.tqcontains( parentDir ) )
return 0L;
KFileItemList *itemList = itemsForDir( parentDir );
@@ -760,7 +760,7 @@ void KDirListerCache::FilesChanged( const KURL::List &fileList )
// Let's update the dir.
KURL dir( *it );
dir.setPath( dir.directory( true ) );
- if ( dirsToUpdate.find( dir ) == dirsToUpdate.end() )
+ if ( dirsToUpdate.tqfind( dir ) == dirsToUpdate.end() )
dirsToUpdate.prepend( dir );
}
}
@@ -890,7 +890,7 @@ void KDirListerCache::slotFileDirty( const TQString& _file )
// delayed updating of files, FAM is flooding us with events
void KDirListerCache::slotFileDirtyDelayed()
{
- TQString file = TQString::fromUtf8( sender()->name() );
+ TQString file = TQString::fromUtf8( TQT_TQOBJECT_CONST(sender())->name() );
kdDebug(7004) << k_funcinfo << file << endl;
@@ -1110,7 +1110,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
kdl->d->url = newUrl;
}
- *kdl->d->lstDirs.find( oldUrl ) = newUrl;
+ *kdl->d->lstDirs.tqfind( oldUrl ) = newUrl;
if ( kdl->d->lstDirs.count() == 1 )
{
@@ -1147,7 +1147,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
kdl->d->url = newUrl;
}
- *kdl->d->lstDirs.find( oldUrl ) = newUrl;
+ *kdl->d->lstDirs.tqfind( oldUrl ) = newUrl;
if ( kdl->d->lstDirs.count() == 1 )
{
@@ -1429,7 +1429,7 @@ void KDirListerCache::emitRedirections( const KURL &oldUrl, const KURL &url )
// And notify the dirlisters of the redirection
for ( KDirLister *kdl = holders->first(); kdl; kdl = holders->next() )
{
- *kdl->d->lstDirs.find( oldUrl ) = url;
+ *kdl->d->lstDirs.tqfind( oldUrl ) = url;
if ( kdl->d->lstDirs.count() == 1 )
emit kdl->redirection( url );
@@ -1478,7 +1478,7 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
if ( listers )
for ( kdl = tmpLst->first(); kdl; kdl = tmpLst->next() )
{
- Q_ASSERT( listers->containsRef( kdl ) == 0 );
+ Q_ASSERT( listers->tqcontainsRef( kdl ) == 0 );
listers->append( kdl );
}
else
@@ -2095,8 +2095,8 @@ void KDirLister::setMimeFilter( const TQStringList& mimeFilter )
if ( !(d->changes & MIME_FILTER) )
d->oldMimeFilter = d->mimeFilter;
- if ( mimeFilter.find("all/allfiles") != mimeFilter.end() ||
- mimeFilter.find("all/all") != mimeFilter.end() )
+ if ( mimeFilter.tqfind("all/allfiles") != mimeFilter.end() ||
+ mimeFilter.tqfind("all/all") != mimeFilter.end() )
d->mimeFilter.clear();
else
d->mimeFilter = mimeFilter;
diff --git a/kio/kio/kdirlister.h b/kio/kio/kdirlister.h
index 8a0109e89..d088cc281 100644
--- a/kio/kio/kdirlister.h
+++ b/kio/kio/kdirlister.h
@@ -52,7 +52,7 @@ namespace KIO { class Job; class ListJob; }
* @short Helper class for the kiojob used to list and update a directory.
* @author Michael Brade <brade@kde.org>
*/
-class KIO_EXPORT KDirLister : public QObject
+class KIO_EXPORT KDirLister : public TQObject
{
class KDirListerPrivate;
friend class KDirListerPrivate;
diff --git a/kio/kio/kdirwatch.cpp b/kio/kio/kdirwatch.cpp
index bbea148fa..c9418ef9d 100644
--- a/kio/kio/kdirwatch.cpp
+++ b/kio/kio/kdirwatch.cpp
@@ -23,7 +23,7 @@
// Februar 2002 - Add file watching and remote mount check for STAT
// Mar 30, 2001 - Native support for Linux dir change notification.
// Jan 28, 2000 - Usage of FAM service on IRIX (Josef.Weidendorfer@in.tum.de)
-// May 24. 1998 - List of times introduced, and some bugs are fixed. (sven)
+// May 24. 1998 - List of times introduced, and some bugs are fixed. (sven)1
// May 23. 1998 - Removed static pointer - you can have more instances.
// It was Needed for KRegistry. KDirWatch now emits signals and doesn't
// call (or need) KFM. No more URL's - just plain paths. (sven)
@@ -123,7 +123,7 @@ static int dnotify_signal = 0;
*
* As this is called asynchronously, only a flag is set and
* a rescan is requested.
- * This is done by writing into a pipe to trigger a QSocketNotifier
+ * This is done by writing into a pipe to trigger a TQSocketNotifier
* watching on this pipe: a timer is started and after a timeout,
* the rescan is done.
*/
@@ -135,7 +135,7 @@ void KDirWatchPrivate::dnotify_handler(int, siginfo_t *si, void *)
// (Richard Stevens, Advanced programming in the Unix Environment)
int saved_errno = errno;
- Entry* e = dwp_self->fd_Entry.find(si->si_fd);
+ Entry* e = dwp_self->fd_Entry.tqfind(si->si_fd);
// kdDebug(7001) << "DNOTIFY Handler: fd " << si->si_fd << " path "
// << TQString(e ? e->path:"unknown") << endl;
@@ -551,7 +551,7 @@ KDirWatchPrivate::Entry* KDirWatchPrivate::entry(const TQString& _path)
if ( path.length() > 1 && path.right(1) == "/" )
path.truncate( path.length() - 1 );
- EntryMap::Iterator it = m_mapEntries.find( path );
+ EntryMap::Iterator it = m_mapEntries.tqfind( path );
if ( it == m_mapEntries.end() )
return 0;
else
@@ -684,7 +684,7 @@ bool KDirWatchPrivate::useDNotify(Entry* e)
return false;
}
- fd_Entry.replace(fd, e);
+ fd_Entry.tqreplace(fd, e);
e->dn_fd = fd;
kdDebug(7001) << " Setup DNotify (fd " << fd
@@ -782,7 +782,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const TQString& _path,
if ( path.length() > 1 && path.right(1) == "/" )
path.truncate( path.length() - 1 );
- EntryMap::Iterator it = m_mapEntries.find( path );
+ EntryMap::Iterator it = m_mapEntries.tqfind( path );
if ( it != m_mapEntries.end() )
{
if (sub_entry) {
@@ -830,7 +830,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const TQString& _path,
(*it).addClient(instance);
kdDebug(7001) << "Added already watched Entry " << path
<< " (now " << (*it).clients() << " clients)"
- << TQString(" [%1]").arg(instance->name()) << endl;
+ << TQString(TQString(" [%1]").arg(instance->name())) << endl;
}
return;
}
@@ -873,8 +873,8 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const TQString& _path,
kdDebug(7001) << "Added " << (e->isDir ? "Dir ":"File ") << path
<< (e->m_status == NonExistent ? " NotExisting" : "")
- << (sub_entry ? TQString(" for %1").arg(sub_entry->path) : TQString(""))
- << (instance ? TQString(" [%1]").arg(instance->name()) : TQString(""))
+ << (sub_entry ? TQString(TQString(" for %1").arg(sub_entry->path)) : TQString(""))
+ << (instance ? TQString(TQString(" [%1]").arg(instance->name())) : TQString(""))
<< endl;
@@ -923,7 +923,7 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
if (delayRemove) {
// removeList is allowed to contain any entry at most once
- if (removeList.findRef(e)==-1)
+ if (removeList.tqfindRef(e)==-1)
removeList.append(e);
// now e->isValid() is false
return;
@@ -998,8 +998,8 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
}
kdDebug(7001) << "Removed " << (e->isDir ? "Dir ":"File ") << e->path
- << (sub_entry ? TQString(" for %1").arg(sub_entry->path) : TQString(""))
- << (instance ? TQString(" [%1]").arg(instance->name()) : TQString(""))
+ << (sub_entry ? TQString(TQString(" for %1").arg(sub_entry->path)) : TQString(""))
+ << (instance ? TQString(TQString(" [%1]").arg(instance->name())) : TQString(""))
<< endl;
m_mapEntries.remove( e->path ); // <e> not valid any more
}
@@ -1611,7 +1611,7 @@ KDirWatch::KDirWatch (TQObject* parent, const char* name)
static int nameCounter = 0;
nameCounter++;
- setName(TQString("KDirWatch-%1").arg(nameCounter).ascii());
+ setName(TQString(TQString("KDirWatch-%1").arg(nameCounter)).ascii());
}
if (!dwp_self)
diff --git a/kio/kio/kdirwatch.h b/kio/kio/kdirwatch.h
index 36f2737b3..e04b0ad1e 100644
--- a/kio/kio/kdirwatch.h
+++ b/kio/kio/kdirwatch.h
@@ -60,7 +60,7 @@ class KDirWatchPrivate;
* @short Class for watching directory and file changes.
* @author Sven Radej <sven@lisa.exp.univie.ac.at>
*/
-class KIO_EXPORT KDirWatch : public QObject
+class KIO_EXPORT KDirWatch : public TQObject
{
Q_OBJECT
diff --git a/kio/kio/kdirwatch_p.h b/kio/kio/kdirwatch_p.h
index 9920b866d..1c0ec8fe7 100644
--- a/kio/kio/kdirwatch_p.h
+++ b/kio/kio/kdirwatch_p.h
@@ -1,6 +1,6 @@
/* Private Header for class of KDirWatchPrivate
*
- * this separate header file is needed for MOC processing
+ * this separate header file is needed for TQMOC processing
* because KDirWatchPrivate has signals and slots
*/
@@ -18,7 +18,7 @@
/* KDirWatchPrivate is a singleton and does the watching
* for every KDirWatch instance in the application.
*/
-class KDirWatchPrivate : public QObject
+class KDirWatchPrivate : public TQObject
{
Q_OBJECT
public:
diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp
index 010832573..b15731f1c 100644
--- a/kio/kio/kfileitem.cpp
+++ b/kio/kio/kfileitem.cpp
@@ -973,12 +973,12 @@ void KFileItem::setExtraData( const void *key, void *value )
if ( !key )
return;
- m_extra.replace( key, value );
+ m_extra.tqreplace( key, value );
}
const void * KFileItem::extraData( const void *key ) const
{
- TQMapConstIterator<const void*,void*> it = m_extra.find( key );
+ TQMapConstIterator<const void*,void*> it = m_extra.tqfind( key );
if ( it != m_extra.end() )
return it.data();
return 0L;
@@ -986,7 +986,7 @@ const void * KFileItem::extraData( const void *key ) const
void * KFileItem::extraData( const void *key )
{
- TQMapIterator<const void*,void*> it = m_extra.find( key );
+ TQMapIterator<const void*,void*> it = m_extra.tqfind( key );
if ( it != m_extra.end() )
return it.data();
return 0L;
@@ -1041,7 +1041,7 @@ TQString KFileItem::parsePermissions(mode_t perm) const
if (hasExtendedACL())
p[10]='+';
- return TQString::fromLatin1(p);
+ return TQString::tqfromLatin1(p);
}
// check if we need to cache this
@@ -1098,7 +1098,7 @@ void KFileItem::virtual_hook( int, void* )
TQDataStream & operator<< ( TQDataStream & s, const KFileItem & a )
{
- // We don't need to save/restore anything that refresh() invalidates,
+ // We don't need to save/restore anything that refresh() tqinvalidates,
// since that means we can re-determine those by ourselves.
s << a.m_url;
s << a.m_strName;
diff --git a/kio/kio/kfilemetainfo.cpp b/kio/kio/kfilemetainfo.cpp
index fcab35f19..ee79e72a2 100644
--- a/kio/kio/kfilemetainfo.cpp
+++ b/kio/kio/kfilemetainfo.cpp
@@ -38,12 +38,12 @@
#include "kfilemetainfo.h"
// shared data of a KFileMetaInfoItem
-class KFileMetaInfoItem::Data : public QShared
+class KFileMetaInfoItem::Data : public TQShared
{
public:
Data( const KFileMimeTypeInfo::ItemInfo* mti, const TQString& _key,
const TQVariant& _value )
- : QShared(),
+ : TQShared(),
mimeTypeInfo( mti ),
key( _key ),
value( _value ),
@@ -270,11 +270,11 @@ void KFileMetaInfoItem::deref()
///////////////////////////////////////////////////////////////////
// shared data of a KFileMetaInfo
-class KFileMetaInfo::Data : public QShared
+class KFileMetaInfo::Data : public TQShared
{
public:
Data(const KURL& _url, uint _what)
- : QShared(),
+ : TQShared(),
url(_url),
what(_what),
mimeTypeInfo( 0L )
@@ -410,7 +410,7 @@ TQStringList KFileMetaInfo::preferredGroups() const
// move all keys from the preferred groups that are in our list to a new list
for ( pref = preferred.begin(); pref != preferred.end(); ++pref )
{
- TQStringList::Iterator group = list.find(*pref);
+ TQStringList::Iterator group = list.tqfind(*pref);
if ( group != list.end() )
{
newlist.append( *group );
@@ -440,7 +440,7 @@ TQStringList KFileMetaInfo::preferredKeys() const
KFileMetaInfoGroup KFileMetaInfo::group(const TQString& key) const
{
- TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.find( key );
+ TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.tqfind( key );
if ( it != d->groups.end() )
return it.data();
else
@@ -450,8 +450,8 @@ KFileMetaInfoGroup KFileMetaInfo::group(const TQString& key) const
bool KFileMetaInfo::addGroup( const TQString& name )
{
assert(isValid());
- if ( d->mimeTypeInfo->supportedGroups().contains(name) &&
- ! d->groups.contains(name) )
+ if ( d->mimeTypeInfo->supportedGroups().tqcontains(name) &&
+ ! d->groups.tqcontains(name) )
{
KFileMetaInfoGroup group( name, d->mimeTypeInfo );
@@ -486,7 +486,7 @@ bool KFileMetaInfo::addGroup( const TQString& name )
bool KFileMetaInfo::removeGroup( const TQString& name )
{
- TQMapIterator<TQString, KFileMetaInfoGroup> it = d->groups.find(name);
+ TQMapIterator<TQString, KFileMetaInfoGroup> it = d->groups.tqfind(name);
if ( (it==d->groups.end()) ||
!((*it).attributes() & KFileMimeTypeInfo::Removable))
return false;
@@ -608,7 +608,7 @@ bool KFileMetaInfo::contains(const TQString& key) const
bool KFileMetaInfo::containsGroup(const TQString& key) const
{
- return groups().contains(key);
+ return groups().tqcontains(key);
}
KFileMetaInfoItem KFileMetaInfo::item( const TQString& key) const
@@ -642,15 +642,15 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const TQString& key,
// try the preferred groups first
if ( !preferredGroup.isEmpty() ) {
TQMapIterator<TQString,KFileMetaInfoGroup> it =
- d->groups.find( preferredGroup );
+ d->groups.tqfind( preferredGroup );
// try to create the preferred group, if necessary
if ( it == d->groups.end() && createGroup ) {
const KFileMimeTypeInfo::GroupInfo *groupInfo =
d->mimeTypeInfo->groupInfo( preferredGroup );
- if ( groupInfo && groupInfo->supportedKeys().contains( key ) ) {
+ if ( groupInfo && groupInfo->supportedKeys().tqcontains( key ) ) {
if ( addGroup( preferredGroup ) )
- it = d->groups.find( preferredGroup );
+ it = d->groups.tqfind( preferredGroup );
}
}
@@ -668,7 +668,7 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const TQString& key,
TQStringList::ConstIterator groupIt = groups.begin();
for ( ; groupIt != groups.end(); ++groupIt )
{
- TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.find( *groupIt );
+ TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.tqfind( *groupIt );
if ( it != d->groups.end() )
{
KFileMetaInfoGroup group = it.data();
@@ -680,7 +680,7 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const TQString& key,
{
const KFileMimeTypeInfo::GroupInfo *groupInfo =
d->mimeTypeInfo->groupInfo( *groupIt );
- if ( groupInfo && groupInfo->supportedKeys().contains( key ) )
+ if ( groupInfo && groupInfo->supportedKeys().tqcontains( key ) )
{
if ( addGroup( *groupIt ) )
{
@@ -717,8 +717,8 @@ KFileMetaInfoItem KFileMetaInfo::findEditableItem( KFileMetaInfoGroup& group,
KFileMetaInfoGroup KFileMetaInfo::appendGroup(const TQString& name)
{
assert(isValid());
- if ( d->mimeTypeInfo->supportedGroups().contains(name) &&
- ! d->groups.contains(name) )
+ if ( d->mimeTypeInfo->supportedGroups().tqcontains(name) &&
+ ! d->groups.tqcontains(name) )
{
KFileMetaInfoGroup group( name, d->mimeTypeInfo );
d->groups.insert(name, group);
@@ -937,7 +937,7 @@ KFilePlugin* KFileMetaInfoProvider::loadPlugin( const TQString& mimeType, const
query = "(not exist [X-KDE-Protocol])";
queryMimeType = mimeType;
} else {
- query = TQString::fromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol);
+ query = TQString::tqfromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol);
// querying for a protocol: we have no mimetype, so we need to use KFilePlugin as one
queryMimeType = "KFilePlugin";
// hopefully using KFilePlugin as genericMimeType too isn't a problem
@@ -951,7 +951,7 @@ KFilePlugin* KFileMetaInfoProvider::loadPlugin( const TQString& mimeType, const
return 0;
KFilePlugin* plugin = KParts::ComponentFactory::createInstanceFromService<KFilePlugin>
- ( service, this, mimeType.local8Bit() );
+ ( service, TQT_TQOBJECT(this), mimeType.local8Bit() );
if (!plugin)
kdWarning(7033) << "error loading the plugin from " << service->desktopEntryPath() << endl;
@@ -986,7 +986,7 @@ KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const TQString& mimeT
first = false;
}
// Hopefully the above includes the mimetype we asked for!
- if ( m_pendingMimetypeInfos.find( mimeType ) == 0 )
+ if ( m_pendingMimetypeInfos.tqfind( mimeType ) == 0 )
kdWarning(7033) << plugin->className() << " was created for " << mimeType << " but doesn't call addMimeTypeInfo for it!" << endl;
}
m_pendingMimetypeInfos.clear();
@@ -1003,7 +1003,7 @@ KFilePlugin * KFileMetaInfoProvider::plugin(const TQString& mimeType, const TQSt
//kdDebug(7033) << "plugin() : looking for plugin for protocol=" << protocol << " mimeType=" << mimeType << endl;
if ( !protocol.isEmpty() ) {
- CachedPluginInfo *cache = m_plugins.find( protocol );
+ CachedPluginInfo *cache = m_plugins.tqfind( protocol );
if ( cache && cache->plugin ) {
return cache->plugin;
}
@@ -1014,7 +1014,7 @@ KFilePlugin * KFileMetaInfoProvider::plugin(const TQString& mimeType, const TQSt
}
}
- CachedPluginInfo *cache = m_plugins.find( mimeType );
+ CachedPluginInfo *cache = m_plugins.tqfind( mimeType );
if ( cache ) {
return cache->plugin;
}
@@ -1072,27 +1072,27 @@ const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const TQString& m
{
//kdDebug(7033) << "mimeTypeInfo() : looking for plugin for protocol=" << protocol << " mimeType=" << mimeType << endl;
if ( !protocol.isEmpty() ) {
- CachedPluginInfo *cache = m_plugins.find( protocol );
+ CachedPluginInfo *cache = m_plugins.tqfind( protocol );
if ( cache && cache->mimeTypeInfo ) {
return cache->mimeTypeInfo;
}
if ( !cache ) {
loadAndRegisterPlugin( TQString::null, protocol );
- cache = m_plugins.find( protocol );
+ cache = m_plugins.tqfind( protocol );
if ( cache && cache->mimeTypeInfo ) {
return cache->mimeTypeInfo;
}
}
}
- CachedPluginInfo *cache = m_plugins.find( mimeType );
+ CachedPluginInfo *cache = m_plugins.tqfind( mimeType );
if ( cache ) {
return cache->mimeTypeInfo;
}
loadAndRegisterPlugin( mimeType, TQString::null );
- cache = m_plugins.find( mimeType );
+ cache = m_plugins.tqfind( mimeType );
if ( cache ) {
return cache->mimeTypeInfo;
}
@@ -1103,7 +1103,7 @@ KFileMimeTypeInfo * KFileMetaInfoProvider::addMimeTypeInfo(
const TQString& mimeType )
{
- KFileMimeTypeInfo *info = m_pendingMimetypeInfos.find( mimeType );
+ KFileMimeTypeInfo *info = m_pendingMimetypeInfos.tqfind( mimeType );
Q_ASSERT( !info );
if ( !info )
{
@@ -1129,7 +1129,7 @@ TQStringList KFileMetaInfoProvider::supportedMimeTypes() const
const TQStringList mimeTypes = (*it)->serviceTypes();
TQStringList::ConstIterator it2 = mimeTypes.begin();
for ( ; it2 != mimeTypes.end(); ++it2 )
- if ( allMimeTypes.find( *it2 ) == allMimeTypes.end() &&
+ if ( allMimeTypes.tqfind( *it2 ) == allMimeTypes.end() &&
*it2 != kfilePlugin ) // also in serviceTypes()
allMimeTypes.append( *it2 );
}
@@ -1144,11 +1144,11 @@ TQStringList KFileMetaInfoProvider::supportedMimeTypes() const
// shared data of a KFileMetaInfoGroup
-class KFileMetaInfoGroup::Data : public QShared
+class KFileMetaInfoGroup::Data : public TQShared
{
public:
Data(const TQString& _name)
- : QShared(),
+ : TQShared(),
name(_name),
mimeTypeInfo(0L),
dirty( false ),
@@ -1235,7 +1235,7 @@ TQStringList KFileMetaInfoGroup::preferredKeys() const
// move all keys from the preferred keys that are in our list to a new list
for ( pref = begin; pref!=end; ++pref )
{
- TQStringList::Iterator item = list.find(*pref);
+ TQStringList::Iterator item = list.tqfind(*pref);
if ( item != list.end() )
{
newlist.append( *item );
@@ -1288,12 +1288,12 @@ bool KFileMetaInfoGroup::supportsVariableKeys() const
bool KFileMetaInfoGroup::contains( const TQString& key ) const
{
- return d->items.contains(key);
+ return d->items.tqcontains(key);
}
KFileMetaInfoItem KFileMetaInfoGroup::item( const TQString& key) const
{
- TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.find( key );
+ TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.tqfind( key );
if ( it != d->items.end() )
return it.data();
@@ -1356,7 +1356,7 @@ void KFileMetaInfoGroup::deref()
KFileMetaInfoItem KFileMetaInfoGroup::addItem( const TQString& key )
{
assert(isValid());
- TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.find( key );
+ TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.tqfind( key );
if ( it != d->items.end() )
return it.data();
@@ -1395,7 +1395,7 @@ bool KFileMetaInfoGroup::removeItem( const TQString& key )
return false;
}
- TQMapIterator<TQString, KFileMetaInfoItem> it = d->items.find(key);
+ TQMapIterator<TQString, KFileMetaInfoItem> it = d->items.tqfind(key);
if ( it==d->items.end() )
{
kdDebug(7033) << "trying to remove the non existant item " << key << "\n";
@@ -1482,7 +1482,7 @@ KFileMimeTypeInfo::~KFileMimeTypeInfo()
const KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::groupInfo( const TQString& group ) const
{
- return m_groups.find( group );
+ return m_groups.tqfind( group );
}
KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::addGroupInfo(
@@ -1523,7 +1523,7 @@ TQStringList KFileMimeTypeInfo::supportedKeys() const
for ( ; it.current(); ++it ) { // need to nuke dupes
TQStringList list = it.current()->supportedKeys();
for ( lit = list.begin(); lit != list.end(); ++lit ) {
- if ( keys.find( *lit ) == keys.end() )
+ if ( keys.tqfind( *lit ) == keys.end() )
keys.append( *lit );
}
}
@@ -1564,7 +1564,7 @@ KFileMimeTypeInfo::GroupInfo::~GroupInfo()
const KFileMimeTypeInfo::ItemInfo * KFileMimeTypeInfo::GroupInfo::itemInfo( const TQString& key ) const
{
- ItemInfo* item = m_itemDict.find( key );
+ ItemInfo* item = m_itemDict.tqfind( key );
// if we the item isn't found and variable keys are supported, we need to
// return the default variable key iteminfo.
diff --git a/kio/kio/kfilemetainfo.h b/kio/kio/kfilemetainfo.h
index d6a6e7e4c..1552ede9f 100644
--- a/kio/kio/kfilemetainfo.h
+++ b/kio/kio/kfilemetainfo.h
@@ -1391,7 +1391,7 @@ private:
* PreferredItems=Items,Size
* @endcode
**/
-class KIO_EXPORT KFilePlugin : public QObject
+class KIO_EXPORT KFilePlugin : public TQObject
{
Q_OBJECT
diff --git a/kio/kio/kfileshare.cpp b/kio/kio/kfileshare.cpp
index 1f6dca285..8fea509d7 100644
--- a/kio/kio/kfileshare.cpp
+++ b/kio/kio/kfileshare.cpp
@@ -90,7 +90,7 @@ void KFileShare::readConfig() // static
{
// Create KFileSharePrivate instance
KFileSharePrivate::self();
- KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
+ KSimpleConfig config(TQString::tqfromLatin1(FILESHARECONF),true);
s_sharingEnabled = config.readEntry("FILESHARING", "yes") == "yes";
s_restricted = config.readEntry("RESTRICT", "yes") == "yes";
@@ -105,7 +105,7 @@ void KFileShare::readConfig() // static
else {
// check if current user is in fileshare group
KUserGroup shareGroup(s_fileShareGroup);
- if (shareGroup.users().findIndex(KUser()) > -1 )
+ if (shareGroup.users().tqfindIndex(KUser()) > -1 )
s_authorization = Authorized;
else
s_authorization = UserNotAllowed;
@@ -221,9 +221,9 @@ int KFileShare::isDirectoryShared( const TQString& _path )
if ( path[path.length()-1] != '/' )
path += '/';
//return s_shareList && s_shareList->contains( path );
- if( (*s_shareMap).contains(path) && !((*s_shareMap)[path].isEmpty()) ) {
+ if( (*s_shareMap).tqcontains(path) && !((*s_shareMap)[path].isEmpty()) ) {
ret+=1;
- if( (*s_shareMap)[path].find("readwrite") != -1 )
+ if( (*s_shareMap)[path].tqfind("readwrite") != -1 )
ret+=2;
}
@@ -241,7 +241,7 @@ KFileShare::Authorization KFileShare::authorization()
TQString KFileShare::findExe( const char* exeName )
{
// /usr/sbin on Mandrake, $PATH allows flexibility for other distributions
- TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::fromLatin1(":/usr/sbin");
+ TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::tqfromLatin1(":/usr/sbin");
TQString exe = KStandardDirs::findExe( exeName, path );
if (exe.isEmpty())
kdError() << exeName << " not found in " << path << endl;
diff --git a/kio/kio/kfileshare.h b/kio/kio/kfileshare.h
index 6fddebd65..a7158bf71 100644
--- a/kio/kio/kfileshare.h
+++ b/kio/kio/kfileshare.h
@@ -29,7 +29,7 @@ class KDirWatch;
* @internal
* Do not use, ever.
*/
-class KFileSharePrivate : public QObject
+class KFileSharePrivate : public TQObject
{
Q_OBJECT
diff --git a/kio/kio/kfilterdev.cpp b/kio/kio/kfilterdev.cpp
index 224d68761..187b16654 100644
--- a/kio/kio/kfilterdev.cpp
+++ b/kio/kio/kfilterdev.cpp
@@ -70,9 +70,9 @@ TQIODevice* KFilterDev::createFilterDevice(KFilterBase* base, TQFile* file)
//we don't need a filter
if (base==0)
- return new TQFile(file->name()); // A bit strange IMHO. We ask for a TQFile but we create another one !?! (DF)
+ return TQT_TQIODEVICE(new TQFile(file->name())); // A bit strange IMHO. We ask for a TQFile but we create another one !?! (DF)
- base->setDevice(file);
+ base->setDevice(TQT_TQIODEVICE(file));
return new KFilterDev(base);
}
#endif
@@ -86,11 +86,11 @@ TQIODevice * KFilterDev::deviceForFile( const TQString & fileName, const TQStrin
: KFilterBase::findFilterByMimeType( mimetype );
if ( base )
{
- base->setDevice(f, true);
+ base->setDevice(TQT_TQIODEVICE(f), true);
return new KFilterDev(base, true);
}
if(!forceFilter)
- return f;
+ return TQT_TQIODEVICE(f);
else
{
delete f;
@@ -132,7 +132,7 @@ bool KFilterDev::open( int mode )
d->bNeedHeader = !d->bSkipHeaders;
filter->init( mode );
d->bOpenedUnderlyingDevice = !filter->device()->isOpen();
- bool ret = d->bOpenedUnderlyingDevice ? filter->device()->open( mode ) : true;
+ bool ret = d->bOpenedUnderlyingDevice ? filter->device()->open( (TQIODevice_OpenModeFlag)mode ) : true;
d->result = KFilterBase::OK;
if ( !ret )
@@ -142,7 +142,7 @@ bool KFilterDev::open( int mode )
setState( IO_Open );
setMode( mode );
}
- ioIndex = 0;
+ TQIODevice::at(0);
return ret;
}
@@ -169,7 +169,11 @@ void KFilterDev::flush()
// Hmm, might not be enough...
}
+#ifdef USE_QT4
+qint64 KFilterDev::size() const
+#else // USE_QT4
TQIODevice::Offset KFilterDev::size() const
+#endif // USE_QT4
{
// Well, hmm, Houston, we have a problem.
// We can't know the size of the uncompressed data
@@ -184,21 +188,21 @@ TQIODevice::Offset KFilterDev::size() const
TQIODevice::Offset KFilterDev::at() const
{
- return ioIndex;
+ return TQIODevice::at();
}
bool KFilterDev::at( TQIODevice::Offset pos )
{
- //kdDebug(7005) << "KFilterDev::at " << pos << " currently at " << ioIndex << endl;
+ //kdDebug(7005) << "KFilterDev::at " << pos << " currently at " << TQIODevice::at() << endl;
- if ( ioIndex == pos )
+ if ( TQIODevice::at() == pos )
return true;
Q_ASSERT ( filter->mode() == IO_ReadOnly );
if ( pos == 0 )
{
- ioIndex = 0;
+ TQIODevice::at(0);
// We can forget about the cached data
d->ungetchBuffer.resize(0);
d->bNeedHeader = !d->bSkipHeaders;
@@ -208,8 +212,8 @@ bool KFilterDev::at( TQIODevice::Offset pos )
return filter->device()->reset();
}
- if ( ioIndex < pos ) // we can start from here
- pos = pos - ioIndex;
+ if ( TQIODevice::at() < pos ) // we can start from here
+ pos = pos - TQIODevice::at();
else
{
// we have to start from 0 ! Ugly and slow, but better than the previous
@@ -219,7 +223,7 @@ bool KFilterDev::at( TQIODevice::Offset pos )
}
//kdDebug(7005) << "KFilterDev::at : reading " << pos << " dummy bytes" << endl;
- TQByteArray dummy( QMIN( pos, 3*BUFFER_SIZE ) );
+ TQByteArray dummy( TQMIN( pos, 3*BUFFER_SIZE ) );
d->bIgnoreData = true;
bool result = ( (TQIODevice::Offset)readBlock( dummy.data(), pos ) == pos );
d->bIgnoreData = false;
@@ -232,7 +236,7 @@ bool KFilterDev::atEnd() const
&& d->ungetchBuffer.isEmpty();
}
-Q_LONG KFilterDev::readBlock( char *data, Q_ULONG maxlen )
+TQ_LONG KFilterDev::readBlock( char *data, TQ_ULONG maxlen )
{
Q_ASSERT ( filter->mode() == IO_ReadOnly );
//kdDebug(7005) << "KFilterDev::readBlock maxlen=" << maxlen << endl;
@@ -252,10 +256,10 @@ Q_LONG KFilterDev::readBlock( char *data, Q_ULONG maxlen )
}
else
{
- dataReceived = QMIN( len, maxlen );
+ dataReceived = TQMIN( len, maxlen );
}
d->ungetchBuffer.truncate( len - dataReceived );
- ioIndex += dataReceived;
+ TQIODevice::at(TQIODevice::at() + dataReceived);
}
// If we came to the end of the stream
@@ -268,17 +272,17 @@ Q_LONG KFilterDev::readBlock( char *data, Q_ULONG maxlen )
return -1;
- Q_ULONG outBufferSize;
+ TQ_ULONG outBufferSize;
if ( d->bIgnoreData )
{
- outBufferSize = QMIN( maxlen, 3*BUFFER_SIZE );
+ outBufferSize = TQMIN( maxlen, 3*BUFFER_SIZE );
}
else
{
outBufferSize = maxlen;
}
outBufferSize -= dataReceived;
- Q_ULONG availOut = outBufferSize;
+ TQ_ULONG availOut = outBufferSize;
filter->setOutBuffer( data, outBufferSize );
bool decompressedAll = false;
@@ -335,7 +339,7 @@ Q_LONG KFilterDev::readBlock( char *data, Q_ULONG maxlen )
{
availOut = maxlen - dataReceived;
}
- ioIndex += outReceived;
+ TQIODevice::at(TQIODevice::at() + outReceived);
if (d->result == KFilterBase::END)
{
//kdDebug(7005) << "KFilterDev::readBlock got END. dataReceived=" << dataReceived << endl;
@@ -351,7 +355,7 @@ Q_LONG KFilterDev::readBlock( char *data, Q_ULONG maxlen )
return dataReceived;
}
-Q_LONG KFilterDev::writeBlock( const char *data /*0 to finish*/, Q_ULONG len )
+TQ_LONG KFilterDev::writeBlock( const char *data /*0 to finish*/, TQ_ULONG len )
{
Q_ASSERT ( filter->mode() == IO_WriteOnly );
// If we had an error, return 0.
@@ -394,7 +398,7 @@ Q_LONG KFilterDev::writeBlock( const char *data /*0 to finish*/, Q_ULONG len )
// Move on in the input buffer
data += wrote;
dataWritten += wrote;
- ioIndex += wrote;
+ TQIODevice::at(TQIODevice::at() + wrote);
availIn = len - dataWritten;
//kdDebug(7005) << " KFilterDev::writeBlock availIn=" << availIn << " dataWritten=" << dataWritten << " ioIndex=" << ioIndex << endl;
@@ -439,7 +443,7 @@ int KFilterDev::getch()
int len = d->ungetchBuffer.length();
int ch = d->ungetchBuffer[ len-1 ];
d->ungetchBuffer.truncate( len - 1 );
- ioIndex++;
+ TQIODevice::at(TQIODevice::at() + 1);
//kdDebug(7005) << "KFilterDev::getch from ungetch: " << TQString(TQChar(ch)) << endl;
return ch;
}
@@ -465,7 +469,7 @@ int KFilterDev::ungetch( int ch )
// pipe or similar => we cannot ungetch, so do it manually
d->ungetchBuffer +=ch;
- ioIndex--;
+ TQIODevice::at(TQIODevice::at() - 1);
return ch;
}
diff --git a/kio/kio/kfilterdev.h b/kio/kio/kfilterdev.h
index d36229859..7d8fe5288 100644
--- a/kio/kio/kfilterdev.h
+++ b/kio/kio/kfilterdev.h
@@ -33,7 +33,7 @@ class KFilterBase;
*
* @author David Faure <faure@kde.org>
*/
-class KIO_EXPORT KFilterDev : public QIODevice
+class KIO_EXPORT KFilterDev : public TQIODevice
{
public:
/**
@@ -77,7 +77,11 @@ public:
void setSkipHeaders();
// Not implemented
+#ifdef USE_QT4
+ virtual qint64 size() const;
+#else // USE_QT4
virtual TQIODevice::Offset size() const;
+#endif // USE_QT4
virtual TQIODevice::Offset at() const;
/**
@@ -87,8 +91,8 @@ public:
virtual bool atEnd() const;
- virtual Q_LONG readBlock( char *data, Q_ULONG maxlen );
- virtual Q_LONG writeBlock( const char *data, Q_ULONG len );
+ virtual TQ_LONG readBlock( char *data, TQ_ULONG maxlen );
+ virtual TQ_LONG writeBlock( const char *data, TQ_ULONG len );
//int readLine( char *data, uint maxlen );
virtual int getch();
diff --git a/kio/kio/kimageio.cpp b/kio/kio/kimageio.cpp
index 8d4a45db4..87bbf6879 100644
--- a/kio/kio/kimageio.cpp
+++ b/kio/kio/kimageio.cpp
@@ -68,7 +68,7 @@ KImageIOFormat::~KImageIOFormat()
void
KImageIOFormat::load( TQDataStream& _str)
{
- Q_INT8 iRead, iWrite;
+ TQ_INT8 iRead, iWrite;
KSycocaEntry::read(_str, mType);
KSycocaEntry::read(_str, mHeader);
KSycocaEntry::read(_str, mFlags);
@@ -86,8 +86,8 @@ void
KImageIOFormat::save( TQDataStream& _str)
{
KSycocaEntry::save( _str );
- Q_INT8 iRead = bRead ? 1 : 0;
- Q_INT8 iWrite = bWrite ? 1 : 0;
+ TQ_INT8 iRead = bRead ? 1 : 0;
+ TQ_INT8 iWrite = bWrite ? 1 : 0;
_str << mType << mHeader << mFlags << iRead << iWrite
<< mSuffices << mMimetype << mLib << mPattern << rPaths;
@@ -100,18 +100,18 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio)
{
if (mLib.isEmpty())
{
- iio->setStatus(1); // Error
+ iio->setqStatus(1); // Error
return;
}
TQString libpath = KLibLoader::findLibrary(mLib.ascii());
if ( libpath.isEmpty())
{
- iio->setStatus(1); // Error
+ iio->setqStatus(1); // Error
return;
}
lt_dlhandle libhandle = lt_dlopen( TQFile::encodeName(libpath) );
if (libhandle == 0) {
- iio->setStatus(1); // error
+ iio->setqStatus(1); // error
kdWarning() << "KImageIOFormat::callLibFunc: couldn't dlopen " << mLib << "(" << lt_dlerror() << ")" << endl;
return;
}
@@ -123,7 +123,7 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio)
lt_ptr func = lt_dlsym(libhandle, funcName.ascii());
if (func == NULL) {
- iio->setStatus(1); // error
+ iio->setqStatus(1); // error
kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl;
}
mReadFunc = (void (*)(TQImageIO *))func;
@@ -134,7 +134,7 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio)
lt_ptr func = lt_dlsym(libhandle, funcName.ascii());
if (func == NULL) {
- iio->setStatus(1); // error
+ iio->setqStatus(1); // error
kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl;
}
mWriteFunc = (void (*)(TQImageIO *))func;
@@ -145,12 +145,12 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio)
if (mReadFunc)
mReadFunc(iio);
else
- iio->setStatus(1); // Error
+ iio->setqStatus(1); // Error
else
if (mWriteFunc)
mWriteFunc(iio);
else
- iio->setStatus(1); // Error
+ iio->setqStatus(1); // Error
}
@@ -193,7 +193,7 @@ KImageIOFactory::KImageIOFactory() : KSycocaFactory( KST_KImageIO )
}
}
-QString
+TQString
KImageIOFactory::createPattern( KImageIO::Mode _mode)
{
TQStringList patterns;
@@ -232,7 +232,7 @@ KImageIOFactory::createPattern( KImageIO::Mode _mode)
patterns.sort();
patterns.prepend(allPatterns);
- TQString pattern = patterns.join(TQString::fromLatin1("\n"));
+ TQString pattern = patterns.join(TQString::tqfromLatin1("\n"));
return pattern;
}
@@ -256,7 +256,7 @@ KImageIOFactory::readImage( TQImageIO *iio)
}
if (!format || !format->bRead)
{
- iio->setStatus(1); // error
+ iio->setqStatus(1); // error
return;
}
@@ -283,7 +283,7 @@ KImageIOFactory::writeImage( TQImageIO *iio)
}
if (!format || !format->bWrite)
{
- iio->setStatus(1); // error
+ iio->setqStatus(1); // error
return;
}
@@ -380,7 +380,7 @@ void KImageIO::registerFormats()
(void) KImageIOFactory::self();
}
-QString
+TQString
KImageIO::pattern(Mode _mode)
{
if (_mode == Reading)
@@ -489,7 +489,7 @@ TQString KImageIO::type(const TQString& filename)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
TQString suffix = filename;
- int dot = suffix.findRev('.');
+ int dot = suffix.tqfindRev('.');
if (dot >= 0)
suffix = suffix.mid(dot + 1);
@@ -500,7 +500,7 @@ TQString KImageIO::type(const TQString& filename)
++it )
{
KImageIOFormat *format = (*it);
- if (format->mSuffices.contains(suffix))
+ if (format->mSuffices.tqcontains(suffix))
return format->mType;
}
}
diff --git a/kio/kio/klimitediodevice.h b/kio/kio/klimitediodevice.h
index 035a3cd15..1b82e2e49 100644
--- a/kio/kio/klimitediodevice.h
+++ b/kio/kio/klimitediodevice.h
@@ -28,7 +28,7 @@
* @author David Faure <david@mandrakesoft.com>
* @since 3.1
*/
-class KIO_EXPORT KLimitedIODevice : public QIODevice
+class KIO_EXPORT KLimitedIODevice : public TQIODevice
{
public:
/**
@@ -67,14 +67,18 @@ public:
virtual void close() {}
virtual void flush() {}
+#ifdef USE_QT4
+ virtual qint64 size() const { return m_length; }
+#else // USE_QT4
virtual Offset size() const { return m_length; }
+#endif // USE_QT4
- virtual Q_LONG readBlock ( char * data, Q_ULONG maxlen )
+ virtual TQ_LONG readBlock ( char * data, TQ_ULONG maxlen )
{
maxlen = QMIN( maxlen, m_length - at() ); // Apply upper limit
return m_dev->readBlock( data, maxlen );
}
- virtual Q_LONG writeBlock ( const char *, Q_ULONG ) { return -1; } // unsupported
+ virtual TQ_LONG writeBlock ( const char *, TQ_ULONG ) { return -1; } // unsupported
virtual int putch( int ) { return -1; } // unsupported
virtual int getch() {
@@ -94,8 +98,8 @@ public:
virtual bool atEnd() const { return m_dev->atEnd() || m_dev->at() >= m_start + m_length; }
private:
TQIODevice* m_dev;
- Q_ULONG m_start;
- Q_ULONG m_length;
+ TQ_ULONG m_start;
+ TQ_ULONG m_length;
};
#endif
diff --git a/kio/kio/kmimemagic.cpp b/kio/kio/kmimemagic.cpp
index 72b249249..f59ee9d10 100644
--- a/kio/kio/kmimemagic.cpp
+++ b/kio/kio/kmimemagic.cpp
@@ -525,7 +525,7 @@ class KMimeMagicUtimeConf
public:
KMimeMagicUtimeConf()
{
- tmpDirs << TQString::fromLatin1("/tmp"); // default value
+ tmpDirs << TQString::tqfromLatin1("/tmp"); // default value
// The trick is that we also don't want the user to override globally set
// directories. So we have to misuse KStandardDirs :}
@@ -565,8 +565,8 @@ public:
bool restoreAccessTime( const TQString & file ) const
{
- TQString dir = file.left( file.findRev( '/' ) );
- bool res = tmpDirs.contains( dir );
+ TQString dir = file.left( file.tqfindRev( '/' ) );
+ bool res = tmpDirs.tqcontains( dir );
//kdDebug(7018) << "restoreAccessTime " << file << " dir=" << dir << " result=" << res << endl;
return res;
}
@@ -2270,7 +2270,7 @@ refineResult(KMimeMagicResult *r, const TQString & _filename)
else
if ( tmp == "application/x-sharedlib" )
{
- if ( _filename.find( ".so" ) == -1 )
+ if ( _filename.tqfind( ".so" ) == -1 )
{
tmp = "application/x-executable";
r->setMimeType( tmp );
diff --git a/kio/kio/kmimetype.cpp b/kio/kio/kmimetype.cpp
index a698e7495..ab65c4c24 100644
--- a/kio/kio/kmimetype.cpp
+++ b/kio/kio/kmimetype.cpp
@@ -265,7 +265,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
{
// Assume inode/directory, if the protocol supports listing.
if ( KProtocolInfo::supportsListing( _url ) )
- return mimeType( TQString::fromLatin1("inode/directory") );
+ return mimeType( TQString::tqfromLatin1("inode/directory") );
else
return defaultMimeTypePtr(); // == 'no idea', e.g. for "data:,foo/"
}
@@ -382,15 +382,15 @@ void KMimeType::init( KDesktopFile * config )
m_lstPatterns = config->readListEntry( "Patterns", ';' );
// Read the X-KDE-AutoEmbed setting and store it in the properties map
- TQString XKDEAutoEmbed = TQString::fromLatin1("X-KDE-AutoEmbed");
+ TQString XKDEAutoEmbed = TQString::tqfromLatin1("X-KDE-AutoEmbed");
if ( config->hasKey( XKDEAutoEmbed ) )
m_mapProps.insert( XKDEAutoEmbed, TQVariant( config->readBoolEntry( XKDEAutoEmbed ), 0 ) );
- TQString XKDEText = TQString::fromLatin1("X-KDE-text");
+ TQString XKDEText = TQString::tqfromLatin1("X-KDE-text");
if ( config->hasKey( XKDEText ) )
m_mapProps.insert( XKDEText, config->readBoolEntry( XKDEText ) );
- TQString XKDEIsAlso = TQString::fromLatin1("X-KDE-IsAlso");
+ TQString XKDEIsAlso = TQString::tqfromLatin1("X-KDE-IsAlso");
if ( config->hasKey( XKDEIsAlso ) ) {
TQString inherits = config->readEntry( XKDEIsAlso );
if ( inherits != name() )
@@ -399,7 +399,7 @@ void KMimeType::init( KDesktopFile * config )
kdWarning(7009) << "Error: " << inherits << " inherits from itself!!!!" << endl;
}
- TQString XKDEPatternsAccuracy = TQString::fromLatin1("X-KDE-PatternsAccuracy");
+ TQString XKDEPatternsAccuracy = TQString::tqfromLatin1("X-KDE-PatternsAccuracy");
if ( config->hasKey( XKDEPatternsAccuracy ) )
m_mapProps.insert( XKDEPatternsAccuracy, config->readEntry( XKDEPatternsAccuracy ) );
@@ -632,9 +632,9 @@ TQString KFolderType::icon( const KURL& _url, bool _is_local ) const
entries.append( ep->d_name );
if ( readdir( dp ) == 0 ) { // only three
// check if we got "." ".." and ".directory"
- isempty = entries.find( "." ) != entries.end() &&
- entries.find( ".." ) != entries.end() &&
- entries.find( ".directory" ) != entries.end();
+ isempty = entries.tqfind( "." ) != entries.end() &&
+ entries.tqfind( ".." ) != entries.end() &&
+ entries.tqfind( ".directory" ) != entries.end();
}
}
if (!isempty && !strcmp(ep->d_name, ".directory"))
@@ -838,7 +838,7 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf
KURL mpURL;
mpURL.setPath( mp );
// Open a new window
- retval = KRun::runURL( mpURL, TQString::fromLatin1("inode/directory") );
+ retval = KRun::runURL( mpURL, TQString::tqfromLatin1("inode/directory") );
}
else
{
@@ -995,15 +995,15 @@ TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices
if( cfg.hasKey( "X-KDE-GetActionMenu" )) {
TQString dcopcall = cfg.readEntry( "X-KDE-GetActionMenu" );
- const TQCString app = dcopcall.section(' ', 0,0).utf8();
+ const TQCString app = TQString(dcopcall.section(' ', 0,0)).utf8();
TQByteArray dataToSend;
TQDataStream dataStream(dataToSend, IO_WriteOnly);
dataStream << file_list;
TQCString replyType;
TQByteArray replyData;
- TQCString object = dcopcall.section(' ', 1,-2).utf8();
- TQString function = dcopcall.section(' ', -1);
+ TQCString object = TQString(dcopcall.section(' ', 1,-2)).utf8();
+ TQString function = dcopcall.section(' ', -1);
if(!function.endsWith("(KURL::List)")) {
kdWarning() << "Desktop file " << path << " contains an invalid X-KDE-ShowIfDcopCall - the function must take the exact parameter (KURL::List) and must be specified." << endl;
} else {
diff --git a/kio/kio/kmimetypechooser.cpp b/kio/kio/kmimetypechooser.cpp
index d8ceb930b..7f041b722 100644
--- a/kio/kio/kmimetypechooser.cpp
+++ b/kio/kio/kmimetypechooser.cpp
@@ -134,15 +134,15 @@ void KMimeTypeChooser::loadMimeTypes( const TQStringList &_selectedMimeTypes )
for (; it != mimetypes.end(); ++it)
{
TQString mimetype = (*it)->name();
- int index = mimetype.find("/");
+ int index = mimetype.tqfind("/");
TQString maj = mimetype.left(index);
- if ( d->groups.count() && !d->groups.contains( maj ) )
+ if ( d->groups.count() && !d->groups.tqcontains( maj ) )
continue;
TQString min = mimetype.right(mimetype.length() - (index+1));
- TQMapIterator<TQString,TQListViewItem*> mit = groups.find( maj );
+ TQMapIterator<TQString,TQListViewItem*> mit = groups.tqfind( maj );
if ( mit == groups.end() )
{
groupItem = new TQListViewItem( d->lvMimeTypes, maj );
@@ -167,7 +167,7 @@ void KMimeTypeChooser::loadMimeTypes( const TQStringList &_selectedMimeTypes )
if ( d->visuals & Patterns )
item->setText( cl, (*it)->patterns().join("; ") );
- if ( selMimeTypes.contains(mimetype) )
+ if ( selMimeTypes.tqcontains(mimetype) )
{
item->setOn( true );
groupItem->setOpen( true );
@@ -189,15 +189,15 @@ void KMimeTypeChooser::loadMimeTypes( const TQStringList &_selectedMimeTypes )
void KMimeTypeChooser::editMimeType()
{
- if ( !(d->lvMimeTypes->currentItem() && (d->lvMimeTypes->currentItem())->parent()) )
+ if ( !(d->lvMimeTypes->currentItem() && (d->lvMimeTypes->currentItem())->tqparent()) )
return;
- TQString mt = (d->lvMimeTypes->currentItem()->parent())->text( 0 ) + "/" + (d->lvMimeTypes->currentItem())->text( 0 );
+ TQString mt = (d->lvMimeTypes->currentItem()->tqparent())->text( 0 ) + "/" + (d->lvMimeTypes->currentItem())->text( 0 );
// thanks to libkonq/konq_operations.cc
connect( KSycoca::self(), TQT_SIGNAL(databaseChanged()),
this, TQT_SLOT(slotSycocaDatabaseChanged()) );
- TQString keditfiletype = TQString::fromLatin1("keditfiletype");
+ TQString keditfiletype = TQString::tqfromLatin1("keditfiletype");
KRun::runCommand( keditfiletype
- + " --parent " + TQString::number( (ulong)topLevelWidget()->winId())
+ + " --parent " + TQString::number( (ulong)tqtopLevelWidget()->winId())
+ " " + KProcess::quote(mt),
keditfiletype, keditfiletype /*unused*/);
}
@@ -205,7 +205,7 @@ void KMimeTypeChooser::editMimeType()
void KMimeTypeChooser::slotCurrentChanged(TQListViewItem* i)
{
if ( d->btnEditMimeType )
- d->btnEditMimeType->setEnabled( i->parent() );
+ d->btnEditMimeType->setEnabled( i->tqparent() );
}
void KMimeTypeChooser::slotSycocaDatabaseChanged()
@@ -220,8 +220,8 @@ TQStringList KMimeTypeChooser::mimeTypes() const
TQListViewItemIterator it( d->lvMimeTypes );
for (; it.current(); ++it)
{
- if ( it.current()->parent() && ((TQCheckListItem*)it.current())->isOn() )
- l << it.current()->parent()->text(0) + "/" + it.current()->text(0); // FIXME uncecked, should be Ok unless someone changes mimetypes during this!
+ if ( it.current()->tqparent() && ((TQCheckListItem*)it.current())->isOn() )
+ l << it.current()->tqparent()->text(0) + "/" + it.current()->text(0); // FIXME uncecked, should be Ok unless someone changes mimetypes during this!
}
return l;
}
@@ -234,9 +234,9 @@ TQStringList KMimeTypeChooser::patterns() const
TQListViewItemIterator it( d->lvMimeTypes );
for (; it.current(); ++it)
{
- if ( it.current()->parent() && ((TQCheckListItem*)it.current())->isOn() )
+ if ( it.current()->tqparent() && ((TQCheckListItem*)it.current())->isOn() )
{
- p = KMimeType::mimeType( it.current()->parent()->text(0) + "/" + it.current()->text(0) );
+ p = KMimeType::mimeType( it.current()->tqparent()->text(0) + "/" + it.current()->text(0) );
if ( p->name() != defMT )
l += p->patterns();
}
diff --git a/kio/kio/kmimetypechooser.h b/kio/kio/kmimetypechooser.h
index 0827d5b30..355eeb707 100644
--- a/kio/kio/kmimetypechooser.h
+++ b/kio/kio/kmimetypechooser.h
@@ -31,7 +31,7 @@
*
* @author Anders Lund (anders at alweb dk), jan 23, 2002
*/
-class KIO_EXPORT KMimeTypeChooser : public QVBox
+class KIO_EXPORT KMimeTypeChooser : public TQVBox
{
Q_OBJECT
diff --git a/kio/kio/kmimetyperesolver.h b/kio/kio/kmimetyperesolver.h
index 4ac6347f2..fdbbb1e5b 100644
--- a/kio/kio/kmimetyperesolver.h
+++ b/kio/kio/kmimetyperesolver.h
@@ -46,7 +46,7 @@ protected:
* itself. So an object of this class is used to handle signals, slots etc.
* and forwards them to the KMimeTypeResolver instance.
*/
-class KIO_EXPORT KMimeTypeResolverHelper : public QObject
+class KIO_EXPORT KMimeTypeResolverHelper : public TQObject
{
Q_OBJECT
diff --git a/kio/kio/knfsshare.cpp b/kio/kio/knfsshare.cpp
index f0fdfce6d..faf7448ee 100644
--- a/kio/kio/knfsshare.cpp
+++ b/kio/kio/knfsshare.cpp
@@ -123,7 +123,7 @@ bool KNFSSharePrivate::readExportsFile() {
// Handle quotation marks
if ( completeLine[0] == '"' ) {
- int i = completeLine.find('"',1);
+ int i = completeLine.tqfind('"',1);
if (i == -1) {
kdError() << "KNFSShare: Parse error: Missing quotation mark: " << completeLine << endl;
continue;
@@ -131,9 +131,9 @@ bool KNFSSharePrivate::readExportsFile() {
path = completeLine.mid(1,i-1);
} else { // no quotation marks
- int i = completeLine.find(' ');
+ int i = completeLine.tqfind(' ');
if (i == -1)
- i = completeLine.find('\t');
+ i = completeLine.tqfind('\t');
if (i == -1)
path = completeLine;
@@ -180,7 +180,7 @@ bool KNFSShare::isDirectoryShared( const TQString & path ) const {
if ( path[path.length()-1] != '/' )
fixedPath += '/';
- return d->sharedPaths.find(fixedPath) != 0;
+ return d->sharedPaths.tqfind(fixedPath) != 0;
}
TQStringList KNFSShare::sharedDirectories() const {
diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp
index 8fb8b3227..8b333da07 100644
--- a/kio/kio/kprotocolmanager.cpp
+++ b/kio/kio/kprotocolmanager.cpp
@@ -267,7 +267,7 @@ TQString KProtocolManager::proxyForURL( const KURL &url )
}
break;
case EnvVarProxy:
- proxy = TQString::fromLocal8Bit(getenv(proxyFor(url.protocol()).local8Bit())).stripWhiteSpace();
+ proxy = TQString(TQString::fromLocal8Bit(getenv(proxyFor(url.protocol()).local8Bit()))).stripWhiteSpace();
break;
case ManualProxy:
proxy = proxyFor( url.protocol() );
@@ -277,7 +277,7 @@ TQString KProtocolManager::proxyForURL( const KURL &url )
break;
}
- return (proxy.isEmpty() ? TQString::fromLatin1("DIRECT") : proxy);
+ return (proxy.isEmpty() ? TQString::tqfromLatin1("DIRECT") : proxy);
}
void KProtocolManager::badProxy( const TQString &proxy )
@@ -462,7 +462,7 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers )
if( modifiers.contains('p') )
{
// TODO: determine this value instead of hardcoding it...
- supp += TQString::fromLatin1("; X11");
+ supp += TQString::tqfromLatin1("; X11");
}
if( modifiers.contains('m') )
{
@@ -471,13 +471,13 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers )
if( modifiers.contains('l') )
{
TQStringList languageList = KGlobal::locale()->languageList();
- TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") );
+ TQStringList::Iterator it = languageList.tqfind( TQString::tqfromLatin1("C") );
if( it != languageList.end() )
{
- if( languageList.contains( TQString::fromLatin1("en") ) > 0 )
+ if( languageList.tqcontains( TQString::tqfromLatin1("en") ) > 0 )
languageList.remove( it );
else
- (*it) = TQString::fromLatin1("en");
+ (*it) = TQString::tqfromLatin1("en");
}
if( languageList.count() )
supp += TQString("; %1").arg(languageList.join(", "));
diff --git a/kio/kio/kremoteencoding.cpp b/kio/kio/kremoteencoding.cpp
index 632eeb8b2..23fd0563d 100644
--- a/kio/kio/kremoteencoding.cpp
+++ b/kio/kio/kremoteencoding.cpp
@@ -37,13 +37,13 @@ TQString KRemoteEncoding::decode(const TQCString& name) const
{
#ifdef CHECK_UTF8
if (codec->mibEnum() == 106 && !KStringHandler::isUtf8(name))
- return TQString::fromLatin1(name);
+ return TQString::tqfromLatin1(name);
#endif
TQString result = codec->toUnicode(name);
if (codec->fromUnicode(result) != name)
// fallback in case of decoding failure
- return TQString::fromLatin1(name);
+ return TQString::tqfromLatin1(name);
return result;
}
diff --git a/kio/kio/krun.cpp b/kio/kio/krun.cpp
index 9e51a2938..a8304427c 100644
--- a/kio/kio/krun.cpp
+++ b/kio/kio/krun.cpp
@@ -386,15 +386,15 @@ TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List
/// compatibility hack -- KDE 4: remove
TQRegExp re("^\\s*(?:/bin/)?sh\\s+-c\\s+(.*)$");
if (!re.search( exec )) {
- exec = re.cap( 1 ).stripWhiteSpace();
+ exec = TQString(re.cap( 1 )).stripWhiteSpace();
for (uint pos = 0; pos < exec.length(); ) {
- TQChar c = exec.unicode()[pos];
+ TQChar c = exec.tqunicode()[pos];
if (c != '\'' && c != '"')
goto synerr; // what else can we do? after normal parsing the substs would be insecure
- int pos2 = exec.find( c, pos + 1 ) - 1;
+ int pos2 = exec.tqfind( c, pos + 1 ) - 1;
if (pos2 < 0)
goto synerr; // quoting error
- memcpy( (void *)(exec.unicode() + pos), exec.unicode() + pos + 1, (pos2 - pos) * sizeof(TQChar));
+ memcpy( (void *)(exec.tqunicode() + pos), exec.tqunicode() + pos + 1, (pos2 - pos) * sizeof(TQChar));
pos = pos2;
exec.remove( pos, 2 );
}
@@ -545,8 +545,8 @@ TQString KRun::binaryName( const TQString & execLine, bool removePath )
for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it)
if (!(*it).contains('='))
// Remove path if wanted
- return removePath ? (*it).mid((*it).findRev('/') + 1) : *it;
- return TQString::null;
+ return removePath ? (*it).mid(TQString(*it).tqfindRev('/') + 1) : *it;
+ return TQString();
}
static pid_t runCommandInternal( KProcess* proc, const KService* service, const TQString& binName,
@@ -708,7 +708,7 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service
{
// compat mode: assume KIO if not set and it's a KDE app
TQStringList categories = _service.property("Categories").toStringList();
- if ( categories.find("KDE") != categories.end() )
+ if ( categories.tqfind("KDE") != categories.end() )
supportedProtocols.append( "KIO" );
else { // if no KDE app, be a bit over-generic
supportedProtocols.append( "http");
@@ -719,10 +719,10 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service
kdDebug(7010) << "supportedProtocols:" << supportedProtocols << endl;
KURL::List urls( _urls );
- if ( supportedProtocols.find( "KIO" ) == supportedProtocols.end() ) {
+ if ( supportedProtocols.tqfind( "KIO" ) == supportedProtocols.end() ) {
for( KURL::List::Iterator it = urls.begin(); it != urls.end(); ++it ) {
const KURL url = *it;
- bool supported = url.isLocalFile() || supportedProtocols.find( url.protocol().lower() ) != supportedProtocols.end();
+ bool supported = url.isLocalFile() || supportedProtocols.tqfind( url.protocol().lower() ) != supportedProtocols.end();
kdDebug(7010) << "Looking at url=" << url << " supported=" << supported << endl;
if ( !supported && KProtocolInfo::protocolClass(url.protocol()) == ":local" )
{
@@ -861,7 +861,7 @@ pid_t KRun::runCommand( const TQString& cmd, const TQString &execName, const TQS
*proc << cmd;
KService::Ptr service = KService::serviceByDesktopName( binaryName( execName, true ) );
TQString bin = binaryName( cmd, false );
- int pos = bin.findRev( '/' );
+ int pos = bin.tqfindRev( '/' );
if (pos != -1) {
proc->setWorkingDirectory( bin.mid(0, pos) );
}
@@ -927,7 +927,7 @@ void KRun::init()
if (m_strURL.url().startsWith("$(")) {
// check for environment variables and make necessary translations
TQString aValue = m_strURL.url();
- int nDollarPos = aValue.find( '$' );
+ int nDollarPos = aValue.tqfind( '$' );
while( nDollarPos != -1 && nDollarPos+1 < static_cast<int>(aValue.length())) {
// there is at least one $
@@ -983,7 +983,7 @@ void KRun::init()
aValue.remove( nDollarPos, 1 );
nDollarPos++;
}
- nDollarPos = aValue.find( '$', nDollarPos );
+ nDollarPos = aValue.tqfind( '$', nDollarPos );
}
m_strURL = KURL(aValue);
bypassErrorMessage = true;
@@ -1360,7 +1360,7 @@ void KRun::foundMimeType( const TQString& type )
return;
}
*/
- KIO::TransferJob *job = ::qt_cast<KIO::TransferJob *>( m_job );
+ KIO::TransferJob *job = ::tqqt_cast<KIO::TransferJob *>( m_job );
if ( job )
{
job->putOnHold();
diff --git a/kio/kio/krun.h b/kio/kio/krun.h
index 17fa434e3..5cf8189c9 100644
--- a/kio/kio/krun.h
+++ b/kio/kio/krun.h
@@ -55,7 +55,7 @@ namespace KIO {
*
* @short Opens files with their associated applications in KDE
*/
-class KIO_EXPORT KRun : public QObject
+class KIO_EXPORT KRun : public TQObject
{
Q_OBJECT
public:
@@ -475,7 +475,7 @@ public:
* It sends a notification when the process exits (for the taskbar)
* and it will show an error message if necessary (e.g. "program not found").
*/
-class KIO_EXPORT KProcessRunner : public QObject
+class KIO_EXPORT KProcessRunner : public TQObject
{
Q_OBJECT
diff --git a/kio/kio/ksambashare.cpp b/kio/kio/ksambashare.cpp
index defeae4a7..3eea9e145 100644
--- a/kio/kio/ksambashare.cpp
+++ b/kio/kio/ksambashare.cpp
@@ -62,7 +62,7 @@ bool KSambaSharePrivate::load() {
* @return wether a smb.conf was found.
**/
bool KSambaSharePrivate::findSmbConf() {
- KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
+ KSimpleConfig config(TQString::tqfromLatin1(FILESHARECONF),true);
smbConf = config.readEntry("SMBCONF");
if ( TQFile::exists(smbConf) )
@@ -144,7 +144,7 @@ bool KSambaSharePrivate::readSmbConf() {
}
// parameter
- int i = completeLine.find('=');
+ int i = completeLine.tqfind('=');
if (i>-1)
{
@@ -203,7 +203,7 @@ bool KSambaShare::isDirectoryShared( const TQString & path ) const {
if ( path[path.length()-1] != '/' )
fixedPath += '/';
- return d->sharedPaths.find(fixedPath) != 0;
+ return d->sharedPaths.tqfind(fixedPath) != 0;
}
TQStringList KSambaShare::sharedDirectories() const {
diff --git a/kio/kio/kscan.cpp b/kio/kio/kscan.cpp
index 21e8086b8..49ae7c5ab 100644
--- a/kio/kio/kscan.cpp
+++ b/kio/kio/kscan.cpp
@@ -41,7 +41,7 @@ KScanDialog * KScanDialog::getScanDialog( TQWidget *parent, const char *name,
TQStringList args;
args << TQString::number( (int)modal );
- TQObject *res = factory->create( parent, name, "KScanDialog", args );
+ TQObject *res = factory->create( TQT_TQOBJECT(parent), name, "KScanDialog", args );
return dynamic_cast<KScanDialog *>( res );
}
@@ -84,7 +84,7 @@ KOCRDialog * KOCRDialog::getOCRDialog( TQWidget *parent, const char *name,
TQStringList args;
args << TQString::number( (int)modal );
- TQObject *res = factory->create( parent, name, "KOCRDialog", args );
+ TQObject *res = factory->create( TQT_TQOBJECT(parent), name, "KOCRDialog", args );
return dynamic_cast<KOCRDialog *>( res );
}
@@ -133,7 +133,7 @@ TQObject *KScanDialogFactory::createObject( TQObject *parent, const char *name,
if ( args.count() == 1 )
modal = (bool)args[ 0 ].toInt();
- return createDialog( static_cast<TQWidget *>( parent ), name, modal );
+ return TQT_TQOBJECT(createDialog( TQT_TQWIDGET( parent ), name, modal ));
}
@@ -166,7 +166,7 @@ TQObject *KOCRDialogFactory::createObject( TQObject *parent, const char *name,
if ( args.count() == 1 )
modal = (bool)args[ 0 ].toInt();
- return createDialog( static_cast<TQWidget *>( parent ), name, modal );
+ return TQT_TQOBJECT(createDialog( TQT_TQWIDGET( parent ), name, modal ));
}
void KScanDialog::virtual_hook( int id, void* data )
diff --git a/kio/kio/kservice.cpp b/kio/kio/kservice.cpp
index 3af62f26f..36fb0f9fa 100644
--- a/kio/kio/kservice.cpp
+++ b/kio/kio/kservice.cpp
@@ -128,9 +128,9 @@ KService::init( KDesktopFile *config )
}
// Try to make up a name.
m_strName = entryPath();
- int i = m_strName.findRev('/');
+ int i = m_strName.tqfindRev('/');
m_strName = m_strName.mid(i+1);
- i = m_strName.findRev('.');
+ i = m_strName.tqfindRev('.');
if (i != -1)
m_strName = m_strName.left(i);
}
@@ -189,10 +189,10 @@ KService::init( KDesktopFile *config )
}
TQString name = entryPath();
- int pos = name.findRev('/');
+ int pos = name.tqfindRev('/');
if (pos != -1)
name = name.mid(pos+1);
- pos = name.find('.');
+ pos = name.tqfind('.');
if (pos != -1)
name = name.left(pos);
@@ -200,7 +200,7 @@ KService::init( KDesktopFile *config )
if (kde4application && !m_strExec.startsWith("/")) {
m_strExec = "KDEHOME=$HOME/.kde XDG_DATA_DIRS=/usr/share KDEDIRS=/usr/ XDG_CONFIG_DIRS=/etc/xdg/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$PATH "+m_strExec;
} else if (config->readBoolEntry("X-KDE-SubstituteUID")) {
- int space = m_strExec.find(" ");
+ int space = m_strExec.tqfind(" ");
if (space==-1)
m_strExec = KStandardDirs::findExe(m_strExec);
else {
@@ -253,7 +253,7 @@ KService::init( KDesktopFile *config )
m_lstServiceTypes += config->readListEntry( "MimeType", ';' );
entryMap.remove("MimeType");
- if ( m_strType == "Application" && !m_lstServiceTypes.contains("Application") )
+ if ( m_strType == "Application" && !m_lstServiceTypes.tqcontains("Application") )
// Applications implement the service type "Application" ;-)
m_lstServiceTypes += "Application";
@@ -327,11 +327,11 @@ void KService::load( TQDataStream& s )
// dummies are here because of fields that were removed, to keep bin compat.
// Feel free to re-use, but fields for Applications only (not generic services)
// should rather be added to application.desktop
- Q_INT8 def, term, dummy1, dummy2;
- Q_INT8 dst, initpref;
+ TQ_INT8 def, term, dummy1, dummy2;
+ TQ_INT8 dst, initpref;
TQString dummyStr1, dummyStr2;
int dummyI1, dummyI2;
- Q_UINT32 dummyUI32;
+ TQ_UINT32 dummyUI32;
// WARNING: IN KDE 3.x THIS NEEDS TO REMAIN COMPATIBLE WITH KDE 2.x!
// !! This data structure should remain binary compatible at all times !!
@@ -358,13 +358,13 @@ void KService::load( TQDataStream& s )
void KService::save( TQDataStream& s )
{
KSycocaEntry::save( s );
- Q_INT8 def = m_bAllowAsDefault, initpref = m_initialPreference;
- Q_INT8 term = m_bTerminal;
- Q_INT8 dst = (Q_INT8) m_DCOPServiceType;
- Q_INT8 dummy1 = 0, dummy2 = 0; // see ::load
+ TQ_INT8 def = m_bAllowAsDefault, initpref = m_initialPreference;
+ TQ_INT8 term = m_bTerminal;
+ TQ_INT8 dst = (TQ_INT8) m_DCOPServiceType;
+ TQ_INT8 dummy1 = 0, dummy2 = 0; // see ::load
TQString dummyStr1, dummyStr2;
int dummyI1 = 0, dummyI2 = 0;
- Q_UINT32 dummyUI32 = 0;
+ TQ_UINT32 dummyUI32 = 0;
// WARNING: IN KDE 3.x THIS NEEDS TO REMAIN COMPATIBLE WITH KDE 2.x!
// !! This data structure should remain binary compatible at all times !!
@@ -572,7 +572,7 @@ TQVariant KService::property( const TQString& _name, TQVariant::Type t ) const
// Then we use a homebuild class based on KConfigBase to convert the TQString.
// For some often used property types we do the conversion ourselves.
- TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.tqfind( _name );
if ( (it == m_mapProps.end()) || (!it.data().isValid()))
{
//kdDebug(7012) << "Property not found " << _name << endl;
@@ -684,7 +684,7 @@ KService::Ptr KService::serviceByStorageId( const TQString& _storageId )
return new KService(_storageId);
TQString tmp = _storageId;
- tmp = tmp.mid(tmp.findRev('/')+1); // Strip dir
+ tmp = tmp.mid(tmp.tqfindRev('/')+1); // Strip dir
if (tmp.endsWith(".desktop"))
tmp.truncate(tmp.length()-8);
@@ -720,7 +720,7 @@ TQString KService::username() const {
}
bool KService::noDisplay() const {
- TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "NoDisplay" );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.tqfind( "NoDisplay" );
if ( (it != m_mapProps.end()) && (it.data().isValid()))
{
TQString aValue = it.data().toString().lower();
@@ -728,21 +728,21 @@ bool KService::noDisplay() const {
return true;
}
- it = m_mapProps.find( "OnlyShowIn" );
+ it = m_mapProps.tqfind( "OnlyShowIn" );
if ( (it != m_mapProps.end()) && (it.data().isValid()))
{
TQString aValue = it.data().toString();
TQStringList aList = TQStringList::split(';', aValue);
- if (!aList.contains("KDE"))
+ if (!aList.tqcontains("KDE"))
return true;
}
- it = m_mapProps.find( "NotShowIn" );
+ it = m_mapProps.tqfind( "NotShowIn" );
if ( (it != m_mapProps.end()) && (it.data().isValid()))
{
TQString aValue = it.data().toString();
TQStringList aList = TQStringList::split(';', aValue);
- if (aList.contains("KDE"))
+ if (aList.tqcontains("KDE"))
return true;
}
@@ -758,7 +758,7 @@ TQString KService::untranslatedGenericName() const {
}
bool KService::SuSEunimportant() const {
- TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "X-SuSE-Unimportant" );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.tqfind( "X-SuSE-Unimportant" );
if ( (it == m_mapProps.end()) || (!it.data().isValid()))
{
return false;
@@ -772,7 +772,7 @@ bool KService::SuSEunimportant() const {
}
TQString KService::parentApp() const {
- TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "X-KDE-ParentApp" );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.tqfind( "X-KDE-ParentApp" );
if ( (it == m_mapProps.end()) || (!it.data().isValid()))
{
return TQString::null;
@@ -783,8 +783,8 @@ TQString KService::parentApp() const {
bool KService::allowMultipleFiles() const {
// Can we pass multiple files on the command line or do we have to start the application for every single file ?
- if ( m_strExec.find( "%F" ) != -1 || m_strExec.find( "%U" ) != -1 ||
- m_strExec.find( "%N" ) != -1 || m_strExec.find( "%D" ) != -1 )
+ if ( m_strExec.tqfind( "%F" ) != -1 || m_strExec.tqfind( "%U" ) != -1 ||
+ m_strExec.tqfind( "%N" ) != -1 || m_strExec.tqfind( "%D" ) != -1 )
return true;
else
return false;
@@ -836,7 +836,7 @@ TQString KService::newServicePath(bool showInMenu, const TQString &suggestedName
else
result = base + TQString("-%1.desktop").arg(i);
- if (reservedMenuIds && reservedMenuIds->contains(result))
+ if (reservedMenuIds && reservedMenuIds->tqcontains(result))
continue;
// Lookup service by menu-id
@@ -887,7 +887,7 @@ void KService::rebuildKSycoca(TQWidget *parent)
DCOPClient *client = kapp->dcopClient();
int result = client->callAsync("kded", "kbuildsycoca", "recreate()",
- data, &dlg, TQT_SLOT(slotFinished()));
+ data, TQT_TQOBJECT(&dlg), TQT_SLOT(slotFinished()));
if (result)
{
diff --git a/kio/kio/kservicefactory.cpp b/kio/kio/kservicefactory.cpp
index 1f79deb19..d2d4a9623 100644
--- a/kio/kio/kservicefactory.cpp
+++ b/kio/kio/kservicefactory.cpp
@@ -40,7 +40,7 @@ KServiceFactory::KServiceFactory()
if (m_str)
{
// Read Header
- Q_INT32 i;
+ TQ_INT32 i;
(*m_str) >> i;
m_nameDictOffset = i;
(*m_str) >> i;
@@ -52,14 +52,14 @@ KServiceFactory::KServiceFactory()
(*m_str) >> i;
m_menuIdDictOffset = i;
- int saveOffset = m_str->device()->at();
+ int saveOffset = m_str->tqdevice()->at();
// Init index tables
m_nameDict = new KSycocaDict(m_str, m_nameDictOffset);
// Init index tables
m_relNameDict = new KSycocaDict(m_str, m_relNameDictOffset);
// Init index tables
m_menuIdDict = new KSycocaDict(m_str, m_menuIdDictOffset);
- saveOffset = m_str->device()->at(saveOffset);
+ saveOffset = m_str->tqdevice()->at(saveOffset);
}
else
{
@@ -191,7 +191,7 @@ KService* KServiceFactory::createEntry(int offset)
break;
default:
- kdError(7011) << TQString("KServiceFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
+ kdError(7011) << TQString(TQString("KServiceFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type)) << endl;
return 0;
}
if (!newEntry->isValid())
@@ -225,11 +225,11 @@ KService::List KServiceFactory::allInitServices()
// Assume we're NOT building a database
- m_str->device()->at(m_initListOffset);
- Q_INT32 entryCount;
+ m_str->tqdevice()->at(m_initListOffset);
+ TQ_INT32 entryCount;
(*m_str) >> entryCount;
- Q_INT32 *offsetList = new Q_INT32[entryCount];
+ TQ_INT32 *offsetList = new TQ_INT32[entryCount];
for(int i = 0; i < entryCount; i++)
{
(*m_str) >> offsetList[i];
@@ -253,10 +253,10 @@ KService::List KServiceFactory::offers( int serviceTypeOffset )
TQDataStream *str = m_str;
// Jump to the offer list
- str->device()->at( m_offerListOffset );
+ str->tqdevice()->at( m_offerListOffset );
- Q_INT32 aServiceTypeOffset;
- Q_INT32 aServiceOffset;
+ TQ_INT32 aServiceTypeOffset;
+ TQ_INT32 aServiceOffset;
// We might want to do a binary search instead of a linear search
// since servicetype offsets are sorted. Bah.
while (true)
@@ -268,14 +268,14 @@ KService::List KServiceFactory::offers( int serviceTypeOffset )
if ( aServiceTypeOffset == serviceTypeOffset )
{
// Save stream position !
- int savedPos = str->device()->at();
+ int savedPos = str->tqdevice()->at();
// Create Service
KService * serv = createEntry( aServiceOffset );
if (serv)
list.append( KService::Ptr( serv ) );
// Restore position
- str->device()->at( savedPos );
- } else if ( aServiceTypeOffset > (Q_INT32)serviceTypeOffset )
+ str->tqdevice()->at( savedPos );
+ } else if ( aServiceTypeOffset > (TQ_INT32)serviceTypeOffset )
break; // too far
}
else
diff --git a/kio/kio/kservicegroup.cpp b/kio/kio/kservicegroup.cpp
index f5d2970a9..0560d033c 100644
--- a/kio/kio/kservicegroup.cpp
+++ b/kio/kio/kservicegroup.cpp
@@ -84,12 +84,12 @@ KServiceGroup::KServiceGroup( const TQString &configFile, const TQString & _relp
TQStringList tmpList;
if (config.hasKey("OnlyShowIn"))
{
- if (!config.readListEntry("OnlyShowIn", ';').contains("KDE"))
+ if (!config.readListEntry("OnlyShowIn", ';').tqcontains("KDE"))
d->m_bNoDisplay = true;
}
if (config.hasKey("NotShowIn"))
{
- if (config.readListEntry("NotShowIn", ';').contains("KDE"))
+ if (config.readListEntry("NotShowIn", ';').tqcontains("KDE"))
d->m_bNoDisplay = true;
}
@@ -103,7 +103,7 @@ KServiceGroup::KServiceGroup( const TQString &configFile, const TQString & _relp
m_strCaption = _relpath;
if (m_strCaption.right(1) == "/")
m_strCaption = m_strCaption.left(m_strCaption.length()-1);
- int i = m_strCaption.findRev('/');
+ int i = m_strCaption.tqfindRev('/');
if (i > 0)
m_strCaption = m_strCaption.mid(i+1);
}
@@ -229,11 +229,11 @@ bool KServiceGroup::SuSEshortMenu() const
void KServiceGroup::load( TQDataStream& s )
{
TQStringList groupList;
- Q_INT8 noDisplay;
- Q_INT8 _showEmptyMenu;
- Q_INT8 inlineHeader;
- Q_INT8 _inlineAlias;
- Q_INT8 _allowInline;
+ TQ_INT8 noDisplay;
+ TQ_INT8 _showEmptyMenu;
+ TQ_INT8 inlineHeader;
+ TQ_INT8 _inlineAlias;
+ TQ_INT8 _allowInline;
s >> m_strCaption >> m_strIcon >>
m_strComment >> groupList >> m_strBaseGroupName >> m_childCount >>
noDisplay >> d->suppressGenericNames >> d->directoryEntryPath >>
@@ -302,11 +302,11 @@ void KServiceGroup::save( TQDataStream& s )
(void) childCount();
- Q_INT8 noDisplay = d->m_bNoDisplay ? 1 : 0;
- Q_INT8 _showEmptyMenu = d->m_bShowEmptyMenu ? 1 : 0;
- Q_INT8 inlineHeader = d->m_bShowInlineHeader ? 1 : 0;
- Q_INT8 _inlineAlias = d->m_bInlineAlias ? 1 : 0;
- Q_INT8 _allowInline = d->m_bAllowInline ? 1 : 0;
+ TQ_INT8 noDisplay = d->m_bNoDisplay ? 1 : 0;
+ TQ_INT8 _showEmptyMenu = d->m_bShowEmptyMenu ? 1 : 0;
+ TQ_INT8 inlineHeader = d->m_bShowInlineHeader ? 1 : 0;
+ TQ_INT8 _inlineAlias = d->m_bInlineAlias ? 1 : 0;
+ TQ_INT8 _allowInline = d->m_bAllowInline ? 1 : 0;
s << m_strCaption << m_strIcon <<
m_strComment << groupList << m_strBaseGroupName << m_childCount <<
noDisplay << d->suppressGenericNames << d->directoryEntryPath <<
@@ -707,7 +707,7 @@ KServiceGroup::childGroup(const TQString &parent)
return KServiceGroupFactory::self()->findGroupByDesktopPath("#parent#"+parent, true);
}
-QString
+TQString
KServiceGroup::directoryEntryPath() const
{
return d->directoryEntryPath;
diff --git a/kio/kio/kservicegroupfactory.cpp b/kio/kio/kservicegroupfactory.cpp
index 9bca4dc63..326c41173 100644
--- a/kio/kio/kservicegroupfactory.cpp
+++ b/kio/kio/kservicegroupfactory.cpp
@@ -36,14 +36,14 @@ KServiceGroupFactory::KServiceGroupFactory()
if (m_str)
{
// Read Header
- Q_INT32 i;
+ TQ_INT32 i;
(*m_str) >> i;
m_baseGroupDictOffset = i;
- int saveOffset = m_str->device()->at();
+ int saveOffset = m_str->tqdevice()->at();
// Init index tables
m_baseGroupDict = new KSycocaDict(m_str, m_baseGroupDictOffset);
- m_str->device()->at(saveOffset);
+ m_str->tqdevice()->at(saveOffset);
}
else
{
@@ -124,7 +124,7 @@ KServiceGroup* KServiceGroupFactory::createGroup(int offset, bool deep)
break;
default:
- kdError(7011) << TQString("KServiceGroupFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
+ kdError(7011) << TQString(TQString("KServiceGroupFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type)) << endl;
return 0;
}
if (!newEntry->isValid())
diff --git a/kio/kio/kservicetype.cpp b/kio/kio/kservicetype.cpp
index 48693aceb..b8b4e4659 100644
--- a/kio/kio/kservicetype.cpp
+++ b/kio/kio/kservicetype.cpp
@@ -82,7 +82,7 @@ KServiceType::init( KDesktopFile *config)
for( ; gIt != tmpList.end(); ++gIt )
{
- if ( (*gIt).find( "Property::" ) == 0 )
+ if ( (*gIt).tqfind( "Property::" ) == 0 )
{
config->setGroup( *gIt );
TQVariant v = config->readPropertyEntry( "Value",
@@ -95,7 +95,7 @@ KServiceType::init( KDesktopFile *config)
gIt = tmpList.begin();
for( ; gIt != tmpList.end(); ++gIt )
{
- if( (*gIt).find( "PropertyDef::" ) == 0 )
+ if( (*gIt).tqfind( "PropertyDef::" ) == 0 )
{
config->setGroup( *gIt );
m_mapPropDefs.insert( (*gIt).mid( 13 ),
@@ -125,11 +125,11 @@ KServiceType::KServiceType( TQDataStream& _str, int offset )
void
KServiceType::load( TQDataStream& _str )
{
- Q_INT8 b;
+ TQ_INT8 b;
_str >> m_strName >> m_strIcon >> m_strComment >> m_mapProps >> m_mapPropDefs
>> b;
m_bValid = b;
- m_bDerived = m_mapProps.contains("X-KDE-Derived");
+ m_bDerived = m_mapProps.tqcontains("X-KDE-Derived");
}
void
@@ -140,7 +140,7 @@ KServiceType::save( TQDataStream& _str )
// You may add new fields at the end. Make sure to update the version
// number in ksycoca.h
_str << m_strName << m_strIcon << m_strComment << m_mapProps << m_mapPropDefs
- << (Q_INT8)m_bValid;
+ << (TQ_INT8)m_bValid;
}
KServiceType::~KServiceType()
@@ -170,7 +170,7 @@ bool KServiceType::inherits( const TQString& servTypeName ) const
return false;
}
-QVariant
+TQVariant
KServiceType::property( const TQString& _name ) const
{
TQVariant v;
@@ -182,7 +182,7 @@ KServiceType::property( const TQString& _name ) const
else if ( _name == "Comment" )
v = TQVariant( m_strComment );
else {
- TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.tqfind( _name );
if ( it != m_mapProps.end() )
v = it.data();
}
@@ -190,7 +190,7 @@ KServiceType::property( const TQString& _name ) const
return v;
}
-QStringList
+TQStringList
KServiceType::propertyNames() const
{
TQStringList res;
@@ -209,13 +209,13 @@ KServiceType::propertyNames() const
TQVariant::Type
KServiceType::propertyDef( const TQString& _name ) const
{
- TQMap<TQString,TQVariant::Type>::ConstIterator it = m_mapPropDefs.find( _name );
+ TQMap<TQString,TQVariant::Type>::ConstIterator it = m_mapPropDefs.tqfind( _name );
if ( it == m_mapPropDefs.end() )
return TQVariant::Invalid;
return it.data();
}
-QStringList
+TQStringList
KServiceType::propertyDefNames() const
{
TQStringList l;
@@ -239,7 +239,7 @@ static void addUnique(KService::List &lst, TQDict<KService> &dict, const KServic
for( ; it != newLst.end(); ++it )
{
KService *service = static_cast<KService*>(*it);
- if (dict.find(service->desktopEntryPath()))
+ if (dict.tqfind(service->desktopEntryPath()))
continue;
dict.insert(service->desktopEntryPath(), service);
lst.append(service);
diff --git a/kio/kio/kservicetypefactory.cpp b/kio/kio/kservicetypefactory.cpp
index 8287bca44..99a0ee349 100644
--- a/kio/kio/kservicetypefactory.cpp
+++ b/kio/kio/kservicetypefactory.cpp
@@ -39,7 +39,7 @@ KServiceTypeFactory::KServiceTypeFactory()
if (m_str)
{
// Read Header
- Q_INT32 i,n;
+ TQ_INT32 i,n;
(*m_str) >> i;
m_fastPatternOffset = i;
(*m_str) >> i;
@@ -102,7 +102,7 @@ TQVariant::Type KServiceTypeFactory::findPropertyTypeByName(const TQString &_nam
assert (!KSycoca::self()->isBuilding());
- TQMapConstIterator<TQString,int> it = m_propertyTypeDict.find(_name);
+ TQMapConstIterator<TQString,int> it = m_propertyTypeDict.tqfind(_name);
if (it != m_propertyTypeDict.end()) {
return (TQVariant::Type)it.data();
}
@@ -118,23 +118,23 @@ KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQSt
// Get stream to the header
TQDataStream *str = m_str;
- str->device()->at( m_fastPatternOffset );
+ str->tqdevice()->at( m_fastPatternOffset );
- Q_INT32 nrOfEntries;
+ TQ_INT32 nrOfEntries;
(*str) >> nrOfEntries;
- Q_INT32 entrySize;
+ TQ_INT32 entrySize;
(*str) >> entrySize;
- Q_INT32 fastOffset = str->device()->at( );
+ TQ_INT32 fastOffset = str->tqdevice()->at( );
- Q_INT32 matchingOffset = 0;
+ TQ_INT32 matchingOffset = 0;
// Let's go for a binary search in the "fast" pattern index
- Q_INT32 left = 0;
- Q_INT32 right = nrOfEntries - 1;
- Q_INT32 middle;
+ TQ_INT32 left = 0;
+ TQ_INT32 right = nrOfEntries - 1;
+ TQ_INT32 middle;
// Extract extension
- int lastDot = _filename.findRev('.');
+ int lastDot = _filename.tqfindRev('.');
int ext_len = _filename.length() - lastDot - 1;
if (lastDot != -1 && ext_len <= 4) // if no '.', skip the extension lookup
{
@@ -145,7 +145,7 @@ KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQSt
while (left <= right) {
middle = (left + right) / 2;
// read pattern at position "middle"
- str->device()->at( middle * entrySize + fastOffset );
+ str->tqdevice()->at( middle * entrySize + fastOffset );
KSycocaEntry::read(*str, pattern);
int cmp = pattern.compare( extension );
if (cmp < 0)
@@ -166,10 +166,10 @@ KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQSt
// Now try the "other" Pattern table
if ( m_patterns.isEmpty() ) {
- str->device()->at( m_otherPatternOffset );
+ str->tqdevice()->at( m_otherPatternOffset );
TQString pattern;
- Q_INT32 mimetypeOffset;
+ TQ_INT32 mimetypeOffset;
while (true)
{
@@ -186,7 +186,7 @@ KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQSt
TQStringList::const_iterator it = m_patterns.begin();
TQStringList::const_iterator end = m_patterns.end();
- TQValueVector<Q_INT32>::const_iterator it_offset = m_pattern_offsets.begin();
+ TQValueVector<TQ_INT32>::const_iterator it_offset = m_pattern_offsets.begin();
for ( ; it != end; ++it, ++it_offset )
{
@@ -280,7 +280,7 @@ KServiceType * KServiceTypeFactory::createEntry(int offset)
break;
default:
- kdError(7011) << TQString("KServiceTypeFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
+ kdError(7011) << TQString(TQString("KServiceTypeFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type)) << endl;
break;
}
if (newEntry && !newEntry->isValid())
diff --git a/kio/kio/kservicetypefactory.h b/kio/kio/kservicetypefactory.h
index db64aa115..fd3c96a1a 100644
--- a/kio/kio/kservicetypefactory.h
+++ b/kio/kio/kservicetypefactory.h
@@ -113,7 +113,7 @@ protected:
private:
TQStringList m_patterns;
- TQValueVector<Q_INT32> m_pattern_offsets;
+ TQValueVector<TQ_INT32> m_pattern_offsets;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/kshellcompletion.cpp b/kio/kio/kshellcompletion.cpp
index 2fb67a31f..bd3c43be7 100644
--- a/kio/kio/kshellcompletion.cpp
+++ b/kio/kio/kshellcompletion.cpp
@@ -217,22 +217,22 @@ bool KShellCompletion::quoteText(TQString *text, bool force, bool skip_last) con
int pos = 0;
if ( !force ) {
- pos = text->find( m_word_break_char );
+ pos = text->tqfind( m_word_break_char );
if ( skip_last && (pos == (int)(text->length())-1) ) pos = -1;
}
if ( !force && pos == -1 ) {
- pos = text->find( m_quote_char1 );
+ pos = text->tqfind( m_quote_char1 );
if ( skip_last && (pos == (int)(text->length())-1) ) pos = -1;
}
if ( !force && pos == -1 ) {
- pos = text->find( m_quote_char2 );
+ pos = text->tqfind( m_quote_char2 );
if ( skip_last && (pos == (int)(text->length())-1) ) pos = -1;
}
if ( !force && pos == -1 ) {
- pos = text->find( m_escape_char );
+ pos = text->tqfind( m_escape_char );
if ( skip_last && (pos == (int)(text->length())-1) ) pos = -1;
}
diff --git a/kio/kio/ktar.cpp b/kio/kio/ktar.cpp
index 0b77fff52..6c8227d3e 100644
--- a/kio/kio/ktar.cpp
+++ b/kio/kio/ktar.cpp
@@ -129,7 +129,7 @@ void KTar::prepareDevice( const TQString & filename,
const TQString & mimetype, bool /*forced*/ )
{
if( "application/x-tar" == mimetype )
- setDevice( new TQFile( filename ) );
+ setDevice( TQT_TQIODEVICE(new TQFile( filename )) );
else
{
// The compression filters are very slow with random access.
@@ -149,7 +149,7 @@ void KTar::prepareDevice( const TQString & filename,
// the device must be closed, however, for KArchive.setDevice()
TQFile* file = d->tmpFile->file();
file->close();
- setDevice(file);
+ setDevice(TQT_TQIODEVICE(file));
}
}
@@ -185,9 +185,9 @@ void KTar::setOrigFileName( const TQCString & fileName )
d->origFileName = fileName;
}
-Q_LONG KTar::readRawHeader(char *buffer) {
+TQ_LONG KTar::readRawHeader(char *buffer) {
// Read header
- Q_LONG n = device()->readBlock( buffer, 0x200 );
+ TQ_LONG n = device()->readBlock( buffer, 0x200 );
if ( n == 0x200 && buffer[0] != 0 ) {
// Make sure this is actually a tar header
if (strncmp(buffer + 257, "ustar", 5)) {
@@ -223,7 +223,7 @@ Q_LONG KTar::readRawHeader(char *buffer) {
}
bool KTar::readLonglink(char *buffer,TQCString &longlink) {
- Q_LONG n = 0;
+ TQ_LONG n = 0;
TQIODevice *dev = device();
// read size of longlink from size field in header
// size is in bytes including the trailing null (which we ignore)
@@ -252,11 +252,11 @@ bool KTar::readLonglink(char *buffer,TQCString &longlink) {
return true;
}
-Q_LONG KTar::readHeader(char *buffer,TQString &name,TQString &symlink) {
+TQ_LONG KTar::readHeader(char *buffer,TQString &name,TQString &symlink) {
name.truncate(0);
symlink.truncate(0);
while (true) {
- Q_LONG n = readRawHeader(buffer);
+ TQ_LONG n = readRawHeader(buffer);
if (n != 0x200) return n;
// is it a longlink?
@@ -320,7 +320,7 @@ bool KTar::KTarPrivate::fillTempFile( const TQString & filename) {
delete filterDev;
return false;
}
- Q_LONG len = -1;
+ TQ_LONG len = -1;
while ( !filterDev->atEnd() && len != 0) {
len = filterDev->readBlock(buffer.data(),buffer.size());
if ( len < 0 ) { // corrupted archive
@@ -372,7 +372,7 @@ bool KTar::openArchive( int mode )
TQString symlink;
// Read header
- Q_LONG n = readHeader(buffer,name,symlink);
+ TQ_LONG n = readHeader(buffer,name,symlink);
if (n < 0) return false;
if (n == 0x200)
{
@@ -385,7 +385,7 @@ bool KTar::openArchive( int mode )
name = name.left( name.length() - 1 );
}
- int pos = name.findRev( '/' );
+ int pos = name.tqfindRev( '/' );
if ( pos == -1 )
nm = name;
else
@@ -534,7 +534,7 @@ bool KTar::KTarPrivate::writeBackTempFile( const TQString & filename ) {
if ( forced )
static_cast<KFilterDev *>(dev)->setOrigFileName( origFileName );
TQByteArray buffer(8*1024);
- Q_LONG len;
+ TQ_LONG len;
while ( ! file->atEnd()) {
len = file->readBlock(buffer.data(),buffer.size());
dev->writeBlock(buffer.data(),len);
@@ -633,7 +633,7 @@ bool KTar::prepareWriting( const TQString& name, const TQString& user, const TQS
bool KTar::doneWriting( uint size )
{
- // Write alignment
+ // Write tqalignment
int rest = size % 0x200;
if ( mode() & IO_ReadWrite )
d->tarEnd = device()->at() + (rest ? 0x200 - rest : 0); // Record our new end of archive
@@ -642,7 +642,7 @@ bool KTar::doneWriting( uint size )
char buffer[ 0x201 ];
for( uint i = 0; i < 0x200; ++i )
buffer[i] = 0;
- Q_LONG nwritten = device()->writeBlock( buffer, 0x200 - rest );
+ TQ_LONG nwritten = device()->writeBlock( buffer, 0x200 - rest );
return nwritten == 0x200 - rest;
}
return true;
@@ -853,7 +853,7 @@ bool KTar::writeDir_impl(const TQString &name, const TQString &user,
if ( dirName.right(1) != "/" )
dirName += "/";
- if ( d->dirList.contains( dirName ) )
+ if ( d->dirList.tqcontains( dirName ) )
return true; // already there
char buffer[ 0x201 ];
diff --git a/kio/kio/ktar.h b/kio/kio/ktar.h
index 95c52a32c..67f004a39 100644
--- a/kio/kio/ktar.h
+++ b/kio/kio/ktar.h
@@ -139,9 +139,9 @@ private:
void writeLonglink(char *buffer, const TQCString &name, char typeflag,
const char *uname, const char *gname);
- Q_LONG readRawHeader(char *buffer);
+ TQ_LONG readRawHeader(char *buffer);
bool readLonglink(char *buffer,TQCString &longlink);
- Q_LONG readHeader(char *buffer,TQString &name,TQString &symlink);
+ TQ_LONG readHeader(char *buffer,TQString &name,TQString &symlink);
TQString m_filename;
protected:
diff --git a/kio/kio/ktrader.h b/kio/kio/ktrader.h
index e5bb734e6..4b2690dc7 100644
--- a/kio/kio/ktrader.h
+++ b/kio/kio/ktrader.h
@@ -82,7 +82,7 @@
* applications or components.
* @author Torben Weis <weis@kde.org>
*/
-class KIO_EXPORT KTrader : public QObject
+class KIO_EXPORT KTrader : public TQObject
{
Q_OBJECT
public:
diff --git a/kio/kio/ktraderparsetree.cpp b/kio/kio/ktraderparsetree.cpp
index 711ec5356..969599db6 100644
--- a/kio/kio/ktraderparsetree.cpp
+++ b/kio/kio/ktraderparsetree.cpp
@@ -415,7 +415,7 @@ bool ParseTreeMATCH::eval( ParseContext *_context ) const
if ( c1.type != ParseContext::T_STRING || c2.type != ParseContext::T_STRING )
return false;
- _context->b = ( c2.str.find( c1.str ) != -1 );
+ _context->b = ( c2.str.tqfind( c1.str ) != -1 );
return true;
}
@@ -465,7 +465,7 @@ bool ParseTreeIN::eval( ParseContext *_context ) const
if ( c1.type == ParseContext::T_STRING && c2.type == ParseContext::T_STR_SEQ )
{
- _context->b = ( c2.strSeq.find( c1.str ) != c2.strSeq.end() );
+ _context->b = ( c2.strSeq.tqfind( c1.str ) != c2.strSeq.end() );
return true;
}
@@ -535,7 +535,7 @@ bool ParseTreeMIN2::eval( ParseContext *_context ) const
if ( !_context->initMaxima( m_strId ) )
return false;
- TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
+ TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.tqfind( m_strId );
if ( it == _context->maxima.end() )
return false;
@@ -568,7 +568,7 @@ bool ParseTreeMAX2::eval( ParseContext *_context ) const
return false;
// Find extrema
- TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
+ TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.tqfind( m_strId );
if ( it == _context->maxima.end() )
return false;
@@ -651,7 +651,7 @@ bool ParseContext::initMaxima( const TQString& _prop )
return false;
// Did we cache the result ?
- TQMap<TQString,PreferencesMaxima>::Iterator it = maxima.find( _prop );
+ TQMap<TQString,PreferencesMaxima>::Iterator it = maxima.tqfind( _prop );
if ( it != maxima.end() )
return ( it.data().type == PreferencesMaxima::PM_DOUBLE ||
it.data().type == PreferencesMaxima::PM_INT );
diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp
index 2c4c5b12e..e4b885ce5 100644
--- a/kio/kio/kurifilter.cpp
+++ b/kio/kio/kurifilter.cpp
@@ -35,7 +35,7 @@ template class TQPtrList<KURIFilterPlugin>;
KURIFilterPlugin::KURIFilterPlugin( TQObject *parent, const char *name, double pri )
:TQObject( parent, name )
{
- m_strName = TQString::fromLatin1( name );
+ m_strName = TQString::tqfromLatin1( name );
m_dblPriority = pri;
}
@@ -171,32 +171,32 @@ TQString KURIFilterData::iconName()
case KURIFilterData::EXECUTABLE:
{
TQString exeName = m_pURI.url();
- exeName = exeName.mid( exeName.findRev( '/' ) + 1 ); // strip path if given
+ exeName = exeName.mid( exeName.tqfindRev( '/' ) + 1 ); // strip path if given
KService::Ptr service = KService::serviceByDesktopName( exeName );
- if (service && service->icon() != TQString::fromLatin1( "unknown" ))
+ if (service && service->icon() != TQString::tqfromLatin1( "unknown" ))
m_strIconName = service->icon();
// Try to find an icon with the same name as the binary (useful for non-kde apps)
else if ( !KGlobal::iconLoader()->loadIcon( exeName, KIcon::NoGroup, 16, KIcon::DefaultState, 0, true ).isNull() )
m_strIconName = exeName;
else
// not found, use default
- m_strIconName = TQString::fromLatin1("exec");
+ m_strIconName = TQString::tqfromLatin1("exec");
break;
}
case KURIFilterData::HELP:
{
- m_strIconName = TQString::fromLatin1("khelpcenter");
+ m_strIconName = TQString::tqfromLatin1("khelpcenter");
break;
}
case KURIFilterData::SHELL:
{
- m_strIconName = TQString::fromLatin1("konsole");
+ m_strIconName = TQString::tqfromLatin1("konsole");
break;
}
case KURIFilterData::ERROR:
case KURIFilterData::BLOCKED:
{
- m_strIconName = TQString::fromLatin1("error");
+ m_strIconName = TQString::tqfromLatin1("error");
break;
}
default:
diff --git a/kio/kio/kurifilter.h b/kio/kio/kurifilter.h
index 0960c1419..2cd999582 100644
--- a/kio/kio/kurifilter.h
+++ b/kio/kio/kurifilter.h
@@ -347,9 +347,10 @@ private:
*
* @short Abstract class for URI filter plugins.
*/
-class KIO_EXPORT KURIFilterPlugin : public QObject
+class KIO_EXPORT KURIFilterPlugin : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kio/kio/kurlcompletion.cpp b/kio/kio/kurlcompletion.cpp
index 88a566b5f..339f6c351 100644
--- a/kio/kio/kurlcompletion.cpp
+++ b/kio/kio/kurlcompletion.cpp
@@ -80,7 +80,7 @@ class CompletionThread;
* matches from an asyncrynous lookup.
*/
-class CompletionMatchEvent : public QCustomEvent
+class CompletionMatchEvent : public TQCustomEvent
{
public:
CompletionMatchEvent( CompletionThread *thread ) :
@@ -95,7 +95,7 @@ private:
CompletionThread *m_completionThread;
};
-class CompletionThread : public QThread
+class CompletionThread : public TQThread
{
protected:
CompletionThread( KURLCompletion *receiver ) :
@@ -786,7 +786,7 @@ bool KURLCompletion::envCompletion(const MyURL &url, TQString *match)
while ( *env ) {
TQString s = TQString::fromLocal8Bit( *env );
- int pos = s.find('=');
+ int pos = s.tqfind('=');
if ( pos == -1 )
pos = s.length();
@@ -1407,7 +1407,7 @@ static bool expandEnv( TQString &text )
bool expanded = false;
- while ( (pos = text.find('$', pos)) != -1 ) {
+ while ( (pos = text.tqfind('$', pos)) != -1 ) {
// Skip escaped '$'
//
@@ -1419,8 +1419,8 @@ static bool expandEnv( TQString &text )
else {
// Find the end of the variable = next '/' or ' '
//
- int pos2 = text.find( ' ', pos+1 );
- int pos_tmp = text.find( '/', pos+1 );
+ int pos2 = text.tqfind( ' ', pos+1 );
+ int pos_tmp = text.tqfind( '/', pos+1 );
if ( pos2 == -1 || (pos_tmp != -1 && pos_tmp < pos2) )
pos2 = pos_tmp;
@@ -1467,8 +1467,8 @@ static bool expandTilde(TQString &text)
// Find the end of the user name = next '/' or ' '
//
- int pos2 = text.find( ' ', 1 );
- int pos_tmp = text.find( '/', 1 );
+ int pos2 = text.tqfind( ' ', 1 );
+ int pos_tmp = text.tqfind( '/', 1 );
if ( pos2 == -1 || (pos_tmp != -1 && pos_tmp < pos2) )
pos2 = pos_tmp;
diff --git a/kio/kio/kuserprofile.cpp b/kio/kio/kuserprofile.cpp
index b7ef68c76..8fddf763d 100644
--- a/kio/kio/kuserprofile.cpp
+++ b/kio/kio/kuserprofile.cpp
@@ -165,7 +165,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const TQString& _ser
if (_genericServiceType.isEmpty() /*no constraint*/ || (*it)->hasServiceType( _genericServiceType ))
{
// Check that we don't already have it ;)
- if ( serviceList.find( (*it)->desktopEntryPath() ) == serviceList.end() )
+ if ( serviceList.tqfind( (*it)->desktopEntryPath() ) == serviceList.end() )
{
bool allow = (*it)->allowAsDefault();
KServiceOffer o( (*it), (*it)->initialPreferenceForMimeType(_servicetype), allow );
@@ -215,7 +215,7 @@ int KServiceTypeProfile::preference( const TQString& _service ) const
KService::Ptr service = KService::serviceByName( _service );
if (!service)
return 0;
- TQMap<TQString,Service>::ConstIterator it = m_mapServices.find( service->storageId() );
+ TQMap<TQString,Service>::ConstIterator it = m_mapServices.tqfind( service->storageId() );
if ( it == m_mapServices.end() )
return 0;
@@ -233,7 +233,7 @@ bool KServiceTypeProfile::allowAsDefault( const TQString& _service ) const
return false;
// Look what the user says ...
- TQMap<TQString,Service>::ConstIterator it = m_mapServices.find( service->storageId() );
+ TQMap<TQString,Service>::ConstIterator it = m_mapServices.tqfind( service->storageId() );
if ( it == m_mapServices.end() )
return 0;
@@ -270,7 +270,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers() const
if ( m_strGenericServiceType.isEmpty() || (*it)->hasServiceType( m_strGenericServiceType ) )
{
// Now look into the profile, to find this service's preference.
- TQMap<TQString,Service>::ConstIterator it2 = m_mapServices.find( (*it)->storageId() );
+ TQMap<TQString,Service>::ConstIterator it2 = m_mapServices.tqfind( (*it)->storageId() );
if( it2 != m_mapServices.end() )
{
diff --git a/kio/kio/kzip.cpp b/kio/kio/kzip.cpp
index 6f29bb264..1e1dd6241 100644
--- a/kio/kio/kzip.cpp
+++ b/kio/kio/kzip.cpp
@@ -60,7 +60,7 @@ static void transformToMsDos(const TQDateTime& dt, char* buffer)
{
if ( dt.isValid() )
{
- const Q_UINT16 time =
+ const TQ_UINT16 time =
( dt.time().hour() << 11 ) // 5 bit hour
| ( dt.time().minute() << 5 ) // 6 bit minute
| ( dt.time().second() >> 1 ); // 5 bit double seconds
@@ -68,7 +68,7 @@ static void transformToMsDos(const TQDateTime& dt, char* buffer)
buffer[0] = char(time);
buffer[1] = char(time >> 8);
- const Q_UINT16 date =
+ const TQ_UINT16 date =
( ( dt.date().year() - 1980 ) << 9 ) // 7 bit year 1980-based
| ( dt.date().month() << 5 ) // 4 bit month
| ( dt.date().day() ); // 5 bit day
@@ -87,13 +87,13 @@ static void transformToMsDos(const TQDateTime& dt, char* buffer)
static time_t transformFromMsDos(const char* buffer)
{
- Q_UINT16 time = (uchar)buffer[0] | ( (uchar)buffer[1] << 8 );
+ TQ_UINT16 time = (uchar)buffer[0] | ( (uchar)buffer[1] << 8 );
int h = time >> 11;
int m = ( time & 0x7ff ) >> 5;
int s = ( time & 0x1f ) * 2 ;
TQTime qt(h, m, s);
- Q_UINT16 date = (uchar)buffer[2] | ( (uchar)buffer[3] << 8 );
+ TQ_UINT16 date = (uchar)buffer[2] | ( (uchar)buffer[3] << 8 );
int y = ( date >> 9 ) + 1980;
int o = ( date & 0x1ff ) >> 5;
int d = ( date & 0x1f );
@@ -385,7 +385,7 @@ bool KZip::openArchive( int mode )
return false;
}
Q_ASSERT( d->m_saveFile->file() );
- setDevice( d->m_saveFile->file() );
+ setDevice( TQT_TQIODEVICE(d->m_saveFile->file()) );
}
return true;
case IO_ReadOnly:
@@ -393,8 +393,8 @@ bool KZip::openArchive( int mode )
{
// ReadWrite mode still uses TQFile for now; we'd need to copy to the tempfile, in fact.
if ( !m_filename.isEmpty() ) {
- setDevice( new TQFile( m_filename ) );
- if ( !device()->open( mode ) )
+ setDevice( TQT_TQIODEVICE(new TQFile( m_filename )) );
+ if ( !device()->tqopen( mode ) )
return false;
}
break; // continued below
@@ -462,9 +462,9 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
int compression_mode = (uchar)buffer[2] | (uchar)buffer[3] << 8;
time_t mtime = transformFromMsDos( buffer+4 );
- Q_LONG compr_size = (uchar)buffer[12] | (uchar)buffer[13] << 8
+ TQ_LONG compr_size = (uchar)buffer[12] | (uchar)buffer[13] << 8
| (uchar)buffer[14] << 16 | (uchar)buffer[15] << 24;
- Q_LONG uncomp_size = (uchar)buffer[16] | (uchar)buffer[17] << 8
+ TQ_LONG uncomp_size = (uchar)buffer[16] | (uchar)buffer[17] << 8
| (uchar)buffer[18] << 16 | (uchar)buffer[19] << 24;
int namelen = (uchar)buffer[20] | (uchar)buffer[21] << 8;
int extralen = (uchar)buffer[22] | (uchar)buffer[23] << 8;
@@ -578,7 +578,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
}
} else {
- if ( compr_size > (Q_LONG)dev->size() )
+ if ( compr_size > (TQ_LONG)dev->size() )
{
// here we cannot trust the compressed size, so scan through the compressed
// data to find the next header
@@ -736,7 +736,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
else Q_ASSERT(access & S_IFDIR);
}
- int pos = name.findRev( '/' );
+ int pos = name.tqfindRev( '/' );
if ( pos == -1 )
entryName = name;
else
@@ -871,9 +871,9 @@ bool KZip::closeArchive()
char buffer[ 22 ]; // first used for 12, then for 22 at the end
uLong crc = crc32(0L, Z_NULL, 0);
- Q_LONG centraldiroffset = device()->at();
+ TQ_LONG centraldiroffset = device()->at();
//kdDebug(7040) << "closearchive: centraldiroffset: " << centraldiroffset << endl;
- Q_LONG atbackup = centraldiroffset;
+ TQ_LONG atbackup = centraldiroffset;
TQPtrListIterator<KZipFileEntry> it( d->m_fileList );
for ( ; it.current() ; ++it )
@@ -994,7 +994,7 @@ bool KZip::closeArchive()
if ( !ok )
return false;
}
- Q_LONG centraldirendoffset = device()->at();
+ TQ_LONG centraldirendoffset = device()->at();
//kdDebug(7040) << "closearchive: centraldirendoffset: " << centraldirendoffset << endl;
//kdDebug(7040) << "closearchive: device()->at(): " << device()->at() << endl;
@@ -1133,7 +1133,7 @@ bool KZip::prepareWriting_impl(const TQString &name, const TQString &user,
// Find or create parent dir
KArchiveDirectory* parentDir = rootDir();
TQString fileName( name );
- int i = name.findRev( '/' );
+ int i = name.tqfindRev( '/' );
if ( i != -1 )
{
TQString dir = name.left( i );
@@ -1383,9 +1383,9 @@ bool KZip::writeData_impl(const char * c, uint i)
// and they didn't mention it in their docs...
d->m_crc = crc32(d->m_crc, (const Bytef *) c , i);
- Q_LONG written = d->m_currentDev->writeBlock( c, i );
+ TQ_LONG written = d->m_currentDev->writeBlock( c, i );
//kdDebug(7040) << "KZip::writeData wrote " << i << " bytes." << endl;
- bool ok = written == (Q_LONG)i;
+ bool ok = written == (TQ_LONG)i;
if ( !ok )
abort();
return ok;
diff --git a/kio/kio/kzip.h b/kio/kio/kzip.h
index 291f827f8..26bfc71d3 100644
--- a/kio/kio/kzip.h
+++ b/kio/kio/kzip.h
@@ -230,8 +230,8 @@ public:
{}*/
KZipFileEntry( KZip* zip, const TQString& name, int access, int date,
const TQString& user, const TQString& group, const TQString& symlink,
- const TQString& path, Q_LONG start, Q_LONG uncompressedSize,
- int encoding, Q_LONG compressedSize) :
+ const TQString& path, TQ_LONG start, TQ_LONG uncompressedSize,
+ int encoding, TQ_LONG compressedSize) :
KArchiveFile( zip, name, access, date, user, group, symlink,
start, uncompressedSize ),
m_crc(0),
@@ -241,14 +241,14 @@ public:
m_path( path )
{}
int encoding() const { return m_encoding; }
- Q_LONG compressedSize() const { return m_compressedSize; }
+ TQ_LONG compressedSize() const { return m_compressedSize; }
/// Only used when writing
- void setCompressedSize(Q_LONG compressedSize) { m_compressedSize = compressedSize; }
+ void setCompressedSize(TQ_LONG compressedSize) { m_compressedSize = compressedSize; }
/// Header start: only used when writing
- void setHeaderStart(Q_LONG headerstart) { m_headerStart = headerstart; }
- Q_LONG headerStart() const {return m_headerStart; }
+ void setHeaderStart(TQ_LONG headerstart) { m_headerStart = headerstart; }
+ TQ_LONG headerStart() const {return m_headerStart; }
/// CRC: only used when writing
unsigned long crc32() const { return m_crc; }
@@ -274,8 +274,8 @@ public:
private:
unsigned long m_crc;
- Q_LONG m_compressedSize;
- Q_LONG m_headerStart;
+ TQ_LONG m_compressedSize;
+ TQ_LONG m_headerStart;
int m_encoding;
TQString m_path;
// KDE4: d pointer or at least some int for future extensions
diff --git a/kio/kio/metainfojob.cpp b/kio/kio/metainfojob.cpp
index 3998584e3..28bc23633 100644
--- a/kio/kio/metainfojob.cpp
+++ b/kio/kio/metainfojob.cpp
@@ -86,7 +86,7 @@ void MetaInfoJob::removeItem(const KFileItem* item)
determineNextFile();
}
- d->items.remove(d->items.find(item));
+ d->items.remove(d->items.tqfind(item));
}
void MetaInfoJob::determineNextFile()
diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp
index 5189b93d6..975a42c10 100644
--- a/kio/kio/netaccess.cpp
+++ b/kio/kio/netaccess.cpp
@@ -293,7 +293,7 @@ void NetAccess::removeTempFile(const TQString& name)
{
if (!tmpfiles)
return;
- if (tmpfiles->contains(name))
+ if (tmpfiles->tqcontains(name))
{
unlink(TQFile::encodeName(name));
tmpfiles->remove(name);
@@ -373,7 +373,7 @@ bool NetAccess::mkdirInternal( const KURL & url, int permissions,
TQString NetAccess::mimetypeInternal( const KURL & url, TQWidget* window )
{
bJobOK = true; // success unless further error occurs
- m_mimetype = TQString::fromLatin1("unknown");
+ m_mimetype = TQString::tqfromLatin1("unknown");
KIO::Job * job = KIO::mimetype( url );
job->setWindow (window);
connect( job, TQT_SIGNAL( result (KIO::Job *) ),
@@ -403,7 +403,7 @@ TQString NetAccess::fish_executeInternal(const KURL & url, const TQString comman
remoteTempFileName = tmpFile.name();
// only need the filename KTempFile adds some KDE specific dirs
// that probably does not exist on the remote side
- int pos = remoteTempFileName.findRev('/');
+ int pos = remoteTempFileName.tqfindRev('/');
remoteTempFileName = "/tmp/fishexec_" + remoteTempFileName.mid(pos + 1);
tempPathUrl.setPath( remoteTempFileName );
bJobOK = true; // success unless further error occurs
@@ -462,16 +462,16 @@ bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray*
connect( job, TQT_SIGNAL( result (KIO::Job *) ),
this, TQT_SLOT( slotResult (KIO::Job *) ) );
- TQMetaObject *meta = job->metaObject();
+ TQMetaObject *meta = job->tqmetaObject();
static const char dataSignal[] = "data(KIO::Job*,const TQByteArray&)";
- if ( meta->findSignal( dataSignal ) != -1 ) {
+ if ( meta->tqfindSignal( dataSignal ) != -1 ) {
connect( job, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)),
this, TQT_SLOT(slotData(KIO::Job*,const TQByteArray&)) );
}
static const char redirSignal[] = "redirection(KIO::Job*,const KURL&)";
- if ( meta->findSignal( redirSignal ) != -1 ) {
+ if ( meta->tqfindSignal( redirSignal ) != -1 ) {
connect( job, TQT_SIGNAL(redirection(KIO::Job*,const KURL&)),
this, TQT_SLOT(slotRedirection(KIO::Job*, const KURL&)) );
}
@@ -492,10 +492,10 @@ void qt_leave_modal( TQWidget *widget );
void NetAccess::enter_loop()
{
- TQWidget dummy(0,0,WType_Dialog | WShowModal);
- dummy.setFocusPolicy( TQWidget::NoFocus );
+ TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal));
+ dummy.setFocusPolicy( TQ_NoFocus );
qt_enter_modal(&dummy);
- qApp->enter_loop();
+ tqApp->enter_loop();
qt_leave_modal(&dummy);
}
@@ -515,7 +515,7 @@ void NetAccess::slotResult( KIO::Job * job )
if ( m_metaData )
*m_metaData = job->metaData();
- qApp->exit_loop();
+ tqApp->exit_loop();
}
void NetAccess::slotData( KIO::Job*, const TQByteArray& data )
diff --git a/kio/kio/netaccess.h b/kio/kio/netaccess.h
index caeb7b985..3fb9103af 100644
--- a/kio/kio/netaccess.h
+++ b/kio/kio/netaccess.h
@@ -56,7 +56,7 @@ namespace KIO {
*
* @short Provides an easy, synchronous interface to KIO file operations.
*/
-class KIO_EXPORT NetAccess : public QObject
+class KIO_EXPORT NetAccess : public TQObject
{
Q_OBJECT
@@ -92,7 +92,7 @@ public:
* }
* \endcode
*
- * Of course, your user interface will still process exposure/repaint
+ * Of course, your user interface will still process exposure/tqrepaint
* events during the download.
*
* If the download fails, lastError() and lastErrorString() will be set.
diff --git a/kio/kio/passdlg.cpp b/kio/kio/passdlg.cpp
index 83434906b..1670e83bb 100644
--- a/kio/kio/passdlg.cpp
+++ b/kio/kio/passdlg.cpp
@@ -87,12 +87,12 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user,
{
lbl = new TQLabel( main );
lbl->setPixmap( pix );
- lbl->setAlignment( Qt::AlignLeft|Qt::AlignVCenter );
- lbl->setFixedSize( lbl->sizeHint() );
+ lbl->tqsetAlignment( Qt::AlignLeft|Qt::AlignVCenter );
+ lbl->setFixedSize( lbl->tqsizeHint() );
d->layout->addWidget( lbl, 0, 0, Qt::AlignLeft );
}
d->prompt = new TQLabel( main );
- d->prompt->setAlignment( Qt::AlignLeft|Qt::AlignVCenter|Qt::WordBreak );
+ d->prompt->tqsetAlignment( Qt::AlignLeft|Qt::AlignVCenter|TQt::WordBreak );
d->layout->addWidget( d->prompt, 0, 2, Qt::AlignLeft );
if ( prompt.isEmpty() )
setPrompt( i18n( "You need to supply a username and a password" ) );
@@ -106,12 +106,12 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user,
// Row 4: Username field
d->userNameLabel = new TQLabel( i18n("&Username:"), main );
- d->userNameLabel->setAlignment( Qt::AlignVCenter | Qt::AlignLeft );
- d->userNameLabel->setFixedSize( d->userNameLabel->sizeHint() );
+ d->userNameLabel->tqsetAlignment( Qt::AlignVCenter | Qt::AlignLeft );
+ d->userNameLabel->setFixedSize( d->userNameLabel->tqsizeHint() );
d->userNameHBox = new TQHBox( main );
d->userEdit = new KLineEdit( d->userNameHBox );
- TQSize s = d->userEdit->sizeHint();
+ TQSize s = d->userEdit->tqsizeHint();
d->userEdit->setFixedHeight( s.height() );
d->userEdit->setMinimumWidth( s.width() );
d->userNameLabel->setBuddy( d->userEdit );
@@ -123,15 +123,15 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user,
// Row 6: Password field
lbl = new TQLabel( i18n("&Password:"), main );
- lbl->setAlignment( Qt::AlignVCenter | Qt::AlignLeft );
- lbl->setFixedSize( lbl->sizeHint() );
+ lbl->tqsetAlignment( Qt::AlignVCenter | Qt::AlignLeft );
+ lbl->setFixedSize( lbl->tqsizeHint() );
TQHBox* hbox = new TQHBox( main );
d->passEdit = new KLineEdit( hbox );
if ( cfg->readEntry("EchoMode", "OneStar") == "NoEcho" )
d->passEdit->setEchoMode( TQLineEdit::NoEcho );
else
d->passEdit->setEchoMode( TQLineEdit::Password );
- s = d->passEdit->sizeHint();
+ s = d->passEdit->tqsizeHint();
d->passEdit->setFixedHeight( s.height() );
d->passEdit->setMinimumWidth( s.width() );
lbl->setBuddy( d->passEdit );
@@ -145,7 +145,7 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user,
// Row 8: Keep Password
hbox = new TQHBox( main );
d->keepCheckBox = new TQCheckBox( i18n("&Keep password"), hbox );
- d->keepCheckBox->setFixedSize( d->keepCheckBox->sizeHint() );
+ d->keepCheckBox->setFixedSize( d->keepCheckBox->tqsizeHint() );
d->keep = cfg->readBoolEntry("Keep", false );
d->keepCheckBox->setChecked( d->keep );
connect(d->keepCheckBox, TQT_SIGNAL(toggled( bool )), TQT_SLOT(slotKeep( bool )));
@@ -165,7 +165,7 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user,
d->userEdit->setFocus();
d->userEditCombo = 0;
-// setFixedSize( sizeHint() );
+// setFixedSize( tqsizeHint() );
}
TQString PasswordDialog::username() const
@@ -198,7 +198,7 @@ static void calculateLabelSize(TQLabel *label)
// Calculate a proper size for the text.
{
TQSimpleRichText rt(qt_text, label->font());
- TQRect d = KGlobalSettings::desktopGeometry(label->topLevelWidget());
+ TQRect d = KGlobalSettings::desktopGeometry(label->tqtopLevelWidget());
pref_width = d.width() / 4;
rt.setWidth(pref_width-10);
@@ -239,11 +239,11 @@ void PasswordDialog::addCommentLine( const TQString& label,
TQWidget *main = mainWidget();
TQLabel* lbl = new TQLabel( label, main);
- lbl->setAlignment( Qt::AlignVCenter|Qt::AlignRight );
- lbl->setFixedSize( lbl->sizeHint() );
+ lbl->tqsetAlignment( Qt::AlignVCenter|Qt::AlignRight );
+ lbl->setFixedSize( lbl->tqsizeHint() );
d->layout->addWidget( lbl, d->nRow+2, 0, Qt::AlignLeft );
lbl = new TQLabel( comment, main);
- lbl->setAlignment( Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak );
+ lbl->tqsetAlignment( Qt::AlignVCenter|Qt::AlignLeft|TQt::WordBreak );
calculateLabelSize(lbl);
d->layout->addWidget( lbl, d->nRow+2, 2, Qt::AlignLeft );
d->layout->addRowSpacing( 3, 10 ); // Add a spacer
@@ -304,7 +304,7 @@ void PasswordDialog::setKnownLogins( const TQMap<TQString, TQString>& knownLogin
delete d->userEdit;
d->userEditCombo = new KComboBox( true, d->userNameHBox );
d->userEdit = d->userEditCombo->lineEdit();
- TQSize s = d->userEditCombo->sizeHint();
+ TQSize s = d->userEditCombo->tqsizeHint();
d->userEditCombo->setFixedHeight( s.height() );
d->userEditCombo->setMinimumWidth( s.width() );
d->userNameLabel->setBuddy( d->userEditCombo );
@@ -321,7 +321,7 @@ void PasswordDialog::setKnownLogins( const TQMap<TQString, TQString>& knownLogin
void PasswordDialog::slotActivated( const TQString& userName )
{
- TQMap<TQString, TQString>::ConstIterator it = d->knownLogins.find( userName );
+ TQMap<TQString, TQString>::ConstIterator it = d->knownLogins.tqfind( userName );
if ( it != d->knownLogins.end() )
setPassword( it.data() );
}
diff --git a/kio/kio/paste.cpp b/kio/kio/paste.cpp
index 399350236..37ba406f6 100644
--- a/kio/kio/paste.cpp
+++ b/kio/kio/paste.cpp
@@ -105,7 +105,7 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data,
const TQCString& fmt = formats[i];
KMimeType::Ptr mime = KMimeType::mimeType( fmt );
if ( mime != KMimeType::defaultMimeTypePtr() )
- formatLabels.append( i18n( "%1 (%2)" ).arg( mime->comment() ).arg( fmt ) );
+ formatLabels.append( i18n( "%1 (%2)" ).arg( mime->comment() ).arg( fmt.data() ) );
else
formatLabels.append( fmt );
}
@@ -135,9 +135,9 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data,
// if "data" came from QClipboard, then it was deleted already - by a nice 0-seconds timer
// In that case, get it again. Let's hope the user didn't copy something else meanwhile :/
if ( clipboard ) {
- data = TQApplication::clipboard()->data();
+ data = TQApplication::tqclipboard()->data();
}
- const TQByteArray ba = data->encodedData( chosenFormat );
+ const TQByteArray ba = data->tqencodedData( chosenFormat );
return pasteDataAsyncTo( new_url, ba );
}
#endif
@@ -146,13 +146,13 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data,
KIO_EXPORT bool KIO::isClipboardEmpty()
{
#ifndef QT_NO_MIMECLIPBOARD
- TQMimeSource *data = TQApplication::clipboard()->data();
- if ( data->provides( "text/uri-list" ) && data->encodedData( "text/uri-list" ).size() > 0 )
+ TQMimeSource *data = TQApplication::tqclipboard()->data();
+ if ( data->provides( "text/uri-list" ) && data->tqencodedData( "text/uri-list" ).size() > 0 )
return false;
#else
// Happens with some versions of Qt Embedded... :/
// Guess.
- TQString data = TQApplication::clipboard()->text();
+ TQString data = TQApplication::tqclipboard()->text();
if(data.contains("://"))
return false;
#endif
@@ -194,7 +194,7 @@ KIO::CopyJob* KIO::pasteMimeSource( TQMimeSource* data, const KURL& dest_url,
if ( formats.size() > 1 ) {
return chooseAndPaste( dest_url, data, formats, dialogText, widget, clipboard );
}
- ba = data->encodedData( formats.first() );
+ ba = data->tqencodedData( formats.first() );
}
if ( ba.size() == 0 )
{
@@ -215,7 +215,7 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move )
}
#ifndef QT_NO_MIMECLIPBOARD
- TQMimeSource *data = TQApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::tqclipboard()->data();
// First check for URLs.
KURL::List urls;
@@ -233,14 +233,14 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move )
// If moving, erase the clipboard contents, the original files don't exist anymore
if ( move )
- TQApplication::clipboard()->clear();
+ TQApplication::tqclipboard()->clear();
return res;
}
return pasteMimeSource( data, dest_url, TQString::null, 0 /*TODO parent widget*/, true /*clipboard*/ );
#else
TQByteArray ba;
TQTextStream txtStream( ba, IO_WriteOnly );
- TQStringList data = TQStringList::split("\n", TQApplication::clipboard()->text());
+ TQStringList data = TQStringList::split("\n", TQApplication::tqclipboard()->text());
KURL::List urls;
KURLDrag::decode(data, urls);
TQStringList::Iterator end(data.end());
@@ -290,7 +290,7 @@ KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const TQByteArray&
KIO_EXPORT TQString KIO::pasteActionText()
{
- TQMimeSource *data = TQApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::tqclipboard()->data();
KURL::List urls;
if ( KURLDrag::canDecode( data ) && KURLDrag::decode( data, urls ) ) {
if ( urls.isEmpty() )
diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp
index 3802093c1..34735c26d 100644
--- a/kio/kio/previewjob.cpp
+++ b/kio/kio/previewjob.cpp
@@ -96,7 +96,7 @@ struct KIO::PreviewJobPrivate
// If the file to create a thumb for was a temp file, this is its name
TQString tempName;
// Over that, it's too much
- unsigned long maximumSize;
+ unsigned long tqmaximumSize;
// the size for the icon overlay
int iconSize;
// the transparency of the blended mimetype icon
@@ -163,7 +163,7 @@ void PreviewJob::startPreview()
TQMap<TQString, KService::Ptr> mimeMap;
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
- if (!d->enabledPlugins || d->enabledPlugins->contains((*it)->desktopEntryName()))
+ if (!d->enabledPlugins || d->enabledPlugins->tqcontains((*it)->desktopEntryName()))
{
TQStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
for (TQStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
@@ -176,7 +176,7 @@ void PreviewJob::startPreview()
{
PreviewItem item;
item.item = it.current();
- TQMap<TQString, KService::Ptr>::ConstIterator plugin = mimeMap.find(it.current()->mimetype());
+ TQMap<TQString, KService::Ptr>::ConstIterator plugin = mimeMap.tqfind(it.current()->mimetype());
if (plugin == mimeMap.end()
&& (it.current()->mimetype() != "application/x-desktop")
&& (it.current()->mimetype() != "media/builtin-mydocuments")
@@ -187,7 +187,7 @@ void PreviewJob::startPreview()
&& (it.current()->mimetype() != "media/builtin-webbrowser"))
{
TQString mimeType = it.current()->mimetype();
- plugin = mimeMap.find(mimeType.replace(TQRegExp("/.*"), "/*"));
+ plugin = mimeMap.tqfind(mimeType.replace(TQRegExp("/.*"), "/*"));
if (plugin == mimeMap.end())
{
@@ -196,7 +196,7 @@ void PreviewJob::startPreview()
TQString parentMimeType = mimeInfo->parentMimeType();
while (!parentMimeType.isEmpty())
{
- plugin = mimeMap.find(parentMimeType);
+ plugin = mimeMap.tqfind(parentMimeType);
if (plugin != mimeMap.end()) break;
KMimeType::Ptr parentMimeInfo = KMimeType::mimeType(parentMimeType);
@@ -215,10 +215,10 @@ void PreviewJob::startPreview()
{
if (textProperty.toBool())
{
- plugin = mimeMap.find("text/plain");
+ plugin = mimeMap.tqfind("text/plain");
if (plugin == mimeMap.end())
{
- plugin = mimeMap.find( "text/*" );
+ plugin = mimeMap.tqfind( "text/*" );
}
}
}
@@ -246,7 +246,7 @@ void PreviewJob::startPreview()
// Read configuration value for the maximum allowed size
KConfig * config = KGlobal::config();
KConfigGroupSaver cgs( config, "PreviewSettings" );
- d->maximumSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ );
+ d->tqmaximumSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ );
if (bNeedCache)
{
@@ -339,7 +339,7 @@ void PreviewJob::slotResult( KIO::Job *job )
}
else if ( (*it).m_uds == KIO::UDS_SIZE )
{
- if ( filesize_t((*it).m_long) > d->maximumSize &&
+ if ( filesize_t((*it).m_long) > d->tqmaximumSize &&
!d->ignoreMaximumSize &&
!d->currentItem.plugin->property("IgnoreMaximumSize").toBool() )
{
@@ -405,7 +405,7 @@ bool PreviewJob::statResultThumbnail()
else d->origName = url.url();
#endif
- KMD5 md5( TQFile::encodeName( d->origName ) );
+ KMD5 md5( TQFile::encodeName( d->origName ).data() );
d->thumbName = TQFile::encodeName( md5.hexDigest() ) + ".png";
TQImage thumb;
@@ -533,9 +533,9 @@ void PreviewJob::emitPreview(const TQImage &thumb)
double imgRatio = (double)thumb.height() / (double)thumb.width();
if (imgRatio > (double)d->height / (double)d->width)
pix.convertFromImage(
- thumb.smoothScale((int)QMAX((double)d->height / imgRatio, 1), d->height));
+ thumb.smoothScale((int)TQMAX((double)d->height / imgRatio, 1), d->height));
else pix.convertFromImage(
- thumb.smoothScale(d->width, (int)QMAX((double)d->width * imgRatio, 1)));
+ thumb.smoothScale(d->width, (int)TQMAX((double)d->width * imgRatio, 1)));
}
else pix.convertFromImage(thumb);
emit gotPreview(d->currentItem.item, pix);
@@ -553,7 +553,7 @@ TQStringList PreviewJob::availablePlugins()
TQStringList result;
KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator");
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
- if (!result.contains((*it)->desktopEntryName()))
+ if (!result.tqcontains((*it)->desktopEntryName()))
result.append((*it)->desktopEntryName());
return result;
}
diff --git a/kio/kio/renamedlg.cpp b/kio/kio/renamedlg.cpp
index fe830b2e3..2cc928692 100644
--- a/kio/kio/renamedlg.cpp
+++ b/kio/kio/renamedlg.cpp
@@ -194,12 +194,12 @@ RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption,
lib->unload();
continue;
}
- TQObject *obj = factory->create( this, (*it)->name().latin1() );
+ TQObject *obj = factory->create( TQT_TQOBJECT(this), (*it)->name().latin1() );
if(!obj) {
lib->unload();
continue;
}
- RenameDlgPlugin *plugin = static_cast<RenameDlgPlugin *>(obj);
+ RenameDlgPlugin *plugin = static_cast<RenameDlgPlugin *>(TQT_TQWIDGET(obj));
if(!plugin ){
delete obj;
continue;
@@ -223,7 +223,7 @@ RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption,
// No plugin found, build default dialog
TQGridLayout * gridLayout = new TQGridLayout( 0L, 9, 2, KDialog::marginHint(),
KDialog::spacingHint() );
- pLayout->addLayout(gridLayout);
+ pLayout->addLayout(TQT_TQLAYOUT(gridLayout));
gridLayout->setColStretch(0,0);
gridLayout->setColStretch(1,10);
@@ -380,7 +380,7 @@ RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption,
d->bCancel->setDefault( true );
layout->addWidget( d->bCancel );
- resize( sizeHint() );
+ resize( tqsizeHint() );
}
RenameDlg::~RenameDlg()
@@ -440,13 +440,13 @@ TQString RenameDlg::suggestName(const KURL& baseURL, const TQString& oldName)
TQString dotSuffix, suggestedName;
TQString basename = oldName;
- int index = basename.find( '.' );
+ int index = basename.tqfind( '.' );
if ( index != -1 ) {
dotSuffix = basename.mid( index );
basename.truncate( index );
}
- int pos = basename.findRev( '_' );
+ int pos = basename.tqfindRev( '_' );
if(pos != -1 ){
TQString tmp = basename.mid( pos+1 );
bool ok;
diff --git a/kio/kio/renamedlg.h b/kio/kio/renamedlg.h
index a1b5d6bb2..373abf446 100644
--- a/kio/kio/renamedlg.h
+++ b/kio/kio/renamedlg.h
@@ -45,7 +45,7 @@ enum RenameDlg_Result { R_RESUME = 6, R_RESUME_ALL = 7, R_OVERWRITE = 4, R_OVERW
* @short A dialog for renaming files.
* @since 3.1
*/
-class KIO_EXPORT RenameDlg : public QDialog
+class KIO_EXPORT RenameDlg : public TQDialog
{
Q_OBJECT
public:
diff --git a/kio/kio/renamedlgplugin.h b/kio/kio/renamedlgplugin.h
index 39319fdb8..b4dd8b9fb 100644
--- a/kio/kio/renamedlgplugin.h
+++ b/kio/kio/renamedlgplugin.h
@@ -31,7 +31,7 @@
* @short Base class for RenameDlg plugins.
* @since 3.1
*/
-class KIO_EXPORT RenameDlgPlugin : public QWidget
+class KIO_EXPORT RenameDlgPlugin : public TQWidget
{
public:
/**
diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp
index 8ab080486..830ebe93c 100644
--- a/kio/kio/scheduler.cpp
+++ b/kio/kio/scheduler.cpp
@@ -110,7 +110,7 @@ class KIO::Scheduler::ProtocolInfoDict : public TQDict<KIO::Scheduler::ProtocolI
KIO::Scheduler::ProtocolInfo *
KIO::Scheduler::ProtocolInfoDict::get(const TQString &protocol)
{
- ProtocolInfo *info = find(protocol);
+ ProtocolInfo *info = tqfind(protocol);
if (!info)
{
info = new ProtocolInfo;
@@ -206,7 +206,7 @@ void Scheduler::_doJob(SimpleJob *job) {
jobData->checkOnHold = checkOnHold;
checkOnHold = false;
}
- extraJobData->replace(job, jobData);
+ extraJobData->tqreplace(job, jobData);
newJobs.append(job);
slaveTimer.start(0, true);
#ifndef NDEBUG
@@ -217,7 +217,7 @@ void Scheduler::_doJob(SimpleJob *job) {
void Scheduler::_scheduleJob(SimpleJob *job) {
newJobs.removeRef(job);
- JobData *jobData = extraJobData->find(job);
+ JobData *jobData = extraJobData->tqfind(job);
if (!jobData)
{
kdFatal(7006) << "BUG! _ScheduleJob(): No extraJobData for job!" << endl;
@@ -237,7 +237,7 @@ void Scheduler::_cancelJob(SimpleJob *job) {
if ( !slave )
{
// was not yet running (don't call this on a finished job!)
- JobData *jobData = extraJobData->find(job);
+ JobData *jobData = extraJobData->tqfind(job);
if (!jobData)
return; // I said: "Don't call this on a finished job!"
@@ -249,7 +249,7 @@ void Scheduler::_cancelJob(SimpleJob *job) {
slave = slaveList->first();
for(; slave; slave = slaveList->next())
{
- JobList *list = coSlaves.find(slave);
+ JobList *list = coSlaves.tqfind(slave);
if (list && list->removeRef(job))
break; // Job was found and removed.
// Fall through to kill the slave as well!
@@ -402,7 +402,7 @@ bool Scheduler::startJobScheduled(ProtocolInfo *protInfo)
// kdDebug(7006) << "scheduler: job started " << job << endl;
- JobData *jobData = extraJobData->find(job);
+ JobData *jobData = extraJobData->tqfind(job);
setupSlave(slave, job->url(), jobData->protocol, jobData->proxy, newSlave);
job->start(slave);
@@ -414,7 +414,7 @@ bool Scheduler::startJobDirect()
{
debug_info();
SimpleJob *job = newJobs.take(0);
- JobData *jobData = extraJobData->find(job);
+ JobData *jobData = extraJobData->tqfind(job);
if (!jobData)
{
kdFatal(7006) << "BUG! startjobDirect(): No extraJobData for job!"
@@ -481,7 +481,7 @@ static Slave *searchIdleList(SlaveList *idleSlaves, const KURL &url, const TQStr
Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact)
{
Slave *slave = 0;
- JobData *jobData = extraJobData->find(job);
+ JobData *jobData = extraJobData->tqfind(job);
if (!jobData)
{
kdFatal(7006) << "BUG! findIdleSlave(): No extraJobData for job!" << endl;
@@ -504,7 +504,7 @@ Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact)
if ( bCanReuse )
{
KIO::MetaData outgoing = tJob->outgoingMetaData();
- TQString resume = (!outgoing.contains("resume")) ? TQString::null : outgoing["resume"];
+ TQString resume = (!outgoing.tqcontains("resume")) ? TQString() : outgoing["resume"];
kdDebug(7006) << "Resume metadata is '" << resume << "'" << endl;
bCanReuse = (resume.isEmpty() || resume == "0");
}
@@ -582,7 +582,7 @@ void Scheduler::_jobFinished(SimpleJob *job, Slave *slave)
protInfo->activeSlaves.removeRef(slave);
if (slave->isAlive())
{
- JobList *list = coSlaves.find(slave);
+ JobList *list = coSlaves.tqfind(slave);
if (list)
{
assert(slave->isConnected());
@@ -618,7 +618,7 @@ void Scheduler::slotSlaveDied(KIO::Slave *slave)
urlOnHold = KURL();
}
idleSlaves->removeRef(slave);
- JobList *list = coSlaves.find(slave);
+ JobList *list = coSlaves.tqfind(slave);
if (list)
{
// coSlave dies, kill jobs waiting in queue
@@ -733,7 +733,7 @@ Scheduler::slotScheduleCoSlave()
slave = nextSlave)
{
nextSlave = coIdleSlaves->next();
- JobList *list = coSlaves.find(slave);
+ JobList *list = coSlaves.tqfind(slave);
assert(list);
if (list && !list->isEmpty())
{
@@ -784,7 +784,7 @@ void
Scheduler::slotSlaveError(int errorNr, const TQString &errorMsg)
{
Slave *slave = (Slave *)sender();
- if (!slave->isConnected() || (coIdleSlaves->find(slave) != -1))
+ if (!slave->isConnected() || (coIdleSlaves->tqfind(slave) != -1))
{
// Only forward to application if slave is idle or still connecting.
emit slaveError(slave, errorNr, errorMsg);
@@ -805,7 +805,7 @@ Scheduler::_assignJobToSlave(KIO::Slave *slave, SimpleJob *job)
return false;
}
- JobList *list = coSlaves.find(slave);
+ JobList *list = coSlaves.tqfind(slave);
assert(list);
if (!list)
{
@@ -865,15 +865,15 @@ Scheduler::_registerWindow(TQWidget *wid)
if (!wid)
return;
- TQObject *obj = static_cast<TQObject *>(wid);
- if (!m_windowList.contains(obj))
+ TQObject *obj = TQT_TQOBJECT(wid);
+ if (!m_windowList.tqcontains(obj))
{
// We must store the window Id because by the time
// the destroyed signal is emitted we can no longer
// access TQWidget::winId() (already destructed)
WId windowId = wid->winId();
m_windowList.insert(obj, windowId);
- connect(wid, TQT_SIGNAL(destroyed(TQObject *)),
+ connect(TQT_TQOBJECT(wid), TQT_SIGNAL(destroyed(TQObject *)),
this, TQT_SLOT(slotUnregisterWindow(TQObject*)));
TQByteArray params;
TQDataStream stream(params, IO_WriteOnly);
@@ -890,7 +890,7 @@ Scheduler::slotUnregisterWindow(TQObject *obj)
if (!obj)
return;
- TQMap<TQObject *, WId>::Iterator it = m_windowList.find(obj);
+ TQMap<TQObject *, WId>::Iterator it = m_windowList.tqfind(obj);
if (it == m_windowList.end())
return;
WId windowId = it.data();
diff --git a/kio/kio/sessiondata.cpp b/kio/kio/sessiondata.cpp
index 258f03e2a..2381bde91 100644
--- a/kio/kio/sessiondata.cpp
+++ b/kio/kio/sessiondata.cpp
@@ -236,8 +236,8 @@ SessionData::~SessionData()
void SessionData::configDataFor( MetaData &configData, const TQString &proto,
const TQString & )
{
- if ( (proto.find("http", 0, false) == 0 ) ||
- (proto.find("webdav", 0, false) == 0) )
+ if ( (proto.tqfind("http", 0, false) == 0 ) ||
+ (proto.tqfind("webdav", 0, false) == 0) )
{
if (!d->initDone)
reset();
@@ -273,20 +273,20 @@ void SessionData::reset()
// Get language settings...
TQStringList languageList = KGlobal::locale()->languagesTwoAlpha();
- TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") );
+ TQStringList::Iterator it = languageList.tqfind( TQString::tqfromLatin1("C") );
if ( it != languageList.end() )
{
- if ( languageList.contains( english ) > 0 )
+ if ( languageList.tqcontains( english ) > 0 )
languageList.remove( it );
else
(*it) = english;
}
- if ( !languageList.contains( english ) )
+ if ( !languageList.tqcontains( english ) )
languageList.append( english );
d->language = languageList.join( ", " );
- d->charsets = TQString::fromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower();
+ d->charsets = TQString::tqfromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower();
KProtocolManager::reparseConfiguration();
}
diff --git a/kio/kio/sessiondata.h b/kio/kio/sessiondata.h
index 408045260..80433679c 100644
--- a/kio/kio/sessiondata.h
+++ b/kio/kio/sessiondata.h
@@ -32,7 +32,7 @@ class SlaveConfig;
/**
* @internal
*/
-class KIO_EXPORT SessionData : public QObject
+class KIO_EXPORT SessionData : public TQObject
{
Q_OBJECT
diff --git a/kio/kio/skipdlg.cpp b/kio/kio/skipdlg.cpp
index f014b10d9..fabc6f841 100644
--- a/kio/kio/skipdlg.cpp
+++ b/kio/kio/skipdlg.cpp
@@ -71,8 +71,8 @@ SkipDlg::SkipDlg(TQWidget *parent, bool _multi, const TQString& _error_text, boo
// vlayout->addStrut( 360 ); makes dlg at least that wide
TQLabel * lb = new TQLabel( _error_text, this );
- lb->setFixedHeight( lb->sizeHint().height() );
- lb->setMinimumWidth( lb->sizeHint().width() );
+ lb->setFixedHeight( lb->tqsizeHint().height() );
+ lb->setMinimumWidth( lb->tqsizeHint().width() );
vlayout->addWidget( lb );
vlayout->addSpacing( 10 );
@@ -82,26 +82,26 @@ SkipDlg::SkipDlg(TQWidget *parent, bool _multi, const TQString& _error_text, boo
if ( b0 )
{
b0->setDefault( true );
- b0->setFixedSize( b0->sizeHint() );
+ b0->setFixedSize( b0->tqsizeHint() );
layout->addWidget( b0 );
layout->addSpacing( 5 );
}
if ( b1 )
{
- b1->setFixedSize( b1->sizeHint() );
+ b1->setFixedSize( b1->tqsizeHint() );
layout->addWidget( b1 );
layout->addSpacing( 5 );
}
if ( b2 )
{
- b2->setFixedSize( b2->sizeHint() );
+ b2->setFixedSize( b2->tqsizeHint() );
layout->addWidget( b2 );
layout->addSpacing( 5 );
}
vlayout->addStretch( 10 );
vlayout->activate();
- resize( sizeHint() );
+ resize( tqsizeHint() );
}
SkipDlg::~SkipDlg()
diff --git a/kio/kio/slave.cpp b/kio/kio/slave.cpp
index c1a701711..b4f288d94 100644
--- a/kio/kio/slave.cpp
+++ b/kio/kio/slave.cpp
@@ -364,7 +364,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error
client->attach();
TQString prefix = locateLocal("socket", KGlobal::instance()->instanceName());
- KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket"));
+ KTempFile socketfile(prefix, TQString::tqfromLatin1(".slave-socket"));
if ( socketfile.status() != 0 )
{
error_text = i18n("Unable to create io-slave: %1").arg(strerror(errno));
@@ -377,7 +377,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error
#endif
#ifndef Q_WS_WIN
- KServerSocket *kss = new KServerSocket(TQFile::encodeName(socketfile.name()));
+ KServerSocket *kss = new KServerSocket(TQFile::encodeName(socketfile.name()).data());
Slave *slave = new Slave(kss, protocol, socketfile.name());
#else
@@ -469,7 +469,7 @@ Slave* Slave::holdSlave( const TQString &protocol, const KURL& url )
client->attach();
TQString prefix = locateLocal("socket", KGlobal::instance()->instanceName());
- KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket"));
+ KTempFile socketfile(prefix, TQString::tqfromLatin1(".slave-socket"));
if ( socketfile.status() != 0 )
return 0;
@@ -479,7 +479,7 @@ Slave* Slave::holdSlave( const TQString &protocol, const KURL& url )
#endif
#ifndef Q_WS_WIN
- KServerSocket *kss = new KServerSocket(TQFile::encodeName(socketfile.name()));
+ KServerSocket *kss = new KServerSocket(TQFile::encodeName(socketfile.name()).data());
Slave *slave = new Slave(kss, protocol, socketfile.name());
#else
diff --git a/kio/kio/slavebase.cpp b/kio/kio/slavebase.cpp
index ad683a009..cecaf9ec3 100644
--- a/kio/kio/slavebase.cpp
+++ b/kio/kio/slavebase.cpp
@@ -340,7 +340,7 @@ void SlaveBase::dispatchLoop()
void SlaveBase::connectSlave(const TQString& path)
{
#ifdef Q_OS_UNIX //TODO: KSocket not yet available on WIN32
- appconn->init(new KSocket(TQFile::encodeName(path)));
+ appconn->init(new KSocket(TQFile::encodeName(path).data()));
if (!appconn->inited())
{
kdDebug(7019) << "SlaveBase: failed to connect to " << path << endl;
@@ -358,23 +358,23 @@ void SlaveBase::disconnectSlave()
void SlaveBase::setMetaData(const TQString &key, const TQString &value)
{
- mOutgoingMetaData.replace(key, value);
+ mOutgoingMetaData.tqreplace(key, value);
}
TQString SlaveBase::metaData(const TQString &key) const
{
- if (mIncomingMetaData.contains(key))
+ if (mIncomingMetaData.tqcontains(key))
return mIncomingMetaData[key];
- if (d->configData.contains(key))
+ if (d->configData.tqcontains(key))
return d->configData[key];
return TQString::null;
}
bool SlaveBase::hasMetaData(const TQString &key) const
{
- if (mIncomingMetaData.contains(key))
+ if (mIncomingMetaData.tqcontains(key))
return true;
- if (d->configData.contains(key))
+ if (d->configData.tqcontains(key))
return true;
return false;
}
@@ -434,7 +434,7 @@ void SlaveBase::error( int _errid, const TQString &_text )
{
mIncomingMetaData.clear(); // Clear meta data
mOutgoingMetaData.clear();
- KIO_DATA << (Q_INT32) _errid << _text;
+ KIO_DATA << (TQ_INT32) _errid << _text;
m_pConnection->send( MSG_ERROR, data );
//reset
@@ -471,7 +471,7 @@ void SlaveBase::needSubURLData()
void SlaveBase::slaveStatus( const TQString &host, bool connected )
{
pid_t pid = getpid();
- Q_INT8 b = connected ? 1 : 0;
+ TQ_INT8 b = connected ? 1 : 0;
KIO_DATA << pid << mProtocol << host << b;
if (d->onHold)
stream << d->onHoldUrl;
@@ -543,7 +543,7 @@ void SlaveBase::processedPercent( float /* percent */ )
void SlaveBase::speed( unsigned long _bytes_per_second )
{
- KIO_DATA << (Q_UINT32) _bytes_per_second;
+ KIO_DATA << (TQ_UINT32) _bytes_per_second;
slaveWriteError = false;
m_pConnection->send( INF_SPEED, data );
if (slaveWriteError) exit();
@@ -700,7 +700,7 @@ void SlaveBase::listEntry( const UDSEntry& entry, bool _ready )
void SlaveBase::listEntries( const UDSEntryList& list )
{
- KIO_DATA << (Q_UINT32)list.count();
+ KIO_DATA << (TQ_UINT32)list.count();
UDSEntryListConstIterator it = list.begin();
UDSEntryListConstIterator end = list.end();
for (; it != end; ++it)
@@ -898,7 +898,7 @@ int SlaveBase::messageBox( const TQString &text, MessageBoxType type, const TQSt
const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName )
{
kdDebug(7019) << "messageBox " << type << " " << text << " - " << caption << buttonYes << buttonNo << endl;
- KIO_DATA << (Q_INT32)type << text << caption << buttonYes << buttonNo << dontAskAgainName;
+ KIO_DATA << (TQ_INT32)type << text << caption << buttonYes << buttonNo << dontAskAgainName;
m_pConnection->send( INF_MESSAGEBOX, data );
if ( waitForAnswer( CMD_MESSAGEBOXANSWER, 0, data ) != -1 )
{
@@ -1048,7 +1048,7 @@ void SlaveBase::dispatch( int command, const TQByteArray &data )
case CMD_PUT:
{
int permissions;
- Q_INT8 iOverwrite, iResume;
+ TQ_INT8 iOverwrite, iResume;
stream >> url >> iOverwrite >> iResume >> permissions;
bool overwrite = ( iOverwrite != 0 );
bool resume = ( iResume != 0 );
@@ -1078,7 +1078,7 @@ void SlaveBase::dispatch( int command, const TQByteArray &data )
break;
case CMD_RENAME:
{
- Q_INT8 iOverwrite;
+ TQ_INT8 iOverwrite;
KURL url2;
stream >> url >> url2 >> iOverwrite;
bool overwrite = (iOverwrite != 0);
@@ -1086,7 +1086,7 @@ void SlaveBase::dispatch( int command, const TQByteArray &data )
} break;
case CMD_SYMLINK:
{
- Q_INT8 iOverwrite;
+ TQ_INT8 iOverwrite;
TQString target;
stream >> target >> url >> iOverwrite;
bool overwrite = (iOverwrite != 0);
@@ -1095,7 +1095,7 @@ void SlaveBase::dispatch( int command, const TQByteArray &data )
case CMD_COPY:
{
int permissions;
- Q_INT8 iOverwrite;
+ TQ_INT8 iOverwrite;
KURL url2;
stream >> url >> url2 >> permissions >> iOverwrite;
bool overwrite = (iOverwrite != 0);
@@ -1103,7 +1103,7 @@ void SlaveBase::dispatch( int command, const TQByteArray &data )
} break;
case CMD_DEL:
{
- Q_INT8 isFile;
+ TQ_INT8 isFile;
stream >> url >> isFile;
del( url, isFile != 0);
} break;
diff --git a/kio/kio/slavebase.h b/kio/kio/slavebase.h
index 82370ce56..48fccd74e 100644
--- a/kio/kio/slavebase.h
+++ b/kio/kio/slavebase.h
@@ -618,10 +618,10 @@ public:
* KIO::AuthInfo authInfo;
* if ( openPassDlg( authInfo ) )
* {
- * kdDebug() << TQString::fromLatin1("User: ")
+ * kdDebug() << TQString::tqfromLatin1("User: ")
* << authInfo.username << endl;
- * kdDebug() << TQString::fromLatin1("Password: ")
- * << TQString::fromLatin1("Not displayed here!") << endl;
+ * kdDebug() << TQString::tqfromLatin1("Password: ")
+ * << TQString::tqfromLatin1("Not displayed here!") << endl;
* }
* \endcode
*
@@ -635,10 +635,10 @@ public:
* TQString errorMsg = "You entered an incorrect password.";
* if ( openPassDlg( authInfo, errorMsg ) )
* {
- * kdDebug() << TQString::fromLatin1("User: ")
+ * kdDebug() << TQString::tqfromLatin1("User: ")
* << authInfo.username << endl;
- * kdDebug() << TQString::fromLatin1("Password: ")
- * << TQString::fromLatin1("Not displayed here!") << endl;
+ * kdDebug() << TQString::tqfromLatin1("Password: ")
+ * << TQString::tqfromLatin1("Not displayed here!") << endl;
* }
* \endcode
*
diff --git a/kio/kio/slaveconfig.cpp b/kio/kio/slaveconfig.cpp
index fe888c99c..d9efdb6cc 100644
--- a/kio/kio/slaveconfig.cpp
+++ b/kio/kio/slaveconfig.cpp
@@ -79,7 +79,7 @@ void SlaveConfigPrivate::readGlobalConfig()
SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const TQString &_protocol)
{
- SlaveConfigProtocol *scp = protocol.find(_protocol);
+ SlaveConfigProtocol *scp = protocol.tqfind(_protocol);
if (!scp)
{
TQString filename = KProtocolInfo::config(_protocol);
@@ -94,7 +94,7 @@ SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const TQString &_pro
SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const TQString &_protocol)
{
- SlaveConfigProtocol *scp = protocol.find(_protocol);
+ SlaveConfigProtocol *scp = protocol.tqfind(_protocol);
if (!scp)
scp = readProtocolConfig(_protocol);
return scp;
@@ -103,7 +103,7 @@ SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const TQString &_pro
void SlaveConfigPrivate::readConfigProtocolHost(const TQString &, SlaveConfigProtocol *scp, const TQString &host)
{
MetaData *metaData = new MetaData;
- scp->host.replace(host, metaData);
+ scp->host.tqreplace(host, metaData);
// Read stuff
// Break host into domains
@@ -119,7 +119,7 @@ void SlaveConfigPrivate::readConfigProtocolHost(const TQString &, SlaveConfigPro
int pos = 0;
do
{
- pos = host.findRev('.', pos-1);
+ pos = host.tqfindRev('.', pos-1);
if (pos < 0)
domain = host;
@@ -178,11 +178,11 @@ void SlaveConfig::setConfigData(const TQString &protocol, const TQString &host,
}
else
{
- MetaData *hostConfig = scp->host.find(host);
+ MetaData *hostConfig = scp->host.tqfind(host);
if (!hostConfig)
{
d->readConfigProtocolHost(protocol, scp, host);
- hostConfig = scp->host.find(host);
+ hostConfig = scp->host.tqfind(host);
assert(hostConfig);
}
*hostConfig += config;
@@ -197,12 +197,12 @@ MetaData SlaveConfig::configData(const TQString &protocol, const TQString &host)
config += scp->global;
if (host.isEmpty())
return config;
- MetaData *hostConfig = scp->host.find(host);
+ MetaData *hostConfig = scp->host.tqfind(host);
if (!hostConfig)
{
d->readConfigProtocolHost(protocol, scp, host);
emit configNeeded(protocol, host);
- hostConfig = scp->host.find(host);
+ hostConfig = scp->host.tqfind(host);
assert(hostConfig);
}
config += *hostConfig;
diff --git a/kio/kio/slaveconfig.h b/kio/kio/slaveconfig.h
index 1eaaa55e4..a7ded457d 100644
--- a/kio/kio/slaveconfig.h
+++ b/kio/kio/slaveconfig.h
@@ -44,7 +44,7 @@ namespace KIO {
* only applied when the slave is connecting with a host that matches with
* the host and/or domain specified by the group.
*/
- class KIO_EXPORT SlaveConfig : public QObject
+ class KIO_EXPORT SlaveConfig : public TQObject
{
Q_OBJECT
public:
diff --git a/kio/kio/slaveinterface.cpp b/kio/kio/slaveinterface.cpp
index 563aad17e..62c64d566 100644
--- a/kio/kio/slaveinterface.cpp
+++ b/kio/kio/slaveinterface.cpp
@@ -43,7 +43,7 @@ TQDataStream &operator <<(TQDataStream &s, const KIO::UDSEntry &e )
// We do the same on 64-bit platforms in case we run in a mixed 32/64bit
// environment.
- Q_UINT32 size = 0;
+ TQ_UINT32 size = 0;
KIO::UDSEntry::ConstIterator it = e.begin();
for( ; it != e.end(); ++it )
{
@@ -70,7 +70,7 @@ TQDataStream &operator <<(TQDataStream &s, const KIO::UDSEntry &e )
TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e )
{
e.clear();
- Q_UINT32 size;
+ TQ_UINT32 size;
s >> size;
// On 32-bit platforms we send UDS_SIZE with UDS_SIZE_LARGE in front
@@ -78,8 +78,8 @@ TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e )
// that would break the compatibility of the wire-protocol with KDE 2.
// We do the same on 64-bit platforms in case we run in a mixed 32/64bit
// environment.
- Q_LLONG msb = 0;
- for(Q_UINT32 i = 0; i < size; i++)
+ TQ_LLONG msb = 0;
+ for(TQ_UINT32 i = 0; i < size; i++)
{
KIO::UDSAtom a;
s >> a;
@@ -92,7 +92,7 @@ TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e )
if (a.m_uds == KIO::UDS_SIZE)
{
if (a.m_long < 0)
- a.m_long += (Q_LLONG) 1 << 32;
+ a.m_long += (TQ_LLONG) 1 << 32;
a.m_long += msb << 32;
}
e.append(a);
@@ -225,9 +225,9 @@ bool SlaveInterface::dispatch( int _cmd, const TQByteArray &rawdata )
TQDataStream stream( rawdata, IO_ReadOnly );
TQString str1;
- Q_INT32 i;
- Q_INT8 b;
- Q_UINT32 ul;
+ TQ_INT32 i;
+ TQ_INT8 b;
+ TQ_UINT32 ul;
switch( _cmd ) {
case MSG_DATA:
@@ -251,7 +251,7 @@ bool SlaveInterface::dispatch( int _cmd, const TQByteArray &rawdata )
break;
case MSG_LIST_ENTRIES:
{
- Q_UINT32 count;
+ TQ_UINT32 count;
stream >> count;
UDSEntryList list;
diff --git a/kio/kio/slaveinterface.h b/kio/kio/slaveinterface.h
index 5cca5dd77..d5b680f63 100644
--- a/kio/kio/slaveinterface.h
+++ b/kio/kio/slaveinterface.h
@@ -89,7 +89,7 @@ class SlaveInterfacePrivate;
*
* A call to foo() results in a call to slotFoo() on the other end.
*/
-class KIO_EXPORT SlaveInterface : public QObject
+class KIO_EXPORT SlaveInterface : public TQObject
{
Q_OBJECT
@@ -252,7 +252,7 @@ private:
inline TQDataStream &operator >>(TQDataStream &s, KIO::UDSAtom &a )
{
- Q_INT32 l;
+ TQ_INT32 l;
s >> a.m_uds;
if ( a.m_uds & KIO::UDS_LONG ) {
@@ -273,7 +273,7 @@ inline TQDataStream &operator <<(TQDataStream &s, const KIO::UDSAtom &a )
s << a.m_uds;
if ( a.m_uds & KIO::UDS_LONG )
- s << (Q_INT32) a.m_long;
+ s << (TQ_INT32) a.m_long;
else if ( a.m_uds & KIO::UDS_STRING )
s << a.m_str;
else {} // DIE!
diff --git a/kio/kio/statusbarprogress.cpp b/kio/kio/statusbarprogress.cpp
index 910155799..a3fdbf9c2 100644
--- a/kio/kio/statusbarprogress.cpp
+++ b/kio/kio/statusbarprogress.cpp
@@ -60,11 +60,11 @@ StatusbarProgress::StatusbarProgress( TQWidget* parent, bool button )
stack->addWidget( m_pProgressBar, 1 );
m_pLabel = new TQLabel( "", this );
- m_pLabel->setAlignment( AlignHCenter | AlignVCenter );
+ m_pLabel->tqsetAlignment( AlignHCenter | AlignVCenter );
m_pLabel->installEventFilter( this );
m_pLabel->setMinimumWidth( w );
stack->addWidget( m_pLabel, 2 );
- setMinimumSize( sizeHint() );
+ setMinimumSize( tqsizeHint() );
mode = None;
setMode();
@@ -144,7 +144,7 @@ bool StatusbarProgress::eventFilter( TQObject *, TQEvent *ev ) {
if ( ev->type() == TQEvent::MouseButtonPress ) {
TQMouseEvent *e = (TQMouseEvent*)ev;
- if ( e->button() == LeftButton ) { // toggle view on left mouse button
+ if ( e->button() == Qt::LeftButton ) { // toggle view on left mouse button
if ( mode == Label ) {
mode = Progress;
} else if ( mode == Progress ) {
diff --git a/kio/kio/tcpslavebase.cpp b/kio/kio/tcpslavebase.cpp
index 78093577d..5547c4d23 100644
--- a/kio/kio/tcpslavebase.cpp
+++ b/kio/kio/tcpslavebase.cpp
@@ -774,7 +774,7 @@ int TCPSlaveBase::verifyCertificate()
}
#endif
if (!_IPmatchesCN && !d->militantSSL) { // force this if the user wants it
- if (d->cc->getHostList(pc).contains(ourHost)) {
+ if (d->cc->getHostList(pc).tqcontains(ourHost)) {
_IPmatchesCN = true;
}
}