diff options
Diffstat (limited to 'kio/kio')
115 files changed, 1063 insertions, 1063 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..9d8c271ad 100644 --- a/kio/kio/chmodjob.cpp +++ b/kio/kio/chmodjob.cpp @@ -40,11 +40,11 @@ using namespace KIO; -ChmodJob::ChmodJob( const KFileItemList& lstItems, int permissions, int mask, +ChmodJob::ChmodJob( const KFileItemList& lstItems, int permissions, int tqmask, int newOwner, int newGroup, bool recursive, bool showProgressInfo ) : KIO::Job( showProgressInfo ), state( STATE_LISTING ), - m_permissions( permissions ), m_mask( mask ), + m_permissions( permissions ), m_tqmask( tqmask ), m_newOwner( newOwner ), m_newGroup( newGroup ), m_recursive( recursive ), m_lstItems( lstItems ) { @@ -62,12 +62,12 @@ void ChmodJob::processList() ChmodInfo info; info.url = item->url(); // This is a toplevel file, we apply changes directly (no +X emulation here) - info.permissions = ( m_permissions & m_mask ) | ( item->permissions() & ~m_mask ); + info.permissions = ( m_permissions & m_tqmask ) | ( item->permissions() & ~m_tqmask ); /*kdDebug(7007) << "\n current permissions=" << TQString::number(item->permissions(),8) << "\n wanted permission=" << TQString::number(m_permissions,8) - << "\n with mask=" << TQString::number(m_mask,8) - << "\n with ~mask (mask bits we keep) =" << TQString::number((uint)~m_mask,8) - << "\n bits we keep =" << TQString::number(item->permissions() & ~m_mask,8) + << "\n with tqmask=" << TQString::number(m_tqmask,8) + << "\n with ~tqmask (tqmask bits we keep) =" << TQString::number((uint)~m_tqmask,8) + << "\n bits we keep =" << TQString::number(item->permissions() & ~m_tqmask,8) << "\n new permissions = " << TQString::number(info.permissions,8) << endl;*/ m_infos.prepend( info ); @@ -121,33 +121,33 @@ 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 info.url.addPath( relativePath ); - int mask = m_mask; + int tqmask = m_tqmask; // Emulate -X: only give +x to files that had a +x bit already // So the check is the opposite : if the file had no x bit, don't touch x bits // For dirs this doesn't apply if ( !isDir ) { - int newPerms = m_permissions & mask; + int newPerms = m_permissions & tqmask; if ( (newPerms & 0111) && !(permissions & 0111) ) { // don't interfere with mandatory file locking if ( newPerms & 02000 ) - mask = mask & ~0101; + tqmask = tqmask & ~0101; else - mask = mask & ~0111; + tqmask = tqmask & ~0111; } } - info.permissions = ( m_permissions & mask ) | ( permissions & ~mask ); + info.permissions = ( m_permissions & tqmask ) | ( permissions & ~tqmask ); /*kdDebug(7007) << "\n current permissions=" << TQString::number(permissions,8) << "\n wanted permission=" << TQString::number(m_permissions,8) - << "\n with mask=" << TQString::number(mask,8) - << "\n with ~mask (mask bits we keep) =" << TQString::number((uint)~mask,8) - << "\n bits we keep =" << TQString::number(permissions & ~mask,8) + << "\n with tqmask=" << TQString::number(tqmask,8) + << "\n with ~tqmask (tqmask bits we keep) =" << TQString::number((uint)~tqmask,8) + << "\n bits we keep =" << TQString::number(permissions & ~tqmask,8) << "\n new permissions = " << TQString::number(info.permissions,8) << endl;*/ // Prepend this info in our todo list. @@ -227,7 +227,7 @@ void ChmodJob::slotResult( KIO::Job * job ) } // antlarr: KDE 4: Make owner and group be const TQString & -KIO_EXPORT ChmodJob *KIO::chmod( const KFileItemList& lstItems, int permissions, int mask, +KIO_EXPORT ChmodJob *KIO::chmod( const KFileItemList& lstItems, int permissions, int tqmask, TQString owner, TQString group, bool recursive, bool showProgressInfo ) { @@ -249,7 +249,7 @@ KIO_EXPORT ChmodJob *KIO::chmod( const KFileItemList& lstItems, int permissions, else newGroupID = g->gr_gid; } - return new ChmodJob( lstItems, permissions, mask, newOwnerID, newGroupID, recursive, showProgressInfo ); + return new ChmodJob( lstItems, permissions, tqmask, newOwnerID, newGroupID, recursive, showProgressInfo ); } void ChmodJob::virtual_hook( int id, void* data ) diff --git a/kio/kio/chmodjob.h b/kio/kio/chmodjob.h index fdb873b17..d1fe572f9 100644 --- a/kio/kio/chmodjob.h +++ b/kio/kio/chmodjob.h @@ -42,7 +42,7 @@ namespace KIO { /** * Create new ChmodJobs using the KIO::chmod() function. */ - ChmodJob( const KFileItemList & lstItems, int permissions, int mask, + ChmodJob( const KFileItemList & lstItems, int permissions, int tqmask, int newOwner, int newGroup, bool recursive, bool showProgressInfo ); @@ -63,7 +63,7 @@ namespace KIO { }; enum { STATE_LISTING, STATE_CHMODING } state; int m_permissions; - int m_mask; + int m_tqmask; int m_newOwner; int m_newGroup; bool m_recursive; @@ -91,8 +91,8 @@ namespace KIO { * * @param lstItems The file items representing several files or directories. * @param permissions the permissions we want to set - * @param mask the bits we are allowed to change. - * For instance, if mask is 0077, we don't change + * @param tqmask the bits we are allowed to change. + * For instance, if tqmask is 0077, we don't change * the "user" bits, only "group" and "others". * @param newOwner If non-empty, the new owner for the files * @param newGroup If non-empty, the new group for the files @@ -100,7 +100,7 @@ namespace KIO { * @param showProgressInfo true to show progess information * @return The job handling the operation. */ - KIO_EXPORT ChmodJob * chmod( const KFileItemList& lstItems, int permissions, int mask, + KIO_EXPORT ChmodJob * chmod( const KFileItemList& lstItems, int permissions, int tqmask, TQString newOwner, TQString newGroup, bool recursive, bool showProgressInfo = true ); diff --git a/kio/kio/configure.in.in b/kio/kio/configure.in.in index 8683dfec1..1aea61653 100644 --- a/kio/kio/configure.in.in +++ b/kio/kio/configure.in.in @@ -1,5 +1,5 @@ dnl ------------------------------------------------------------------------ -dnl Try to find if FAM is installed +dnl Try to tqfind if FAM is installed dnl ------------------------------------------------------------------------ dnl kde_have_fam=yes @@ -23,7 +23,7 @@ if test "$kde_have_fam" = "yes" ; then fi AC_SUBST(LIBFAM) dnl ------------------------------------------------------------------------ -dnl Try to find if LIBZ is installed +dnl Try to tqfind if LIBZ is installed dnl ------------------------------------------------------------------------ dnl @@ -47,7 +47,7 @@ int getmntinfo(struct statfs **mntbufp, int flags); ]) dnl ------------------------------------------------------------------------ -dnl Try to find if libvolmgt is installed (Solaris) +dnl Try to tqfind if libvolmgt is installed (Solaris) dnl ------------------------------------------------------------------------ kde_have_volmgt=yes AC_CHECK_LIB(volmgt, volmgt_running, [LIBVOLMGT=-lvolmgt], kde_have_volmgt=no) @@ -57,7 +57,7 @@ if test "$kde_have_volmgt" = "yes"; then fi dnl ------------------------------------------------------------------------ -dnl Try to find if we have Linux Dir Notification +dnl Try to tqfind if we have Linux Dir Notification dnl ------------------------------------------------------------------------ AC_ARG_ENABLE(dnotify, @@ -103,7 +103,7 @@ if test "x$kde_enable_dnotify" = "xyes"; then fi dnl ------------------------------------------------------------------------ -dnl Try to find if we have Linux Inode based Dir Notification +dnl Try to tqfind if we have Linux Inode based Dir Notification dnl ------------------------------------------------------------------------ AC_ARG_ENABLE(inotify, 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..659efbf3d 100644 --- a/kio/kio/dataprotocol.cpp +++ b/kio/kio/dataprotocol.cpp @@ -88,11 +88,11 @@ const TQChar base64_str[] = { 'b','a','s','e','6','4' }; * @p c1 to @p c3 or buf.length() if none is contained. * @param buf buffer where to look for c * @param begin zero-indexed starting position - * @param c1 character to find - * @param c2 alternative character to find or '\0' to ignore - * @param c3 alternative character to find or '\0' to ignore + * @param c1 character to tqfind + * @param c2 alternative character to tqfind or '\0' to ignore + * @param c3 alternative character to tqfind or '\0' to ignore */ -static int find(const TQString &buf, int begin, TQChar c1, TQChar c2 = '\0', +static int tqfind(const TQString &buf, int begin, TQChar c1, TQChar c2 = '\0', TQChar c3 = '\0') { int pos = begin; int size = (int)buf.length(); @@ -113,15 +113,15 @@ static int find(const TQString &buf, int begin, TQChar c1, TQChar c2 = '\0', * neither character occurred. * @param buf buffer where to look for * @param pos zero-indexed position within buffer - * @param c1 character to find - * @param c2 alternative character to find or 0 to ignore - * @param c3 alternative character to find or 0 to ignore + * @param c1 character to tqfind + * @param c2 alternative character to tqfind or 0 to ignore + * @param c3 alternative character to tqfind or 0 to ignore */ 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); + pos = tqfind(buf,oldpos,c1,c2,c3); + 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/davjob.cpp b/kio/kio/davjob.cpp index 1f3b208a6..6b2201c22 100644 --- a/kio/kio/davjob.cpp +++ b/kio/kio/davjob.cpp @@ -46,7 +46,7 @@ class DavJob::DavJobPrivate { public: TQByteArray savedStaticData; - TQByteArray str_response; // replaces the TQString previously used in DavJob itself + TQByteArray str_response; // tqreplaces the TQString previously used in DavJob itself }; DavJob::DavJob( const KURL& url, int method, const TQString& request, bool showProgressInfo ) diff --git a/kio/kio/davjob.h b/kio/kio/davjob.h index 98d0fe702..98cdc0080 100644 --- a/kio/kio/davjob.h +++ b/kio/kio/davjob.h @@ -89,7 +89,7 @@ namespace KIO { * the properties of the resource identified by the given @p url. * * @param url the URL of the resource - * @param properties a propfind document that describes the properties that + * @param properties a proptqfind document that describes the properties that * should be retrieved * @param depth the depth of the request. Can be "0", "1" or "infinity" * @param showProgressInfo true to show progress information diff --git a/kio/kio/defaultprogress.cpp b/kio/kio/defaultprogress.cpp index 8293901ae..0ca33d184 100644 --- a/kio/kio/defaultprogress.cpp +++ b/kio/kio/defaultprogress.cpp @@ -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() & ~Qt::WordBreak ); } @@ -472,7 +472,7 @@ void DefaultProgress::checkDestination(const KURL& dest) { TQString path = dest.path( -1 ); TQStringList tmpDirs = KGlobal::dirs()->resourceDirs( "tmp" ); for ( TQStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it ) - if ( path.contains( *it ) ) + if ( path.tqcontains( *it ) ) ok = false; // it's in the tmp resource } 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..44718fc91 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,13 +167,13 @@ 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, "%%"); + str.tqreplace( i, 1, "%%"); i += 2; } - while ( ( i = str.find( "/" ) ) != -1 ) - str.replace( i, 1, "%2f"); + while ( ( i = str.tqfind( "/" ) ) != -1 ) + str.tqreplace( 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; @@ -700,7 +700,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT causes << i18n( "This error is very much dependent on the KDE program. The " "additional information should give you more information than is available " "to the KDE input/output architecture." ); - solutions << i18n( "Attempt to find another way to accomplish the same " + solutions << i18n( "Attempt to tqfind another way to accomplish the same " "outcome." ); break; @@ -988,7 +988,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT break; case KIO::ERR_COULD_NOT_STAT: - errorName = i18n( "Could Not Determine Resource Status" ); + errorName = i18n( "Could Not Determine Resource tqStatus" ); techName = i18n( "Could Not Stat Resource" ); description = i18n( "An attempt to determine information about the status " "of the resource <strong>%1</strong>, such as the resource name, type, " @@ -1291,7 +1291,7 @@ KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorT #include <sys/vmount.h> #include <sys/vfs.h> -/* AIX does not prototype mntctl anywhere that I can find */ +/* AIX does not prototype mntctl anywhere that I can tqfind */ #ifndef mntctl extern "C" { int mntctl(int command, int size, void* buffer); @@ -1368,7 +1368,7 @@ extern "C" void endvfsent( ); #endif /* HAVE_GETMNTINFO */ -TQString KIO::findDeviceMountPoint( const TQString& filename ) +TQString KIO::tqfindDeviceMountPoint( const TQString& filename ) { TQString result; @@ -1383,13 +1383,13 @@ TQString KIO::findDeviceMountPoint( const TQString& filename ) TQCString devname; if( (volpath = volmgt_root()) == NULL ) { - kdDebug( 7007 ) << "findDeviceMountPoint: " - << "VOLMGT: can't find volmgt root dir" << endl; + kdDebug( 7007 ) << "tqfindDeviceMountPoint: " + << "VOLMGT: can't tqfind volmgt root dir" << endl; return TQString::null; } if( (mnttab = fopen( MNTTAB, "r" )) == NULL ) { - kdDebug( 7007 ) << "findDeviceMountPoint: " + kdDebug( 7007 ) << "tqfindDeviceMountPoint: " << "VOLMGT: can't open mnttab" << endl; return TQString::null; } @@ -1398,12 +1398,12 @@ TQString KIO::findDeviceMountPoint( const TQString& filename ) devname += TQFile::encodeName( filename ); devname += '/'; len = devname.length(); -// kdDebug( 7007 ) << "findDeviceMountPoint: " +// kdDebug( 7007 ) << "tqfindDeviceMountPoint: " // << "VOLMGT: searching mountpoint for \"" << devname << "\"" // << endl; /* - * find the mountpoint + * tqfind the mountpoint * floppies: * /dev/disketteN => <volpath>/dev/disketteN * CDROM, ZIP, and other media: @@ -1432,12 +1432,12 @@ TQString KIO::findDeviceMountPoint( const TQString& filename ) TQCString realname; realname = TQFile::encodeName(filename); - /* If the path contains symlinks, get the real name */ + /* If the path tqcontains symlinks, get the real name */ if (realpath(realname, realpath_buffer) != 0) // succes, use result from realpath realname = realpath_buffer; - //kdDebug(7007) << "findDeviceMountPoint realname=" << realname << endl; + //kdDebug(7007) << "tqfindDeviceMountPoint realname=" << realname << endl; #ifdef HAVE_GETMNTINFO @@ -1453,7 +1453,7 @@ TQString KIO::findDeviceMountPoint( const TQString& filename ) TQCString device_name = mounted[i].f_mntfromname; - // If the path contains symlinks, get + // If the path tqcontains symlinks, get // the real name if (realpath(device_name, realpath_buffer) != 0) // succes, use result from realpath @@ -1546,7 +1546,7 @@ TQString KIO::findDeviceMountPoint( const TQString& filename ) return TQString::null; } - /* Loop over all file systems and see if we can find our + /* Loop over all file systems and see if we can tqfind our * mount point. * Note that this is the mount point with the longest match. * XXX: Fails if me->mnt_dir is not a realpath but goes @@ -1561,14 +1561,14 @@ TQString KIO::findDeviceMountPoint( const TQString& filename ) while (GETMNTENT(mtab, me)) { // There may be symbolic links into the /etc/mnttab - // So we have to find the real device name here as well! + // So we have to tqfind the real device name here as well! TQCString device_name = FSNAME(me); if (device_name.isEmpty() || (device_name == "none")) continue; //kdDebug( 7007 ) << "device_name=" << device_name << endl; - // If the path contains symlinks, get + // If the path tqcontains symlinks, get // the real name if (realpath(device_name, realpath_buffer) != 0) // succes, use result from realpath @@ -1690,7 +1690,7 @@ static TQString get_mount_info(const TQString& filename, memset(realname, 0, MAXPATHLEN); - /* If the path contains symlinks, get the real name */ + /* If the path tqcontains symlinks, get the real name */ if (realpath(TQFile::encodeName(filename), realname) == 0) { if( strlcpy(realname, TQFile::encodeName(filename), MAXPATHLEN)>=MAXPATHLEN) return TQString::null; @@ -1699,7 +1699,7 @@ static TQString get_mount_info(const TQString& filename, int max = 0; TQString mountPoint; - /* Loop over all file systems and see if we can find our + /* Loop over all file systems and see if we can tqfind our * mount point. * Note that this is the mount point with the longest match. * XXX: Fails if me->mnt_dir is not a realpath but goes @@ -1725,7 +1725,7 @@ static TQString get_mount_info(const TQString& filename, TQCString device_name = mounted[i].f_mntfromname; - // If the path contains symlinks, get + // If the path tqcontains symlinks, get // the real name if (realpath(device_name, realpath_buffer) != 0) // succes, use result from realpath @@ -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,12 +1805,12 @@ 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) { - // TODO: add check for ismanual, I couldn't find any way + // TODO: add check for ismanual, I couldn't tqfind any way // how to get the mount attribute from /etc/filesystems ismanual == Wrong; } @@ -1909,13 +1909,13 @@ static TQString get_mount_info(const TQString& filename, #else //!Q_OS_UNIX //dummy -TQString KIO::findDeviceMountPoint( const TQString& filename ) +TQString KIO::tqfindDeviceMountPoint( const TQString& filename ) { return TQString::null; } #endif -TQString KIO::findPathMountPoint(const TQString& filename) +TQString KIO::tqfindPathMountPoint(const TQString& filename) { #ifdef Q_OS_UNIX MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong; diff --git a/kio/kio/global.h b/kio/kio/global.h index 402d7b431..780bac6a2 100644 --- a/kio/kio/global.h +++ b/kio/kio/global.h @@ -416,16 +416,16 @@ namespace KIO * right now. This means, it has to be mounted, not just * defined in fstab. */ - KIO_EXPORT TQString findDeviceMountPoint( const TQString& device ); + KIO_EXPORT TQString tqfindDeviceMountPoint( const TQString& device ); /** * Returns the mount point on which resides @p filename. - * For instance if /home is a separate partition, findPathMountPoint("/home/user/blah") + * For instance if /home is a separate partition, tqfindPathMountPoint("/home/user/blah") * will return /home * @param filename the file name to check * @return the mount point of the given @p filename */ - KIO_EXPORT TQString findPathMountPoint( const TQString & filename ); + KIO_EXPORT TQString tqfindPathMountPoint( const TQString & filename ); /** * Checks if the path belongs to a filesystem that is probably @@ -475,12 +475,12 @@ namespace KIO * * Any file or URL can be represented by the UDSEntry type below * A UDSEntry is a list of atoms - * Each atom contains a specific bit of information for the file + * Each atom tqcontains a specific bit of information for the file * * The following UDS constants represent the different possible values * for m_uds in the UDS atom structure below * - * Each atom contains a specific bit of information for the file + * Each atom tqcontains a specific bit of information for the file */ class KIO_EXPORT UDSAtom { @@ -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..3fdb5d1e0 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; } @@ -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 tqfind()! 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; @@ -2677,7 +2677,7 @@ void CopyJob::statCurrentSrc() return; } else if ( m_mode == Move && ( - // Don't go renaming right away if we need a stat() to find out the destination filename + // Don't go renaming right away if we need a stat() to tqfind out the destination filename KProtocolInfo::fileNameUsedForCopying( m_currentSrcURL ) == KProtocolInfo::FromURL || destinationState != DEST_IS_DIR || m_asMethod ) ) @@ -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; @@ -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; @@ -4471,7 +4471,7 @@ void MultiGetJob::start(Slave *slave) TransferJob::start(slave); // Anything else to do?? } -bool MultiGetJob::findCurrentEntry() +bool MultiGetJob::tqfindCurrentEntry() { if (b_multiGetActive) { @@ -4496,7 +4496,7 @@ bool MultiGetJob::findCurrentEntry() void MultiGetJob::slotRedirection( const KURL &url) { - if (!findCurrentEntry()) return; // Error + if (!tqfindCurrentEntry()) return; // Error if (kapp && !kapp->authorizeURLAction("redirect", m_url, url)) { kdWarning(7007) << "MultiGetJob: Redirection from " << m_currentEntry->url << " to " << url << " REJECTED!" << endl; @@ -4511,7 +4511,7 @@ void MultiGetJob::slotRedirection( const KURL &url) void MultiGetJob::slotFinished() { - if (!findCurrentEntry()) return; + if (!tqfindCurrentEntry()) return; if (m_redirectionURL.isEmpty()) { // No redirection, tell the world that we are finished. @@ -4561,7 +4561,7 @@ void MultiGetJob::slotMimetype( const TQString &_mimetype ) m_slave->send( m_command, m_packedArgs ); } } - if (!findCurrentEntry()) return; // Error, unknown request! + if (!tqfindCurrentEntry()) return; // Error, unknown request! emit mimetype(m_currentEntry->id, _mimetype); } @@ -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..f5fa1134c 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. @@ -1186,7 +1186,7 @@ namespace KIO { KURL url; MetaData metaData; }; - bool findCurrentEntry(); + bool tqfindCurrentEntry(); void flushQueue(TQPtrList<GetRequest> &queue); TQPtrList<GetRequest> m_waitQueue; diff --git a/kio/kio/kacl.cpp b/kio/kio/kacl.cpp index 432a50d31..e152d29cd 100644 --- a/kio/kio/kacl.cpp +++ b/kio/kio/kacl.cpp @@ -271,7 +271,7 @@ mode_t KACL::basePermissions() const return perms; } -unsigned short KACL::maskPermissions( bool &exists ) const +unsigned short KACL::tqmaskPermissions( bool &exists ) const { exists = true; #ifdef USE_POSIX_ACL @@ -376,7 +376,7 @@ bool KACL::KACLPrivate::setNamedUserOrGroupPermissions( const TQString& name, un } if ( allIsWell && createdNewEntry ) { // 23.1.1 of 1003.1e states that as soon as there is a named user or - // named group entry, there needs to be a mask entry as well, so add + // named group entry, there needs to be a tqmask entry as well, so add // one, if the user hasn't explicitely set one. if ( entryForTag( newACL, ACL_MASK ) == 0 ) { acl_calc_mask( &newACL ); @@ -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 ); @@ -475,7 +475,7 @@ bool KACL::KACLPrivate::setAllUsersOrGroups( const TQValueList< QPair<TQString, //printACL( newACL, "After adding entries: " ); if ( allIsWell && atLeastOneUserOrGroup ) { // 23.1.1 of 1003.1e states that as soon as there is a named user or - // named group entry, there needs to be a mask entry as well, so add + // named group entry, there needs to be a tqmask entry as well, so add // one, if the user hasn't explicitely set one. if ( entryForTag( newACL, ACL_MASK ) == 0 ) { acl_calc_mask( &newACL ); @@ -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/kacl.h b/kio/kio/kacl.h index 53bc762b0..6fe415603 100644 --- a/kio/kio/kacl.h +++ b/kio/kio/kacl.h @@ -111,24 +111,24 @@ public: /** @return the basic (owner/group/others) part of the ACL as a mode_t */ mode_t basePermissions() const; - /** The interface to the extended ACL. This is a mask, permissions for + /** The interface to the extended ACL. This is a tqmask, permissions for * n named users and permissions for m named groups. */ /** - * Return whether the ACL contains extended entries or can be expressed + * Return whether the ACL tqcontains extended entries or can be expressed * using only basic file permissions. - * @return whether the ACL contains extended entries */ + * @return whether the ACL tqcontains extended entries */ bool isExtended() const; /** - * Return the entry for the permissions mask if there is one and sets + * Return the entry for the permissions tqmask if there is one and sets * @p exists to true. If there is no such entry, @p exists is set to false. - * @return the permissions mask entry */ - unsigned short maskPermissions( bool &exists ) const; + * @return the permissions tqmask entry */ + unsigned short tqmaskPermissions( bool &exists ) const; - /** Set the permissions mask for the ACL. Permissions set for individual - * entries will be masked with this, such that their effective permissions - * are the result of the logical and of their entry and the mask. + /** Set the permissions tqmask for the ACL. Permissions set for individual + * entries will be tqmasked with this, such that their effective permissions + * are the result of the logical and of their entry and the tqmask. * @return success or failure */ bool setMaskPermissions( unsigned short ); diff --git a/kio/kio/kar.cpp b/kio/kio/kar.cpp index 9f9435294..8d8d0bba5 100644 --- a/kio/kio/kar.cpp +++ b/kio/kio/kar.cpp @@ -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,13 +140,13 @@ 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; name = name.stripWhiteSpace(); // Process filename - name.replace( "/", "" ); + name.tqreplace( "/", "" ); kdDebug(7042) << "Filename: " << name << " Size: " << size << endl; KArchiveEntry* entry; diff --git a/kio/kio/karchive.cpp b/kio/kio/karchive.cpp index 592e513d4..dd424fe69 100644 --- a/kio/kio/karchive.cpp +++ b/kio/kio/karchive.cpp @@ -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,17 +375,17 @@ 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; } -KArchiveDirectory * KArchive::findOrCreate( const TQString & path ) +KArchiveDirectory * KArchive::tqfindOrCreate( const TQString & path ) { - //kdDebug() << "KArchive::findOrCreate " << path << endl; + //kdDebug() << "KArchive::tqfindOrCreate " << path << endl; if ( path.isEmpty() || path == "/" || path == "." ) // root dir => found { - //kdDebug() << "KArchive::findOrCreate returning rootdir" << endl; + //kdDebug() << "KArchive::tqfindOrCreate returning rootdir" << endl; return rootDir(); } // Important note : for tar files containing absolute paths @@ -399,14 +399,14 @@ KArchiveDirectory * KArchive::findOrCreate( const TQString & path ) if ( ent ) { if ( ent->isDirectory() ) - //kdDebug() << "KArchive::findOrCreate found it" << endl; + //kdDebug() << "KArchive::tqfindOrCreate found it" << endl; return (KArchiveDirectory *) ent; else kdWarning() << "Found " << path << " but it's not a directory" << endl; } // 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 @@ -418,7 +418,7 @@ KArchiveDirectory * KArchive::findOrCreate( const TQString & path ) { TQString left = path.left( pos ); dirname = path.mid( pos + 1 ); - parent = findOrCreate( left ); // recursive call... until we find an existing dir. + parent = tqfindOrCreate( left ); // recursive call... until we tqfind an existing dir. } //kdDebug() << "KTar : found parent " << parent->name() << " adding " << dirname << " to ensure " << path << endl; @@ -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( '/' ); - if ( pos == 0 ) // ouch absolute path (see also KArchive::findOrCreate) + int pos = name.tqfind( '/' ); + if ( pos == 0 ) // ouch absolute path (see also KArchive::tqfindOrCreate) { 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..c764fb3be 100644 --- a/kio/kio/karchive.h +++ b/kio/kio/karchive.h @@ -304,7 +304,7 @@ protected: * @param path the path of the directory * @return the directory with the given @p path */ - KArchiveDirectory * findOrCreate( const TQString & path ); + KArchiveDirectory * tqfindOrCreate( const TQString & path ); /** * @internal for inherited constructors @@ -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.cpp b/kio/kio/kautomount.cpp index a4782c313..e7df61a0a 100644 --- a/kio/kio/kautomount.cpp +++ b/kio/kio/kautomount.cpp @@ -51,12 +51,12 @@ void KAutoMount::slotResult( KIO::Job * job ) else { KURL mountpoint; - mountpoint.setPath( KIO::findDeviceMountPoint( m_strDevice ) ); + mountpoint.setPath( KIO::tqfindDeviceMountPoint( m_strDevice ) ); //kdDebug(7015) << "KAutoMount: m_strDevice=" << m_strDevice << " -> mountpoint=" << mountpoint << endl; Q_ASSERT( mountpoint.isValid() ); if ( mountpoint.path().isEmpty() ) - kdWarning(7015) << m_strDevice << " was correctly mounted, but KIO::findDeviceMountPoint didn't find it. " + kdWarning(7015) << m_strDevice << " was correctly mounted, but KIO::tqfindDeviceMountPoint didn't tqfind it. " << "This looks like a bug, please report it on http://bugs.kde.org, together with your /etc/fstab line" << endl; else if ( m_bShowFilemanagerWindow ) KRun::runURL( mountpoint, "inode/directory" ); diff --git a/kio/kio/kautomount.h b/kio/kio/kautomount.h index 1d8662590..3130ddec0 100644 --- a/kio/kio/kautomount.h +++ b/kio/kio/kautomount.h @@ -38,7 +38,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,14 +83,14 @@ 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; public: /** * Unmounts a device. - * @param mountpoint the mount point - KAutoUnmount finds the device from that + * @param mountpoint the mount point - KAutoUnmount tqfinds the device from that * @param desktopFile the file the user clicked on - to notify KDirWatch of the fact that * it should emit fileDirty for it (to have the icon change) */ diff --git a/kio/kio/kdatatool.cpp b/kio/kio/kdatatool.cpp index bb6462006..6905b3c31 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; @@ -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 @@ -194,9 +194,9 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const KTrader::OfferList::ConstIterator it = offers.begin(); for( ; it != offers.end(); ++it ) { - // Temporary replacement for the non-working trader query above + // Temporary tqreplacement 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..819382380 100644 --- a/kio/kio/kdatatool.h +++ b/kio/kio/kdatatool.h @@ -250,7 +250,7 @@ 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 public: diff --git a/kio/kio/kdcopservicestarter.cpp b/kio/kio/kdcopservicestarter.cpp index 3c9b55501..27c4d3514 100644 --- a/kio/kio/kdcopservicestarter.cpp +++ b/kio/kio/kdcopservicestarter.cpp @@ -46,7 +46,7 @@ KDCOPServiceStarter::~KDCOPServiceStarter() { } -int KDCOPServiceStarter::findServiceFor( const TQString& serviceType, +int KDCOPServiceStarter::tqfindServiceFor( const TQString& serviceType, const TQString& _constraint, const TQString& preferences, TQString *error, TQCString* pDcopService, diff --git a/kio/kio/kdcopservicestarter.h b/kio/kio/kdcopservicestarter.h index b267476e7..501bef030 100644 --- a/kio/kio/kdcopservicestarter.h +++ b/kio/kio/kdcopservicestarter.h @@ -40,7 +40,7 @@ public: /** * Check if a given DCOP interface is available - from the serviceType it's supposed to implement. * - * The trader is queried to find the preferred application for this serviceType, + * The trader is queried to tqfind the preferred application for this serviceType, * with the constraint that its X-DCOP-ServiceName property must be defined. * Then the DCOP server is checked. If the service is not available, * this method will call startServiceFor to start it. @@ -48,17 +48,17 @@ public: * @param serviceType the type of service we're looking for * @param constraint see KTrader * @param preferences see KTrader - * @param error On failure, @p error contains a description of the error + * @param error On failure, @p error tqcontains a description of the error * that occurred. If the pointer is 0, the argument will be * ignored - * @param dcopService On success, @p dcopService contains the DCOP name + * @param dcopService On success, @p dcopService tqcontains the DCOP name * under which this service is available. If the pointer is 0 the argument * will be ignored * @param flags for future extensions (currently unused) * * @return an error code indicating success (== 0) or failure (> 0). */ - int findServiceFor( const TQString& serviceType, + int tqfindServiceFor( const TQString& serviceType, const TQString& constraint = TQString::null, const TQString& preferences = TQString::null, TQString *error=0, TQCString* dcopService=0, @@ -67,7 +67,7 @@ public: /** * Find an implementation of the given @p serviceType, * and start it, to use its DCOP interface. - * The default implementation uses KTrader to find the preferred Application, + * The default implementation uses KTrader to tqfind the preferred Application, * and then starts it using kapp->startService... * * However applications (like kontact) can reimplement this method, to provide @@ -76,10 +76,10 @@ public: * @param serviceType the type of service we're looking for * @param constraint see KTrader * @param preferences see KTrader - * @param error On failure, @p error contains a description of the error + * @param error On failure, @p error tqcontains a description of the error * that occurred. If the pointer is 0, the argument will be * ignored - * @param dcopService On success, @p dcopService contains the DCOP name + * @param dcopService On success, @p dcopService tqcontains the DCOP name * under which this service is available. If the pointer is 0 the argument * will be ignored * @param flags for future extensions (currently unused) diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp index 901f382b8..5664e2572 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(); @@ -456,8 +456,8 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not // remove the dir from lister->d->lstDirs so that it doesn't contain things // 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 ) ); + // might crash in tqfindByName()). + lister->d->lstDirs.remove( lister->d->lstDirs.tqfind( url ) ); DirItem *item = itemsInUse[urlStr]; @@ -498,7 +498,7 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not // unmounting a removable device (#37780) const bool isLocal = item->url.isLocalFile(); const bool isManuallyMounted = isLocal && KIO::manually_mounted( item->url.path() ); - bool containsManuallyMounted = false; + bool tqcontainsManuallyMounted = false; if ( !isManuallyMounted && item->lstItems && isLocal ) { // Look for a manually-mounted directory inside @@ -506,15 +506,15 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not // I hope this isn't too slow (manually_mounted caches the last device so most // of the time this is just a stat per subdir) KFileItemListIterator kit( *item->lstItems ); - for ( ; kit.current() && !containsManuallyMounted; ++kit ) + for ( ; kit.current() && !tqcontainsManuallyMounted; ++kit ) if ( (*kit)->isDir() && KIO::manually_mounted( (*kit)->url().path() ) ) - containsManuallyMounted = true; + tqcontainsManuallyMounted = true; } - if ( isManuallyMounted || containsManuallyMounted ) + if ( isManuallyMounted || tqcontainsManuallyMounted ) { kdDebug(7004) << "Not adding a watch on " << item->url << " because it " << - ( isManuallyMounted ? "is manually mounted" : "contains a manually mounted subdir" ) << endl; + ( isManuallyMounted ? "is manually mounted" : "tqcontains a manually mounted subdir" ) << endl; item->complete = false; // set to "dirty" } else @@ -570,7 +570,7 @@ void KDirListerCache::updateDirectory( const KURL& _dir ) } kdDebug(7004) << k_funcinfo << "Killed = " << killed << endl; - // we don't need to emit canceled signals since we only replaced the job, + // we don't need to emit canceled signals since we only tqreplaced the job, // the listing is continuing. Q_ASSERT( !listers || (listers && killed) ); @@ -645,7 +645,7 @@ KFileItemList *KDirListerCache::itemsForDir( const KURL &_dir ) const return item ? item->lstItems : 0; } -KFileItem *KDirListerCache::findByName( const KDirLister *lister, const TQString& _name ) const +KFileItem *KDirListerCache::tqfindByName( const KDirLister *lister, const TQString& _name ) const { Q_ASSERT( lister ); @@ -669,8 +669,8 @@ KFileItem *KDirListerCache::findByURL( const KDirLister *lister, const KURL& _u KURL parentDir( _url ); parentDir.setPath( parentDir.directory() ); - // If lister is set, check that it contains this dir - if ( lister && !lister->d->lstDirs.contains( parentDir ) ) + // If lister is set, check that it tqcontains this dir + 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 ); } } @@ -959,7 +959,7 @@ void KDirListerCache::slotEntries( KIO::Job *job, const KIO::UDSEntryList &entri { TQString name; - // find out about the name + // tqfind out about the name KIO::UDSEntry::ConstIterator entit = (*it).begin(); for( ; entit != (*it).end(); ++entit ) if ( (*entit).m_uds == KIO::UDS_NAME ) @@ -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 @@ -1755,7 +1755,7 @@ void KDirListerCache::deleteDir( const KURL& dirUrl ) DirItem *dir = itemsInUse.take( deletedUrl.url() ); Q_ASSERT( !dir ); - if ( !dir ) // take didn't find it - move on + if ( !dir ) // take didn't tqfind it - move on ++itu; } else @@ -2049,13 +2049,13 @@ KFileItem *KDirLister::findByURL( const KURL& _url ) const return s_pCache->findByURL( this, _url ); } -KFileItem *KDirLister::findByName( const TQString& _name ) const +KFileItem *KDirLister::tqfindByName( const TQString& _name ) const { - return s_pCache->findByName( this, _name ); + return s_pCache->tqfindByName( this, _name ); } #ifndef KDE_NO_COMPAT -KFileItem *KDirLister::find( const KURL& _url ) const +KFileItem *KDirLister::tqfind( const KURL& _url ) const { return findByURL( _url ); } @@ -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..af5d7de22 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; @@ -251,7 +251,7 @@ public: */ virtual KFileItem *findByURL( const KURL& _url ) const; #ifndef KDE_NO_COMPAT - KFileItem *find( const KURL& _url ) const; + KFileItem *tqfind( const KURL& _url ) const; #endif /** @@ -259,7 +259,7 @@ public: * @param name the item name * @return the pointer to the KFileItem */ - virtual KFileItem *findByName( const TQString& name ) const; + virtual KFileItem *tqfindByName( const TQString& name ) const; /** * Set a name filter to only list items matching this name, e.g. "*.cpp". @@ -334,7 +334,7 @@ public: /** * Checks whether @p mime matches a filter in the list of mime types - * @param mime the mimetype to find in the filter list. + * @param mime the mimetype to tqfind in the filter list. * @return true if @p name matches a filter in the list, * otherwise false. * @see setMimeFilter. diff --git a/kio/kio/kdirlister_p.h b/kio/kio/kdirlister_p.h index a98521905..9a91e57df 100644 --- a/kio/kio/kdirlister_p.h +++ b/kio/kio/kdirlister_p.h @@ -70,7 +70,7 @@ public: /** * List of dirs handled by this dirlister. The first entry is the base URL. - * For a tree view, it contains all the dirs shown. + * For a tree view, it tqcontains all the dirs shown. */ KURL::List lstDirs; @@ -150,13 +150,13 @@ public: KFileItemList *itemsForDir( const KURL &_dir ) const; - KFileItem *findByName( const KDirLister *lister, const TQString &_name ) const; + KFileItem *tqfindByName( const KDirLister *lister, const TQString &_name ) const; // if lister is set, it is checked that the url is held by the lister KFileItem *findByURL( const KDirLister *lister, const KURL &_url ) const; /** * Notify that files have been added in @p directory - * The receiver will list that directory again to find + * The receiver will list that directory again to tqfind * the new items (since it needs more than just the names anyway). * Reimplemented from KDirNotify. */ diff --git a/kio/kio/kdirnotify.h b/kio/kio/kdirnotify.h index 2082569a1..8c8051524 100644 --- a/kio/kio/kdirnotify.h +++ b/kio/kio/kdirnotify.h @@ -41,7 +41,7 @@ k_dcop: /** * Notify that files have been added in @p directory * Note: this is ASYNC so that it can be used with a broadcast. - * @param directory the directory that contains the new files + * @param directory the directory that tqcontains the new files */ virtual ASYNC FilesAdded( const KURL & directory ) = 0; diff --git a/kio/kio/kdirwatch.cpp b/kio/kio/kdirwatch.cpp index bbea148fa..83d8dac9f 100644 --- a/kio/kio/kdirwatch.cpp +++ b/kio/kio/kdirwatch.cpp @@ -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; @@ -413,9 +413,9 @@ void KDirWatchPrivate::slotActivated() if ( path.length() && isNoisyFile( path.latin1() ) ) continue; - kdDebug(7001) << "ev wd: " << event->wd << " mask " << event->mask << " path: " << path << endl; + kdDebug(7001) << "ev wd: " << event->wd << " tqmask " << event->tqmask << " path: " << path << endl; - // now we're in deep trouble of finding the + // now we're in deep trouble of tqfinding the // associated entries // for now, we suck and iterate for ( EntryMap::Iterator it = m_mapEntries.begin(); @@ -425,7 +425,7 @@ void KDirWatchPrivate::slotActivated() e->dirty = true; if ( 1 || e->isDir) { - if( event->mask & IN_DELETE_SELF) { + if( event->tqmask & IN_DELETE_SELF) { kdDebug(7001) << "-->got deleteself signal for " << e->path << endl; e->m_status = NonExistent; if (e->isDir) @@ -433,10 +433,10 @@ void KDirWatchPrivate::slotActivated() else addEntry(0, TQFileInfo(e->path).dirPath(true), e, true); } - if ( event->mask & IN_IGNORED ) { + if ( event->tqmask & IN_IGNORED ) { e->wd = 0; } - if ( event->mask & (IN_CREATE|IN_MOVED_TO) ) { + if ( event->tqmask & (IN_CREATE|IN_MOVED_TO) ) { Entry *sub_entry = e->m_entries.first(); for(;sub_entry; sub_entry = e->m_entries.next()) if (sub_entry->path == e->path + "/" + path) break; @@ -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 @@ -668,13 +668,13 @@ bool KDirWatchPrivate::useDNotify(Entry* e) return false; } - int mask = DN_DELETE|DN_CREATE|DN_RENAME|DN_MULTISHOT; + int tqmask = DN_DELETE|DN_CREATE|DN_RENAME|DN_MULTISHOT; // if dependant is a file watch, we check for MODIFY & ATTRIB too for(Entry* dep=e->m_entries.first();dep;dep=e->m_entries.next()) - if (!dep->isDir) { mask |= DN_MODIFY|DN_ATTRIB; break; } + if (!dep->isDir) { tqmask |= DN_MODIFY|DN_ATTRIB; break; } if(fcntl(fd, F_SETSIG, dnotify_signal) < 0 || - fcntl(fd, F_NOTIFY, mask) < 0) { + fcntl(fd, F_NOTIFY, tqmask) < 0) { kdDebug(7001) << "Not using Linux Directory Notifications." << endl; @@ -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 @@ -714,19 +714,19 @@ bool KDirWatchPrivate::useINotify( Entry* e ) e->m_mode = INotifyMode; - int mask = IN_DELETE|IN_DELETE_SELF|IN_CREATE|IN_MOVE|IN_MOVE_SELF|IN_DONT_FOLLOW; + int tqmask = IN_DELETE|IN_DELETE_SELF|IN_CREATE|IN_MOVE|IN_MOVE_SELF|IN_DONT_FOLLOW; if(!e->isDir) - mask |= IN_MODIFY|IN_ATTRIB; + tqmask |= IN_MODIFY|IN_ATTRIB; else - mask |= IN_ONLYDIR; + tqmask |= IN_ONLYDIR; // if dependant is a file watch, we check for MODIFY & ATTRIB too for(Entry* dep=e->m_entries.first();dep;dep=e->m_entries.next()) { - if (!dep->isDir) { mask |= IN_MODIFY|IN_ATTRIB; break; } + if (!dep->isDir) { tqmask |= IN_MODIFY|IN_ATTRIB; break; } } if ( ( e->wd = inotify_add_watch( m_inotify_fd, - TQFile::encodeName( e->path ), mask) ) > 0 ) + TQFile::encodeName( e->path ), tqmask) ) > 0 ) return true; if ( e->m_status == NonExistent ) { @@ -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) { @@ -794,11 +794,11 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const TQString& _path, { Entry* e = &(*it); if( (e->m_mode == DNotifyMode) && (e->dn_fd > 0) ) { - int mask = DN_DELETE|DN_CREATE|DN_RENAME|DN_MULTISHOT; + int tqmask = DN_DELETE|DN_CREATE|DN_RENAME|DN_MULTISHOT; // if dependant is a file watch, we check for MODIFY & ATTRIB too for(Entry* dep=e->m_entries.first();dep;dep=e->m_entries.next()) - if (!dep->isDir) { mask |= DN_MODIFY|DN_ATTRIB; break; } - if( fcntl(e->dn_fd, F_NOTIFY, mask) < 0) { // shouldn't happen + if (!dep->isDir) { tqmask |= DN_MODIFY|DN_ATTRIB; break; } + if( fcntl(e->dn_fd, F_NOTIFY, tqmask) < 0) { // shouldn't happen ::close(e->dn_fd); e->m_mode = UnknownMode; fd_Entry.remove(e->dn_fd); @@ -813,14 +813,14 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const TQString& _path, { Entry* e = &(*it); if( (e->m_mode == INotifyMode) && (e->wd > 0) ) { - int mask = IN_DELETE|IN_DELETE_SELF|IN_CREATE|IN_MOVE|IN_MOVE_SELF|IN_DONT_FOLLOW; + int tqmask = IN_DELETE|IN_DELETE_SELF|IN_CREATE|IN_MOVE|IN_MOVE_SELF|IN_DONT_FOLLOW; if(!e->isDir) - mask |= IN_MODIFY|IN_ATTRIB; + tqmask |= IN_MODIFY|IN_ATTRIB; else - mask |= IN_ONLYDIR; + tqmask |= IN_ONLYDIR; inotify_rm_watch (m_inotify_fd, e->wd); - e->wd = inotify_add_watch( m_inotify_fd, TQFile::encodeName( e->path ), mask); + e->wd = inotify_add_watch( m_inotify_fd, TQFile::encodeName( e->path ), tqmask); } } #endif @@ -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; @@ -1704,7 +1704,7 @@ void KDirWatch::startScan( bool notify, bool skippedToo ) } -bool KDirWatch::contains( const TQString& _path ) const +bool KDirWatch::tqcontains( const TQString& _path ) const { KDirWatchPrivate::Entry* e = d->entry(_path); if (!e) diff --git a/kio/kio/kdirwatch.h b/kio/kio/kdirwatch.h index 36f2737b3..591627a70 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 @@ -194,7 +194,7 @@ class KIO_EXPORT KDirWatch : public QObject * @param path the directory to check * @return true if the directory is being watched */ - bool contains( const TQString& path ) const; + bool tqcontains( const TQString& path ) const; /** * Dump statistic information about all KDirWatch instances. diff --git a/kio/kio/kdirwatch_p.h b/kio/kio/kdirwatch_p.h index 9920b866d..473f1e468 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,12 +18,12 @@ /* 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: - enum entryStatus { Normal = 0, NonExistent }; + enum entrytqStatus { Normal = 0, NonExistent }; enum entryMode { UnknownMode = 0, StatMode, DNotifyMode, INotifyMode, FAMMode }; enum { NoChange=0, Changed=1, Created=2, Deleted=4 }; @@ -43,7 +43,7 @@ public: time_t m_ctime; // the last observed link count int m_nlink; - entryStatus m_status; + entrytqStatus m_status; entryMode m_mode; bool isDir; // instances interested in events diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp index 010832573..b503be761 100644 --- a/kio/kio/kfileitem.cpp +++ b/kio/kio/kfileitem.cpp @@ -179,7 +179,7 @@ void KFileItem::init( bool _determineMimeTypeOnDemand ) m_pMimeType = KMimeType::findByURL( url, m_fileMode, isLocalURL, // use fast mode if not mimetype on demand _determineMimeTypeOnDemand, &accurate ); - //kdDebug() << "finding mimetype for " << url.url() << " : " << m_pMimeType->name() << endl; + //kdDebug() << "tqfinding mimetype for " << url.url() << " : " << m_pMimeType->name() << endl; // if we didn't use fast mode, or if we got a result, then this is the mimetype // otherwise, determineMimeType will be able to do better. m_bMimeTypeKnown = (!_determineMimeTypeOnDemand) || accurate; @@ -518,7 +518,7 @@ KMimeType::Ptr KFileItem::determineMimeType() KURL url = mostLocalURL(isLocalURL); m_pMimeType = KMimeType::findByURL( url, m_fileMode, isLocalURL ); - //kdDebug() << "finding mimetype for " << url.url() << " : " << m_pMimeType->name() << endl; + //kdDebug() << "tqfinding mimetype for " << url.url() << " : " << m_pMimeType->name() << endl; m_bMimeTypeKnown = true; } @@ -541,7 +541,7 @@ TQString KFileItem::mimeComment() KURL url = mostLocalURL(isLocalURL); TQString comment = mType->comment( url, isLocalURL ); - //kdDebug() << "finding comment for " << url.url() << " : " << m_pMimeType->name() << endl; + //kdDebug() << "tqfinding comment for " << url.url() << " : " << m_pMimeType->name() << endl; if (!comment.isEmpty()) return comment; else @@ -555,7 +555,7 @@ TQString KFileItem::iconName() bool isLocalURL; KURL url = mostLocalURL(isLocalURL); - //kdDebug() << "finding icon for " << url.url() << " : " << m_pMimeType->name() << endl; + //kdDebug() << "tqfinding icon for " << url.url() << " : " << m_pMimeType->name() << endl; return determineMimeType()->icon(url, isLocalURL); } @@ -626,7 +626,7 @@ TQPixmap KFileItem::pixmap( int _size, int _state ) const KURL url = mostLocalURL(isLocalURL); TQPixmap p = mime->pixmap( url, KIcon::Desktop, _size, _state ); - //kdDebug() << "finding pixmap for " << url.url() << " : " << mime->name() << endl; + //kdDebug() << "tqfinding pixmap for " << url.url() << " : " << mime->name() << endl; if (p.isNull()) kdWarning() << "Pixmap not found for mimetype " << m_pMimeType->name() << endl; @@ -774,7 +774,7 @@ TQString KFileItem::getStatusBarInfo() text += " "; text += mimeComment(); } - text.replace('\n', " "); // replace any newlines with a space, so the statusbar doesn't get a two-line string which messes the display up, Alex + text.tqreplace('\n', " "); // tqreplace any newlines with a space, so the statusbar doesn't get a two-line string which messes the display up, Alex return text; } @@ -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/kfileitem.h b/kio/kio/kfileitem.h index cf6344669..b0ce59d88 100644 --- a/kio/kio/kfileitem.h +++ b/kio/kio/kfileitem.h @@ -47,7 +47,7 @@ public: * Creates an item representing a file, from a UDSEntry. * This is the preferred constructor when using KIO::listDir(). * - * @param _entry the KIO entry used to get the file, contains info about it + * @param _entry the KIO entry used to get the file, tqcontains info about it * @param _url the file url * @param _determineMimeTypeOnDemand specifies if the mimetype of the given * URL should be determined immediately or on demand diff --git a/kio/kio/kfilemetainfo.cpp b/kio/kio/kfilemetainfo.cpp index fcab35f19..8ecf1af16 100644 --- a/kio/kio/kfilemetainfo.cpp +++ b/kio/kio/kfilemetainfo.cpp @@ -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 ); @@ -418,7 +418,7 @@ TQStringList KFileMetaInfo::preferredGroups() const } } - // now the old list only contains the non-preferred items, so we + // now the old list only tqcontains the non-preferred items, so we // add the remaining ones to newlist newlist += list; @@ -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; @@ -595,20 +595,20 @@ TQString KFileMetaInfo::mimeType() const return d->mimeTypeInfo->mimeType(); } -bool KFileMetaInfo::contains(const TQString& key) const +bool KFileMetaInfo::tqcontains(const TQString& key) const { TQStringList glist = groups(); for (TQStringList::Iterator it = glist.begin(); it != glist.end(); ++it) { KFileMetaInfoGroup g = d->groups[*it]; - if (g.contains(key)) return true; + if (g.tqcontains(key)) return true; } return false; } -bool KFileMetaInfo::containsGroup(const TQString& key) const +bool KFileMetaInfo::tqcontainsGroup(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,11 +668,11 @@ 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(); - item = findEditableItem( group, key ); + item = tqfindEditableItem( group, key ); if ( item.isValid() ) return item; } @@ -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 ) ) { @@ -700,7 +700,7 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const TQString& key, return item; } -KFileMetaInfoItem KFileMetaInfo::findEditableItem( KFileMetaInfoGroup& group, +KFileMetaInfoItem KFileMetaInfo::tqfindEditableItem( KFileMetaInfoGroup& group, const TQString& key ) { assert(isValid()); @@ -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 @@ -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 ); } @@ -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 ); @@ -1243,7 +1243,7 @@ TQStringList KFileMetaInfoGroup::preferredKeys() const } } - // now the old list only contains the non-preferred items, so we + // now the old list only tqcontains the non-preferred items, so we // add the remaining ones to newlist newlist += list; @@ -1286,14 +1286,14 @@ bool KFileMetaInfoGroup::supportsVariableKeys() const return d->mimeTypeInfo->groupInfo(d->name)->supportsVariableKeys(); } -bool KFileMetaInfoGroup::contains( const TQString& key ) const +bool KFileMetaInfoGroup::tqcontains( 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..1fedc4c8c 100644 --- a/kio/kio/kfilemetainfo.h +++ b/kio/kio/kfilemetainfo.h @@ -105,7 +105,7 @@ public: * This enum exists so that you can specify units for items, which you * can usually use for integer items, so an application knows how to * display it (e.g. a time in seconds in a hh:mm:ss form). You can either - * use one of those units, or if you don't find one that fits, you can + * use one of those units, or if you don't tqfind one that fits, you can * add it yourself using a prefix and/or suffix. */ enum Unit { @@ -132,7 +132,7 @@ public: * @brief Information about a meta information group * * This is the class for one group of items of a KFileMimeTypeInfo. - * It contains, among other things, the information about the group's name + * It tqcontains, among other things, the information about the group's name * and a list of supported items. */ class KIO_EXPORT GroupInfo @@ -244,7 +244,7 @@ public: /** * This is the class for one item of a KFileMimeTypeInfo. - * It contains every information about a KFileMetaInfoItem that this + * It tqcontains every information about a KFileMetaInfoItem that this * item has in common for each file of a specific mimetype. **/ class KIO_EXPORT ItemInfo @@ -606,7 +606,7 @@ public: * KFileMetaInfo::applyChanges() , the change will be written to the * file. With this method, you can ask if this item is dirty. * - * @return true if the item contains changes that have not yet been written + * @return true if the item tqcontains changes that have not yet been written * back into the file. Removing or adding an item counts as such a change */ bool isModified() const; @@ -651,9 +651,9 @@ public: uint attributes() const; /** - * Return true if the item is valid, i.e. if it contains data, false + * Return true if the item is valid, i.e. if it tqcontains data, false * if it's invalid (created with the default constructor and not been - * assigned anything), or if KFileMetaInfoGroup::item() didn't find + * assigned anything), or if KFileMetaInfoGroup::item() didn't tqfind * your requested item). * * @return true if valid, false if invalid @@ -724,9 +724,9 @@ public: ~KFileMetaInfoGroup(); /** - * Returns true if the item is valid, i.e. if it contains data, false + * Returns true if the item is valid, i.e. if it tqcontains data, false * if it's invalid (created with the default constructor and not been - * assigned anything), or if KFileMetaInfoGroup::item() didn't find + * assigned anything), or if KFileMetaInfoGroup::item() didn't tqfind * your requested item). * * @return true if valid, false if invalid @@ -734,7 +734,7 @@ public: bool isValid() const; /** - * Returns false if the object contains data, true if it's empty. An + * Returns false if the object tqcontains data, true if it's empty. An * empty group is a group with no items (amazing, isn't it?). * * @return true if empty, false otherwise @@ -812,7 +812,7 @@ public: * * @return true if an item for this @p key exists. */ - bool contains( const TQString& key ) const; + bool tqcontains( const TQString& key ) const; /** * Returns a list of all keys. @@ -949,7 +949,7 @@ public: like comments or id3 tags */ ExtenedAttr = 0x10, /**< read filesystem based extended attributes if they are supported for the filesystem */ - Thumbnail = 0x20, /**< only read the file's thumbnail, if it contains + Thumbnail = 0x20, /**< only read the file's thumbnail, if it tqcontains one */ Preferred = 0x40, ///< get at least the preferred items Everything = 0xffff ///< read everything, even if it might take a while @@ -1164,7 +1164,7 @@ public: * @param key the key to check * @return whether an item for this @p key exists. */ - bool contains( const TQString& key ) const; + bool tqcontains( const TQString& key ) const; /** * Checks whether a group with the given @p key exists. @@ -1172,7 +1172,7 @@ public: * @param key the key to check * @return whether a group with this name exists. */ - bool containsGroup( const TQString& key ) const; + bool tqcontainsGroup( const TQString& key ) const; /** * Returns the value with the given @p key. @@ -1195,7 +1195,7 @@ public: bool isValid() const; /** - * Returns false if the object contains data, true if it's empty. You'll + * Returns false if the object tqcontains data, true if it's empty. You'll * get an empty object if no plugin for the file could be found. * * @return true if empty, false otherwise @@ -1242,7 +1242,7 @@ protected: Data* d; private: - KFileMetaInfoItem findEditableItem( KFileMetaInfoGroup& group, + KFileMetaInfoItem tqfindEditableItem( KFileMetaInfoGroup& group, const TQString& key ); void init( const KURL& url, @@ -1391,7 +1391,7 @@ private: * PreferredItems=Items,Size * @endcode **/ -class KIO_EXPORT KFilePlugin : public QObject +class KIO_EXPORT KFilePlugin : public TQObject { Q_OBJECT @@ -1639,11 +1639,11 @@ private: * @internal * Synchronous access to metadata of a local file. Usually, you don't want * to use this class for getting metainfo from a file. Use KFileMetaInfo - * directly. However, if you want to find out if a specific mimetype is + * directly. However, if you want to tqfind out if a specific mimetype is * supported and which groups and items are provided for it, you can ask * the KFileMetainfoProvider for it. **/ -class KIO_EXPORT KFileMetaInfoProvider: private QObject +class KIO_EXPORT KFileMetaInfoProvider: private TQObject { friend class KFilePlugin; diff --git a/kio/kio/kfileshare.cpp b/kio/kio/kfileshare.cpp index 1f6dca285..e93cf37d4 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; @@ -220,10 +220,10 @@ int KFileShare::isDirectoryShared( const TQString& _path ) TQString path( _path ); if ( path[path.length()-1] != '/' ) path += '/'; - //return s_shareList && s_shareList->contains( path ); - if( (*s_shareMap).contains(path) && !((*s_shareMap)[path].isEmpty()) ) { + //return s_shareList && s_shareList->tqcontains( path ); + 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/kfilterbase.cpp b/kio/kio/kfilterbase.cpp index 50ff5498a..081a58587 100644 --- a/kio/kio/kfilterbase.cpp +++ b/kio/kio/kfilterbase.cpp @@ -39,21 +39,21 @@ void KFilterBase::setDevice( TQIODevice * dev, bool autodelete ) m_bAutoDel = autodelete; } -KFilterBase * KFilterBase::findFilterByFileName( const TQString & fileName ) +KFilterBase * KFilterBase::tqfindFilterByFileName( const TQString & fileName ) { - KMimeType::Ptr mime = KMimeType::findByPath( fileName ); - kdDebug(7005) << "KFilterBase::findFilterByFileName mime=" << mime->name() << endl; - return findFilterByMimeType(mime->name()); + KMimeType::Ptr mime = KMimeType::tqfindByPath( fileName ); + kdDebug(7005) << "KFilterBase::tqfindFilterByFileName mime=" << mime->name() << endl; + return tqfindFilterByMimeType(mime->name()); } -KFilterBase * KFilterBase::findFilterByMimeType( const TQString & mimeType ) +KFilterBase * KFilterBase::tqfindFilterByMimeType( const TQString & mimeType ) { KTrader::OfferList offers = KTrader::self()->query( "KDECompressionFilter", TQString("'") + mimeType + "' in ServiceTypes" ); KTrader::OfferList::ConstIterator it = offers.begin(); KTrader::OfferList::ConstIterator end = offers.end(); - kdDebug(7005) << "KFilterBase::findFilterByMimeType(" << mimeType << ") got " << offers.count() << " offers" << endl; + kdDebug(7005) << "KFilterBase::tqfindFilterByMimeType(" << mimeType << ") got " << offers.count() << " offers" << endl; for (; it != end; ++it ) { if ((*it)->library().isEmpty()) { continue; } @@ -65,7 +65,7 @@ KFilterBase * KFilterBase::findFilterByMimeType( const TQString & mimeType ) } if ( mimeType == "application/x-bzip2" || mimeType == "application/x-gzip" ) // #88574 - kdWarning(7005) << "KFilterBase::findFilterByMimeType : no filter found for " << mimeType << endl; + kdWarning(7005) << "KFilterBase::tqfindFilterByMimeType : no filter found for " << mimeType << endl; return 0L; } diff --git a/kio/kio/kfilterbase.h b/kio/kio/kfilterbase.h index b46706241..32b96e2ad 100644 --- a/kio/kio/kfilterbase.h +++ b/kio/kio/kfilterbase.h @@ -94,7 +94,7 @@ public: * @param fileName the name of the file to filter * @return the filter for the @p fileName, or 0 if not found */ - static KFilterBase * findFilterByFileName( const TQString & fileName ); + static KFilterBase * tqfindFilterByFileName( const TQString & fileName ); /** * Call this to create the appropriate filter for the mimetype @@ -102,7 +102,7 @@ public: * @param mimeType the mime type of the file to filter * @return the filter for the @p mimeType, or 0 if not found */ - static KFilterBase * findFilterByMimeType( const TQString & mimeType ); + static KFilterBase * tqfindFilterByMimeType( const TQString & mimeType ); protected: TQIODevice * m_dev; diff --git a/kio/kio/kfilterdev.cpp b/kio/kio/kfilterdev.cpp index 224d68761..3a177385d 100644 --- a/kio/kio/kfilterdev.cpp +++ b/kio/kio/kfilterdev.cpp @@ -82,8 +82,8 @@ TQIODevice * KFilterDev::deviceForFile( const TQString & fileName, const TQStrin bool forceFilter ) { TQFile * f = new TQFile( fileName ); - KFilterBase * base = mimetype.isEmpty() ? KFilterBase::findFilterByFileName( fileName ) - : KFilterBase::findFilterByMimeType( mimetype ); + KFilterBase * base = mimetype.isEmpty() ? KFilterBase::tqfindFilterByFileName( fileName ) + : KFilterBase::tqfindFilterByMimeType( mimetype ); if ( base ) { base->setDevice(f, true); @@ -107,7 +107,7 @@ TQIODevice * KFilterDev::device( TQIODevice* inDevice, const TQString & mimetype { if (inDevice==0) return 0; - KFilterBase * base = KFilterBase::findFilterByMimeType(mimetype); + KFilterBase * base = KFilterBase::tqfindFilterByMimeType(mimetype); if ( base ) { base->setDevice(inDevice, autoDeleteInDevice); @@ -232,7 +232,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; @@ -268,7 +268,7 @@ 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 ); @@ -278,7 +278,7 @@ Q_LONG KFilterDev::readBlock( char *data, Q_ULONG maxlen ) outBufferSize = maxlen; } outBufferSize -= dataReceived; - Q_ULONG availOut = outBufferSize; + TQ_ULONG availOut = outBufferSize; filter->setOutBuffer( data, outBufferSize ); bool decompressedAll = false; @@ -351,7 +351,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. diff --git a/kio/kio/kfilterdev.h b/kio/kio/kfilterdev.h index d36229859..6ee9314be 100644 --- a/kio/kio/kfilterdev.h +++ b/kio/kio/kfilterdev.h @@ -87,8 +87,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(); @@ -119,14 +119,14 @@ public: * * Warning: application/x-bzip2 may not be available. * In that case a TQFile opened on the compressed data will be returned ! - * Use KFilterBase::findFilterByMimeType and code similar to what + * Use KFilterBase::tqfindFilterByMimeType and code similar to what * deviceForFile is doing, to better control what's happening. * * The returned TQIODevice has to be deleted after using. * * @param fileName the name of the file to filter * @param mimetype the mime type of the file to filter, or TQString::null if unknown - * @param forceFilter if true, the function will either find a compression filter, or return 0. + * @param forceFilter if true, the function will either tqfind a compression filter, or return 0. * If false, it will always return a TQIODevice. If no * filter is available it will return a simple TQFile. * This can be useful if the file is usable without a filter. diff --git a/kio/kio/kimageio.cpp b/kio/kio/kimageio.cpp index 8d4a45db4..a26f25596 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; @@ -124,7 +124,7 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio) if (func == NULL) { iio->setStatus(1); // error - kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl; + kdWarning() << "couln't tqfind " << funcName << " (" << lt_dlerror() << ")" << endl; } mReadFunc = (void (*)(TQImageIO *))func; } @@ -135,7 +135,7 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio) if (func == NULL) { iio->setStatus(1); // error - kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl; + kdWarning() << "couln't tqfind " << funcName << " (" << lt_dlerror() << ")" << endl; } mWriteFunc = (void (*)(TQImageIO *))func; } @@ -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; } @@ -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..6b777129a 100644 --- a/kio/kio/klimitediodevice.h +++ b/kio/kio/klimitediodevice.h @@ -69,12 +69,12 @@ public: virtual Offset size() const { return m_length; } - 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 +94,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..4aed63808 100644 --- a/kio/kio/kmimemagic.cpp +++ b/kio/kio/kmimemagic.cpp @@ -141,10 +141,10 @@ struct magic { #define LELONG 11 #define LEDATE 12 VALUETYPE value; /* either number or string */ - unsigned long mask; /* mask before comparison with value */ + unsigned long tqmask; /* tqmask before comparison with value */ char nospflag; /* suppress space character */ - /* NOTE: this string is suspected of overrunning - find it! */ + /* NOTE: this string is suspected of overrunning - tqfind it! */ char desc[MAXDESC]; /* description */ }; @@ -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; } @@ -909,9 +909,9 @@ int KMimeMagic::parse(char *l, int /* New-style anding: "0 byte&0x80 =0x80 dynamically linked" */ if (*l == '&') { ++l; - m->mask = signextend(m, strtol(l, &l, 0)); + m->tqmask = signextend(m, strtol(l, &l, 0)); } else - m->mask = (unsigned long) ~0L; + m->tqmask = (unsigned long) ~0L; EATAB; switch (*l) { @@ -1297,7 +1297,7 @@ mcheck(union VALUETYPE *p, struct magic *m) #if 0 qDebug("Before signextend %08x", v); #endif - v = signextend(m, v) & m->mask; + v = signextend(m, v) & m->tqmask; #if 0 qDebug("After signextend %08x", v); #endif @@ -1550,7 +1550,7 @@ fsmagic(struct config_rec* conf, const char *fn, KDE_struct_stat *sb) } /* - * Go through the whole list, stopping if you find a match. Process all the + * Go through the whole list, stopping if you tqfind a match. Process all the * continuations of that match before returning. * * We support multi-level continuations: @@ -2214,7 +2214,7 @@ KMimeMagic::setFollowLinks( bool _enable ) } KMimeMagicResult * -KMimeMagic::findBufferType(const TQByteArray &array) +KMimeMagic::tqfindBufferType(const TQByteArray &array) { unsigned char buf[HOWMANY + 1]; /* one extra for terminating '\0' */ @@ -2261,7 +2261,7 @@ refineResult(KMimeMagicResult *r, const TQString & _filename) if ( _filename.endsWith(".h") || _filename.endsWith(".hh") || _filename.endsWith(".H") - || !_filename.right(4).contains('.')) + || !_filename.right(4).tqcontains('.')) tmp += "hdr"; else tmp += "src"; @@ -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 ); @@ -2279,10 +2279,10 @@ refineResult(KMimeMagicResult *r, const TQString & _filename) } KMimeMagicResult * -KMimeMagic::findBufferFileType( const TQByteArray &data, +KMimeMagic::tqfindBufferFileType( const TQByteArray &data, const TQString &fn) { - KMimeMagicResult * r = findBufferType( data ); + KMimeMagicResult * r = tqfindBufferType( data ); refineResult(r, fn); return r; } @@ -2290,10 +2290,10 @@ KMimeMagic::findBufferFileType( const TQByteArray &data, /* * Find the content-type of the given file. */ -KMimeMagicResult* KMimeMagic::findFileType(const TQString & fn) +KMimeMagicResult* KMimeMagic::tqfindFileType(const TQString & fn) { #ifdef DEBUG_MIMEMAGIC - kdDebug(7018) << "KMimeMagic::findFileType " << fn << endl; + kdDebug(7018) << "KMimeMagic::tqfindFileType " << fn << endl; #endif conf->resultBuf = TQString::null; diff --git a/kio/kio/kmimemagic.h b/kio/kio/kmimemagic.h index d73dd306a..8a10be2cd 100644 --- a/kio/kio/kmimemagic.h +++ b/kio/kio/kmimemagic.h @@ -36,11 +36,11 @@ class KMimeMagic; // see below (read this one first) /** - * @deprecated Use KMimeType::findByContent() instead + * @deprecated Use KMimeType::tqfindByContent() instead * May be removed in KDE 4.0. - * Returned by KMimeMagic @p find...Type methods. + * Returned by KMimeMagic @p tqfind...Type methods. * - * It contains the mimetype and the encoding of + * It tqcontains the mimetype and the encoding of * the file or buffer read. */ class KIO_EXPORT_DEPRECATED KMimeMagicResult @@ -75,7 +75,7 @@ protected: }; /** - * @deprecated Use KMimeType::findByContent() instead + * @deprecated Use KMimeType::tqfindByContent() instead * May be removed in KDE 4.0. * Determine auto-magically the type of file, * not only by using its extension, but also by reading its contents. @@ -94,7 +94,7 @@ protected: * The basic usage of KMimeMagic is : * @li Get a pointer to it, using KMimeMagic::self(). * @li Use it for any file or buffer you want, using one of the three - * @p find...Type() methods. + * @p tqfind...Type() methods. * * The result is contained in the class KMimeMagicResult. */ @@ -142,7 +142,7 @@ public: void setFollowLinks( bool _enable ); /** - * Try to find a MimeType for the given file. + * Try to tqfind a MimeType for the given file. * * If no special * MimeType is found, the default MimeType is returned. @@ -153,7 +153,7 @@ public: * the returned result object changes its value * since it is reused by KMimeMagic. */ - KMimeMagicResult* findFileType( const TQString & _filename ); + KMimeMagicResult* tqfindFileType( const TQString & _filename ); /** * Same functionality as above, except data is not @@ -167,10 +167,10 @@ public: * the returned result object changes its value * since it is reused by KMimeMagic. */ - KMimeMagicResult* findBufferType( const TQByteArray &p ); + KMimeMagicResult* tqfindBufferType( const TQByteArray &p ); /** - * Same functionality as findBufferType() but with + * Same functionality as tqfindBufferType() but with * additional capability of distinguishing between * C-headers and C-Source. * @@ -183,7 +183,7 @@ public: * the returned result object changes its value * since it is reused by KMimeMagic. */ - KMimeMagicResult * findBufferFileType( const TQByteArray &, const TQString & filename ); + KMimeMagicResult * tqfindBufferFileType( const TQByteArray &, const TQString & filename ); /** * Returns a pointer to the unique KMimeMagic instance in this process. diff --git a/kio/kio/kmimetype.cpp b/kio/kio/kmimetype.cpp index a698e7495..aa2bdd807 100644 --- a/kio/kio/kmimetype.cpp +++ b/kio/kio/kmimetype.cpp @@ -68,9 +68,9 @@ bool KMimeType::s_bChecked = false; void KMimeType::buildDefaultType() { assert ( !s_pDefaultType ); - // Try to find the default type + // Try to tqfind the default type KServiceType * mime = KServiceTypeFactory::self()-> - findServiceTypeByName( defaultMimeType() ); + tqfindServiceTypeByName( defaultMimeType() ); if (mime && mime->isType( KST_KMimeType )) { @@ -133,18 +133,18 @@ void KMimeType::checkEssentialMimeTypes() void KMimeType::errorMissingMimeType( const TQString& _type ) { - TQString tmp = i18n( "Could not find mime type\n%1" ).arg( _type ); + TQString tmp = i18n( "Could not tqfind mime type\n%1" ).arg( _type ); KMessageBoxWrapper::sorry( 0, tmp ); } KMimeType::Ptr KMimeType::mimeType( const TQString& _name ) { - KServiceType * mime = KServiceTypeFactory::self()->findServiceTypeByName( _name ); + KServiceType * mime = KServiceTypeFactory::self()->tqfindServiceTypeByName( _name ); if ( !mime || !mime->isType( KST_KMimeType ) ) { - // When building ksycoca, findServiceTypeByName doesn't create an object + // When building ksycoca, tqfindServiceTypeByName doesn't create an object // but returns one from a dict. if ( !KSycoca::self()->isBuilding() ) delete mime; @@ -207,8 +207,8 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode, static const TQString& slash = KGlobal::staticQString("/"); if ( ! fileName.isNull() && !path.endsWith( slash ) ) { - // Try to find it out by looking at the filename - KMimeType::Ptr mime = KServiceTypeFactory::self()->findFromPattern( fileName ); + // Try to tqfind it out by looking at the filename + KMimeType::Ptr mime = KServiceTypeFactory::self()->tqfindFromPattern( fileName ); if ( mime ) { // Found something - can we trust it ? (e.g. don't trust *.pl over HTTP, could be anything) @@ -219,7 +219,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode, if ( mime->patternsAccuracy()<100 ) { KMimeMagicResult* result = - KMimeMagic::self()->findFileType( path ); + KMimeMagic::self()->tqfindFileType( path ); if ( result && result->isValid() && result->accuracy() > 0 ) return mimeType( result->mimeType() ); @@ -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/" } @@ -276,10 +276,10 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode, } // Do some magic for local files - //kdDebug(7009) << TQString("Mime Type finding for '%1'").arg(path) << endl; - KMimeMagicResult* result = KMimeMagic::self()->findFileType( path ); + //kdDebug(7009) << TQString("Mime Type tqfinding for '%1'").arg(path) << endl; + KMimeMagicResult* result = KMimeMagic::self()->tqfindFileType( path ); - // If we still did not find it, we must assume the default mime type + // If we still did not tqfind it, we must assume the default mime type if ( !result || !result->isValid() ) return defaultMimeTypePtr(); @@ -298,27 +298,27 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode, KMimeType::Ptr KMimeType::diagnoseFileName(const TQString &fileName, TQString &pattern) { - return KServiceTypeFactory::self()->findFromPattern( fileName, &pattern ); + return KServiceTypeFactory::self()->tqfindFromPattern( fileName, &pattern ); } -KMimeType::Ptr KMimeType::findByPath( const TQString& path, mode_t mode, bool fast_mode ) +KMimeType::Ptr KMimeType::tqfindByPath( const TQString& path, mode_t mode, bool fast_mode ) { KURL u; u.setPath(path); return findByURL( u, mode, true, fast_mode ); } -KMimeType::Ptr KMimeType::findByContent( const TQByteArray &data, int *accuracy ) +KMimeType::Ptr KMimeType::tqfindByContent( const TQByteArray &data, int *accuracy ) { - KMimeMagicResult *result = KMimeMagic::self()->findBufferType(data); + KMimeMagicResult *result = KMimeMagic::self()->tqfindBufferType(data); if (accuracy) *accuracy = result->accuracy(); return mimeType( result->mimeType() ); } -KMimeType::Ptr KMimeType::findByFileContent( const TQString &fileName, int *accuracy ) +KMimeType::Ptr KMimeType::tqfindByFileContent( const TQString &fileName, int *accuracy ) { - KMimeMagicResult *result = KMimeMagic::self()->findFileType(fileName); + KMimeMagicResult *result = KMimeMagic::self()->tqfindFileType(fileName); if (accuracy) *accuracy = result->accuracy(); return mimeType( result->mimeType() ); @@ -327,11 +327,11 @@ KMimeType::Ptr KMimeType::findByFileContent( const TQString &fileName, int *accu #define GZIP_MAGIC1 0x1f #define GZIP_MAGIC2 0x8b -KMimeType::Format KMimeType::findFormatByFileContent( const TQString &fileName ) +KMimeType::Format KMimeType::tqfindFormatByFileContent( const TQString &fileName ) { KMimeType::Format result; result.compression = Format::NoCompression; - KMimeType::Ptr mime = findByPath(fileName); + KMimeType::Ptr mime = tqfindByPath(fileName); result.text = mime->name().startsWith("text/"); TQVariant v = mime->property("X-KDE-text"); @@ -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 ) ); @@ -508,7 +508,7 @@ TQString KMimeType::iconForURL( const KURL & _url, mode_t _mode ) const TQString mimeTypeIcon = mt->icon( _url, _url.isLocalFile() ); TQString i = mimeTypeIcon; - // if we don't find an icon, maybe we can use the one for the protocol + // if we don't tqfind an icon, maybe we can use the one for the protocol if ( i == unknown || i.isEmpty() || mt == defaultMimeTypePtr() // and for the root of the protocol (e.g. trash:/) the protocol icon has priority over the mimetype icon || _url.path().length() <= 1 ) @@ -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")) @@ -717,7 +717,7 @@ TQString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const TQString dev = cfg.readEntry( "Dev" ); if ( !icon.isEmpty() && !unmount_icon.isEmpty() && !dev.isEmpty() ) { - TQString mp = KIO::findDeviceMountPoint( dev ); + TQString mp = KIO::tqfindDeviceMountPoint( dev ); // Is the device not mounted ? if ( mp.isNull() ) return unmount_icon; @@ -728,10 +728,10 @@ TQString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const const TQString u = cfg.readPathEntry( "URL" ); const KURL url( u ); if ( url.protocol() == "trash" ) { - // We need to find if the trash is empty, preferrably without using a KIO job. + // We need to tqfind if the trash is empty, preferrably without using a KIO job. // So instead kio_trash leaves an entry in its config file for us. KSimpleConfig trashConfig( "trashrc", true ); - trashConfig.setGroup( "Status" ); + trashConfig.setGroup( "tqStatus" ); if ( trashConfig.readBoolEntry( "Empty", true ) ) { return emptyIcon; } @@ -831,14 +831,14 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf return retval; } - TQString mp = KIO::findDeviceMountPoint( dev ); + TQString mp = KIO::tqfindDeviceMountPoint( dev ); // Is the device already mounted ? if ( !mp.isNull() ) { 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 { @@ -933,7 +933,7 @@ TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( co } else { - TQString mp = KIO::findDeviceMountPoint( dev ); + TQString mp = KIO::tqfindDeviceMountPoint( dev ); // not mounted ? if ( mp.isEmpty() ) { @@ -1005,7 +1005,7 @@ TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices TQCString object = 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; + kdWarning() << "Desktop file " << path << " tqcontains an invalid X-KDE-ShowIfDcopCall - the function must take the exact parameter (KURL::List) and must be specified." << endl; } else { if(kapp->dcopClient()->call( app, object, function.utf8(), @@ -1051,7 +1051,7 @@ TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices else { TQString exec = cfg.readPathEntry( "Exec" ); - if ( bLocalFiles || exec.contains("%U") || exec.contains("%u") ) + if ( bLocalFiles || exec.tqcontains("%U") || exec.tqcontains("%u") ) { Service s; s.m_strName = cfg.readEntry( "Name" ); @@ -1114,7 +1114,7 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT KMessageBoxWrapper::error( 0, tmp ); return; } - TQString mp = KIO::findDeviceMountPoint( dev ); + TQString mp = KIO::tqfindDeviceMountPoint( dev ); if ( _service.m_type == ST_MOUNT ) { diff --git a/kio/kio/kmimetype.h b/kio/kio/kmimetype.h index 22f9b72ef..131724d63 100644 --- a/kio/kio/kmimetype.h +++ b/kio/kio/kmimetype.h @@ -39,7 +39,7 @@ class KSimpleConfig; * * The starting point you need is often the static methods. * - * KMimeType inherits KServiceType because "text/plain" can be used to find + * KMimeType inherits KServiceType because "text/plain" can be used to tqfind * services (apps and components) "which can open text/plain". * * @see KServiceType @@ -113,7 +113,7 @@ public: * Use this function only if you don't have a special URL * for which you search a pixmap. * - * This function is useful to find + * This function is useful to tqfind * out, which icon is usually chosen for a certain mime type. Since * no URL is passed, it is impossible to obey icon hints in desktop * entries for example. @@ -149,7 +149,7 @@ public: int _state = 0, TQString * _path = 0L ) const; /** - * Convenience method to find the pixmap for a URL. + * Convenience method to tqfind the pixmap for a URL. * * Call this one when you don't know the mimetype. * @@ -282,7 +282,7 @@ public: * "application/octet-stream" is returned otherwise. * * @param _url Is the right most URL with a filesystem protocol. It - * is up to you to find out about that if you have a nested + * is up to you to tqfind out about that if you have a nested * URL. For example * "http://localhost/mist.gz#gzip:/decompress" would have to * pass the "http://..." URL part, while @@ -293,7 +293,7 @@ public: * executables) * @param _is_local_file true if the file is local * @param _fast_mode If set to true no disk access is allowed to - * find out the mimetype. The result may be suboptimal, but + * tqfind out the mimetype. The result may be suboptimal, but * it is @em fast. * @return A pointer to the matching mimetype. 0L is never returned. * @em Very @em Important: Don't store the result in a KMimeType* ! @@ -326,14 +326,14 @@ public: * @param mode the mode of the file (used, for example, to identify * executables) * @param fast_mode If set to true no disk access is allowed to - * find out the mimetype. The result may be suboptimal, but + * tqfind out the mimetype. The result may be suboptimal, but * it is @em fast. * @return A pointer to the matching mimetype. 0L is never returned. */ - static Ptr findByPath( const TQString& path, mode_t mode = 0, bool fast_mode = false ); + static Ptr tqfindByPath( const TQString& path, mode_t mode = 0, bool fast_mode = false ); /** - * Tries to find out the MIME type of a data chunk by looking for + * Tries to tqfind out the MIME type of a data chunk by looking for * certain magic numbers and characteristic strings in it. * * @param data the data to examine @@ -342,10 +342,10 @@ public: * @return a pointer to the KMimeType. application/octet-stream's KMimeType of the * type can not be found this way. */ - static Ptr findByContent( const TQByteArray &data, int *accuracy=0 ); + static Ptr tqfindByContent( const TQByteArray &data, int *accuracy=0 ); /** - * Tries to find out the MIME type of a file by looking for + * Tries to tqfind out the MIME type of a file by looking for * certain magic numbers and characteristic strings in it. * This function is similar to the previous one. Note that the * file name is not used for determining the file type, it is just @@ -357,7 +357,7 @@ public: * @return a pointer to the KMimeType. application/octet-stream's KMimeType of the * type can not be found this way. */ - static Ptr findByFileContent( const TQString &fileName, int *accuracy=0 ); + static Ptr tqfindByFileContent( const TQString &fileName, int *accuracy=0 ); struct Format{ bool text : 1; @@ -370,7 +370,7 @@ public: * or that would be human readable after decompression. * @since 3.2 */ - static Format findFormatByFileContent( const TQString &fileName ); + static Format tqfindFormatByFileContent( const TQString &fileName ); /** * Get all the mimetypes. diff --git a/kio/kio/kmimetypechooser.cpp b/kio/kio/kmimetypechooser.cpp index d8ceb930b..763e2bfc5 100644 --- a/kio/kio/kmimetypechooser.cpp +++ b/kio/kio/kmimetypechooser.cpp @@ -90,7 +90,7 @@ KMimeTypeChooser::KMimeTypeChooser( const TQString &text, if (visuals & KMimeTypeChooser::EditButton) { TQHBox *btns = new TQHBox( this ); - ((TQBoxLayout*)btns->layout())->addStretch(1); + ((TQBoxLayout*)btns->tqlayout())->addStretch(1); d->btnEditMimeType = new TQPushButton( i18n("&Edit..."), btns ); connect( d->btnEditMimeType, TQT_SIGNAL(clicked()), this, TQT_SLOT(editMimeType()) ); @@ -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 ); @@ -195,9 +195,9 @@ void KMimeTypeChooser::editMimeType() // 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*/); } @@ -294,5 +294,5 @@ KMimeTypeChooserDialog::~KMimeTypeChooserDialog() //END KMimeTypeChooserDialog -// kate: space-indent on; indent-width 2; replace-tabs on; +// kate: space-indent on; indent-width 2; tqreplace-tabs on; #include "kmimetypechooser.moc" diff --git a/kio/kio/kmimetypechooser.h b/kio/kio/kmimetypechooser.h index 0827d5b30..45d35446f 100644 --- a/kio/kio/kmimetypechooser.h +++ b/kio/kio/kmimetypechooser.h @@ -177,4 +177,4 @@ class KIO_EXPORT KMimeTypeChooserDialog : public KDialogBase KMimeTypeChooser *m_chooser; }; #endif // _KMIMETYPE_CHOOSER_H_ -// kate: space-indent on; indent-width 2; replace-tabs on; +// kate: space-indent on; indent-width 2; tqreplace-tabs on; diff --git a/kio/kio/kmimetyperesolver.h b/kio/kio/kmimetyperesolver.h index 4ac6347f2..ea332dc32 100644 --- a/kio/kio/kmimetyperesolver.h +++ b/kio/kio/kmimetyperesolver.h @@ -42,11 +42,11 @@ protected: /** * @internal - * This class is used by KMimeTypeResolver, because it can't be a QObject + * This class is used by KMimeTypeResolver, because it can't be a TQObject * 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 @@ -168,7 +168,7 @@ private: * (no more visible icon to process). * @return the file item that was just processed. */ - IconItem * findVisibleIcon(); + IconItem * tqfindVisibleIcon(); Parent * m_parent; KMimeTypeResolverHelper *m_helper; @@ -186,10 +186,10 @@ inline void KMimeTypeResolver<IconItem, Parent>::slotProcessMimeIcons() if ( m_lstPendingMimeIconItems.count() > 0 ) { - // We only find mimetypes for icons that are visible. When more + // We only tqfind mimetypes for icons that are visible. When more // of our viewport is exposed, we'll get a signal and then get // the mimetypes for the newly visible icons. (Rikkus) - item = findVisibleIcon(); + item = tqfindVisibleIcon(); } // No more visible items. @@ -217,7 +217,7 @@ template<class IconItem, class Parent> inline void KMimeTypeResolver<IconItem, Parent>::slotViewportAdjusted() { if (m_lstPendingMimeIconItems.isEmpty()) return; - IconItem * item = findVisibleIcon(); + IconItem * item = tqfindVisibleIcon(); if (item) { m_parent->determineIcon( item ); @@ -227,7 +227,7 @@ inline void KMimeTypeResolver<IconItem, Parent>::slotViewportAdjusted() } template<class IconItem, class Parent> -inline IconItem * KMimeTypeResolver<IconItem, Parent>::findVisibleIcon() +inline IconItem * KMimeTypeResolver<IconItem, Parent>::tqfindVisibleIcon() { // Find an icon that's visible and whose mimetype we don't know. diff --git a/kio/kio/knfsshare.cpp b/kio/kio/knfsshare.cpp index f0fdfce6d..861176c94 100644 --- a/kio/kio/knfsshare.cpp +++ b/kio/kio/knfsshare.cpp @@ -33,7 +33,7 @@ public: KNFSSharePrivate(); bool readExportsFile(); - bool findExportsFile(); + bool tqfindExportsFile(); TQDict<bool> sharedPaths; TQString exportsFile; @@ -41,17 +41,17 @@ public: KNFSSharePrivate::KNFSSharePrivate() { - if (findExportsFile()) + if (tqfindExportsFile()) readExportsFile(); } /** - * Try to find the nfs config file path + * Try to tqfind the nfs config file path * First tries the kconfig, then checks * several well-known paths * @return wether an 'exports' file was found. **/ -bool KNFSSharePrivate::findExportsFile() { +bool KNFSSharePrivate::tqfindExportsFile() { KConfig config("knfsshare"); config.setGroup("General"); exportsFile = config.readPathEntry("exportsFile"); @@ -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/kprotocolinfo.cpp b/kio/kio/kprotocolinfo.cpp index 01e3e6c18..416a365f2 100644 --- a/kio/kio/kprotocolinfo.cpp +++ b/kio/kio/kprotocolinfo.cpp @@ -27,7 +27,7 @@ #include "kprotocolmanager.h" // Most of this class is implemented in kdecore/kprotocolinfo_kdecore.cpp -// This file only contains a few static class-functions that depend on +// This file only tqcontains a few static class-functions that depend on // KProtocolManager KProtocolInfo* KProtocolInfo::findProtocol(const KURL &url) diff --git a/kio/kio/kprotocolinfo.h b/kio/kio/kprotocolinfo.h index dba4694db..f297028a0 100644 --- a/kio/kio/kprotocolinfo.h +++ b/kio/kio/kprotocolinfo.h @@ -31,7 +31,7 @@ * Information about I/O (Internet, etc.) protocols supported by KDE. * This class is useful if you want to know which protocols - * KDE supports. In addition you can find out lots of information + * KDE supports. In addition you can tqfind out lots of information * about a certain protocol. A KProtocolInfo instance represents a * single protocol. Most of the functionality is provided by the static * methods that scan the *.protocol files of all installed kioslaves to get @@ -545,7 +545,7 @@ public: * The following parsing modes are defined: * @li "url" for a standards compliant URL * @li "rawuri" for a non-conformant URI for which URL parsing would be meaningless - * @li "mailto" for a mailto style URI (the path part contains only an email address) + * @li "mailto" for a mailto style URI (the path part tqcontains only an email address) * * @param protocol the protocol to check * @return the suggested parsing mode, or KURL::Auto if unspecified diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp index 8fb8b3227..3b4206ddd 100644 --- a/kio/kio/kprotocolmanager.cpp +++ b/kio/kio/kprotocolmanager.cpp @@ -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 ) @@ -305,7 +305,7 @@ static bool revmatch(const char *host, const char *nplist) { hptr = shptr; - // Try to find another domain or host in the list + // Try to tqfind another domain or host in the list while(--nptr>=nplist && *nptr!=',' && *nptr!=' ') ; // Strip out multiple spaces and commas @@ -453,31 +453,31 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers ) struct utsname nam; if( uname(&nam) >= 0 ) { - if( modifiers.contains('o') ) + if( modifiers.tqcontains('o') ) { supp += TQString("; %1").arg(nam.sysname); - if ( modifiers.contains('v') ) + if ( modifiers.tqcontains('v') ) supp += TQString(" %1").arg(nam.release); } - if( modifiers.contains('p') ) + if( modifiers.tqcontains('p') ) { // TODO: determine this value instead of hardcoding it... - supp += TQString::fromLatin1("; X11"); + supp += TQString::tqfromLatin1("; X11"); } - if( modifiers.contains('m') ) + if( modifiers.tqcontains('m') ) { supp += TQString("; %1").arg(nam.machine); } - if( modifiers.contains('l') ) + if( modifiers.tqcontains('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/kprotocolmanager.h b/kio/kio/kprotocolmanager.h index ec59342af..d4463eddd 100644 --- a/kio/kio/kprotocolmanager.h +++ b/kio/kio/kprotocolmanager.h @@ -302,8 +302,8 @@ public: static int maxCacheSize(); // Maximum cache size in Kb. /** - * The directory which contains the cache files. - * @return the directory that contains the cache files + * The directory which tqcontains the cache files. + * @return the directory that tqcontains the cache files */ static TQString cacheDir(); @@ -371,7 +371,7 @@ public: * It's usually the same, except that FTP, when handled by a proxy, * needs an HTTP ioslave. * - * When a proxy is to be used, proxy contains the URL for the proxy. + * When a proxy is to be used, proxy tqcontains the URL for the proxy. * @param url the url to check * @param proxy the URL of the proxy to use * @return the slave protocol (e.g. 'http'), can be null if unknown 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..a48c8c449 100644 --- a/kio/kio/krun.cpp +++ b/kio/kio/krun.cpp @@ -237,7 +237,7 @@ void KRun::shellQuote( TQString &_str ) if (_str.isEmpty()) // Don't create an explicit empty parameter return; TQChar q('\''); - _str.replace(q, "'\\''").prepend(q).append(q); + _str.tqreplace(q, "'\\''").prepend(q).append(q); } @@ -260,16 +260,16 @@ KRunMX1::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret ) uint option = str[pos + 1]; switch( option ) { case 'c': - ret << service.name().replace( '%', "%%" ); + ret << service.name().tqreplace( '%', "%%" ); break; case 'k': - ret << service.desktopEntryPath().replace( '%', "%%" ); + ret << service.desktopEntryPath().tqreplace( '%', "%%" ); break; case 'i': - ret << "-icon" << service.icon().replace( '%', "%%" ); + ret << "-icon" << service.icon().tqreplace( '%', "%%" ); break; case 'm': - ret << "-miniicon" << service.icon().replace( '%', "%%" ); + ret << "-miniicon" << service.icon().tqreplace( '%', "%%" ); break; case 'u': case 'U': @@ -388,13 +388,13 @@ TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List if (!re.search( exec )) { exec = 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 ); } @@ -543,9 +543,9 @@ TQString KRun::binaryName( const TQString & execLine, bool removePath ) // Remove parameters and/or trailing spaces. TQStringList args = KShell::splitArgs( execLine ); for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it) - if (!(*it).contains('=')) + if (!(*it).tqcontains('=')) // Remove path if wanted - return removePath ? (*it).mid((*it).findRev('/') + 1) : *it; + return removePath ? (*it).mid((*it).tqfindRev('/') + 1) : *it; return TQString::null; } @@ -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 $ @@ -949,7 +949,7 @@ void KRun::init() } pclose(fs); } - aValue.replace( nDollarPos, nEndPos-nDollarPos, result ); + aValue.tqreplace( nDollarPos, nEndPos-nDollarPos, result ); } else if( (aValue)[nDollarPos+1] != '$' ) { uint nEndPos = nDollarPos+1; // the next character is no $ @@ -975,7 +975,7 @@ void KRun::init() // !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!! // A environment variables may contain values in 8bit // locale cpecified encoding or in UTF8 encoding. - aValue.replace( nDollarPos, nEndPos-nDollarPos, KStringHandler::from8Bit( pEnv ) ); + aValue.tqreplace( nDollarPos, nEndPos-nDollarPos, KStringHandler::from8Bit( pEnv ) ); } else aValue.remove( nDollarPos, nEndPos-nDollarPos ); } else { @@ -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; @@ -1280,7 +1280,7 @@ void KRun::slotStatResult( KIO::Job * job ) void KRun::slotScanMimeType( KIO::Job *, const TQString &mimetype ) { if ( mimetype.isEmpty() ) - kdWarning(7010) << "KRun::slotScanFinished : MimetypeJob didn't find a mimetype! Probably a kioslave bug." << endl; + kdWarning(7010) << "KRun::slotScanFinished : MimetypeJob didn't tqfind a mimetype! Probably a kioslave bug." << endl; foundMimeType( mimetype ); m_job = 0; } @@ -1380,7 +1380,7 @@ void KRun::foundMimeType( const TQString& type ) lst.append( m_strURL ); m_bFinished = KRun::run( *serv, lst, d->m_window, d->m_asn ); /// Note: the line above means that if that service failed, we'll - /// go to runURL to maybe find another service, even though a dialog + /// go to runURL to maybe tqfind another service, even though a dialog /// box was displayed. That's good if runURL tries another service, /// but it's not good if it tries the same one :} } @@ -1547,12 +1547,12 @@ KProcessRunner::slotProcessExited(KProcess * p) { // Often we get 1 (zsh, csh) or 127 (ksh, bash) because the binary doesn't exist. // We can't just rely on that, but it's a good hint. - // Before assuming its really so, we'll try to find the binName + // Before assuming its really so, we'll try to tqfind the binName // relatively to current directory, and then in the PATH. if ( !TQFile( binName ).exists() && KStandardDirs::findExe( binName ).isEmpty() ) { kapp->ref(); - KMessageBox::sorry( 0L, i18n("Could not find the program '%1'").arg( binName ) ); + KMessageBox::sorry( 0L, i18n("Could not tqfind the program '%1'").arg( binName ) ); kapp->deref(); } } diff --git a/kio/kio/krun.h b/kio/kio/krun.h index 17fa434e3..3f2dd6108 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: @@ -71,7 +71,7 @@ public: * * @param isLocalFile * If this parameter is set to @p false then @p url is - * examined to find out whether it is a local URL or + * examined to tqfind out whether it is a local URL or * not. This flag is just used to improve speed, since the * function KURL::isLocalFile is a bit slow. * @@ -98,7 +98,7 @@ public: * * @param isLocalFile * If this parameter is set to @p false then @p url is - * examined to find out whether it is a local URL or + * examined to tqfind out whether it is a local URL or * not. This flag is just used to improve speed, since the * function KURL::isLocalFile is a bit slow. * @@ -296,7 +296,7 @@ public: /** * Same as the other runCommand(), but it also takes the name of the - * binary, to display an error message in case it couldn't find it. + * binary, to display an error message in case it couldn't tqfind it. * * @param cmd must be a shell command. You must not append "&" * to it, since the function will do that for you. @@ -338,7 +338,7 @@ public: * If false, the arguments are going to be fed into a exec() kind * call. * If the arguments are intended for an exec() kind of call and - * the Exec line contains shell commands then "/bin/sh -c" is added. + * the Exec line tqcontains shell commands then "/bin/sh -c" is added. * @param tempFiles if true and _urls are local files, they will be deleted * when the application exits. * @return a list of arguments suitable for either system() or exec(). @@ -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..7fba51ae2 100644 --- a/kio/kio/ksambashare.cpp +++ b/kio/kio/ksambashare.cpp @@ -33,7 +33,7 @@ public: KSambaSharePrivate(); bool readSmbConf(); - bool findSmbConf(); + bool tqfindSmbConf(); bool load(); TQDict<bool> sharedPaths; @@ -49,20 +49,20 @@ KSambaSharePrivate::KSambaSharePrivate() #define FILESHARECONF "/etc/security/fileshare.conf" bool KSambaSharePrivate::load() { - if (!findSmbConf()) + if (!tqfindSmbConf()) return false; return readSmbConf(); } /** - * Try to find the samba config file path + * Try to tqfind the samba config file path * First tries the kconfig, then checks * several well-known paths * @return wether a smb.conf was found. **/ -bool KSambaSharePrivate::findSmbConf() { - KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true); +bool KSambaSharePrivate::tqfindSmbConf() { + 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.h b/kio/kio/kscan.h index bb5731eec..d3991e4a4 100644 --- a/kio/kio/kscan.h +++ b/kio/kio/kscan.h @@ -98,7 +98,7 @@ protected: * customize it with the usual KDialogBase flags. * * @param dialogFace the KDialogBase::DialogType - * @param buttonMask a ORed mask of all buttons (see + * @param buttonMask a ORed tqmask of all buttons (see * KDialogBase::ButtonCode) * @param parent the QWidget's parent, or 0 * @param name the name of the TQObject, can be 0 @@ -258,7 +258,7 @@ protected: * customize it with the usual KDialogBase flags. * * @param dialogFace the KDialogBase::DialogType - * @param buttonMask a ORed mask of all buttons (see + * @param buttonMask a ORed tqmask of all buttons (see * KDialogBase::ButtonCode) * @param parent the QWidget's parent, or 0 * @param name the name of the TQObject, can be 0 diff --git a/kio/kio/kservice.cpp b/kio/kio/kservice.cpp index 3af62f26f..23ae54380 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,12 +200,12 @@ 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 { const TQString command = m_strExec.left(space); - m_strExec.replace(command,KStandardDirs::findExe(command)); + m_strExec.tqreplace(command,KStandardDirs::findExe(command)); } } @@ -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 !! @@ -562,7 +562,7 @@ TQVariant KService::property( const TQString& _name, TQVariant::Type t ) const { // No luck, let's ask KServiceTypeFactory what the type of this property // is supposed to be. - t = KServiceTypeFactory::self()->findPropertyTypeByName(_name); + t = KServiceTypeFactory::self()->tqfindPropertyTypeByName(_name); if (t == TQVariant::Invalid) { kdDebug(7012) << "Request for unknown property '" << _name << "'\n"; @@ -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; @@ -646,27 +646,27 @@ KService::List KService::allServices() KService::Ptr KService::serviceByName( const TQString& _name ) { - KService * s = KServiceFactory::self()->findServiceByName( _name ); + KService * s = KServiceFactory::self()->tqfindServiceByName( _name ); return KService::Ptr( s ); } KService::Ptr KService::serviceByDesktopPath( const TQString& _name ) { - KService * s = KServiceFactory::self()->findServiceByDesktopPath( _name ); + KService * s = KServiceFactory::self()->tqfindServiceByDesktopPath( _name ); return KService::Ptr( s ); } KService::Ptr KService::serviceByDesktopName( const TQString& _name ) { - KService * s = KServiceFactory::self()->findServiceByDesktopName( _name.lower() ); + KService * s = KServiceFactory::self()->tqfindServiceByDesktopName( _name.lower() ); if (!s && !_name.startsWith("kde-")) - s = KServiceFactory::self()->findServiceByDesktopName( "kde-"+_name.lower() ); + s = KServiceFactory::self()->tqfindServiceByDesktopName( "kde-"+_name.lower() ); return KService::Ptr( s ); } KService::Ptr KService::serviceByMenuId( const TQString& _name ) { - KService * s = KServiceFactory::self()->findServiceByMenuId( _name ); + KService * s = KServiceFactory::self()->tqfindServiceByMenuId( _name ); return KService::Ptr( s ); } @@ -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 diff --git a/kio/kio/kservice.h b/kio/kio/kservice.h index c276e8369..ed863ed55 100644 --- a/kio/kio/kservice.h +++ b/kio/kio/kservice.h @@ -104,7 +104,7 @@ public: TQString exec() const { return m_strExec; } /** * Returns the name of the service's library. - * @return the name of the library that contains the services + * @return the name of the library that tqcontains the services * implementation, * or TQString::null if not set */ @@ -125,7 +125,7 @@ public: TQString icon() const { return m_strIcon; } /** * Returns the pixmap that represents the icon. - * @return a pixmap for this service (finds and loads icon()), + * @return a pixmap for this service (tqfinds and loads icon()), * null if not set * @see icon() */ @@ -463,7 +463,7 @@ public: /** * Find a service by its storage-id or desktop-file path. This - * function will try very hard to find a matching service. + * function will try very hard to tqfind a matching service. * * @param _storageId the storage id or desktop-file path of the service * @return a pointer to the requested service or 0 if the service is diff --git a/kio/kio/kservicefactory.cpp b/kio/kio/kservicefactory.cpp index 1f79deb19..6480737cf 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; @@ -87,12 +87,12 @@ KServiceFactory * KServiceFactory::self() return _self; } -KService * KServiceFactory::findServiceByName(const TQString &_name) +KService * KServiceFactory::tqfindServiceByName(const TQString &_name) { if (!m_sycocaDict) return 0; // Error! // Warning : this assumes we're NOT building a database - // But since findServiceByName isn't called in that case... + // But since tqfindServiceByName isn't called in that case... // [ see KServiceTypeFactory for how to do it if needed ] int offset = m_sycocaDict->find_string( _name ); @@ -110,12 +110,12 @@ KService * KServiceFactory::findServiceByName(const TQString &_name) return newService; } -KService * KServiceFactory::findServiceByDesktopName(const TQString &_name) +KService * KServiceFactory::tqfindServiceByDesktopName(const TQString &_name) { if (!m_nameDict) return 0; // Error! // Warning : this assumes we're NOT building a database - // But since findServiceByName isn't called in that case... + // But since tqfindServiceByName isn't called in that case... // [ see KServiceTypeFactory for how to do it if needed ] int offset = m_nameDict->find_string( _name ); @@ -133,12 +133,12 @@ KService * KServiceFactory::findServiceByDesktopName(const TQString &_name) return newService; } -KService * KServiceFactory::findServiceByDesktopPath(const TQString &_name) +KService * KServiceFactory::tqfindServiceByDesktopPath(const TQString &_name) { if (!m_relNameDict) return 0; // Error! // Warning : this assumes we're NOT building a database - // But since findServiceByName isn't called in that case... + // But since tqfindServiceByName isn't called in that case... // [ see KServiceTypeFactory for how to do it if needed ] int offset = m_relNameDict->find_string( _name ); @@ -156,12 +156,12 @@ KService * KServiceFactory::findServiceByDesktopPath(const TQString &_name) return newService; } -KService * KServiceFactory::findServiceByMenuId(const TQString &_menuId) +KService * KServiceFactory::tqfindServiceByMenuId(const TQString &_menuId) { if (!m_menuIdDict) return 0; // Error! // Warning : this assumes we're NOT building a database - // But since findServiceByMenuId isn't called in that case... + // But since tqfindServiceByMenuId isn't called in that case... // [ see KServiceTypeFactory for how to do it if needed ] int offset = m_menuIdDict->find_string( _menuId ); @@ -226,10 +226,10 @@ KService::List KServiceFactory::allInitServices() // Assume we're NOT building a database m_str->device()->at(m_initListOffset); - Q_INT32 entryCount; + 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]; @@ -255,8 +255,8 @@ KService::List KServiceFactory::offers( int serviceTypeOffset ) // Jump to the offer list str->device()->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) @@ -275,7 +275,7 @@ KService::List KServiceFactory::offers( int serviceTypeOffset ) list.append( KService::Ptr( serv ) ); // Restore position str->device()->at( savedPos ); - } else if ( aServiceTypeOffset > (Q_INT32)serviceTypeOffset ) + } else if ( aServiceTypeOffset > (TQ_INT32)serviceTypeOffset ) break; // too far } else diff --git a/kio/kio/kservicefactory.h b/kio/kio/kservicefactory.h index 1a828364e..b52f30d5a 100644 --- a/kio/kio/kservicefactory.h +++ b/kio/kio/kservicefactory.h @@ -54,22 +54,22 @@ public: /** * Find a service (by name, e.g. "Terminal") */ - KService * findServiceByName( const TQString &_name ); + KService * tqfindServiceByName( const TQString &_name ); /** * Find a service (by desktop file name, e.g. "konsole") */ - KService * findServiceByDesktopName( const TQString &_name ); + KService * tqfindServiceByDesktopName( const TQString &_name ); /** * Find a service ( by desktop path, e.g. "System/konsole.desktop") */ - KService * findServiceByDesktopPath( const TQString &_name ); + KService * tqfindServiceByDesktopPath( const TQString &_name ); /** * Find a service ( by menu id, e.g. "kde-konsole.desktop") */ - KService * findServiceByMenuId( const TQString &_menuId ); + KService * tqfindServiceByMenuId( const TQString &_menuId ); /** * @return the services supporting the given service type diff --git a/kio/kio/kservicegroup.cpp b/kio/kio/kservicegroup.cpp index f5d2970a9..d8d1ddd0b 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 >> @@ -255,14 +255,14 @@ void KServiceGroup::load( TQDataStream& s ) if (path[path.length()-1] == '/') { KServiceGroup *serviceGroup; - serviceGroup = KServiceGroupFactory::self()->findGroupByDesktopPath(path, false); + serviceGroup = KServiceGroupFactory::self()->tqfindGroupByDesktopPath(path, false); if (serviceGroup) m_serviceList.append( SPtr(serviceGroup) ); } else { KService *service; - service = KServiceFactory::self()->findServiceByDesktopPath(path); + service = KServiceFactory::self()->tqfindServiceByDesktopPath(path); if (service) m_serviceList.append( SPtr(service) ); } @@ -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 << @@ -352,7 +352,7 @@ KServiceGroup::SuSEentries(bool sort, bool excludeNoDisplay, bool allowSeparator if (!m_bDeep) { group = - KServiceGroupFactory::self()->findGroupByDesktopPath(relPath(), true); + KServiceGroupFactory::self()->tqfindGroupByDesktopPath(relPath(), true); if (0 == group) // No guarantee that we still exist! return List(); @@ -491,7 +491,7 @@ KServiceGroup::SuSEsortEntries( KSortableValueList<SPtr,TQCString> slist, KSorta if (allowSeparators) needSeparator = true; } - else if ( item.contains( ":O" ) ) + else if ( item.tqcontains( ":O" ) ) { //todo parse attribute: TQString tmp( item ); @@ -657,7 +657,7 @@ void KServiceGroup::parseAttribute( const TQString &item , bool &showEmptyMenu, showInlineAlias = true; else if ( item == "NIA") //not inline alias! showInlineAlias = false; - else if( ( item ).contains( "IL" )) //inline limite! + else if( ( item ).tqcontains( "IL" )) //inline limite! { TQString tmp( item ); tmp = tmp.remove( "IL[" ); @@ -672,12 +672,12 @@ void KServiceGroup::parseAttribute( const TQString &item , bool &showEmptyMenu, kdDebug()<<" This attribute is not supported :"<<item<<endl; } -void KServiceGroup::setLayoutInfo(const TQStringList &layout) +void KServiceGroup::setLayoutInfo(const TQStringList &tqlayout) { - d->sortOrder = layout; + d->sortOrder = tqlayout; } -TQStringList KServiceGroup::layoutInfo() const +TQStringList KServiceGroup::tqlayoutInfo() const { return d->sortOrder; } @@ -685,26 +685,26 @@ TQStringList KServiceGroup::layoutInfo() const KServiceGroup::Ptr KServiceGroup::baseGroup( const TQString & _baseGroupName ) { - return KServiceGroupFactory::self()->findBaseGroup(_baseGroupName, true); + return KServiceGroupFactory::self()->tqfindBaseGroup(_baseGroupName, true); } KServiceGroup::Ptr KServiceGroup::root() { - return KServiceGroupFactory::self()->findGroupByDesktopPath("/", true); + return KServiceGroupFactory::self()->tqfindGroupByDesktopPath("/", true); } KServiceGroup::Ptr KServiceGroup::group(const TQString &relPath) { if (relPath.isEmpty()) return root(); - return KServiceGroupFactory::self()->findGroupByDesktopPath(relPath, true); + return KServiceGroupFactory::self()->tqfindGroupByDesktopPath(relPath, true); } KServiceGroup::Ptr KServiceGroup::childGroup(const TQString &parent) { - return KServiceGroupFactory::self()->findGroupByDesktopPath("#parent#"+parent, true); + return KServiceGroupFactory::self()->tqfindGroupByDesktopPath("#parent#"+parent, true); } QString diff --git a/kio/kio/kservicegroup.h b/kio/kio/kservicegroup.h index 69242e6ed..ea923ff0d 100644 --- a/kio/kio/kservicegroup.h +++ b/kio/kio/kservicegroup.h @@ -197,9 +197,9 @@ public: /** * @internal - * Sets information related to the layout of services in this group. + * Sets information related to the tqlayout of services in this group. */ - void setLayoutInfo(const TQStringList &layout); + void setLayoutInfo(const TQStringList &tqlayout); /** * Original API and feature kindly provided by SuSE @@ -209,9 +209,9 @@ public: /** * @internal - * Returns information related to the layout of services in this group. + * Returns information related to the tqlayout of services in this group. */ - TQStringList layoutInfo() const; + TQStringList tqlayoutInfo() const; /** * @internal diff --git a/kio/kio/kservicegroupfactory.cpp b/kio/kio/kservicegroupfactory.cpp index 9bca4dc63..9a2ae33f2 100644 --- a/kio/kio/kservicegroupfactory.cpp +++ b/kio/kio/kservicegroupfactory.cpp @@ -36,7 +36,7 @@ KServiceGroupFactory::KServiceGroupFactory() if (m_str) { // Read Header - Q_INT32 i; + TQ_INT32 i; (*m_str) >> i; m_baseGroupDictOffset = i; @@ -66,12 +66,12 @@ KServiceGroupFactory * KServiceGroupFactory::self() return _self; } -KServiceGroup * KServiceGroupFactory::findGroupByDesktopPath(const TQString &_name, bool deep) +KServiceGroup * KServiceGroupFactory::tqfindGroupByDesktopPath(const TQString &_name, bool deep) { if (!m_sycocaDict) return 0; // Error! // Warning : this assumes we're NOT building a database - // But since findServiceByName isn't called in that case... + // But since tqfindServiceByName isn't called in that case... // [ see KServiceTypeFactory for how to do it if needed ] int offset = m_sycocaDict->find_string( _name ); @@ -89,12 +89,12 @@ KServiceGroup * KServiceGroupFactory::findGroupByDesktopPath(const TQString &_na return newGroup; } -KServiceGroup * KServiceGroupFactory::findBaseGroup(const TQString &_baseGroupName, bool deep) +KServiceGroup * KServiceGroupFactory::tqfindBaseGroup(const TQString &_baseGroupName, bool deep) { if (!m_baseGroupDict) return 0; // Error! // Warning : this assumes we're NOT building a database - // But since findServiceByName isn't called in that case... + // But since tqfindServiceByName isn't called in that case... // [ see KServiceTypeFactory for how to do it if needed ] int offset = m_baseGroupDict->find_string( _baseGroupName ); diff --git a/kio/kio/kservicegroupfactory.h b/kio/kio/kservicegroupfactory.h index b1131b398..352ca2d1c 100644 --- a/kio/kio/kservicegroupfactory.h +++ b/kio/kio/kservicegroupfactory.h @@ -52,12 +52,12 @@ public: /** * Find a group ( by desktop path, e.g. "Applications/Editors") */ - KServiceGroup * findGroupByDesktopPath( const TQString &_name, bool deep = true ); + KServiceGroup * tqfindGroupByDesktopPath( const TQString &_name, bool deep = true ); /** * Find a base group by name, e.g. "settings" */ - KServiceGroup * findBaseGroup( const TQString &_baseGroupName, bool deep = true ); + KServiceGroup * tqfindBaseGroup( const TQString &_baseGroupName, bool deep = true ); /** * @return the unique service group factory, creating it if necessary diff --git a/kio/kio/kservicetype.cpp b/kio/kio/kservicetype.cpp index 48693aceb..5a44210de 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() @@ -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(); } @@ -209,7 +209,7 @@ 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(); @@ -229,7 +229,7 @@ KServiceType::propertyDefNames() const KServiceType::Ptr KServiceType::serviceType( const TQString& _name ) { - KServiceType * p = KServiceTypeFactory::self()->findServiceTypeByName( _name ); + KServiceType * p = KServiceTypeFactory::self()->tqfindServiceTypeByName( _name ); return KServiceType::Ptr( p ); } @@ -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); @@ -254,7 +254,7 @@ KService::List KServiceType::offers( const TQString& _servicetype ) KService::List lst; // Services associated directly with this servicetype (the normal case) - KServiceType::Ptr serv = KServiceTypeFactory::self()->findServiceTypeByName( _servicetype ); + KServiceType::Ptr serv = KServiceTypeFactory::self()->tqfindServiceTypeByName( _servicetype ); if ( serv ) addUnique(lst, dict, KServiceFactory::self()->offers( serv->offset() ), false); else @@ -270,7 +270,7 @@ KService::List KServiceType::offers( const TQString& _servicetype ) TQString parent = mime->parentMimeType(); if (parent.isEmpty()) break; - mime = dynamic_cast<KMimeType *>(KServiceTypeFactory::self()->findServiceTypeByName( parent )); + mime = dynamic_cast<KMimeType *>(KServiceTypeFactory::self()->tqfindServiceTypeByName( parent )); if (!mime) break; @@ -291,7 +291,7 @@ KService::List KServiceType::offers( const TQString& _servicetype ) && _servicetype.left(4) != "all/" ) { // Support for services associated with "all" - KServiceType * servAll = KServiceTypeFactory::self()->findServiceTypeByName( "all/all" ); + KServiceType * servAll = KServiceTypeFactory::self()->tqfindServiceTypeByName( "all/all" ); if ( servAll ) { addUnique(lst, dict, KServiceFactory::self()->offers( servAll->offset() ), true); @@ -303,7 +303,7 @@ KService::List KServiceType::offers( const TQString& _servicetype ) // Support for services associated with "allfiles" if ( _servicetype != "inode/directory" && _servicetype != "inode/directory-locked" ) { - KServiceType * servAllFiles = KServiceTypeFactory::self()->findServiceTypeByName( "all/allfiles" ); + KServiceType * servAllFiles = KServiceTypeFactory::self()->tqfindServiceTypeByName( "all/allfiles" ); if ( servAllFiles ) { addUnique(lst, dict, KServiceFactory::self()->offers( servAllFiles->offset() ), true); @@ -333,7 +333,7 @@ KServiceType::Ptr KServiceType::parentType() TQString parentSt = parentServiceType(); if (!parentSt.isEmpty()) { - d->parentType = KServiceTypeFactory::self()->findServiceTypeByName( parentSt ); + d->parentType = KServiceTypeFactory::self()->tqfindServiceTypeByName( parentSt ); if (!d->parentType) kdWarning(7009) << "'" << desktopEntryPath() << "' specifies undefined mimetype/servicetype '"<< parentSt << "'" << endl; } diff --git a/kio/kio/kservicetypefactory.cpp b/kio/kio/kservicetypefactory.cpp index 8287bca44..ac0a3d37c 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; @@ -77,7 +77,7 @@ KServiceTypeFactory * KServiceTypeFactory::self() return _self; } -KServiceType * KServiceTypeFactory::findServiceTypeByName(const TQString &_name) +KServiceType * KServiceTypeFactory::tqfindServiceTypeByName(const TQString &_name) { if (!m_sycocaDict) return 0L; // Error! assert (!KSycoca::self()->isBuilding()); @@ -95,14 +95,14 @@ KServiceType * KServiceTypeFactory::findServiceTypeByName(const TQString &_name) return newServiceType; } -TQVariant::Type KServiceTypeFactory::findPropertyTypeByName(const TQString &_name) +TQVariant::Type KServiceTypeFactory::tqfindPropertyTypeByName(const TQString &_name) { if (!m_sycocaDict) return TQVariant::Invalid; // Error! 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(); } @@ -110,7 +110,7 @@ TQVariant::Type KServiceTypeFactory::findPropertyTypeByName(const TQString &_nam return TQVariant::Invalid; } -KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQString *match) +KMimeType * KServiceTypeFactory::tqfindFromPattern(const TQString &_filename, TQString *match) { // Assume we're NOT building a database if (!m_str) return 0; @@ -120,21 +120,21 @@ KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQSt str->device()->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->device()->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 { @@ -169,7 +169,7 @@ KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQSt str->device()->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 ) { diff --git a/kio/kio/kservicetypefactory.h b/kio/kio/kservicetypefactory.h index db64aa115..ae7e56785 100644 --- a/kio/kio/kservicetypefactory.h +++ b/kio/kio/kservicetypefactory.h @@ -63,19 +63,19 @@ public: * Find a service type in the database file (allocates it) * Overloaded by KBuildServiceTypeFactory to return a memory one. */ - virtual KServiceType * findServiceTypeByName(const TQString &_name); + virtual KServiceType * tqfindServiceTypeByName(const TQString &_name); /** * Find a the property type of a named property. */ - TQVariant::Type findPropertyTypeByName(const TQString &_name); + TQVariant::Type tqfindPropertyTypeByName(const TQString &_name); /** * Find a mimetype from a filename (using the pattern list) * @param _filename filename to check. * @param match if provided, returns the pattern that matched. */ - KMimeType * findFromPattern(const TQString &_filename, TQString *match = 0); + KMimeType * tqfindFromPattern(const TQString &_filename, TQString *match = 0); /** * @return all mimetypes @@ -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..b27e04054 100644 --- a/kio/kio/kshellcompletion.cpp +++ b/kio/kio/kshellcompletion.cpp @@ -217,33 +217,33 @@ 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; } if ( force || (pos >= 0) ) { // Escape \ in the string - text->replace( m_escape_char, + text->tqreplace( m_escape_char, TQString( m_escape_char ) + m_escape_char ); // Escape " in the string - text->replace( m_quote_char1, + text->tqreplace( m_quote_char1, TQString( m_escape_char ) + m_quote_char1 ); // " at the beginning diff --git a/kio/kio/ktar.cpp b/kio/kio/ktar.cpp index 0b77fff52..768d0bc63 100644 --- a/kio/kio/ktar.cpp +++ b/kio/kio/ktar.cpp @@ -66,9 +66,9 @@ KTar::KTar( const TQString& filename, const TQString & _mimetype ) if ( mimetype.isEmpty() ) // Find out mimetype manually { if ( TQFile::exists( filename ) ) - mimetype = KMimeType::findByFileContent( filename )->name(); + mimetype = KMimeType::tqfindByFileContent( filename )->name(); else - mimetype = KMimeType::findByPath( filename, 0, true )->name(); + mimetype = KMimeType::tqfindByPath( filename, 0, true )->name(); kdDebug(7041) << "KTar::KTar mimetype = " << mimetype << endl; // Don't move to prepareDevice - the other constructor theoretically allows ANY filter @@ -137,7 +137,7 @@ void KTar::prepareDevice( const TQString & filename, // the file is completly extracted instead, // and we work on the extracted tar file. // This improves the extraction speed by the tar ioslave dramatically, - // if the archive file contains many files. + // if the archive file tqcontains many files. // This is because the tar ioslave extracts one file after the other and normally // has to walk through the decompression filter each time. // Which is in fact nearly as slow as a complete decompression for each 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 @@ -353,7 +353,7 @@ bool KTar::openArchive( int mode ) return false; // We'll use the permission and user/group of d->rootDir - // for any directory we emulate (see findOrCreate) + // for any directory we emulate (see tqfindOrCreate) //struct stat buf; //stat( m_filename, &buf ); @@ -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 @@ -485,10 +485,10 @@ bool KTar::openArchive( int mode ) } else { - // In some tar files we can find dir/./file => call cleanDirPath + // In some tar files we can tqfind dir/./file => call cleanDirPath TQString path = TQDir::cleanDirPath( name.left( pos ) ); // Ensure container directory exists, create otherwise - KArchiveDirectory * d = findOrCreate( path ); + KArchiveDirectory * d = tqfindOrCreate( path ); d->addEntry( e ); } } @@ -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); @@ -579,14 +579,14 @@ bool KTar::writeDir( const TQString& name, const TQString& user, const TQString& return false; } - // In some tar files we can find dir/./ => call cleanDirPath + // In some tar files we can tqfind dir/./ => call cleanDirPath TQString dirName ( TQDir::cleanDirPath( name ) ); // Need trailing '/' if ( dirName.right(1) != "/" ) dirName += "/"; - if ( d->dirList.contains( dirName ) ) + if ( d->dirList.tqcontains( dirName ) ) return true; // already there char buffer[ 0x201 ]; @@ -618,7 +618,7 @@ bool KTar::writeDir( const TQString& name, const TQString& user, const TQString& device()->writeBlock( buffer, 0x200 ); if ( mode() & IO_ReadWrite ) d->tarEnd = device()->at(); - d->dirList.append( dirName ); // contains trailing slash + d->dirList.append( dirName ); // tqcontains trailing slash return true; // TODO if wanted, better error control #endif } @@ -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; @@ -699,7 +699,7 @@ void KTar::fillBuffer( char * buffer, strcpy( buffer + 0x88, s.data() ); buffer[ 0x93 ] = ' '; // space-terminate (no null after) - // spaces, replaced by the check sum later + // spaces, tqreplaced by the check sum later buffer[ 0x94 ] = 0x20; buffer[ 0x95 ] = 0x20; buffer[ 0x96 ] = 0x20; @@ -775,21 +775,21 @@ bool KTar::prepareWriting_impl(const TQString &name, const TQString &user, return false; } - // In some tar files we can find dir/./file => call cleanDirPath + // In some tar files we can tqfind dir/./file => call cleanDirPath TQString fileName ( TQDir::cleanDirPath( name ) ); /* // Create toplevel dirs // Commented out by David since it's not necessary, and if anybody thinks it is, - // he needs to implement a findOrCreate equivalent in writeDir. + // he needs to implement a tqfindOrCreate equivalent in writeDir. // But as KTar and the "tar" program both handle tar files without // dir entries, there's really no need for that TQString tmp ( fileName ); - int i = tmp.findRev( '/' ); + int i = tmp.tqfindRev( '/' ); if ( i != -1 ) { - TQString d = tmp.left( i + 1 ); // contains trailing slash - if ( !m_dirList.contains( d ) ) + TQString d = tmp.left( i + 1 ); // tqcontains trailing slash + if ( !m_dirList.tqcontains( d ) ) { tmp = tmp.mid( i + 1 ); writeDir( d, user, group ); // WARNING : this one doesn't create its toplevel dirs @@ -846,14 +846,14 @@ bool KTar::writeDir_impl(const TQString &name, const TQString &user, return false; } - // In some tar files we can find dir/./ => call cleanDirPath + // In some tar files we can tqfind dir/./ => call cleanDirPath TQString dirName ( TQDir::cleanDirPath( name ) ); // Need trailing '/' if ( dirName.right(1) != "/" ) dirName += "/"; - if ( d->dirList.contains( dirName ) ) + if ( d->dirList.tqcontains( dirName ) ) return true; // already there char buffer[ 0x201 ]; @@ -884,7 +884,7 @@ bool KTar::writeDir_impl(const TQString &name, const TQString &user, device()->writeBlock( buffer, 0x200 ); if ( mode() & IO_ReadWrite ) d->tarEnd = device()->at(); - d->dirList.append( dirName ); // contains trailing slash + d->dirList.append( dirName ); // tqcontains trailing slash return true; // TODO if wanted, better error control } @@ -911,7 +911,7 @@ bool KTar::writeSymLink_impl(const TQString &name, const TQString &target, device()->flush(); - // In some tar files we can find dir/./file => call cleanDirPath + // In some tar files we can tqfind dir/./file => call cleanDirPath TQString fileName ( TQDir::cleanDirPath( name ) ); 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..7f6e9d4af 100644 --- a/kio/kio/ktrader.h +++ b/kio/kio/ktrader.h @@ -27,7 +27,7 @@ * * Basically, it provides a way for an application to query * all KDE services (that is, applications and components) that match - * a specific set of requirements. This allows you to find an + * a specific set of requirements. This allows you to tqfind an * application in real-time without you having to hard-code the name * and/or path of the application. * @@ -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..a2c4ff9d3 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) + // Try to tqfind 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..0a6b01045 100644 --- a/kio/kio/kurifilter.h +++ b/kio/kio/kurifilter.h @@ -347,7 +347,7 @@ private: * * @short Abstract class for URI filter plugins. */ -class KIO_EXPORT KURIFilterPlugin : public QObject +class KIO_EXPORT KURIFilterPlugin : public TQObject { Q_OBJECT @@ -525,7 +525,7 @@ private: * * KURIFilter also allows richer data exchange through a simple * meta-object called @p KURIFilterData. Using this meta-object - * you can find out more information about the URL you want to + * you can tqfind out more information about the URL you want to * filter. See KURIFilterData for examples and details. * * @short Filters a given URL into its proper format whenever possible. @@ -550,7 +550,7 @@ public: * The given URL is filtered based on the specified list of filters. * If the list is empty all available filters would be used. * - * @param data object that contains the URI to be filtered. + * @param data object that tqcontains the URI to be filtered. * @param filters specify the list of filters to be used. * * @return a boolean indicating whether the URI has been changed @@ -631,7 +631,7 @@ protected: * A protected constructor. * * This constructor creates a KURIFilter and - * initializes all plugins it can find by invoking + * initializes all plugins it can tqfind by invoking * loadPlugins. */ KURIFilter(); diff --git a/kio/kio/kurlcompletion.cpp b/kio/kio/kurlcompletion.cpp index 88a566b5f..75a6fd106 100644 --- a/kio/kio/kurlcompletion.cpp +++ b/kio/kio/kurlcompletion.cpp @@ -66,7 +66,7 @@ static bool expandEnv(TQString &); static TQString unescape(const TQString &text); -// Permission mask for files that are executable by +// Permission tqmask for files that are executable by // user, group or other #define MODE_EXE (S_IXUSR | S_IXGRP | S_IXOTH) @@ -330,7 +330,7 @@ public: // Is the initial string a URL, or just a path (whether absolute or relative) bool isURL() const { return m_isURL; } - void filter( bool replace_user_dir, bool replace_env ); + void filter( bool tqreplace_user_dir, bool tqreplace_env ); private: void init(const TQString &url, const TQString &cwd); @@ -363,9 +363,9 @@ void KURLCompletion::MyURL::init(const TQString &url, const TQString &cwd) // Special shortcuts for "man:" and "info:" if ( url_copy[0] == '#' ) { if ( url_copy[1] == '#' ) - url_copy.replace( 0, 2, TQString("info:") ); + url_copy.tqreplace( 0, 2, TQString("info:") ); else - url_copy.replace( 0, 1, TQString("man:") ); + url_copy.tqreplace( 0, 1, TQString("man:") ); } // Look for a protocol in 'url' @@ -414,11 +414,11 @@ KURLCompletion::MyURL::~MyURL() delete m_kurl; } -void KURLCompletion::MyURL::filter( bool replace_user_dir, bool replace_env ) +void KURLCompletion::MyURL::filter( bool tqreplace_user_dir, bool tqreplace_env ) { TQString d = dir() + file(); - if ( replace_user_dir ) expandTilde( d ); - if ( replace_env ) expandEnv( d ); + if ( tqreplace_user_dir ) expandTilde( d ); + if ( tqreplace_env ) expandEnv( d ); m_kurl->setPath( d ); } @@ -455,8 +455,8 @@ public: TQString cwd; // "current directory" = base dir for completion KURLCompletion::Mode mode; // ExeCompletion, FileCompletion, DirCompletion - bool replace_env; - bool replace_home; + bool tqreplace_env; + bool tqreplace_home; bool complete_url; // if true completing a URL (i.e. 'prepend' is a URL), otherwise a path KIO::ListJob *list_job; // kio job to list directories @@ -511,8 +511,8 @@ void KURLCompletion::init() d->cwd = TQDir::homeDirPath(); - d->replace_home = true; - d->replace_env = true; + d->tqreplace_home = true; + d->tqreplace_env = true; d->last_no_hidden = false; d->last_compl_type = 0; d->list_job = 0L; @@ -547,24 +547,24 @@ void KURLCompletion::setMode( Mode mode ) d->mode = mode; } -bool KURLCompletion::replaceEnv() const +bool KURLCompletion::tqreplaceEnv() const { - return d->replace_env; + return d->tqreplace_env; } -void KURLCompletion::setReplaceEnv( bool replace ) +void KURLCompletion::setReplaceEnv( bool tqreplace ) { - d->replace_env = replace; + d->tqreplace_env = tqreplace; } -bool KURLCompletion::replaceHome() const +bool KURLCompletion::tqreplaceHome() const { - return d->replace_home; + return d->tqreplace_home; } -void KURLCompletion::setReplaceHome( bool replace ) +void KURLCompletion::setReplaceHome( bool tqreplace ) { - d->replace_home = replace; + d->tqreplace_home = tqreplace; } /* @@ -592,16 +592,16 @@ TQString KURLCompletion::makeCompletion(const TQString &text) // Environment variables // - if ( d->replace_env && envCompletion( url, &match ) ) + if ( d->tqreplace_env && envCompletion( url, &match ) ) return match; // User directories // - if ( d->replace_home && userCompletion( url, &match ) ) + if ( d->tqreplace_home && userCompletion( url, &match ) ) return match; // Replace user directories and variables - url.filter( d->replace_home, d->replace_env ); + url.filter( d->tqreplace_home, d->tqreplace_env ); //kdDebug() << "Filtered: proto=" << url.protocol() // << ", dir=" << url.dir() @@ -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(); @@ -1370,23 +1370,23 @@ void KURLCompletion::customEvent(TQCustomEvent *e) } // static -TQString KURLCompletion::replacedPath( const TQString& text, bool replaceHome, bool replaceEnv ) +TQString KURLCompletion::tqreplacedPath( const TQString& text, bool tqreplaceHome, bool tqreplaceEnv ) { if ( text.isEmpty() ) return text; - MyURL url( text, TQString::null ); // no need to replace something of our current cwd + MyURL url( text, TQString::null ); // no need to tqreplace something of our current cwd if ( !url.kurl()->isLocalFile() ) return text; - url.filter( replaceHome, replaceEnv ); + url.filter( tqreplaceHome, tqreplaceEnv ); return url.dir() + url.file(); } -TQString KURLCompletion::replacedPath( const TQString& text ) +TQString KURLCompletion::tqreplacedPath( const TQString& text ) { - return replacedPath( text, d->replace_home, d->replace_env ); + return tqreplacedPath( text, d->tqreplace_home, d->tqreplace_env ); } ///////////////////////////////////////////////////////// @@ -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; @@ -1439,7 +1439,7 @@ static bool expandEnv( TQString &text ) if ( !value.isEmpty() ) { expanded = true; - text.replace( pos, len, value ); + text.tqreplace( pos, len, value ); pos = pos + value.length(); } else { @@ -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; @@ -1483,12 +1483,12 @@ static bool expandTilde(TQString &text) TQString user = text.mid( 1, pos2-1 ); TQString dir; - // A single ~ is replaced with $HOME + // A single ~ is tqreplaced with $HOME // if ( user.isEmpty() ) { dir = TQDir::homeDirPath(); } - // ~user is replaced with the dir from passwd + // ~user is tqreplaced with the dir from passwd // else { struct passwd *pw = ::getpwnam( user.local8Bit() ); @@ -1501,7 +1501,7 @@ static bool expandTilde(TQString &text) if ( !dir.isEmpty() ) { expanded = true; - text.replace(0, pos2, dir); + text.tqreplace(0, pos2, dir); } } diff --git a/kio/kio/kurlcompletion.h b/kio/kio/kurlcompletion.h index a06d7dc4b..d2759ae5d 100644 --- a/kio/kio/kurlcompletion.h +++ b/kio/kio/kurlcompletion.h @@ -119,34 +119,34 @@ public: /** * Checks whether environment variables are completed and - * whether they are replaced internally while finding completions. + * whether they are tqreplaced internally while tqfinding completions. * Default is enabled. - * @return true if environment vvariables will be replaced + * @return true if environment vvariables will be tqreplaced */ - virtual bool replaceEnv() const; + virtual bool tqreplaceEnv() const; /** - * Enables/disables completion and replacement (internally) of + * Enables/disables completion and tqreplacement (internally) of * environment variables in URLs. Default is enabled. - * @param replace true to replace environment variables + * @param tqreplace true to tqreplace environment variables */ - virtual void setReplaceEnv( bool replace ); + virtual void setReplaceEnv( bool tqreplace ); /** * Returns whether ~username is completed and whether ~username - * is replaced internally with the user's home directory while - * finding completions. Default is enabled. - * @return true to replace tilde with the home directory + * is tqreplaced internally with the user's home directory while + * tqfinding completions. Default is enabled. + * @return true to tqreplace tilde with the home directory */ - virtual bool replaceHome() const; + virtual bool tqreplaceHome() const; /** - * Enables/disables completion of ~username and replacement + * Enables/disables completion of ~username and tqreplacement * (internally) of ~username with the user's home directory. * Default is enabled. - * @param replace true to replace tilde with the home directory + * @param tqreplace true to tqreplace tilde with the home directory */ - virtual void setReplaceHome( bool replace ); + virtual void setReplaceHome( bool tqreplace ); /** * Replaces username and/or environment variables, depending on the @@ -157,14 +157,14 @@ public: * @return the path or URL resulting from this operation. If you * want to convert it to a KURL, use KURL::fromPathOrURL. */ - TQString replacedPath( const TQString& text ); + TQString tqreplacedPath( const TQString& text ); /** * @internal I'll let ossi add a real one to KShell :) * @since 3.2 */ - static TQString replacedPath( const TQString& text, - bool replaceHome, bool replaceEnv = true ); + static TQString tqreplacedPath( const TQString& text, + bool tqreplaceHome, bool tqreplaceEnv = true ); class MyURL; protected: diff --git a/kio/kio/kuserprofile.cpp b/kio/kio/kuserprofile.cpp index b7ef68c76..690b3ff96 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; @@ -269,8 +269,8 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers() const //kdDebug(7014) << "KServiceTypeProfile::offers considering " << (*it)->name() << endl; 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() ); + // Now look into the profile, to tqfind this service's preference. + TQMap<TQString,Service>::ConstIterator it2 = m_mapServices.tqfind( (*it)->storageId() ); if( it2 != m_mapServices.end() ) { diff --git a/kio/kio/kuserprofile.h b/kio/kio/kuserprofile.h index 061657625..1282d182b 100644 --- a/kio/kio/kuserprofile.h +++ b/kio/kio/kuserprofile.h @@ -106,7 +106,7 @@ private: * It consists of a list of services (service offers) for the service type * that is sorted by the user's preference. * KTrader uses KServiceTypeProfile to sort its results, so usually - * you can just use KTrader to find the user's preferred service. + * you can just use KTrader to tqfind the user's preferred service. * * @see KService * @see KServiceType diff --git a/kio/kio/kzip.cpp b/kio/kio/kzip.cpp index 6f29bb264..46bd39725 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 ); @@ -148,7 +148,7 @@ static bool parseExtTimestamp(const char *buffer, int size, bool islocal, buffer += 1; size -= 1; - if (flags & 1) { // contains modification time + if (flags & 1) { // tqcontains modification time if (size < 4) { kdDebug(7040) << "premature end of extended timestamp (#2)" << endl; return false; @@ -165,7 +165,7 @@ static bool parseExtTimestamp(const char *buffer, int size, bool islocal, return true; }/*end if*/ - if (flags & 2) { // contains last access time + if (flags & 2) { // tqcontains last access time if (size < 4) { kdDebug(7040) << "premature end of extended timestamp (#3)" << endl; return true; @@ -176,7 +176,7 @@ static bool parseExtTimestamp(const char *buffer, int size, bool islocal, size -= 4; }/*end if*/ - if (flags & 4) { // contains creation time + if (flags & 4) { // tqcontains creation time if (size < 4) { kdDebug(7040) << "premature end of extended timestamp (#4)" << endl; return true; @@ -234,7 +234,7 @@ static bool parseInfoZipUnixOld(const char *buffer, int size, bool islocal, */ static bool parseInfoZipUnixNew(const char *buffer, int size, bool islocal, ParseFileInfo &pfi) { - if (!islocal) { // contains nothing in central field + if (!islocal) { // tqcontains nothing in central field pfi.newinfounix = true; return true; }/*end if*/ @@ -417,7 +417,7 @@ bool KZip::openArchive( int mode ) uint offset = 0; // holds offset, where we read int n; - // contains information gathered from the local file headers + // tqcontains information gathered from the local file headers TQAsciiDict<ParseFileInfo> pfi_map(1009, true /*case sensitive */, true /*copy keys*/); pfi_map.setAutoDelete(true); @@ -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; @@ -512,7 +512,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl; // the file and we look for the signature 'PK\7\8'. if ( gpf & 8 ) { - // here we have to read through the compressed data to find + // here we have to read through the compressed data to tqfind // the next PKxx kdDebug(7040) << "trying to seek for next PK78" << endl; bool foundSignature = false; @@ -563,7 +563,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl; else { // here we skip the compressed data and jump to the next header - kdDebug(7040) << "general purpose bit flag indicates, that local file header contains valid size" << endl; + kdDebug(7040) << "general purpose bit flag indicates, that local file header tqcontains valid size" << endl; // check if this could be a symbolic link if (compression_mode == NoCompression && uncomp_size <= max_path_len @@ -578,10 +578,10 @@ 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 + // data to tqfind the next header bool foundSignature = false; while (!foundSignature) @@ -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 @@ -782,10 +782,10 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl; } else { - // In some tar files we can find dir/./file => call cleanDirPath + // In some tar files we can tqfind dir/./file => call cleanDirPath TQString path = TQDir::cleanDirPath( name.left( pos ) ); // Ensure container directory exists, create otherwise - KArchiveDirectory * tdir = findOrCreate( path ); + KArchiveDirectory * tdir = tqfindOrCreate( path ); tdir->addEntry(entry); } } @@ -800,7 +800,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl; else if ( startOfFile ) { // The file does not start with any ZIP header (e.g. self-extractable ZIP files) - // Therefore we need to find the first PK\003\004 (local header) + // Therefore we need to tqfind the first PK\003\004 (local header) kdDebug(7040) << "Try to skip start of file" << endl; startOfFile = false; bool foundSignature = false; @@ -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,13 +1133,13 @@ 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 ); fileName = name.mid( i + 1 ); //kdDebug(7040) << "KZip::prepareWriting ensuring " << dir << " exists. fileName=" << fileName << endl; - parentDir = findOrCreate( dir ); + parentDir = tqfindOrCreate( dir ); } // construct a KZipFileEntry and add it to list @@ -1212,7 +1212,7 @@ bool KZip::prepareWriting_impl(const TQString &name, const TQString &user, extfield[1] = 'T'; extfield[2] = 13; // data size extfield[3] = 0; - extfield[4] = 1 | 2 | 4; // contains mtime, atime, ctime + extfield[4] = 1 | 2 | 4; // tqcontains mtime, atime, ctime extfield[5] = char(mtime); extfield[6] = char(mtime >> 8); @@ -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; @@ -1453,7 +1453,7 @@ TQIODevice* KZipFileEntry::device() const return filterDev; } - kdError() << "This zip file contains files compressed with method " + kdError() << "This zip file tqcontains files compressed with method " << encoding() <<", this method is currently not supported by KZip," <<" please use a command-line tool to handle this file." << endl; return 0L; 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/lex.c b/kio/kio/lex.c index 4b8cb21f7..012981d1c 100644 --- a/kio/kio/lex.c +++ b/kio/kio/lex.c @@ -656,7 +656,7 @@ yy_match: } while ( yy_base[yy_current_state] != 96 ); -yy_find_action: +yy_tqfind_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ @@ -678,7 +678,7 @@ do_action: /* This label is used only to access EOF actions. */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; - goto yy_find_action; + goto yy_tqfind_action; case 1: YY_RULE_SETUP @@ -873,7 +873,7 @@ case YY_STATE_EOF(INITIAL): else { yy_cp = yy_c_buf_p; - goto yy_find_action; + goto yy_tqfind_action; } } @@ -926,7 +926,7 @@ case YY_STATE_EOF(INITIAL): yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; + goto yy_tqfind_action; } break; } 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/metainfojob.h b/kio/kio/metainfojob.h index 3b96713fb..742841d93 100644 --- a/kio/kio/metainfojob.h +++ b/kio/kio/metainfojob.h @@ -53,7 +53,7 @@ namespace KIO { /** * Returns a list of all available metainfo plugins. The list - * contains the basenames of the plugins' .desktop files (no path, + * tqcontains the basenames of the plugins' .desktop files (no path, * no .desktop). * @return the list of available meta info plugins */ diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp index 5189b93d6..696690a8c 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&)) ); } @@ -495,7 +495,7 @@ void NetAccess::enter_loop() TQWidget dummy(0,0,WType_Dialog | WShowModal); dummy.setFocusPolicy( TQWidget::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/observer.cpp b/kio/kio/observer.cpp index 2a468b1e6..b09b8b39a 100644 --- a/kio/kio/observer.cpp +++ b/kio/kio/observer.cpp @@ -101,7 +101,7 @@ void Observer::killJob( int progressId ) KIO::Job * job = m_dctJobs[ progressId ]; if (!job) { - kdWarning() << "Can't find job to kill ! There is no job with progressId=" << progressId << " in this process" << endl; + kdWarning() << "Can't tqfind job to kill ! There is no job with progressId=" << progressId << " in this process" << endl; return; } job->kill( false /* not quietly */ ); diff --git a/kio/kio/passdlg.cpp b/kio/kio/passdlg.cpp index 83434906b..11257abdd 100644 --- a/kio/kio/passdlg.cpp +++ b/kio/kio/passdlg.cpp @@ -37,7 +37,7 @@ using namespace KIO; struct PasswordDialog::PasswordDialogPrivate { - TQGridLayout *layout; + TQGridLayout *tqlayout; TQLineEdit* userEdit; KLineEdit* passEdit; TQLabel* userNameLabel; @@ -77,8 +77,8 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user, KConfig* cfg = KGlobal::config(); KConfigGroupSaver saver( cfg, "Passwords" ); - d->layout = new TQGridLayout( main, 9, 3, spacingHint(), marginHint()); - d->layout->addColSpacing(1, 5); + d->tqlayout = new TQGridLayout( main, 9, 3, spacingHint(), marginHint()); + d->tqlayout->addColSpacing(1, 5); // Row 0: pixmap prompt TQLabel* lbl; @@ -87,69 +87,69 @@ 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() ); - d->layout->addWidget( lbl, 0, 0, Qt::AlignLeft ); + lbl->tqsetAlignment( Qt::AlignLeft|Qt::AlignVCenter ); + lbl->setFixedSize( lbl->tqsizeHint() ); + d->tqlayout->addWidget( lbl, 0, 0, Qt::AlignLeft ); } d->prompt = new TQLabel( main ); - d->prompt->setAlignment( Qt::AlignLeft|Qt::AlignVCenter|Qt::WordBreak ); - d->layout->addWidget( d->prompt, 0, 2, Qt::AlignLeft ); + d->prompt->tqsetAlignment( Qt::AlignLeft|Qt::AlignVCenter|Qt::WordBreak ); + d->tqlayout->addWidget( d->prompt, 0, 2, Qt::AlignLeft ); if ( prompt.isEmpty() ) setPrompt( i18n( "You need to supply a username and a password" ) ); else setPrompt( prompt ); // Row 1: Row Spacer - d->layout->addRowSpacing( 1, 7 ); + d->tqlayout->addRowSpacing( 1, 7 ); // Row 2-3: Reserved for an additional comment // 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 ); - d->layout->addWidget( d->userNameLabel, 4, 0 ); - d->layout->addWidget( d->userNameHBox, 4, 2 ); + d->tqlayout->addWidget( d->userNameLabel, 4, 0 ); + d->tqlayout->addWidget( d->userNameHBox, 4, 2 ); // Row 5: Row spacer - d->layout->addRowSpacing( 5, 4 ); + d->tqlayout->addRowSpacing( 5, 4 ); // 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 ); - d->layout->addWidget( lbl, 6, 0 ); - d->layout->addWidget( hbox, 6, 2 ); + d->tqlayout->addWidget( lbl, 6, 0 ); + d->tqlayout->addWidget( hbox, 6, 2 ); if ( enableKeep ) { // Row 7: Add spacer - d->layout->addRowSpacing( 7, 4 ); + d->tqlayout->addRowSpacing( 7, 4 ); // 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 ))); - d->layout->addWidget( hbox, 8, 2 ); + d->tqlayout->addWidget( hbox, 8, 2 ); } // Configure necessary key-bindings and connect necessar slots and signals @@ -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,14 +239,14 @@ 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() ); - d->layout->addWidget( lbl, d->nRow+2, 0, Qt::AlignLeft ); + lbl->tqsetAlignment( Qt::AlignVCenter|Qt::AlignRight ); + lbl->setFixedSize( lbl->tqsizeHint() ); + d->tqlayout->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|Qt::WordBreak ); calculateLabelSize(lbl); - d->layout->addWidget( lbl, d->nRow+2, 2, Qt::AlignLeft ); - d->layout->addRowSpacing( 3, 10 ); // Add a spacer + d->tqlayout->addWidget( lbl, d->nRow+2, 2, Qt::AlignLeft ); + d->tqlayout->addRowSpacing( 3, 10 ); // Add a spacer d->nRow++; } @@ -304,11 +304,11 @@ 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 ); - d->layout->addWidget( d->userNameHBox, 4, 2 ); + d->tqlayout->addWidget( d->userNameHBox, 4, 2 ); } d->knownLogins = knownLogins; @@ -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..6a232d045 100644 --- a/kio/kio/paste.cpp +++ b/kio/kio/paste.cpp @@ -137,7 +137,7 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data, if ( clipboard ) { data = TQApplication::clipboard()->data(); } - const TQByteArray ba = data->encodedData( chosenFormat ); + const TQByteArray ba = data->tqencodedData( chosenFormat ); return pasteDataAsyncTo( new_url, ba ); } #endif @@ -147,13 +147,13 @@ 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 ) + 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(); - if(data.contains("://")) + if(data.tqcontains("://")) return false; #endif return true; @@ -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 ) { diff --git a/kio/kio/paste.h b/kio/kio/paste.h index a65e956e1..dceddad9e 100644 --- a/kio/kio/paste.h +++ b/kio/kio/paste.h @@ -105,7 +105,7 @@ namespace KIO { bool clipboard = false ); /** - * Checks whether the clipboard contains any URLs. + * Checks whether the clipboard tqcontains any URLs. * @return true if not * Not used anymore, wrong method name, so it will disappear in KDE4. */ diff --git a/kio/kio/pastedialog.cpp b/kio/kio/pastedialog.cpp index 480eaaba8..dd9d947e8 100644 --- a/kio/kio/pastedialog.cpp +++ b/kio/kio/pastedialog.cpp @@ -35,23 +35,23 @@ KIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label, : KDialogBase( parent, 0 /*name*/, true, caption, Ok|Cancel, Ok, true ) { TQFrame *frame = makeMainWidget(); - TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( frame, 0, spacingHint() ); m_label = new TQLabel( label, frame ); - layout->addWidget( m_label ); + tqlayout->addWidget( m_label ); m_lineEdit = new KLineEdit( value, frame ); - layout->addWidget( m_lineEdit ); + tqlayout->addWidget( m_lineEdit ); m_lineEdit->setFocus(); m_label->setBuddy( m_lineEdit ); - layout->addWidget( new TQLabel( i18n( "Data format:" ), frame ) ); + tqlayout->addWidget( new TQLabel( i18n( "Data format:" ), frame ) ); m_comboBox = new TQComboBox( frame ); m_comboBox->insertStringList( items ); - layout->addWidget( m_comboBox ); + tqlayout->addWidget( m_comboBox ); - layout->addStretch(); + tqlayout->addStretch(); //connect( m_lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), // TQT_SLOT( slotEditTextChanged( const TQString & ) ) ); diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp index 3802093c1..9939880b5 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.tqreplace(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() ) { @@ -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/previewjob.h b/kio/kio/previewjob.h index d7686505e..ea3875cd1 100644 --- a/kio/kio/previewjob.h +++ b/kio/kio/previewjob.h @@ -77,7 +77,7 @@ namespace KIO { /** * Returns a list of all available preview plugins. The list - * contains the basenames of the plugins' .desktop files (no path, + * tqcontains the basenames of the plugins' .desktop files (no path, * no .desktop). * @return the list of plugins */ diff --git a/kio/kio/progressbase.h b/kio/kio/progressbase.h index d9e3d8f96..fce482fb8 100644 --- a/kio/kio/progressbase.h +++ b/kio/kio/progressbase.h @@ -47,7 +47,7 @@ namespace KIO * Add your GUI code to the constructor and implemement those virtual * methods which you need in order to display progress. * -* E.g. StatusbarProgress only implements slotTotalSize(), +* E.g. tqStatusbarProgress only implements slotTotalSize(), * slotPercent() and slotSpeed(). * * Custom progress dialog will be used like this : diff --git a/kio/kio/renamedlg.cpp b/kio/kio/renamedlg.cpp index fe830b2e3..cca120266 100644 --- a/kio/kio/renamedlg.cpp +++ b/kio/kio/renamedlg.cpp @@ -317,11 +317,11 @@ RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption, TQLabel *lb = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL()), this ); pLayout->addWidget(lb); } - TQHBoxLayout* layout2 = new TQHBoxLayout(); - pLayout->addLayout( layout2 ); + TQHBoxLayout* tqlayout2 = new TQHBoxLayout(); + pLayout->addLayout( tqlayout2 ); d->m_pLineEdit = new TQLineEdit( this ); - layout2->addWidget( d->m_pLineEdit ); + tqlayout2->addWidget( d->m_pLineEdit ); TQString fileName = d->dest.fileName(); d->m_pLineEdit->setText( KIO::decodeFileName( fileName ) ); if ( d->bRename || d->bOverwrite ) @@ -329,58 +329,58 @@ RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption, TQT_SLOT(enableRenameButton(const TQString &))); if ( d->bSuggestNewName ) { - layout2->addWidget( d->bSuggestNewName ); + tqlayout2->addWidget( d->bSuggestNewName ); setTabOrder( d->m_pLineEdit, d->bSuggestNewName ); } KSeparator* separator = new KSeparator( this ); pLayout->addWidget( separator ); - TQHBoxLayout* layout = new TQHBoxLayout(); - pLayout->addLayout( layout ); + TQHBoxLayout* tqlayout = new TQHBoxLayout(); + pLayout->addLayout( tqlayout ); - layout->addStretch(1); + tqlayout->addStretch(1); if ( d->bRename ) { - layout->addWidget( d->bRename ); + tqlayout->addWidget( d->bRename ); setTabOrder( d->bRename, d->bCancel ); } if ( d->bSkip ) { - layout->addWidget( d->bSkip ); + tqlayout->addWidget( d->bSkip ); setTabOrder( d->bSkip, d->bCancel ); } if ( d->bAutoSkip ) { - layout->addWidget( d->bAutoSkip ); + tqlayout->addWidget( d->bAutoSkip ); setTabOrder( d->bAutoSkip, d->bCancel ); } if ( d->bOverwrite ) { - layout->addWidget( d->bOverwrite ); + tqlayout->addWidget( d->bOverwrite ); setTabOrder( d->bOverwrite, d->bCancel ); } if ( d->bOverwriteAll ) { - layout->addWidget( d->bOverwriteAll ); + tqlayout->addWidget( d->bOverwriteAll ); setTabOrder( d->bOverwriteAll, d->bCancel ); } if ( d->bResume ) { - layout->addWidget( d->bResume ); + tqlayout->addWidget( d->bResume ); setTabOrder( d->bResume, d->bCancel ); } if ( d->bResumeAll ) { - layout->addWidget( d->bResumeAll ); + tqlayout->addWidget( d->bResumeAll ); setTabOrder( d->bResumeAll, d->bCancel ); } d->bCancel->setDefault( true ); - layout->addWidget( d->bCancel ); + tqlayout->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; @@ -456,7 +456,7 @@ TQString RenameDlg::suggestName(const KURL& baseURL, const TQString& oldName) } else { // yes there's already a number behind the _ so increment it by one - basename.replace( pos+1, tmp.length(), TQString::number(number+1) ); + basename.tqreplace( pos+1, tmp.length(), TQString::number(number+1) ); suggestedName = basename + dotSuffix; } } diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp index 8ab080486..eaa9af646 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! @@ -347,7 +347,7 @@ bool Scheduler::startJobScheduled(ProtocolInfo *protInfo) // 2 times in a row. The protInfo->skipCount = 0; job = protInfo->joblist.at(0); - slave = findIdleSlave(protInfo, job, dummy ); + slave = tqfindIdleSlave(protInfo, job, dummy ); } else { @@ -357,7 +357,7 @@ bool Scheduler::startJobScheduled(ProtocolInfo *protInfo) for(uint i = 0; (i < protInfo->joblist.count()) && (i < 10); i++) { job = protInfo->joblist.at(i); - slave = findIdleSlave(protInfo, job, exact); + slave = tqfindIdleSlave(protInfo, job, exact); if (!firstSlave) { firstJob = job; @@ -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!" @@ -428,7 +428,7 @@ bool Scheduler::startJobDirect() bool dummy; // Look for matching slave - Slave *slave = findIdleSlave(protInfo, job, dummy); + Slave *slave = tqfindIdleSlave(protInfo, job, dummy); if (!slave) { @@ -478,13 +478,13 @@ static Slave *searchIdleList(SlaveList *idleSlaves, const KURL &url, const TQStr return 0; } -Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact) +Slave *Scheduler::tqfindIdleSlave(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; + kdFatal(7006) << "BUG! tqfindIdleSlave(): No extraJobData for job!" << endl; return 0; } if (jobData->checkOnHold) @@ -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::null : outgoing["resume"]; kdDebug(7006) << "Resume metadata is '" << resume << "'" << endl; bCanReuse = (resume.isEmpty() || resume == "0"); } @@ -543,8 +543,8 @@ Slave *Scheduler::createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL idleSlaves->append(slave); connect(slave, TQT_SIGNAL(slaveDied(KIO::Slave *)), TQT_SLOT(slotSlaveDied(KIO::Slave *))); - connect(slave, TQT_SIGNAL(slaveStatus(pid_t,const TQCString &,const TQString &, bool)), - TQT_SLOT(slotSlaveStatus(pid_t,const TQCString &, const TQString &, bool))); + connect(slave, TQT_SIGNAL(slavetqStatus(pid_t,const TQCString &,const TQString &, bool)), + TQT_SLOT(slotSlavetqStatus(pid_t,const TQCString &, const TQString &, bool))); connect(slave,TQT_SIGNAL(authorizationKey(const TQCString&, const TQCString&, bool)), sessionData,TQT_SLOT(slotAuthData(const TQCString&, const TQCString&, bool))); @@ -564,7 +564,7 @@ Slave *Scheduler::createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL return slave; } -void Scheduler::slotSlaveStatus(pid_t, const TQCString &, const TQString &, bool) +void Scheduler::slotSlavetqStatus(pid_t, const TQCString &, const TQString &, bool) { } @@ -582,11 +582,11 @@ 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()); - assert(!coIdleSlaves->contains(slave)); + assert(!coIdleSlaves->tqcontains(slave)); coIdleSlaves->append(slave); if (!list->isEmpty()) coSlaveTimer.start(0, true); @@ -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()) { @@ -741,7 +741,7 @@ Scheduler::slotScheduleCoSlave() coIdleSlaves->removeRef(slave); // kdDebug(7006) << "scheduler: job started " << job << endl; - assert(!coIdleSlaves->contains(slave)); + assert(!coIdleSlaves->tqcontains(slave)); KURL url =job->url(); TQString host = url.host(); @@ -775,7 +775,7 @@ Scheduler::slotSlaveConnected() disconnect(slave, TQT_SIGNAL(connected()), this, TQT_SLOT(slotSlaveConnected())); emit slaveConnected(slave); - assert(!coIdleSlaves->contains(slave)); + assert(!coIdleSlaves->tqcontains(slave)); coIdleSlaves->append(slave); coSlaveTimer.start(0, true); } @@ -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) { @@ -814,7 +814,7 @@ Scheduler::_assignJobToSlave(KIO::Slave *slave, SimpleJob *job) return false; } - assert(list->contains(job) == 0); + assert(list->tqcontains(job) == 0); list->append(job); coSlaveTimer.start(0, true); // Start job on timer event @@ -837,7 +837,7 @@ Scheduler::_disconnectSlave(KIO::Slave *slave) } delete list; coIdleSlaves->removeRef(slave); - assert(!coIdleSlaves->contains(slave)); + assert(!coIdleSlaves->tqcontains(slave)); disconnect(slave, TQT_SIGNAL(connected()), this, TQT_SLOT(slotSlaveConnected())); disconnect(slave, TQT_SIGNAL(error(int, const TQString &)), @@ -866,7 +866,7 @@ Scheduler::_registerWindow(TQWidget *wid) return; TQObject *obj = static_cast<TQObject *>(wid); - if (!m_windowList.contains(obj)) + if (!m_windowList.tqcontains(obj)) { // We must store the window Id because by the time // the destroyed signal is emitted we can no longer @@ -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/scheduler.h b/kio/kio/scheduler.h index 4a4f104ba..e90bf1f90 100644 --- a/kio/kio/scheduler.h +++ b/kio/kio/scheduler.h @@ -46,7 +46,7 @@ namespace KIO { * * <h3>1. Direct</h3> * This is the default. When you create a job the - * KIO::Scheduler will be notified and will find either an existing + * KIO::Scheduler will be notified and will tqfind either an existing * slave that is idle or it will create a new slave for the job. * * Example: @@ -288,7 +288,7 @@ namespace KIO { public slots: void slotSlaveDied(KIO::Slave *slave); - void slotSlaveStatus(pid_t pid, const TQCString &protocol, + void slotSlavetqStatus(pid_t pid, const TQCString &protocol, const TQString &host, bool connected); signals: void slaveConnected(KIO::Slave *slave); @@ -330,7 +330,7 @@ namespace KIO { void _publishSlaveOnHold(); void _registerWindow(TQWidget *wid); - Slave *findIdleSlave(ProtocolInfo *protInfo, SimpleJob *job, bool &exact); + Slave *tqfindIdleSlave(ProtocolInfo *protInfo, SimpleJob *job, bool &exact); Slave *createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL &url); 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..b0aa662a0 100644 --- a/kio/kio/skipdlg.cpp +++ b/kio/kio/skipdlg.cpp @@ -67,41 +67,41 @@ SkipDlg::SkipDlg(TQWidget *parent, bool _multi, const TQString& _error_text, boo connect(b2, TQT_SIGNAL(clicked()), this, TQT_SLOT(b2Pressed())); } - TQVBoxLayout *vlayout = new TQVBoxLayout( this, 10, 0 ); - // vlayout->addStrut( 360 ); makes dlg at least that wide + TQVBoxLayout *vtqlayout = new TQVBoxLayout( this, 10, 0 ); + // vtqlayout->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() ); - vlayout->addWidget( lb ); + lb->setFixedHeight( lb->tqsizeHint().height() ); + lb->setMinimumWidth( lb->tqsizeHint().width() ); + vtqlayout->addWidget( lb ); - vlayout->addSpacing( 10 ); + vtqlayout->addSpacing( 10 ); - TQHBoxLayout* layout = new TQHBoxLayout(); - vlayout->addLayout( layout ); + TQHBoxLayout* tqlayout = new TQHBoxLayout(); + vtqlayout->addLayout( tqlayout ); if ( b0 ) { b0->setDefault( true ); - b0->setFixedSize( b0->sizeHint() ); - layout->addWidget( b0 ); - layout->addSpacing( 5 ); + b0->setFixedSize( b0->tqsizeHint() ); + tqlayout->addWidget( b0 ); + tqlayout->addSpacing( 5 ); } if ( b1 ) { - b1->setFixedSize( b1->sizeHint() ); - layout->addWidget( b1 ); - layout->addSpacing( 5 ); + b1->setFixedSize( b1->tqsizeHint() ); + tqlayout->addWidget( b1 ); + tqlayout->addSpacing( 5 ); } if ( b2 ) { - b2->setFixedSize( b2->sizeHint() ); - layout->addWidget( b2 ); - layout->addSpacing( 5 ); + b2->setFixedSize( b2->tqsizeHint() ); + tqlayout->addWidget( b2 ); + tqlayout->addSpacing( 5 ); } - vlayout->addStretch( 10 ); - vlayout->activate(); - resize( sizeHint() ); + vtqlayout->addStretch( 10 ); + vtqlayout->activate(); + resize( tqsizeHint() ); } SkipDlg::~SkipDlg() diff --git a/kio/kio/slave.cpp b/kio/kio/slave.cpp index c1a701711..4fbac8049 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)); @@ -406,7 +406,7 @@ Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error TQString lib_path = KLibLoader::findLibrary(_name.latin1()); if (lib_path.isEmpty()) { - error_text = i18n("Can not find io-slave for protocol '%1'.").arg(protocol); + error_text = i18n("Can not tqfind io-slave for protocol '%1'.").arg(protocol); error = KIO::ERR_CANNOT_LAUNCH_PROCESS; return 0; } @@ -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; diff --git a/kio/kio/slavebase.cpp b/kio/kio/slavebase.cpp index ad683a009..bd9a688a1 100644 --- a/kio/kio/slavebase.cpp +++ b/kio/kio/slavebase.cpp @@ -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 @@ -468,10 +468,10 @@ void SlaveBase::needSubURLData() m_pConnection->send( MSG_NEED_SUBURL_DATA ); } -void SlaveBase::slaveStatus( const TQString &host, bool connected ) +void SlaveBase::slavetqStatus( 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) @@ -801,7 +801,7 @@ void SlaveBase::multiGet(const TQByteArray &) void SlaveBase::slave_status() -{ slaveStatus( TQString::null, false ); } +{ slavetqStatus( TQString::null, false ); } void SlaveBase::reparseConfiguration() { @@ -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..5060131ef 100644 --- a/kio/kio/slavebase.h +++ b/kio/kio/slavebase.h @@ -130,11 +130,11 @@ public: * empty if not connected) * @param connected Whether an actual network connection exists. **/ - void slaveStatus(const TQString &host, bool connected); + void slavetqStatus(const TQString &host, bool connected); /** * Call this from stat() to express details about an object, the - * UDSEntry customarily contains the atoms describing file name, size, + * UDSEntry customarily tqcontains the atoms describing file name, size, * mimetype, etc. * @param _entry The UDSEntry containing all of the object attributes. */ @@ -505,7 +505,7 @@ public: /** * Called to get the status of the slave. Slave should respond - * by calling slaveStatus(...) + * by calling slavetqStatus(...) */ virtual void slave_status(); @@ -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..826aeb50c 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,13 +103,13 @@ 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 TQString domain = host; - if (!domain.contains('.')) + if (!domain.tqcontains('.')) { // Host without domain. if (scp->configFile->hasGroup("<local>")) @@ -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..61d42ba35 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 @@ -79,7 +79,7 @@ TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e ) // 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++) + for(TQ_UINT32 i = 0; i < size; i++) { KIO::UDSAtom a; s >> 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; @@ -284,7 +284,7 @@ bool SlaveInterface::dispatch( int _cmd, const TQByteArray &rawdata ) pid_t pid; TQCString protocol; stream >> pid >> protocol >> str1 >> b; - emit slaveStatus(pid, protocol, str1, (b != 0)); + emit slavetqStatus(pid, protocol, str1, (b != 0)); } break; case MSG_CONNECTED: diff --git a/kio/kio/slaveinterface.h b/kio/kio/slaveinterface.h index 5cca5dd77..faaea16c4 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 @@ -121,7 +121,7 @@ signals: void error( int , const TQString & ); void connected(); void finished(); - void slaveStatus(pid_t, const TQCString &, const TQString &, bool); + void slavetqStatus(pid_t, const TQCString &, const TQString &, bool); void listEntries( const KIO::UDSEntryList& ); void statEntry( const KIO::UDSEntry& ); void needSubURLData(); @@ -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..1c038e724 100644 --- a/kio/kio/statusbarprogress.cpp +++ b/kio/kio/statusbarprogress.cpp @@ -32,7 +32,7 @@ namespace KIO { -StatusbarProgress::StatusbarProgress( TQWidget* parent, bool button ) +tqStatusbarProgress::tqStatusbarProgress( TQWidget* parent, bool button ) : ProgressBase( parent ) { m_bShowButton = button; @@ -60,18 +60,18 @@ 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(); } -void StatusbarProgress::setJob( KIO::Job *job ) +void tqStatusbarProgress::setJob( KIO::Job *job ) { ProgressBase::setJob( job ); @@ -80,7 +80,7 @@ void StatusbarProgress::setJob( KIO::Job *job ) } -void StatusbarProgress::setMode() { +void tqStatusbarProgress::setMode() { switch ( mode ) { case None: if ( m_bShowButton ) { @@ -108,7 +108,7 @@ void StatusbarProgress::setMode() { } -void StatusbarProgress::slotClean() { +void tqStatusbarProgress::slotClean() { // we don't want to delete this widget, only clean m_pProgressBar->setValue( 0 ); m_pLabel->clear(); @@ -118,16 +118,16 @@ void StatusbarProgress::slotClean() { } -void StatusbarProgress::slotTotalSize( KIO::Job*, KIO::filesize_t size ) { +void tqStatusbarProgress::slotTotalSize( KIO::Job*, KIO::filesize_t size ) { m_iTotalSize = size; // size is measured in bytes } -void StatusbarProgress::slotPercent( KIO::Job*, unsigned long percent ) { +void tqStatusbarProgress::slotPercent( KIO::Job*, unsigned long percent ) { m_pProgressBar->setValue( percent ); } -void StatusbarProgress::slotSpeed( KIO::Job*, unsigned long speed ) { +void tqStatusbarProgress::slotSpeed( KIO::Job*, unsigned long speed ) { if ( speed == 0 ) { // spped is measured in bytes-per-second m_pLabel->setText( i18n( " Stalled ") ); } else { @@ -136,7 +136,7 @@ void StatusbarProgress::slotSpeed( KIO::Job*, unsigned long speed ) { } -bool StatusbarProgress::eventFilter( TQObject *, TQEvent *ev ) { +bool tqStatusbarProgress::eventFilter( TQObject *, TQEvent *ev ) { if ( ! m_pJob ) { // don't react when there isn't any job doing IO return true; } @@ -159,7 +159,7 @@ bool StatusbarProgress::eventFilter( TQObject *, TQEvent *ev ) { return false; } -void StatusbarProgress::virtual_hook( int id, void* data ) +void tqStatusbarProgress::virtual_hook( int id, void* data ) { ProgressBase::virtual_hook( id, data ); } } /* namespace */ diff --git a/kio/kio/statusbarprogress.h b/kio/kio/statusbarprogress.h index 6fb460283..e4b25b509 100644 --- a/kio/kio/statusbarprogress.h +++ b/kio/kio/statusbarprogress.h @@ -40,12 +40,12 @@ class Job; * Instead of creating a separate window, this is only a widget that can be * easily embedded in a statusbar. * -* Usage of StatusbarProgress is little different. +* Usage of tqStatusbarProgress is little different. * This dialog will be a part of some application. * \code * // create a dialog -* StatusbarProgress *statusProgress; -* statusProgress = new StatusbarProgress( statusBar() ); +* tqStatusbarProgress *statusProgress; +* statusProgress = new tqStatusbarProgress( statusBar() ); * statusBar()->insertWidget( statusProgress, statusProgress->width() , 0 ); * ... * // create job and connect it to the progress @@ -57,20 +57,20 @@ class Job; * @short IO progress widget for embedding in a statusbar. * @author Matej Koss <koss@miesto.sk> */ -class KIO_EXPORT StatusbarProgress : public ProgressBase { +class KIO_EXPORT tqStatusbarProgress : public ProgressBase { Q_OBJECT public: /** - * Creates a new StatusbarProgress. + * Creates a new tqStatusbarProgress. * @param parent the parent of this widget * @param button true to add an abort button. The button will be * connected to ProgressBase::slotStop() */ - StatusbarProgress( TQWidget* parent, bool button = true ); - ~StatusbarProgress() {} + tqStatusbarProgress( TQWidget* parent, bool button = true ); + ~tqStatusbarProgress() {} /** * Sets the job to monitor. @@ -104,7 +104,7 @@ protected: protected: virtual void virtual_hook( int id, void* data ); private: - class StatusbarProgressPrivate* d; + class tqStatusbarProgressPrivate* d; }; } /* namespace */ diff --git a/kio/kio/tcpslavebase.cpp b/kio/kio/tcpslavebase.cpp index 78093577d..144aaa6b1 100644 --- a/kio/kio/tcpslavebase.cpp +++ b/kio/kio/tcpslavebase.cpp @@ -223,7 +223,7 @@ if ((m_bIsSSL || d->usingTLS) && !d->useSSLTunneling) { // SSL CASE return -1; } - bytes = rc; // in case it contains no \n + bytes = rc; // in case it tqcontains no \n for (int i = 0; i < rc; i++) { if (tmpbuf[i] == '\n') { bytes = i+1; @@ -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; } } |