Rename old tq methods that no longer need a unique name

pull/16/head
Timothy Pearson 14 years ago
parent 56160bf4df
commit 984c25aa69

@ -77,12 +77,12 @@ Arts::SoundServerV2 KArtsServer::server(void)
X11CommConfig.sync();
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::tqfromLatin1("tdeinit_wrapper"))).data();
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("tdeinit_wrapper"))).data();
if(rt)
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::tqfromLatin1("artswrapper"))).data();
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artswrapper"))).data();
else
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::tqfromLatin1("artsd"))).data();
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artsd"))).data();
proc << TQStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) );

@ -78,7 +78,7 @@ void KIOInputStream_impl::streamStart()
m_job = KIO::get(m_url, false, false);
m_job->addMetaData("accept", "audio/x-mp3, video/mpeg, application/ogg");
m_job->addMetaData("UserAgent", TQString::tqfromLatin1("aRts/") + TQString::tqfromLatin1(ARTS_VERSION));
m_job->addMetaData("UserAgent", TQString::fromLatin1("aRts/") + TQString::fromLatin1(ARTS_VERSION));
TQObject::connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));

@ -65,7 +65,7 @@ void KPlayObject::halt()
TQString KPlayObject::description()
{
return TQString::tqfromLatin1(object().description().c_str());
return TQString::fromLatin1(object().description().c_str());
}
Arts::poTime KPlayObject::currentTime()
@ -85,7 +85,7 @@ Arts::poCapabilities KPlayObject::capabilities()
TQString KPlayObject::mediaName()
{
return TQString::tqfromLatin1(object().mediaName().c_str());
return TQString::fromLatin1(object().mediaName().c_str());
}
Arts::poState KPlayObject::state()
@ -243,7 +243,7 @@ TQString KDE::PlayObject::description()
{
if ( object().isNull() )
return TQString();
return TQString::tqfromLatin1(object().description().c_str());
return TQString::fromLatin1(object().description().c_str());
}
Arts::poTime KDE::PlayObject::currentTime()
@ -271,7 +271,7 @@ TQString KDE::PlayObject::mediaName()
{
if ( object().isNull() )
return TQString();
return TQString::tqfromLatin1(object().mediaName().c_str());
return TQString::fromLatin1(object().mediaName().c_str());
}
Arts::poState KDE::PlayObject::state()

@ -642,7 +642,7 @@ bool KNotify::notifyByLogfile(const TQString &text, const TQString &file)
// append msg
TQTextStream strm( &logFile );
strm << "- KNotify " << TQDateTime::tqcurrentDateTime().toString() << ": ";
strm << "- KNotify " << TQDateTime::currentDateTime().toString() << ": ";
strm << text << endl;
// close file
@ -660,7 +660,7 @@ bool KNotify::notifyByStderr(const TQString &text)
TQTextStream strm( stderr, IO_WriteOnly );
// output msg
strm << "KNotify " << TQDateTime::tqcurrentDateTime().toString() << ": ";
strm << "KNotify " << TQDateTime::currentDateTime().toString() << ": ";
strm << text << endl;
return true;

@ -33,7 +33,7 @@ static DCOPClient* dcop = 0;
void startApp(const char *_app, int argc, const char **args)
{
const char *function = 0;
TQString app = TQString::tqfromLatin1(_app);
TQString app = TQString::fromLatin1(_app);
if (app.endsWith(".desktop"))
function = "start_service_by_desktop_path(TQString,TQStringList)";
else

@ -764,7 +764,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
DCOPAuthCount,
const_cast<char **>(DCOPAuthNames),
DCOPClientAuthProcs, 0L)) < 0) {
emit attachFailed(TQString::tqfromLatin1( "Communications could not be established." ));
emit attachFailed(TQString::fromLatin1( "Communications could not be established." ));
return false;
}
@ -779,7 +779,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
TQCString fName = dcopServerFile();
TQFile f(TQFile::decodeName(fName));
if (!f.open(IO_ReadOnly)) {
emit attachFailed(TQString::tqfromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName));
emit attachFailed(TQString::fromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName));
return false;
}
int size = TQMIN( (qint64)1024, f.size() ); // protection against a huge file
@ -819,7 +819,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
emit attachFailed(TQString::tqfromLatin1( errBuf ));
emit attachFailed(TQString::fromLatin1( errBuf ));
return false;
}
fcntl(socket(), F_SETFL, FD_CLOEXEC);
@ -845,7 +845,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
emit attachFailed(TQString::tqfromLatin1( errBuf ));
emit attachFailed(TQString::fromLatin1( errBuf ));
return false;
} else if (setupstat == IceProtocolAlreadyActive) {
if (bClearServerAddr) {
@ -853,7 +853,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
d->serverAddr = 0;
}
/* should not happen because 3rd arg to IceOpenConnection was 0. */
emit attachFailed(TQString::tqfromLatin1( "internal error in IceOpenConnection" ));
emit attachFailed(TQString::fromLatin1( "internal error in IceOpenConnection" ));
return false;
}
@ -863,7 +863,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
emit attachFailed(TQString::tqfromLatin1( "DCOP server did not accept the connection." ));
emit attachFailed(TQString::fromLatin1( "DCOP server did not accept the connection." ));
return false;
}
@ -1470,10 +1470,10 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const
l << "QCStringList properties()";
l << "bool setProperty(TQCString,TQVariant)";
l << "TQVariant property(TQCString)";
TQStrList lst = o->tqmetaObject()->slotNames( true );
TQStrList lst = o->metaObject()->slotNames( true );
int i = 0;
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
if ( o->tqmetaObject()->slot( i++, true )->tqt_mo_access != TQMetaData::Public )
if ( o->metaObject()->slot( i++, true )->tqt_mo_access != TQMetaData::Public )
continue;
TQCString slot = it.current();
if ( slot.contains( "()" ) ) {
@ -1487,10 +1487,10 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const
replyType = "QCStringList";
TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
TQMetaObject *meta = o->tqmetaObject();
TQMetaObject *meta = o->metaObject();
while ( meta ) {
l.prepend( meta->className() );
meta = meta->tqsuperClass();
meta = meta->superClass();
}
reply << l;
return true;
@ -1498,9 +1498,9 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const
replyType = "QCStringList";
TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
TQStrList lst = o->tqmetaObject()->propertyNames( true );
TQStrList lst = o->metaObject()->propertyNames( true );
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
TQMetaObject *mo = o->tqmetaObject();
TQMetaObject *mo = o->metaObject();
const TQMetaProperty* p = mo->property( mo->findProperty( it.current(), true ), true );
if ( !p )
continue;
@ -1532,7 +1532,7 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const
reply << (TQ_INT8) o->setProperty( name, value );
return true;
} else {
int slot = o->tqmetaObject()->findSlot( fun, true );
int slot = o->metaObject()->findSlot( fun, true );
if ( slot != -1 ) {
replyType = "void";
TQUObject uo[ 1 ];

@ -221,7 +221,7 @@ inline BytesEditInterface *bytesEditInterface( T *t )
inline TQWidget *createBytesEditWidget( TQWidget *Parent = 0, const char *Name = 0 )
{
return KParts::ComponentFactory::createInstanceFromQuery<TQWidget>
( TQString::tqfromLatin1("KHexEdit/KBytesEdit"), TQString::null, TQT_TQOBJECT(Parent), Name );
( TQString::fromLatin1("KHexEdit/KBytesEdit"), TQString::null, TQT_TQOBJECT(Parent), Name );
}
}

@ -31,7 +31,7 @@
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>460</width>
<height>0</height>

@ -74,7 +74,7 @@ bool TemplateInterface::expandMacros( TQMap<TQString, TQString> &map, TQWidget *
{
KABC::StdAddressBook *addrBook = 0;
KABC::Addressee userAddress;
TQDateTime datetime = TQDateTime::tqcurrentDateTime();
TQDateTime datetime = TQDateTime::currentDateTime();
TQDate date = TQT_TQDATE_OBJECT(datetime.date());
TQTime time = TQT_TQTIME_OBJECT(datetime.time());

@ -74,7 +74,7 @@ int KabAPI::exec()
}
listbox->setMinimumSize(listbox->sizeHint());
adjustSize();
resize(tqminimumSize());
resize(minimumSize());
return KDialogBase::exec();
} else {
kdDebug(KAB_KDEBUG_AREA) << "KabAPI::exec: error creating interface."

@ -521,7 +521,7 @@ TQString Address::countryToISO( const TQString &cname )
return it.data();
TQString mapfile = KGlobal::dirs()->findResource( "data",
TQString::tqfromLatin1( "kabc/countrytransl.map" ) );
TQString::fromLatin1( "kabc/countrytransl.map" ) );
TQFile file( mapfile );
if ( file.open( IO_ReadOnly ) ) {
@ -551,7 +551,7 @@ TQString Address::ISOtoCountry( const TQString &ISOname )
return TQString::null;
TQString mapfile = KGlobal::dirs()->findResource( "data",
TQString::tqfromLatin1( "kabc/countrytransl.map" ) );
TQString::fromLatin1( "kabc/countrytransl.map" ) );
TQFile file( mapfile );
if ( file.open( IO_ReadOnly ) ) {

@ -527,7 +527,7 @@ void AddressBook::insertAddressee( const Addressee &a )
Addressee addr( a );
if ( !fAddr.isEmpty() ) {
if ( fAddr != a )
addr.setRevision( TQDateTime::tqcurrentDateTime() );
addr.setRevision( TQDateTime::currentDateTime() );
else {
if ( fAddr.resource() == 0 ) {
fAddr.setResource( resource );

@ -50,7 +50,7 @@ public:
TQString LdapObject::toString() const
{
TQString result = TQString::tqfromLatin1( "\ndn: %1\n" ).arg( dn );
TQString result = TQString::fromLatin1( "\ndn: %1\n" ).arg( dn );
for ( LdapAttrMap::ConstIterator it = attrs.begin(); it != attrs.end(); ++it ) {
TQString attr = it.key();
for ( LdapAttrValue::ConstIterator it2 = (*it).begin(); it2 != (*it).end(); ++it2 ) {

@ -183,7 +183,7 @@ bool LDIFConverter::LDIFToAddressee( const TQString &str, AddresseeList &addrLis
data.setRawData( latinstr, latinstrlen );
ldif.setLDIF( data );
if (!dt.isValid())
dt = TQDateTime::tqcurrentDateTime();
dt = TQDateTime::currentDateTime();
a.setRevision(dt);
homeAddr = Address( Address::Home );
workAddr = Address( Address::Work );
@ -235,7 +235,7 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr,
Address &workAddr,
TQString &fieldname, TQString &value )
{
if ( fieldname == TQString::tqfromLatin1( "dn" ) ) // ignore & return false!
if ( fieldname == TQString::fromLatin1( "dn" ) ) // ignore & return false!
return false;
if ( fieldname.startsWith("#") ) {
@ -249,56 +249,56 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr,
return true;
}
if ( fieldname == TQString::tqfromLatin1( "givenname" ) ) {
if ( fieldname == TQString::fromLatin1( "givenname" ) ) {
a.setGivenName( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "xmozillanickname") ||
fieldname == TQString::tqfromLatin1( "nickname") ) {
if ( fieldname == TQString::fromLatin1( "xmozillanickname") ||
fieldname == TQString::fromLatin1( "nickname") ) {
a.setNickName( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "sn" ) ) {
if ( fieldname == TQString::fromLatin1( "sn" ) ) {
a.setFamilyName( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "uid" ) ) {
if ( fieldname == TQString::fromLatin1( "uid" ) ) {
a.setUid( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "mail" ) ||
fieldname == TQString::tqfromLatin1( "mozillasecondemail" ) ) { // mozilla
if ( fieldname == TQString::fromLatin1( "mail" ) ||
fieldname == TQString::fromLatin1( "mozillasecondemail" ) ) { // mozilla
if ( a.emails().findIndex( value ) == -1 )
a.insertEmail( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "title" ) ) {
if ( fieldname == TQString::fromLatin1( "title" ) ) {
a.setTitle( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "vocation" ) ) {
if ( fieldname == TQString::fromLatin1( "vocation" ) ) {
a.setPrefix( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "cn" ) ) {
if ( fieldname == TQString::fromLatin1( "cn" ) ) {
a.setFormattedName( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "o" ) ||
fieldname == TQString::tqfromLatin1( "organization" ) || // Exchange
fieldname == TQString::tqfromLatin1( "organizationname" ) ) { // Exchange
if ( fieldname == TQString::fromLatin1( "o" ) ||
fieldname == TQString::fromLatin1( "organization" ) || // Exchange
fieldname == TQString::fromLatin1( "organizationname" ) ) { // Exchange
a.setOrganization( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "description" ) ) {
if ( fieldname == TQString::fromLatin1( "description" ) ) {
addComment:
if ( !a.note().isEmpty() )
a.setNote( a.note() + "\n" );
@ -306,15 +306,15 @@ addComment:
return true;
}
if ( fieldname == TQString::tqfromLatin1( "custom1" ) ||
fieldname == TQString::tqfromLatin1( "custom2" ) ||
fieldname == TQString::tqfromLatin1( "custom3" ) ||
fieldname == TQString::tqfromLatin1( "custom4" ) ) {
if ( fieldname == TQString::fromLatin1( "custom1" ) ||
fieldname == TQString::fromLatin1( "custom2" ) ||
fieldname == TQString::fromLatin1( "custom3" ) ||
fieldname == TQString::fromLatin1( "custom4" ) ) {
goto addComment;
}
if ( fieldname == TQString::tqfromLatin1( "homeurl" ) ||
fieldname == TQString::tqfromLatin1( "workurl" ) ) {
if ( fieldname == TQString::fromLatin1( "homeurl" ) ||
fieldname == TQString::fromLatin1( "workurl" ) ) {
if (a.url().isEmpty()) {
a.setUrl( KURL( value ) );
return true;
@ -325,139 +325,139 @@ addComment:
// TODO: change this with KDE 4
}
if ( fieldname == TQString::tqfromLatin1( "homephone" ) ) {
if ( fieldname == TQString::fromLatin1( "homephone" ) ) {
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Home ) );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "telephonenumber" ) ) {
if ( fieldname == TQString::fromLatin1( "telephonenumber" ) ) {
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "mobile" ) ) { // mozilla/Netscape 7
if ( fieldname == TQString::fromLatin1( "mobile" ) ) { // mozilla/Netscape 7
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "cellphone" ) ) {
if ( fieldname == TQString::fromLatin1( "cellphone" ) ) {
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "pager" ) || // mozilla
fieldname == TQString::tqfromLatin1( "pagerphone" ) ) { // mozilla
if ( fieldname == TQString::fromLatin1( "pager" ) || // mozilla
fieldname == TQString::fromLatin1( "pagerphone" ) ) { // mozilla
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Pager ) );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "facsimiletelephonenumber" ) ) {
if ( fieldname == TQString::fromLatin1( "facsimiletelephonenumber" ) ) {
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Fax ) );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "xmozillaanyphone" ) ) { // mozilla
if ( fieldname == TQString::fromLatin1( "xmozillaanyphone" ) ) { // mozilla
a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "street" ) ||
fieldname == TQString::tqfromLatin1( "streethomeaddress" ) ) {
if ( fieldname == TQString::fromLatin1( "street" ) ||
fieldname == TQString::fromLatin1( "streethomeaddress" ) ) {
homeAddr.setStreet( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "postaladdress" ) ) { // mozilla
if ( fieldname == TQString::fromLatin1( "postaladdress" ) ) { // mozilla
workAddr.setStreet( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "mozillapostaladdress2" ) ) { // mozilla
workAddr.setStreet( workAddr.street() + TQString::tqfromLatin1( "\n" ) + value );
if ( fieldname == TQString::fromLatin1( "mozillapostaladdress2" ) ) { // mozilla
workAddr.setStreet( workAddr.street() + TQString::fromLatin1( "\n" ) + value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "postalcode" ) ) {
if ( fieldname == TQString::fromLatin1( "postalcode" ) ) {
workAddr.setPostalCode( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "postofficebox" ) ) {
if ( fieldname == TQString::fromLatin1( "postofficebox" ) ) {
workAddr.setPostOfficeBox( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "homepostaladdress" ) ) { // Netscape 7
if ( fieldname == TQString::fromLatin1( "homepostaladdress" ) ) { // Netscape 7
homeAddr.setStreet( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla
homeAddr.setStreet( homeAddr.street() + TQString::tqfromLatin1( "\n" ) + value );
if ( fieldname == TQString::fromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla
homeAddr.setStreet( homeAddr.street() + TQString::fromLatin1( "\n" ) + value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "mozillahomelocalityname" ) ) { // mozilla
if ( fieldname == TQString::fromLatin1( "mozillahomelocalityname" ) ) { // mozilla
homeAddr.setLocality( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "mozillahomestate" ) ) { // mozilla
if ( fieldname == TQString::fromLatin1( "mozillahomestate" ) ) { // mozilla
homeAddr.setRegion( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "mozillahomepostalcode" ) ) { // mozilla
if ( fieldname == TQString::fromLatin1( "mozillahomepostalcode" ) ) { // mozilla
homeAddr.setPostalCode( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "mozillahomecountryname" ) ) { // mozilla
if ( fieldname == TQString::fromLatin1( "mozillahomecountryname" ) ) { // mozilla
if ( value.length() <= 2 )
value = Address::ISOtoCountry(value);
homeAddr.setCountry( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "locality" ) ) {
if ( fieldname == TQString::fromLatin1( "locality" ) ) {
workAddr.setLocality( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "streetaddress" ) ) { // Netscape 4.x
if ( fieldname == TQString::fromLatin1( "streetaddress" ) ) { // Netscape 4.x
workAddr.setStreet( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "countryname" ) ||
fieldname == TQString::tqfromLatin1( "c" ) ) { // mozilla
if ( fieldname == TQString::fromLatin1( "countryname" ) ||
fieldname == TQString::fromLatin1( "c" ) ) { // mozilla
if ( value.length() <= 2 )
value = Address::ISOtoCountry(value);
workAddr.setCountry( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "l" ) ) { // mozilla
if ( fieldname == TQString::fromLatin1( "l" ) ) { // mozilla
workAddr.setLocality( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "st" ) ) {
if ( fieldname == TQString::fromLatin1( "st" ) ) {
workAddr.setRegion( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "ou" ) ) {
if ( fieldname == TQString::fromLatin1( "ou" ) ) {
a.setRole( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "department" ) ) {
if ( fieldname == TQString::fromLatin1( "department" ) ) {
a.setDepartment( value );
return true;
}
if ( fieldname == TQString::tqfromLatin1( "member" ) ) {
if ( fieldname == TQString::fromLatin1( "member" ) ) {
// this is a mozilla list member (cn=xxx, mail=yyy)
TQStringList list( TQStringList::split( ',', value ) );
TQString name, email;
@ -476,8 +476,8 @@ addComment:
return true;
}
if ( fieldname == TQString::tqfromLatin1( "modifytimestamp" ) ) {
if (value == TQString::tqfromLatin1("0Z")) // ignore
if ( fieldname == TQString::fromLatin1( "modifytimestamp" ) ) {
if (value == TQString::fromLatin1("0Z")) // ignore
return true;
TQDateTime dt = VCardStringToDate( value );
if ( dt.isValid() ) {
@ -486,7 +486,7 @@ addComment:
}
}
if ( fieldname == TQString::tqfromLatin1( "objectclass" ) ) // ignore
if ( fieldname == TQString::fromLatin1( "objectclass" ) ) // ignore
return true;
kdWarning() << TQString(TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n")

@ -44,7 +44,7 @@ namespace KABC {
* @param dt The date & time value of the last modification (e.g. file modification time).
* @since 3.2
*/
KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::tqcurrentDateTime() );
KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::currentDateTime() );
/**
* Converts a list of addressees to a LDIF string.

@ -60,7 +60,7 @@ int main( int argc, char **argv )
addressee.setOrganization( "KDE" );
addressee.setNote( "nerver\ntouch a running system" );
addressee.setProductId( "testId" );
addressee.setRevision( TQDateTime::tqcurrentDateTime() );
addressee.setRevision( TQDateTime::currentDateTime() );
addressee.setSortString( "koenig" );
addressee.setUrl( KURL( "http://wgess16.dyndns.org") );
addressee.setSecrecy( KABC::Secrecy( KABC::Secrecy::Confidential ) );

@ -748,7 +748,7 @@ void KateCSmartIndent::processChar(TQChar c)
if (c == 'n')
{
if (firstChar != '#' || textLine->string(curCol-5, 5) != TQString::tqfromLatin1("regio"))
if (firstChar != '#' || textLine->string(curCol-5, 5) != TQString::fromLatin1("regio"))
return;
}
@ -1917,8 +1917,8 @@ TQString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
// if the line starts with # (but isn't a c# region thingy), no indentation at all.
if( currLineFirst >= 0 && currLine->getChar(currLineFirst) == '#' )
{
if( !currLine->stringAtPos( currLineFirst+1, TQString::tqfromLatin1("region") ) &&
!currLine->stringAtPos( currLineFirst+1, TQString::tqfromLatin1("endregion") ) )
if( !currLine->stringAtPos( currLineFirst+1, TQString::fromLatin1("region") ) &&
!currLine->stringAtPos( currLineFirst+1, TQString::fromLatin1("endregion") ) )
return TQString::null;
}
@ -1974,10 +1974,10 @@ TQString KateCSAndSIndent::calcIndent (const KateDocCursor &begin)
{
#define ARRLEN( array ) ( sizeof(array)/sizeof(array[0]) )
for( uint n = 0; n < ARRLEN(scopeKeywords); ++n )
if( textLine->stringAtPos(pos, TQString::tqfromLatin1(scopeKeywords[n]) ) )
if( textLine->stringAtPos(pos, TQString::fromLatin1(scopeKeywords[n]) ) )
return calcIndentAfterKeyword( begin, cur, pos, false );
for( uint n = 0; n < ARRLEN(blockScopeKeywords); ++n )
if( textLine->stringAtPos(pos, TQString::tqfromLatin1(blockScopeKeywords[n]) ) )
if( textLine->stringAtPos(pos, TQString::fromLatin1(blockScopeKeywords[n]) ) )
return calcIndentAfterKeyword( begin, cur, pos, true );
#undef ARRLEN
}
@ -2070,7 +2070,7 @@ TQString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor,
// beginning 'namespace'. that's 99% of usage, I'd guess.
{
if( braceFirst >= 0 && braceLine->attribute(braceFirst) == keywordAttrib &&
braceLine->stringAtPos( braceFirst, TQString::tqfromLatin1( "namespace" ) ) )
braceLine->stringAtPos( braceFirst, TQString::fromLatin1( "namespace" ) ) )
return continuationIndent(indentCursor) + whitespaceToOpenBrace;
if( braceCursor.line() > 0 )
@ -2078,7 +2078,7 @@ TQString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor,
KateTextLine::Ptr prevLine = doc->plainKateTextLine(braceCursor.line() - 1);
int firstPrev = prevLine->firstChar();
if( firstPrev >= 0 && prevLine->attribute(firstPrev) == keywordAttrib &&
prevLine->stringAtPos( firstPrev, TQString::tqfromLatin1( "namespace" ) ) )
prevLine->stringAtPos( firstPrev, TQString::fromLatin1( "namespace" ) ) )
return continuationIndent(indentCursor) + whitespaceToOpenBrace;
}
}

@ -408,7 +408,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line,
TQString rep=repOld;
// now set the backreferences in the replacement
TQStringList backrefs=matcher.tqcapturedTexts();
TQStringList backrefs=matcher.capturedTexts();
int refnum=1;
TQStringList::Iterator i = backrefs.begin();
@ -593,10 +593,10 @@ bool KateCommands::Date::exec (Kate::View *view, const TQString &cmd, TQString &
if (cmd.left(4) != "date")
return false;
if (TQDateTime::tqcurrentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0)
view->insertText(TQDateTime::tqcurrentDateTime().toString(cmd.mid(5, cmd.length()-5)));
if (TQDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0)
view->insertText(TQDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)));
else
view->insertText(TQDateTime::tqcurrentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
view->insertText(TQDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
return true;
}

@ -384,7 +384,7 @@ void KateCodeCompletion::showComment()
m_completionListBox->ensureCurrentVisible();
finalPoint.setY(
m_completionListBox->viewport()->mapToGlobal(m_completionListBox->tqitemRect(
m_completionListBox->viewport()->mapToGlobal(m_completionListBox->itemRect(
m_completionListBox->item(m_completionListBox->currentItem())).topLeft()).y());
m_commentLabel->move(finalPoint);

@ -422,7 +422,7 @@ TQTextCodec *KateDocumentConfig::codec ()
if (m_encodingSet || isGlobal())
{
if (m_encoding.isEmpty() && isGlobal())
return KGlobal::charsets()->codecForName (TQString::tqfromLatin1(KGlobal::locale()->encoding()));
return KGlobal::charsets()->codecForName (TQString::fromLatin1(KGlobal::locale()->encoding()));
else if (m_encoding.isEmpty())
return s_global->codec ();
else

@ -2316,7 +2316,7 @@ bool KateDocument::openURL( const KURL &url )
w = m_views.first();
if (w)
m_job->setWindow (w->tqtopLevelWidget());
m_job->setWindow (w->topLevelWidget());
emit started( m_job );
@ -3195,7 +3195,7 @@ void KateDocument::backspace( KateView *view, const KateTextCursor& c )
if (!textLine)
return;
if (config()->wordWrap() && textLine->endingWith(TQString::tqfromLatin1(" ")))
if (config()->wordWrap() && textLine->endingWith(TQString::fromLatin1(" ")))
{
// gg: in hard wordwrap mode, backspace must also eat the trailing space
removeText (line-1, textLine->length()-1, line, 0);

@ -958,7 +958,7 @@ int KateHlRegExpr::checkHgl(const TQString& text, int offset, int /*len*/)
TQStringList *KateHlRegExpr::capturedTexts()
{
return new TQStringList(Expr->tqcapturedTexts());
return new TQStringList(Expr->capturedTexts());
}
KateHlItem *KateHlRegExpr::clone(const TQStringList *args)

@ -1135,7 +1135,7 @@ void KateIndentJScriptManager::parseScriptHeader(const TQString &filePath,
if (currentState==NOTHING)
{
if (keyValue.exactMatch(line)) {
TQStringList sl=keyValue.tqcapturedTexts();
TQStringList sl=keyValue.capturedTexts();
kdDebug(13050)<<"key:"<<sl[1]<<endl<<"value:"<<sl[2]<<endl;
kdDebug(13050)<<"key-length:"<<sl[1].length()<<endl<<"value-length:"<<sl[2].length()<<endl;
TQString key=sl[1];

@ -184,7 +184,7 @@ bool KatePrinter::print (KateDocument *doc)
// This retrieves all tags, ued or not, but
// none of theese operations should be expensive,
// and searcing each tag in the format strings is avoided.
TQDateTime dt = TQDateTime::tqcurrentDateTime();
TQDateTime dt = TQDateTime::currentDateTime();
TQMap<TQString,TQString> tags;
KUser u (KUser::UseRealUserID);

@ -537,13 +537,13 @@ void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, i
if (isIMSel && !isTab)
{
// input method selection
fillColor = m_view->tqcolorGroup().color(TQColorGroup::Foreground);
fillColor = m_view->colorGroup().color(TQColorGroup::Foreground);
}
else if (isIMEdit && !isTab)
{
// XIM support
// input method edit area
const TQColorGroup& cg = m_view->tqcolorGroup();
const TQColorGroup& cg = m_view->colorGroup();
int h1, s1, v1, h2, s2, v2;
TQColor(cg.color( TQColorGroup::Base )).hsv( &h1, &s1, &v1 );
TQColor(cg.color( TQColorGroup::Background )).hsv( &h2, &s2, &v2 );
@ -576,7 +576,7 @@ void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, i
if (isIMSel && paintBackground && !isTab)
{
paint.save();
paint.setPen( m_view->tqcolorGroup().color( TQColorGroup::BrightText ) );
paint.setPen( m_view->colorGroup().color( TQColorGroup::BrightText ) );
}
// Draw indentation markers.

@ -1088,9 +1088,9 @@ void KateStyleListView::showPopupMenu( KateStyleListItem *i, const TQPoint &glob
TQPixmap scl(16,16);
scl.fill( i->style()->selectedTextColor() );
TQPixmap bgcl(16,16);
bgcl.fill( i->style()->itemSet(KateAttribute::BGColor) ? i->style()->bgColor() : viewport()->tqcolorGroup().base() );
bgcl.fill( i->style()->itemSet(KateAttribute::BGColor) ? i->style()->bgColor() : viewport()->colorGroup().base() );
TQPixmap sbgcl(16,16);
sbgcl.fill( i->style()->itemSet(KateAttribute::SelectedBGColor) ? i->style()->selectedBGColor() : viewport()->tqcolorGroup().base() );
sbgcl.fill( i->style()->itemSet(KateAttribute::SelectedBGColor) ? i->style()->selectedBGColor() : viewport()->colorGroup().base() );
if ( showtitle )
m.insertTitle( i->contextName(), KateStyleListItem::ContextName );
@ -1156,7 +1156,7 @@ void KateStyleListView::slotMousePressed(int btn, TQListViewItem* i, const TQPoi
if ( dynamic_cast<KateStyleListItem*>(i) ) {
if ( btn == Qt::LeftButton && c > 0 ) {
// map pos to item/column and call KateStyleListItem::activate(col, pos)
((KateStyleListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - TQPoint( 0, tqitemRect(i).top() ) );
((KateStyleListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - TQPoint( 0, itemRect(i).top() ) );
}
}
}
@ -1465,7 +1465,7 @@ void KateStyleListItem::paintCell( TQPainter *p, const TQColorGroup& /*cg*/, int
Q_ASSERT( lv ); //###
// use a private color group and set the text/highlighted text colors
TQColorGroup mcg = lv->viewport()->tqcolorGroup();
TQColorGroup mcg = lv->viewport()->colorGroup();
if ( col ) // col 0 is drawn by the superclass method
p->fillRect( 0, 0, width, height(), TQBrush( mcg.base() ) );
@ -1602,7 +1602,7 @@ void KateStyleListCaption::paintCell( TQPainter *p, const TQColorGroup& /*cg*/,
Q_ASSERT( lv ); //###
// use the same colorgroup as the other items in the viewport
TQColorGroup mcg = lv->viewport()->tqcolorGroup();
TQColorGroup mcg = lv->viewport()->colorGroup();
TQListViewItem::paintCell( p, mcg, col, width, align );
}

@ -793,7 +793,7 @@ void KateView::contextMenuEvent( TQContextMenuEvent *ev )
if ( !m_doc || !m_doc->browserExtension() )
return;
emit m_doc->browserExtension()->popupMenu( /*this, */ev->globalPos(), m_doc->url(),
TQString::tqfromLatin1( "text/plain" ) );
TQString::fromLatin1( "text/plain" ) );
ev->accept();
}

@ -222,7 +222,7 @@ class KateViewInternal : public TQWidget
int scrollX;
int scrollY;
TQt::tqCursorShape m_mouseCursor;
TQt::CursorShape m_mouseCursor;
KateSuperCursor cursor;
KateTextCursor displayCursor;

@ -935,7 +935,7 @@ void RegressionTest::doFailureReport( const TQString& test, int failures )
if ( failures & ResultFailure ) {
domDiff += "<pre>";
FILE *pipe = popen( TQString::tqfromLatin1( "diff -u baseline/%1-result %3/%2-result" )
FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-result %3/%2-result" )
.arg ( test, test, relOutputDir ).latin1(), "r" );
TQTextIStream *is = new TQTextIStream( pipe );
for ( int line = 0; line < 100 && !is->eof(); ++line ) {

@ -636,7 +636,7 @@ void KCertPart::displayCACert(KSSLCertificate *c) {
// Set the valid period
TQPalette cspl = _ca_validFrom->palette();
if (TQDateTime::tqcurrentDateTime() < c->getQDTNotBefore()) {
if (TQDateTime::currentDateTime() < c->getQDTNotBefore()) {
cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
} else {
cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
@ -645,7 +645,7 @@ void KCertPart::displayCACert(KSSLCertificate *c) {
_ca_validFrom->setText(c->getNotBefore());
cspl = _ca_validUntil->palette();
if (TQDateTime::tqcurrentDateTime() > c->getQDTNotAfter()) {
if (TQDateTime::currentDateTime() > c->getQDTNotAfter()) {
cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
} else {
cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
@ -677,7 +677,7 @@ void KCertPart::displayPKCS12Cert(KSSLCertificate *c) {
// Set the valid period
TQPalette cspl = _p12_validFrom->palette();
if (TQDateTime::tqcurrentDateTime() < c->getQDTNotBefore()) {
if (TQDateTime::currentDateTime() < c->getQDTNotBefore()) {
cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
} else {
cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
@ -686,7 +686,7 @@ void KCertPart::displayPKCS12Cert(KSSLCertificate *c) {
_p12_validFrom->setText(c->getNotBefore());
cspl = _p12_validUntil->palette();
if (TQDateTime::tqcurrentDateTime() > c->getQDTNotAfter()) {
if (TQDateTime::currentDateTime() > c->getQDTNotAfter()) {
cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
} else {
cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));

@ -201,7 +201,7 @@ KonfUpdate::log()
}
}
(*m_textStream) << TQDateTime::tqcurrentDateTime().toString( Qt::ISODate ) << " ";
(*m_textStream) << TQDateTime::currentDateTime().toString( Qt::ISODate ) << " ";
return *m_textStream;
}

@ -160,12 +160,12 @@ void KBuildSycoca::processGnomeVfs()
if (line[0] != '\t')
{
app = TQString::tqfromLatin1(line);
app = TQString::fromLatin1(line);
app.truncate(app.length()-1);
}
else if (strncmp(line+1, "mime_types=", 11) == 0)
{
TQString mimetypes = TQString::tqfromLatin1(line+12);
TQString mimetypes = TQString::fromLatin1(line+12);
mimetypes.truncate(mimetypes.length()-1);
mimetypes.replace(TQRegExp("\\*"), "all");
KService *s = g_bsf->findServiceByName(app);

@ -47,7 +47,7 @@ static const char classDef[] = "#ifndef EMBED_IMAGES\n"
" TQPixmap pix(m_widgets[key].iconSet);\n"
"#else\n"
" TQPixmap pix(locate( \"data\", \n"
" TQString::tqfromLatin1(\"%PluginNameLower/pics/\") + m_widgets[key].iconSet));\n"
" TQString::fromLatin1(\"%PluginNameLower/pics/\") + m_widgets[key].iconSet));\n"
"#endif\n"
" return TQIconSet(pix);\n"
" }\n"
@ -81,17 +81,17 @@ static const char classDef[] = "#ifndef EMBED_IMAGES\n"
"%PluginName::%PluginName()\n"
"{\n"
" WidgetInfo widget;\n";
static const char widgetDef[] = " widget.group = TQString::tqfromLatin1(\"%Group\");\n"
static const char widgetDef[] = " widget.group = TQString::fromLatin1(\"%Group\");\n"
"#ifdef EMBED_IMAGES\n"
" widget.iconSet = TQPixmap(%Pixmap);\n"
"#else\n"
" widget.iconSet = TQString::tqfromLatin1(\"%IconSet\");\n"
" widget.iconSet = TQString::fromLatin1(\"%IconSet\");\n"
"#endif\n"
" widget.includeFile = TQString::tqfromLatin1(\"%IncludeFile\");\n"
" widget.toolTip = TQString::tqfromLatin1(\"%ToolTip\");\n"
" widget.whatsThis = TQString::tqfromLatin1(\"%WhatsThis\");\n"
" widget.includeFile = TQString::fromLatin1(\"%IncludeFile\");\n"
" widget.toolTip = TQString::fromLatin1(\"%ToolTip\");\n"
" widget.whatsThis = TQString::fromLatin1(\"%WhatsThis\");\n"
" widget.isContainer = %IsContainer;\n"
" m_widgets.insert(TQString::tqfromLatin1(\"%Class\"), widget);\n";
" m_widgets.insert(TQString::fromLatin1(\"%Class\"), widget);\n";
static const char endCtor[] = " %Init\n"
"}\n"
"%PluginName::~%PluginName()\n"
@ -100,7 +100,7 @@ static const char endCtor[] = " %Init\n"
"}\n"
"TQWidget *%PluginName::create(const TQString &key, TQWidget *parent, const char *name)\n"
"{\n";
static const char widgetCreate[] = " if (key == TQString::tqfromLatin1(\"%Class\"))\n"
static const char widgetCreate[] = " if (key == TQString::fromLatin1(\"%Class\"))\n"
" return new %ImplClass%ConstructorArgs;\n";
static const char endCreate[] = " return 0;\n"
"}\n"

@ -327,7 +327,7 @@ void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s, DocumentImpl *do
if ( readbytes >= 0 )
file[readbytes] = '\0';
TQString style = TQString::tqfromLatin1( file.data() );
TQString style = TQString::fromLatin1( file.data() );
if(s)
style += s->settingsToCSS();
DOMString str(style);
@ -352,7 +352,7 @@ void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s, DocumentImpl *do
if ( readbytes >= 0 )
file[readbytes] = '\0';
TQString style = TQString::tqfromLatin1( file.data() );
TQString style = TQString::fromLatin1( file.data() );
DOMString str(style);
s_quirksSheet = new DOM::CSSStyleSheetImpl(doc);
@ -1196,14 +1196,14 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm
//kdDebug( 6080 ) << "checking for beginswith match" << endl;
TQConstString val_str(value->tqunicode(), value->length());
TQConstString sel_str(sel->value.tqunicode(), sel->value.length());
return val_str.string().tqstartsWith(sel_str.string(), caseSensitive);
return val_str.string().startsWith(sel_str.string(), caseSensitive);
}
case CSSSelector::End:
{
//kdDebug( 6080 ) << "checking for endswith match" << endl;
TQConstString val_str(value->tqunicode(), value->length());
TQConstString sel_str(sel->value.tqunicode(), sel->value.length());
return val_str.string().tqendsWith(sel_str.string(), caseSensitive);
return val_str.string().endsWith(sel_str.string(), caseSensitive);
}
case CSSSelector::Hyphen:
{

@ -112,8 +112,8 @@ HTMLDocument DOMImplementation::createHTMLDocument( const DOMString& title )
r->open();
r->write(TQString::tqfromLatin1("<HTML><HEAD><TITLE>") + title.string() +
TQString::tqfromLatin1("</TITLE></HEAD>"));
r->write(TQString::fromLatin1("<HTML><HEAD><TITLE>") + title.string() +
TQString::fromLatin1("</TITLE></HEAD>"));
return r;
}

@ -690,7 +690,7 @@ bool KJSDebugWin::eventFilter(TQObject *o, TQEvent *e)
void KJSDebugWin::disableOtherWindows()
{
TQWidgetList *widgets = TQApplication::tqallWidgets();
TQWidgetList *widgets = TQApplication::allWidgets();
TQWidgetListIt it(*widgets);
for (; it.current(); ++it)
it.current()->installEventFilter(this);
@ -698,7 +698,7 @@ void KJSDebugWin::disableOtherWindows()
void KJSDebugWin::enableOtherWindows()
{
TQWidgetList *widgets = TQApplication::tqallWidgets();
TQWidgetList *widgets = TQApplication::allWidgets();
TQWidgetListIt it(*widgets);
for (; it.current(); ++it)
it.current()->removeEventFilter(this);
@ -861,7 +861,7 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
if (dontShowAgain) {
KConfig *config = kapp->config();
KConfigGroupSaver saver(config,TQString::tqfromLatin1("Java/JavaScript Settings"));
KConfigGroupSaver saver(config,TQString::fromLatin1("Java/JavaScript Settings"));
config->writeEntry("ReportJavaScriptErrors",TQVariant(false,0));
config->sync();
TQByteArray data;

@ -188,14 +188,14 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
return String("Mozilla");
case AppName:
// If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape
if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 &&
userAgent.find(TQString::tqfromLatin1("compatible")) == -1)
if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
userAgent.find(TQString::fromLatin1("compatible")) == -1)
{
//kdDebug() << "appName -> Mozilla" << endl;
return String("Netscape");
}
if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 ||
userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0)
if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 ||
userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
{
//kdDebug() << "appName -> IE" << endl;
return String("Microsoft Internet Explorer");
@ -207,14 +207,14 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
return String(userAgent.mid(userAgent.find('/') + 1));
case Product:
// We are pretending to be Mozilla or Safari
if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 &&
userAgent.find(TQString::tqfromLatin1("compatible")) == -1)
if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
userAgent.find(TQString::fromLatin1("compatible")) == -1)
{
return String("Gecko");
}
// When spoofing as IE, we use Undefined().
if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 ||
userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0)
if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 ||
userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
{
return Undefined();
}
@ -245,19 +245,19 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
return String(userAgent);
case Platform:
// yet another evil hack, but necessary to spoof some sites...
if ( (userAgent.find(TQString::tqfromLatin1("Win"),0,false)>=0) )
return String(TQString::tqfromLatin1("Win32"));
else if ( (userAgent.find(TQString::tqfromLatin1("Macintosh"),0,false)>=0) ||
(userAgent.find(TQString::tqfromLatin1("Mac_PowerPC"),0,false)>=0) )
return String(TQString::tqfromLatin1("MacPPC"));
if ( (userAgent.find(TQString::fromLatin1("Win"),0,false)>=0) )
return String(TQString::fromLatin1("Win32"));
else if ( (userAgent.find(TQString::fromLatin1("Macintosh"),0,false)>=0) ||
(userAgent.find(TQString::fromLatin1("Mac_PowerPC"),0,false)>=0) )
return String(TQString::fromLatin1("MacPPC"));
else
{
struct utsname name;
int ret = uname(&name);
if ( ret >= 0 )
return String(TQString(TQString::tqfromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine)));
return String(TQString(TQString::fromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine)));
else // can't happen
return String(TQString(TQString::tqfromLatin1("Unix X11")));
return String(TQString(TQString::fromLatin1("Unix X11")));
}
case CpuClass:
{

@ -343,8 +343,8 @@ void KJSProxyImpl::applyUserAgent()
assert( m_script );
TQString host = m_frame->m_part->url().isLocalFile() ? "localhost" : m_frame->m_part->url().host();
TQString userAgent = KProtocolManager::userAgentForHost(host);
if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 ||
userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0)
if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 ||
userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
{
m_script->setCompatMode(Interpreter::IECompat);
#ifdef KJS_VERBOSE
@ -353,9 +353,9 @@ void KJSProxyImpl::applyUserAgent()
}
else
// If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape
if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 &&
userAgent.find(TQString::tqfromLatin1("compatible")) == -1 &&
userAgent.find(TQString::tqfromLatin1("KHTML")) == -1)
if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
userAgent.find(TQString::fromLatin1("compatible")) == -1 &&
userAgent.find(TQString::fromLatin1("KHTML")) == -1)
{
m_script->setCompatMode(Interpreter::NetscapeCompat);
#ifdef KJS_VERBOSE

@ -864,7 +864,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
if (!part->widget())
return Number(0);
KWin::WindowInfo inf = KWin::windowInfo(part->widget()->tqtopLevelWidget()->winId());
KWin::WindowInfo inf = KWin::windowInfo(part->widget()->topLevelWidget()->winId());
return Number(entry->value == OuterHeight ?
inf.geometry().height() : inf.geometry().width());
#else
@ -1446,7 +1446,7 @@ void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory)
// check if we're allowed to inject javascript
// SYNC check with khtml_part.cpp::slotRedirect!
if ( isSafeScript(exec) ||
dstUrl.find(TQString::tqfromLatin1("javascript:"), 0, false) != 0 )
dstUrl.find(TQString::fromLatin1("javascript:"), 0, false) != 0 )
part->scheduleRedirection(-1,
dstUrl,
lockHistory);
@ -1622,7 +1622,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
if (pos >= 0) {
key = s.left(pos).stripWhiteSpace().lower();
val = s.mid(pos + 1).stripWhiteSpace().lower();
TQRect screen = KGlobalSettings::desktopGeometry(widget->tqtopLevelWidget());
TQRect screen = KGlobalSettings::desktopGeometry(widget->topLevelWidget());
if (key == "left" || key == "screenx") {
winargs.x = (int)val.toFloat() + screen.x();
@ -1633,13 +1633,13 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
if (winargs.y < screen.y() || winargs.y > screen.bottom())
winargs.y = screen.y(); // only safe choice until size is determined
} else if (key == "height") {
winargs.height = (int)val.toFloat() + 2*tqApp->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
winargs.height = (int)val.toFloat() + 2*tqApp->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
if (winargs.height > screen.height()) // should actually check workspace
winargs.height = screen.height();
if (winargs.height < 100)
winargs.height = 100;
} else if (key == "width") {
winargs.width = (int)val.toFloat() + 2*tqApp->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
winargs.width = (int)val.toFloat() + 2*tqApp->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
if (winargs.width > screen.width()) // should actually check workspace
winargs.width = screen.width();
if (winargs.width < 100)
@ -1897,8 +1897,8 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
KHTMLSettings::KJSWindowFocusPolicy policy =
part->settings()->windowFocusPolicy(part->url().host());
if(policy == KHTMLSettings::KJSWindowFocusAllow && widget) {
widget->tqtopLevelWidget()->raise();
KWin::deIconifyWindow( widget->tqtopLevelWidget()->winId() );
widget->topLevelWidget()->raise();
KWin::deIconifyWindow( widget->topLevelWidget()->winId() );
widget->setActiveWindow();
emit part->browserExtension()->requestFocus(part);
}
@ -1950,7 +1950,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
{
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
TQWidget * tl = widget->tqtopLevelWidget();
TQWidget * tl = widget->topLevelWidget();
TQRect sg = KGlobalSettings::desktopGeometry(tl);
TQPoint dest = tl->pos() + TQPoint( args[0].toInt32(exec), args[1].toInt32(exec) );
@ -1970,7 +1970,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
{
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
TQWidget * tl = widget->tqtopLevelWidget();
TQWidget * tl = widget->topLevelWidget();
TQRect sg = KGlobalSettings::desktopGeometry(tl);
TQPoint dest( args[0].toInt32(exec)+sg.x(), args[1].toInt32(exec)+sg.y() );
@ -1989,7 +1989,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if(policy == KHTMLSettings::KJSWindowResizeAllow
&& args.size() == 2 && widget)
{
TQWidget * tl = widget->tqtopLevelWidget();
TQWidget * tl = widget->topLevelWidget();
TQRect geom = tl->frameGeometry();
window->resizeTo( tl,
geom.width() + args[0].toInt32(exec),
@ -2003,7 +2003,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if(policy == KHTMLSettings::KJSWindowResizeAllow
&& args.size() == 2 && widget)
{
TQWidget * tl = widget->tqtopLevelWidget();
TQWidget * tl = widget->topLevelWidget();
window->resizeTo( tl, args[0].toInt32(exec), args[1].toInt32(exec) );
}
return Undefined();
@ -2545,7 +2545,7 @@ Value Location::get(ExecState *exec, const Identifier &p) const
return String("");
return String( url.path().isEmpty() ? TQString("/") : url.path() );
case Port:
return String( url.port() ? TQString::number((int)url.port()) : TQString::tqfromLatin1("") );
return String( url.port() ? TQString::number((int)url.port()) : TQString::fromLatin1("") );
case Protocol:
return String( url.protocol()+":" );
case Search:

@ -487,7 +487,7 @@ void XMLHttpRequest::setRequestHeader(const TQString& _name, const TQString &val
// Reject all banned headers. See BANNED_HTTP_HEADERS above.
// kdDebug() << "Banned HTTP Headers: " << BANNED_HTTP_HEADERS << endl;
TQStringList bannedHeaders = TQStringList::split(',',
TQString::tqfromLatin1(BANNED_HTTP_HEADERS));
TQString::fromLatin1(BANNED_HTTP_HEADERS));
if (bannedHeaders.contains(name))
return; // Denied

@ -110,8 +110,8 @@ DOMString HTMLDocumentImpl::cookie() const
long windowId = 0;
KHTMLView *v = view ();
if ( v && v->tqtopLevelWidget() )
windowId = v->tqtopLevelWidget()->winId();
if ( v && v->topLevelWidget() )
windowId = v->topLevelWidget()->winId();
TQCString replyType;
TQByteArray params, reply;
@ -142,8 +142,8 @@ void HTMLDocumentImpl::setCookie( const DOMString & value )
long windowId = 0;
KHTMLView *v = view ();
if ( v && v->tqtopLevelWidget() )
windowId = v->tqtopLevelWidget()->winId();
if ( v && v->topLevelWidget() )
windowId = v->topLevelWidget()->winId();
TQByteArray params;
TQDataStream stream(params, IO_WriteOnly);

@ -1322,10 +1322,10 @@ TQString HTMLInputElementImpl::state( )
{
switch (m_type) {
case PASSWORD:
return TQString::tqfromLatin1("."); // empty string, avoid restoring
return TQString::fromLatin1("."); // empty string, avoid restoring
case CHECKBOX:
case RADIO:
return TQString::tqfromLatin1(checked() ? "on" : "off");
return TQString::fromLatin1(checked() ? "on" : "off");
case TEXT:
if (autoComplete() && value() != getAttribute(ATTR_VALUE) && getDocument()->view())
getDocument()->view()->addFormCompletionItem(name().string(), value().string());
@ -1340,7 +1340,7 @@ void HTMLInputElementImpl::restoreState(const TQString &state)
switch (m_type) {
case CHECKBOX:
case RADIO:
setChecked((state == TQString::tqfromLatin1("on")));
setChecked((state == TQString::fromLatin1("on")));
break;
case FILE:
m_value = DOMString(state.left(state.length()-1));
@ -1566,12 +1566,12 @@ bool HTMLInputElementImpl::encoding(const TQTextCodec* codec, khtml::encodingLis
if(m_clicked)
{
m_clicked = false;
TQString astr(nme.isEmpty() ? TQString::tqfromLatin1("x") : nme + ".x");
TQString astr(nme.isEmpty() ? TQString::fromLatin1("x") : nme + ".x");
encoding += fixUpfromUnicode(codec, astr);
astr.setNum(KMAX( clickX(), 0 ));
encoding += fixUpfromUnicode(codec, astr);
astr = nme.isEmpty() ? TQString::tqfromLatin1("y") : nme + ".y";
astr = nme.isEmpty() ? TQString::fromLatin1("y") : nme + ".y";
encoding += fixUpfromUnicode(codec, astr);
astr.setNum(KMAX( clickY(), 0 ) );
encoding += fixUpfromUnicode(codec, astr);
@ -1618,7 +1618,7 @@ bool HTMLInputElementImpl::encoding(const TQTextCodec* codec, khtml::encodingLis
KIO::UDSEntry filestat;
// can't submit file in www-url-form encoded
TQWidget* const toplevel = static_cast<RenderSubmitButton*>(m_render)->widget()->tqtopLevelWidget();
TQWidget* const toplevel = static_cast<RenderSubmitButton*>(m_render)->widget()->topLevelWidget();
if (multipart) {
TQCString filearray( "" );
if ( KIO::NetAccess::stat(fileurl, filestat, toplevel)) {

@ -919,7 +919,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
a = khtml::getAttrID(cBuffer, cBufferPos-1);
}
if (!a)
attrName = TQString::tqfromLatin1(TQCString(cBuffer, cBufferPos+1).data());
attrName = TQString::fromLatin1(TQCString(cBuffer, cBufferPos+1).data());
}
dest = buffer;
@ -941,7 +941,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
}
if ( cBufferPos == CBUFLEN ) {
cBuffer[cBufferPos] = '\0';
attrName = TQString::tqfromLatin1(TQCString(cBuffer, cBufferPos+1).data());
attrName = TQString::fromLatin1(TQCString(cBuffer, cBufferPos+1).data());
dest = buffer;
*dest++ = 0;
tag = SearchEqual;

@ -138,7 +138,7 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg
kdDebug(6100) << "KJavaAppletContext::received, cmd = >>" << cmd << "<<" << endl;
kdDebug(6100) << "arg count = " << arg.count() << endl;
if ( cmd == TQString::tqfromLatin1("showstatus")
if ( cmd == TQString::fromLatin1("showstatus")
&& !arg.empty() )
{
TQString tmp = arg.first();
@ -146,19 +146,19 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg
kdDebug(6100) << "status message = " << tmp << endl;
emit showStatus( tmp );
}
else if ( cmd == TQString::tqfromLatin1( "showurlinframe" )
else if ( cmd == TQString::fromLatin1( "showurlinframe" )
&& arg.count() > 1 )
{
kdDebug(6100) << "url = " << arg[0] << ", frame = " << arg[1] << endl;
emit showDocument( arg[0], arg[1] );
}
else if ( cmd == TQString::tqfromLatin1( "showdocument" )
else if ( cmd == TQString::fromLatin1( "showdocument" )
&& !arg.empty() )
{
kdDebug(6100) << "url = " << arg.first() << endl;
emit showDocument( arg.first(), "_top" );
}
else if ( cmd == TQString::tqfromLatin1( "resizeapplet" )
else if ( cmd == TQString::fromLatin1( "resizeapplet" )
&& arg.count() > 2 )
{
//arg[1] should be appletID
@ -180,10 +180,10 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg
tmp->resizeAppletWidget( width, height );
}
}
else if (cmd.startsWith(TQString::tqfromLatin1("audioclip_"))) {
else if (cmd.startsWith(TQString::fromLatin1("audioclip_"))) {
kdDebug(DEBUGAREA) << "process Audio command (not yet implemented): " << cmd << " " << arg[0] << endl;
}
else if ( cmd == TQString::tqfromLatin1( "JS_Event" )
else if ( cmd == TQString::fromLatin1( "JS_Event" )
&& arg.count() > 2 )
{
bool ok;
@ -198,7 +198,7 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg
else
kdError(DEBUGAREA) << "parse JS event " << arg[0] << " " << arg[1] << endl;
}
else if ( cmd == TQString::tqfromLatin1( "AppletStateNotification" ) )
else if ( cmd == TQString::fromLatin1( "AppletStateNotification" ) )
{
bool ok;
const int appletID = arg.first().toInt(&ok);
@ -222,7 +222,7 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg
} else
kdError(DEBUGAREA) << "AppletStateNotification: Applet ID is not numerical" << endl;
}
else if ( cmd == TQString::tqfromLatin1( "AppletFailed" ) ) {
else if ( cmd == TQString::fromLatin1( "AppletFailed" ) ) {
bool ok;
const int appletID = arg.first().toInt(&ok);
if (ok)

@ -531,19 +531,19 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb )
switch( cmd_code )
{
case KJAS_SHOW_DOCUMENT:
cmd = TQString::tqfromLatin1( "showdocument" );
cmd = TQString::fromLatin1( "showdocument" );
break;
case KJAS_SHOW_URLINFRAME:
cmd = TQString::tqfromLatin1( "showurlinframe" );
cmd = TQString::fromLatin1( "showurlinframe" );
break;
case KJAS_SHOW_STATUS:
cmd = TQString::tqfromLatin1( "showstatus" );
cmd = TQString::fromLatin1( "showstatus" );
break;
case KJAS_RESIZE_APPLET:
cmd = TQString::tqfromLatin1( "resizeapplet" );
cmd = TQString::fromLatin1( "resizeapplet" );
break;
case KJAS_GET_URLDATA:
@ -573,7 +573,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb )
kdError(6100) << "KIO Data command error " << ok << " args:" << args.size() << endl;
return;
case KJAS_JAVASCRIPT_EVENT:
cmd = TQString::tqfromLatin1( "JS_Event" );
cmd = TQString::fromLatin1( "JS_Event" );
kdDebug(6100) << "Javascript request: "<< contextID
<< " code: " << args[0] << endl;
break;
@ -593,24 +593,24 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb )
return;
}
case KJAS_AUDIOCLIP_PLAY:
cmd = TQString::tqfromLatin1( "audioclip_play" );
cmd = TQString::fromLatin1( "audioclip_play" );
kdDebug(6100) << "Audio Play: url=" << args[0] << endl;
break;
case KJAS_AUDIOCLIP_LOOP:
cmd = TQString::tqfromLatin1( "audioclip_loop" );
cmd = TQString::fromLatin1( "audioclip_loop" );
kdDebug(6100) << "Audio Loop: url=" << args[0] << endl;
break;
case KJAS_AUDIOCLIP_STOP:
cmd = TQString::tqfromLatin1( "audioclip_stop" );
cmd = TQString::fromLatin1( "audioclip_stop" );
kdDebug(6100) << "Audio Stop: url=" << args[0] << endl;
break;
case KJAS_APPLET_STATE:
kdDebug(6100) << "Applet State Notification for Applet " << args[0] << ". New state=" << args[1] << endl;
cmd = TQString::tqfromLatin1( "AppletStateNotification" );
cmd = TQString::fromLatin1( "AppletStateNotification" );
break;
case KJAS_APPLET_FAILED:
kdDebug(6100) << "Applet " << args[0] << " Failed: " << args[1] << endl;
cmd = TQString::tqfromLatin1( "AppletFailed" );
cmd = TQString::fromLatin1( "AppletFailed" );
break;
case KJAS_SECURITY_CONFIRM: {
if (KSSL::doesSSLWork() && !d->kssl)

@ -245,27 +245,27 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *,
baseurl = KURL (KURL (value), TQString (".")).url ();
} else if (name == "__KHTML__CODEBASE")
khtml_codebase = value;
else if (name_lower == TQString::tqfromLatin1("codebase") ||
name_lower == TQString::tqfromLatin1("java_codebase")) {
else if (name_lower == TQString::fromLatin1("codebase") ||
name_lower == TQString::fromLatin1("java_codebase")) {
if (!value.isEmpty ())
codebase = value;
} else if (name == "__KHTML__CLASSID")
//else if (name.lower()==TQString::tqfromLatin1("classid"))
//else if (name.lower()==TQString::fromLatin1("classid"))
classid = value;
else if (name_lower == TQString::tqfromLatin1("code") ||
name_lower == TQString::tqfromLatin1("java_code"))
else if (name_lower == TQString::fromLatin1("code") ||
name_lower == TQString::fromLatin1("java_code"))
classname = value;
else if (name_lower == TQString::tqfromLatin1("src"))
else if (name_lower == TQString::fromLatin1("src"))
src_param = value;
else if (name_lower == TQString::tqfromLatin1("archive") ||
name_lower == TQString::tqfromLatin1("java_archive") ||
else if (name_lower == TQString::fromLatin1("archive") ||
name_lower == TQString::fromLatin1("java_archive") ||
name_lower.startsWith ("cache_archive"))
applet->setArchives (value);
else if (name_lower == TQString::tqfromLatin1("name"))
else if (name_lower == TQString::fromLatin1("name"))
applet->setAppletName (value);
else if (name_lower == TQString::tqfromLatin1("width"))
else if (name_lower == TQString::fromLatin1("width"))
width = value.toInt();
else if (name_lower == TQString::tqfromLatin1("height"))
else if (name_lower == TQString::fromLatin1("height"))
height = value.toInt();
if (!name.startsWith ("__KHTML__")) {
applet->setParameter (name, value);
@ -327,7 +327,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *,
info.verifyPath = true;
TQDataStream stream(params, IO_WriteOnly);
stream << info << m_view->tqtopLevelWidget()->winId();
stream << info << m_view->topLevelWidget()->winId();
if (!kapp->dcopClient ()->call( "kded", "kpasswdserver", "checkAuthInfo(KIO::AuthInfo, long int)", params, replyType, reply ) ) {
kdWarning() << "Can't communicate with kded_kpasswdserver!" << endl;
@ -342,7 +342,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *,
/* install event filter for close events */
if (wparent)
wparent->tqtopLevelWidget ()->installEventFilter (this);
wparent->topLevelWidget ()->installEventFilter (this);
setInstance (KJavaAppletViewerFactory::instance ());
KParts::Part::setWidget (m_view);

@ -315,7 +315,7 @@ void KHTMLPartBrowserExtension::callExtensionProxyMethod( const char *method )
if ( !m_extensionProxy )
return;
int slot = m_extensionProxy->tqmetaObject()->findSlot( method );
int slot = m_extensionProxy->metaObject()->findSlot( method );
if ( slot == -1 )
return;
@ -809,7 +809,7 @@ void KHTMLPopupGUIClient::saveURL( TQWidget *parent, const TQString &caption,
const TQString &filter, long cacheId,
const TQString & suggestedFilename )
{
TQString name = TQString::tqfromLatin1( "index.html" );
TQString name = TQString::fromLatin1( "index.html" );
if ( !suggestedFilename.isEmpty() )
name = suggestedFilename;
else if ( !url.fileName().isEmpty() )

@ -717,7 +717,7 @@ bool KHTMLPart::openURL( const KURL &url )
}
if (widget())
d->m_job->setWindow(widget()->tqtopLevelWidget());
d->m_job->setWindow(widget()->topLevelWidget());
d->m_job->addMetaData(args.metaData());
connect( d->m_job, TQT_SIGNAL( result( KIO::Job* ) ),
@ -1722,14 +1722,14 @@ void KHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqU
d->m_bJScriptForce = false;
d->m_bJScriptOverride = true;
begin();
TQString errText = TQString::tqfromLatin1( "<HTML dir=%1><HEAD><TITLE>" )
TQString errText = TQString::fromLatin1( "<HTML dir=%1><HEAD><TITLE>" )
.arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
errText += i18n( "Error while loading %1" ).arg( reqUrl.htmlURL() );
errText += TQString::tqfromLatin1( "</TITLE></HEAD><BODY><P>" );
errText += TQString::fromLatin1( "</TITLE></HEAD><BODY><P>" );
errText += i18n( "An error occurred while loading <B>%1</B>:" ).arg( reqUrl.htmlURL() );
errText += TQString::tqfromLatin1( "</P>" );
errText += TQString::fromLatin1( "</P>" );
errText += TQStyleSheet::convertFromPlainText( KIO::buildErrorString( errorCode, text ) );
errText += TQString::tqfromLatin1( "</BODY></HTML>" );
errText += TQString::fromLatin1( "</BODY></HTML>" );
write(errText);
end();
@ -1757,56 +1757,56 @@ void KHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& reqU
TQString url, protocol, datetime;
url = reqUrl.prettyURL();
protocol = reqUrl.protocol();
datetime = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(),
datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(),
false );
TQString doc = TQString::tqfromLatin1( "<html><head><title>" );
TQString doc = TQString::fromLatin1( "<html><head><title>" );
doc += i18n( "Error: " );
doc += errorName;
doc += TQString::tqfromLatin1( " - %1</title></head><body><h1>" ).arg( url );
doc += TQString::fromLatin1( " - %1</title></head><body><h1>" ).arg( url );
doc += i18n( "The requested operation could not be completed" );
doc += TQString::tqfromLatin1( "</h1><h2>" );
doc += TQString::fromLatin1( "</h1><h2>" );
doc += errorName;
doc += TQString::tqfromLatin1( "</h2>" );
doc += TQString::fromLatin1( "</h2>" );
if ( !techName.isNull() ) {
doc += TQString::tqfromLatin1( "<h2>" );
doc += TQString::fromLatin1( "<h2>" );
doc += i18n( "Technical Reason: " );
doc += techName;
doc += TQString::tqfromLatin1( "</h2>" );
doc += TQString::fromLatin1( "</h2>" );
}
doc += TQString::tqfromLatin1( "<h3>" );
doc += TQString::fromLatin1( "<h3>" );
doc += i18n( "Details of the Request:" );
doc += TQString::tqfromLatin1( "</h3><ul><li>" );
doc += TQString::fromLatin1( "</h3><ul><li>" );
doc += i18n( "URL: %1" ).arg( url );
doc += TQString::tqfromLatin1( "</li><li>" );
doc += TQString::fromLatin1( "</li><li>" );
if ( !protocol.isNull() ) {
// uncomment for 3.1... i18n change
// doc += i18n( "Protocol: %1" ).arg( protocol ).arg( protocol );
doc += TQString::tqfromLatin1( "</li><li>" );
doc += TQString::fromLatin1( "</li><li>" );
}
doc += i18n( "Date and Time: %1" ).arg( datetime );
doc += TQString::tqfromLatin1( "</li><li>" );
doc += TQString::fromLatin1( "</li><li>" );
doc += i18n( "Additional Information: %1" ).arg( text );
doc += TQString::tqfromLatin1( "</li></ul><h3>" );
doc += TQString::fromLatin1( "</li></ul><h3>" );
doc += i18n( "Description:" );
doc += TQString::tqfromLatin1( "</h3><p>" );
doc += TQString::fromLatin1( "</h3><p>" );
doc += description;
doc += TQString::tqfromLatin1( "</p>" );
doc += TQString::fromLatin1( "</p>" );
if ( causes.count() ) {
doc += TQString::tqfromLatin1( "<h3>" );
doc += TQString::fromLatin1( "<h3>" );
doc += i18n( "Possible Causes:" );
doc += TQString::tqfromLatin1( "</h3><ul><li>" );
doc += TQString::fromLatin1( "</h3><ul><li>" );
doc += causes.join( "</li><li>" );
doc += TQString::tqfromLatin1( "</li></ul>" );
doc += TQString::fromLatin1( "</li></ul>" );
}
if ( solutions.count() ) {
doc += TQString::tqfromLatin1( "<h3>" );
doc += TQString::fromLatin1( "<h3>" );
doc += i18n( "Possible Solutions:" );
doc += TQString::tqfromLatin1( "</h3><ul><li>" );
doc += TQString::fromLatin1( "</h3><ul><li>" );
doc += solutions.join( "</li><li>" );
doc += TQString::tqfromLatin1( "</li></ul>" );
doc += TQString::fromLatin1( "</li></ul>" );
}
doc += TQString::tqfromLatin1( "</body></html>" );
doc += TQString::fromLatin1( "</body></html>" );
write( doc );
end();
@ -2402,7 +2402,7 @@ void KHTMLPart::slotRedirect()
d->m_redirectURL = TQString();
// SYNC check with ecma/kjs_window.cpp::goURL !
if ( u.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 )
if ( u.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 )
{
TQString script = KURL::decode_string( u.right( u.length() - 11 ) );
kdDebug( 6050 ) << "KHTMLPart::slotRedirect script=" << script << endl;
@ -3731,7 +3731,7 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi
return;
}
if (url.find( TQString::tqfromLatin1( "javascript:" ),0, false ) == 0 ) {
if (url.find( TQString::fromLatin1( "javascript:" ),0, false ) == 0 ) {
TQString jscode = KURL::decode_string( url.mid( url.find( "javascript:", 0, false ) ) );
jscode = KStringHandler::rsqueeze( jscode, 80 ); // truncate if too long
if (url.startsWith("javascript:window.open"))
@ -3838,18 +3838,18 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi
extra = i18n(" (In other frame)");
}
if (u.protocol() == TQString::tqfromLatin1("mailto")) {
TQString mailtoMsg /* = TQString::tqfromLatin1("<img src=%1>").arg(locate("icon", TQString::tqfromLatin1("locolor/16x16/actions/mail_send.png")))*/;
if (u.protocol() == TQString::fromLatin1("mailto")) {
TQString mailtoMsg /* = TQString::fromLatin1("<img src=%1>").arg(locate("icon", TQString::fromLatin1("locolor/16x16/actions/mail_send.png")))*/;
mailtoMsg += i18n("Email to: ") + KURL::decode_string(u.path());
TQStringList queries = TQStringList::split('&', u.query().mid(1));
TQStringList::Iterator it = queries.begin();
const TQStringList::Iterator itEnd = queries.end();
for (; it != itEnd; ++it)
if ((*it).startsWith(TQString::tqfromLatin1("subject=")))
if ((*it).startsWith(TQString::fromLatin1("subject=")))
mailtoMsg += i18n(" - Subject: ") + KURL::decode_string((*it).mid(8));
else if ((*it).startsWith(TQString::tqfromLatin1("cc=")))
else if ((*it).startsWith(TQString::fromLatin1("cc=")))
mailtoMsg += i18n(" - CC: ") + KURL::decode_string((*it).mid(3));
else if ((*it).startsWith(TQString::tqfromLatin1("bcc=")))
else if ((*it).startsWith(TQString::fromLatin1("bcc=")))
mailtoMsg += i18n(" - BCC: ") + KURL::decode_string((*it).mid(4));
mailtoMsg = TQStyleSheet::escape(mailtoMsg);
mailtoMsg.replace(TQRegExp("([\n\r\t]|[ ]{10})"), TQString());
@ -3858,9 +3858,9 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi
}
// Is this check necessary at all? (Frerich)
#if 0
else if (u.protocol() == TQString::tqfromLatin1("http")) {
else if (u.protocol() == TQString::fromLatin1("http")) {
DOM::Node hrefNode = nodeUnderMouse().parentNode();
while (hrefNode.nodeName().string() != TQString::tqfromLatin1("A") && !hrefNode.isNull())
while (hrefNode.nodeName().string() != TQString::fromLatin1("A") && !hrefNode.isNull())
hrefNode = hrefNode.parentNode();
if (!hrefNode.isNull()) {
@ -3868,12 +3868,12 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi
if (!hreflangNode.isNull()) {
TQString countryCode = hreflangNode.nodeValue().string().lower();
// Map the language code to an appropriate country code.
if (countryCode == TQString::tqfromLatin1("en"))
countryCode = TQString::tqfromLatin1("gb");
TQString flagImg = TQString::tqfromLatin1("<img src=%1>").arg(
locate("locale", TQString::tqfromLatin1("l10n/")
if (countryCode == TQString::fromLatin1("en"))
countryCode = TQString::fromLatin1("gb");
TQString flagImg = TQString::fromLatin1("<img src=%1>").arg(
locate("locale", TQString::fromLatin1("l10n/")
+ countryCode
+ TQString::tqfromLatin1("/flag.png")));
+ TQString::fromLatin1("/flag.png")));
emit setStatusBarText(flagImg + u.prettyURL() + extra);
}
}
@ -3906,7 +3906,7 @@ bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, c
if ( !target.isEmpty() )
hasTarget = true;
if ( url.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 )
if ( url.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 )
{
crossFrameExecuteScript( target, KURL::decode_string( url.mid( 11 ) ) );
return false;
@ -4027,7 +4027,7 @@ void KHTMLPart::slotViewDocumentSource()
}
}
(void) KRun::runURL( url, TQString::tqfromLatin1("text/plain"), isTempFile );
(void) KRun::runURL( url, TQString::fromLatin1("text/plain"), isTempFile );
}
void KHTMLPart::slotViewPageInfo()
@ -4108,7 +4108,7 @@ void KHTMLPart::slotViewFrameSource()
}
}
(void) KRun::runURL( url, TQString::tqfromLatin1("text/plain"), isTempFile );
(void) KRun::runURL( url, TQString::fromLatin1("text/plain"), isTempFile );
}
KURL KHTMLPart::backgroundURL() const
@ -4276,7 +4276,7 @@ void KHTMLPart::updateActions()
{
TQObject *ext = KParts::BrowserExtension::childObject( frame );
if ( ext )
enablePrintFrame = ext->tqmetaObject()->slotNames().contains( "print()" );
enablePrintFrame = ext->metaObject()->slotNames().contains( "print()" );
}
d->m_paPrintFrame->setEnabled( enablePrintFrame );
@ -4319,7 +4319,7 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const TQString &url, con
(*it)->m_params = params;
// Support for <frame src="javascript:string">
if ( url.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 )
if ( url.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 )
{
if ( processObjectRequest(*it, KURL("about:blank"), TQString("text/html") ) ) {
KHTMLPart* p = static_cast<KHTMLPart*>(static_cast<KParts::ReadOnlyPart *>((*it)->m_part));
@ -4341,7 +4341,7 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const TQString &url, con
TQString KHTMLPart::requestFrameName()
{
return TQString::tqfromLatin1("<!--frame %1-->").arg(d->m_frameNameId++);
return TQString::fromLatin1("<!--frame %1-->").arg(d->m_frameNameId++);
}
bool KHTMLPart::requestObject( khtml::RenderPart *frame, const TQString &url, const TQString &serviceType,
@ -4408,7 +4408,7 @@ bool KHTMLPart::requestObject( khtml::ChildFrame *child, const KURL &url, const
// We want a KHTMLPart if the HTML says <frame src=""> or <frame src="about:blank">
if ((url.isEmpty() || url.url() == "about:blank") && args.serviceType.isEmpty())
args.serviceType = TQString::tqfromLatin1( "text/html" );
args.serviceType = TQString::fromLatin1( "text/html" );
if ( args.serviceType.isEmpty() ) {
kdDebug(6050) << "Running new KHTMLRun for " << this << " and child=" << child << endl;
@ -4650,7 +4650,7 @@ KParts::ReadOnlyPart *KHTMLPart::createPart( TQWidget *parentWidget, const char
{
TQString constr;
if ( !serviceName.isEmpty() )
constr.append( TQString::tqfromLatin1( "Name == '%1'" ).arg( serviceName ) );
constr.append( TQString::fromLatin1( "Name == '%1'" ).arg( serviceName ) );
KTrader::OfferList offers = KTrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, TQString() );
@ -4701,7 +4701,7 @@ KParts::PartManager *KHTMLPart::partManager()
{
if ( !d->m_manager && d->m_view )
{
d->m_manager = new KParts::PartManager( d->m_view->tqtopLevelWidget(), this, "khtml part manager" );
d->m_manager = new KParts::PartManager( d->m_view->topLevelWidget(), this, "khtml part manager" );
d->m_manager->setAllowNestedParts( true );
connect( d->m_manager, TQT_SIGNAL( activePartChanged( KParts::Part * ) ),
this, TQT_SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
@ -4777,7 +4777,7 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt
"WarnOnUnencryptedForm");
// Move this setting into KSSL instead
KConfig *config = kapp->config();
TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages");
TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
KConfigGroupSaver saver( config, grpNotifMsgs );
if (!config->readBoolEntry("WarnOnUnencryptedForm", true)) {
@ -4811,7 +4811,7 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt
TQString urlstring = u.url();
if ( urlstring.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) {
if ( urlstring.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
urlstring = KURL::decode_string(urlstring);
crossFrameExecuteScript( _target, urlstring.right( urlstring.length() - 11) );
return;
@ -4873,18 +4873,18 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt
TQString bodyEnc;
if (contentType.lower() == "multipart/form-data") {
// FIXME: is this correct? I suspect not
bodyEnc = KURL::encode_string(TQString::tqfromLatin1(formData.data(),
bodyEnc = KURL::encode_string(TQString::fromLatin1(formData.data(),
formData.size()));
} else if (contentType.lower() == "text/plain") {
// Convention seems to be to decode, and s/&/\n/
TQString tmpbody = TQString::tqfromLatin1(formData.data(),
TQString tmpbody = TQString::fromLatin1(formData.data(),
formData.size());
tmpbody.replace(TQRegExp("[&]"), "\n");
tmpbody.replace(TQRegExp("[+]"), " ");
tmpbody = KURL::decode_string(tmpbody); // Decode the rest of it
bodyEnc = KURL::encode_string(tmpbody); // Recode for the URL
} else {
bodyEnc = KURL::encode_string(TQString::tqfromLatin1(formData.data(),
bodyEnc = KURL::encode_string(TQString::fromLatin1(formData.data(),
formData.size()));
}
@ -4895,7 +4895,7 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt
if ( strcmp( action, "get" ) == 0 ) {
if (u.protocol() != "mailto")
u.setQuery( TQString::tqfromLatin1( formData.data(), formData.size() ) );
u.setQuery( TQString::fromLatin1( formData.data(), formData.size() ) );
args.setDoPost( false );
}
else {
@ -4975,7 +4975,7 @@ void KHTMLPart::popupMenu( const TQString &linkUrl )
KHTMLPopupGUIClient* client = new KHTMLPopupGUIClient( this, d->m_popupMenuXML, linkKURL );
TQGuardedPtr<TQObject> guard( client );
TQString mimetype = TQString::tqfromLatin1( "text/html" );
TQString mimetype = TQString::fromLatin1( "text/html" );
args.metaData()["referrer"] = referrer;
if (!linkUrl.isEmpty()) // over a link
@ -5095,7 +5095,7 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg
// TODO: handle child target correctly! currently the script are always executed fur the parent
TQString urlStr = url.url();
if ( urlStr.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) {
if ( urlStr.find( TQString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
TQString script = KURL::decode_string( urlStr.right( urlStr.length() - 11 ) );
executeScript( DOM::Node(), script );
return;
@ -5103,17 +5103,17 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg
TQString frameName = args.frameName.lower();
if ( !frameName.isEmpty() ) {
if ( frameName == TQString::tqfromLatin1( "_top" ) )
if ( frameName == TQString::fromLatin1( "_top" ) )
{
emit d->m_extension->openURLRequest( url, args );
return;
}
else if ( frameName == TQString::tqfromLatin1( "_blank" ) )
else if ( frameName == TQString::fromLatin1( "_blank" ) )
{
emit d->m_extension->createNewWindow( url, args );
return;
}
else if ( frameName == TQString::tqfromLatin1( "_parent" ) )
else if ( frameName == TQString::fromLatin1( "_parent" ) )
{
KParts::URLArgs newArgs( args );
newArgs.frameName = TQString();
@ -5121,7 +5121,7 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg
emit d->m_extension->openURLRequest( url, newArgs );
return;
}
else if ( frameName != TQString::tqfromLatin1( "_self" ) )
else if ( frameName != TQString::fromLatin1( "_self" ) )
{
khtml::ChildFrame *_frame = recursiveFrameRequest( callingHtmlPart, url, args );
@ -6658,7 +6658,7 @@ void KHTMLPart::slotPrintFrame()
if ( !ext )
return;
TQMetaObject *mo = ext->tqmetaObject();
TQMetaObject *mo = ext->metaObject();
int idx = mo->findSlot( "print()", true );
if ( idx >= 0 ) {
@ -7157,7 +7157,7 @@ void KHTMLPart::openWallet(DOM::HTMLFormElementImpl *form)
}
if (!d->m_wq) {
KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->tqtopLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous);
KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->topLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous);
d->m_wq = new KHTMLWalletQueue(this);
d->m_wq->wallet = wallet;
connect(wallet, TQT_SIGNAL(walletOpened(bool)), d->m_wq, TQT_SLOT(walletOpened(bool)));
@ -7199,7 +7199,7 @@ void KHTMLPart::saveToWallet(const TQString& key, const TQMap<TQString,TQString>
}
if (!d->m_wq) {
KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->tqtopLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous);
KWallet::Wallet *wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), widget() ? widget()->topLevelWidget()->winId() : 0, KWallet::Wallet::Asynchronous);
d->m_wq = new KHTMLWalletQueue(this);
d->m_wq->wallet = wallet;
connect(wallet, TQT_SIGNAL(walletOpened(bool)), d->m_wq, TQT_SLOT(walletOpened(bool)));

@ -30,7 +30,7 @@
KHTMLRun::KHTMLRun( KHTMLPart *part, khtml::ChildFrame *child, const KURL &url,
const KParts::URLArgs &args, bool hideErrorDialog )
: KParts::BrowserRun( url, args, part, part->widget() ? part->widget()->tqtopLevelWidget() : 0,
: KParts::BrowserRun( url, args, part, part->widget() ? part->widget()->topLevelWidget() : 0,
false, false, hideErrorDialog ),
m_child( child )
{

@ -138,9 +138,9 @@ KHTMLSettings::KJavaScriptAdvice KHTMLSettings::strToAdvice(const TQString& _str
if (!_str)
ret = KJavaScriptDunno;
if (_str.lower() == TQString::tqfromLatin1("accept"))
if (_str.lower() == TQString::fromLatin1("accept"))
ret = KJavaScriptAccept;
else if (_str.lower() == TQString::tqfromLatin1("reject"))
else if (_str.lower() == TQString::fromLatin1("reject"))
ret = KJavaScriptReject;
return ret;
@ -189,63 +189,63 @@ void KHTMLSettings::splitDomainAdvice(const TQString& configStr, TQString &domai
void KHTMLSettings::readDomainSettings(KConfig *config, bool reset,
bool global, KPerDomainSettings &pd_settings) {
TQString jsPrefix = global ? TQString::null
: TQString::tqfromLatin1("javascript.");
: TQString::fromLatin1("javascript.");
TQString javaPrefix = global ? TQString::null
: TQString::tqfromLatin1("java.");
: TQString::fromLatin1("java.");
TQString pluginsPrefix = global ? TQString::null
: TQString::tqfromLatin1("plugins.");
: TQString::fromLatin1("plugins.");
// The setting for Java
TQString key = javaPrefix + TQString::tqfromLatin1("EnableJava");
TQString key = javaPrefix + TQString::fromLatin1("EnableJava");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_bEnableJava = config->readBoolEntry( key, false );
else if ( !global )
pd_settings.m_bEnableJava = d->global.m_bEnableJava;
// The setting for Plugins
key = pluginsPrefix + TQString::tqfromLatin1("EnablePlugins");
key = pluginsPrefix + TQString::fromLatin1("EnablePlugins");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_bEnablePlugins = config->readBoolEntry( key, true );
else if ( !global )
pd_settings.m_bEnablePlugins = d->global.m_bEnablePlugins;
// The setting for JavaScript
key = jsPrefix + TQString::tqfromLatin1("EnableJavaScript");
key = jsPrefix + TQString::fromLatin1("EnableJavaScript");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_bEnableJavaScript = config->readBoolEntry( key, true );
else if ( !global )
pd_settings.m_bEnableJavaScript = d->global.m_bEnableJavaScript;
// window property policies
key = jsPrefix + TQString::tqfromLatin1("WindowOpenPolicy");
key = jsPrefix + TQString::fromLatin1("WindowOpenPolicy");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_windowOpenPolicy = (KJSWindowOpenPolicy)
config->readUnsignedNumEntry( key, KJSWindowOpenSmart );
else if ( !global )
pd_settings.m_windowOpenPolicy = d->global.m_windowOpenPolicy;
key = jsPrefix + TQString::tqfromLatin1("WindowMovePolicy");
key = jsPrefix + TQString::fromLatin1("WindowMovePolicy");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_windowMovePolicy = (KJSWindowMovePolicy)
config->readUnsignedNumEntry( key, KJSWindowMoveAllow );
else if ( !global )
pd_settings.m_windowMovePolicy = d->global.m_windowMovePolicy;
key = jsPrefix + TQString::tqfromLatin1("WindowResizePolicy");
key = jsPrefix + TQString::fromLatin1("WindowResizePolicy");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_windowResizePolicy = (KJSWindowResizePolicy)
config->readUnsignedNumEntry( key, KJSWindowResizeAllow );
else if ( !global )
pd_settings.m_windowResizePolicy = d->global.m_windowResizePolicy;
key = jsPrefix + TQString::tqfromLatin1("WindowStatusPolicy");
key = jsPrefix + TQString::fromLatin1("WindowStatusPolicy");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_windowStatusPolicy = (KJSWindowStatusPolicy)
config->readUnsignedNumEntry( key, KJSWindowStatusAllow );
else if ( !global )
pd_settings.m_windowStatusPolicy = d->global.m_windowStatusPolicy;
key = jsPrefix + TQString::tqfromLatin1("WindowFocusPolicy");
key = jsPrefix + TQString::fromLatin1("WindowFocusPolicy");
if ( (global && reset) || config->hasKey( key ) )
pd_settings.m_windowFocusPolicy = (KJSWindowFocusPolicy)
config->readUnsignedNumEntry( key, KJSWindowFocusAllow );
@ -611,7 +611,7 @@ void KHTMLSettings::init( KConfig * config, bool reset )
{
TQCString javaPolicy = adviceToStr( it.data() );
TQCString javaScriptPolicy = adviceToStr( KJavaScriptDunno );
domainConfig.append(TQString::tqfromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy));
domainConfig.append(TQString::fromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy));
}
config->writeEntry( "JavaDomainSettings", domainConfig );
}
@ -624,7 +624,7 @@ void KHTMLSettings::init( KConfig * config, bool reset )
{
TQCString javaPolicy = adviceToStr( KJavaScriptDunno );
TQCString javaScriptPolicy = adviceToStr( it.data() );
domainConfig.append(TQString::tqfromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy));
domainConfig.append(TQString::fromLatin1("%1:%2:%3").arg(it.key()).arg(javaPolicy).arg(javaScriptPolicy));
}
config->writeEntry( "ECMADomainSettings", domainConfig );
}

@ -2721,7 +2721,7 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const
TQString url = (*it).url;
it = data.remove( it );
// assign the same accesskey also to other elements pointing to the same url
if( !url.isEmpty() && !url.tqstartsWith( "javascript:", false )) {
if( !url.isEmpty() && !url.startsWith( "javascript:", false )) {
for( TQValueList< AccessKeyData >::Iterator it2 = data.begin();
it2 != data.end();
) {

@ -234,7 +234,7 @@ void KMultiPart::slotData( KIO::Job *job, const TQByteArray &data )
}
else if ( !qstrnicmp( line.data(), "Content-Encoding:", 17 ) )
{
TQString encoding = TQString::tqfromLatin1(line.data()+17).stripWhiteSpace().lower();
TQString encoding = TQString::fromLatin1(line.data()+17).stripWhiteSpace().lower();
if (encoding == "gzip" || encoding == "x-gzip") {
m_gzip = true;
} else {
@ -245,7 +245,7 @@ void KMultiPart::slotData( KIO::Job *job, const TQByteArray &data )
else if ( !qstrnicmp( line.data(), "Content-Type:", 13 ) )
{
Q_ASSERT( m_nextMimeType.isNull() );
m_nextMimeType = TQString::tqfromLatin1( line.data() + 14 ).stripWhiteSpace();
m_nextMimeType = TQString::fromLatin1( line.data() + 14 ).stripWhiteSpace();
int semicolon = m_nextMimeType.find( ';' );
if ( semicolon != -1 )
m_nextMimeType = m_nextMimeType.left( semicolon );

@ -213,7 +213,7 @@ CachedCSSStyleSheet::CachedCSSStyleSheet(DocLoader* dl, const DOMString &url, KI
: CachedObject(url, CSSStyleSheet, _cachePolicy, 0)
{
// Set the type we want (probably css or xml)
TQString ah = TQString::tqfromLatin1( accept );
TQString ah = TQString::fromLatin1( accept );
if ( !ah.isEmpty() )
ah += ",";
ah += "*/*;q=0.1";
@ -327,7 +327,7 @@ CachedScript::CachedScript(DocLoader* dl, const DOMString &url, KIO::CacheContro
// It's javascript we want.
// But some websites think their scripts are <some wrong mimetype here>
// and refuse to serve them if we only accept application/x-javascript.
setAccept( TQString::tqfromLatin1("*/*") );
setAccept( TQString::fromLatin1("*/*") );
// load the file
Cache::loader()->load(dl, this, false);
m_loading = true;
@ -787,7 +787,7 @@ void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimati
delete p;
p = new TQPixmap(m->framePixmap());
m->disconnectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) ));
m->disconnectqStatus( this, TQT_SLOT( movieStatus( int ) ));
m->disconnecStatus( this, TQT_SLOT( movieStatus( int ) ));
m->disconnectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) );
TQTimer::singleShot(0, this, TQT_SLOT( deleteMovie()));
imgSource = 0;
@ -850,7 +850,7 @@ void CachedImage::data ( TQBuffer &_buffer, bool eof )
imgSource = new ImageSource( _buffer.buffer());
m = new TQMovie( imgSource, 8192 );
m->connectUpdate( this, TQT_SLOT( movieUpdated( const TQRect &) ));
m->connectqStatus( this, TQT_SLOT( movieStatus(int)));
m->connecStatus( this, TQT_SLOT( movieStatus(int)));
m->connectResize( this, TQT_SLOT( movieResize( const TQSize& ) ) );
}
}
@ -1167,7 +1167,7 @@ void Loader::servePendingRequests()
{
job->addMetaData( "cross-domain", part->toplevelURL().url() );
if (part->widget())
job->setWindow (part->widget()->tqtopLevelWidget());
job->setWindow (part->widget()->topLevelWidget());
}
}

@ -138,7 +138,7 @@ TQString toHebrew( int number ) {
TQString letter;
if (number < 1) return TQString::number(number);
if (number>999) {
letter = toHebrew(number/1000) + TQString::tqfromLatin1("'");
letter = toHebrew(number/1000) + TQString::fromLatin1("'");
number = number%1000;
}

@ -407,7 +407,7 @@ bool Font::isFontScalable(TQFontDatabase& db, const TQFont& font)
/* Cache size info */
if (!scalSizesCache)
scalSizesCache = new TQMap<ScalKey, TQValueList<int> >;
(*scalSizesCache)[key] = db.tqsmoothSizes(font.family(), db.styleString(font));
(*scalSizesCache)[key] = db.smoothSizes(font.family(), db.styleString(font));
}
}

@ -123,22 +123,22 @@ void RenderApplet::processArguments(const TQMap<TQString, TQString> &args)
KJavaApplet* applet = w ? w->applet() : 0;
if ( applet ) {
applet->setBaseURL( args[TQString::tqfromLatin1("baseURL") ] );
applet->setAppletClass( args[TQString::tqfromLatin1("code") ] );
applet->setBaseURL( args[TQString::fromLatin1("baseURL") ] );
applet->setAppletClass( args[TQString::fromLatin1("code") ] );
TQString str = args[TQString::tqfromLatin1("codeBase") ];
TQString str = args[TQString::fromLatin1("codeBase") ];
if( !str.isEmpty() )
applet->setCodeBase( str );
str = args[TQString::tqfromLatin1("name") ];
str = args[TQString::fromLatin1("name") ];
if( !str.isNull() )
applet->setAppletName( str );
else
applet->setAppletName( args[TQString::tqfromLatin1("code") ] );
applet->setAppletName( args[TQString::fromLatin1("code") ] );
str = args[TQString::tqfromLatin1("archive") ];
str = args[TQString::fromLatin1("archive") ];
if( !str.isEmpty() )
applet->setArchives( args[TQString::tqfromLatin1("archive") ] );
applet->setArchives( args[TQString::fromLatin1("archive") ] );
}
}

@ -155,8 +155,8 @@ void RenderCheckBox::calcMinMaxWidth()
KHTMLAssert( !minMaxKnown() );
TQCheckBox *cb = static_cast<TQCheckBox *>( m_widget );
TQSize s( cb->tqstyle().tqpixelMetric( TQStyle::PM_IndicatorWidth ),
cb->tqstyle().tqpixelMetric( TQStyle::PM_IndicatorHeight ) );
TQSize s( cb->tqstyle().pixelMetric( TQStyle::PM_IndicatorWidth ),
cb->tqstyle().pixelMetric( TQStyle::PM_IndicatorHeight ) );
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@ -207,8 +207,8 @@ void RenderRadioButton::calcMinMaxWidth()
KHTMLAssert( !minMaxKnown() );
TQRadioButton *rb = static_cast<TQRadioButton *>( m_widget );
TQSize s( rb->tqstyle().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ),
rb->tqstyle().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) );
TQSize s( rb->tqstyle().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ),
rb->tqstyle().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) );
setIntrinsicWidth( s.width() );
setIntrinsicHeight( s.height() );
@ -260,17 +260,17 @@ void RenderSubmitButton::calcMinMaxWidth()
bool empty = raw.isEmpty();
if ( empty )
raw = TQString::tqfromLatin1("X");
raw = TQString::fromLatin1("X");
TQFontMetrics fm = pb->fontMetrics();
TQSize ts = fm.size( ShowPrefix, raw);
TQSize s(pb->tqstyle().tqsizeFromContents( TQStyle::CT_PushButton, pb, ts )
.expandedTo(TQApplication::globalStrut()));
int margin = pb->tqstyle().tqpixelMetric( TQStyle::PM_ButtonMargin, pb) +
pb->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2;
int margin = pb->tqstyle().pixelMetric( TQStyle::PM_ButtonMargin, pb) +
pb->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2;
int w = ts.width() + margin;
int h = s.height();
if (pb->isDefault() || pb->autoDefault()) {
int dbw = pb->tqstyle().tqpixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2;
int dbw = pb->tqstyle().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2;
w += dbw;
}
@ -1018,7 +1018,7 @@ void RenderSelect::updateFromElement()
DOMString label = optElem->getAttribute(ATTR_LABEL);
if (!label.isEmpty())
text = label.string();
text = TQString::tqfromLatin1(" ")+text;
text = TQString::fromLatin1(" ")+text;
}
if(m_useListBox) {
@ -1406,7 +1406,7 @@ void TextAreaWidget::slotReplaceNext()
}
if (!(m_replace->options() & KReplaceDialog::PromptOnReplace)) {
viewport()->tqsetUpdatesEnabled(false);
viewport()->setUpdatesEnabled(false);
}
KFind::Result res = KFind::NoMatch;
@ -1449,7 +1449,7 @@ void TextAreaWidget::slotReplaceNext()
}
if (!(m_replace->options() & KReplaceDialog::PromptOnReplace)) {
viewport()->tqsetUpdatesEnabled(true);
viewport()->setUpdatesEnabled(true);
repaintChanged();
}
@ -1738,13 +1738,13 @@ TQString RenderTextArea::text()
paragraphText = paragraphText.left(pl); //Snip invented space.
for (int l = 0; l < pl; ++l) {
if (lindex != w->lineOfChar(p, l)) {
paragraphText.insert(l+ll++, TQString::tqfromLatin1("\n"));
paragraphText.insert(l+ll++, TQString::fromLatin1("\n"));
lindex = w->lineOfChar(p, l);
}
}
txt += paragraphText;
if (p < w->paragraphs() - 1)
txt += TQString::tqfromLatin1("\n");
txt += TQString::fromLatin1("\n");
}
}
else

@ -728,16 +728,16 @@ void RenderPartObject::updateWidget()
HTMLParamElementImpl *p = static_cast<HTMLParamElementImpl *>( child );
TQString aStr = p->name();
aStr += TQString::tqfromLatin1("=\"");
aStr += TQString::fromLatin1("=\"");
aStr += p->value();
aStr += TQString::tqfromLatin1("\"");
aStr += TQString::fromLatin1("\"");
TQString name_lower = p->name().lower();
if (name_lower == TQString::tqfromLatin1("type") && objbase->id() != ID_APPLET) {
if (name_lower == TQString::fromLatin1("type") && objbase->id() != ID_APPLET) {
objbase->setServiceType(p->value());
} else if (url.isEmpty() &&
(name_lower == TQString::tqfromLatin1("src") ||
name_lower == TQString::tqfromLatin1("movie") ||
name_lower == TQString::tqfromLatin1("code"))) {
(name_lower == TQString::fromLatin1("src") ||
name_lower == TQString::fromLatin1("movie") ||
name_lower == TQString::fromLatin1("code"))) {
url = p->value();
}
params.append(aStr);
@ -754,8 +754,8 @@ void RenderPartObject::updateWidget()
}
}
}
params.append( TQString::tqfromLatin1("__KHTML__PLUGINEMBED=\"YES\"") );
params.append( TQString::tqfromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url()));
params.append( TQString::fromLatin1("__KHTML__PLUGINEMBED=\"YES\"") );
params.append( TQString::fromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url()));
HTMLEmbedElementImpl *embed = 0;
TQString classId;
@ -775,18 +775,18 @@ void RenderPartObject::updateWidget()
}
classId = objbase->classId;
params.append( TQString::tqfromLatin1("__KHTML__CLASSID=\"%1\"").arg( classId ) );
params.append( TQString::tqfromLatin1("__KHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) );
params.append( TQString::fromLatin1("__KHTML__CLASSID=\"%1\"").arg( classId ) );
params.append( TQString::fromLatin1("__KHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) );
if (!objbase->getAttribute(ATTR_WIDTH).isEmpty())
params.append( TQString::tqfromLatin1("WIDTH=\"%1\"").arg( objbase->getAttribute(ATTR_WIDTH).string() ) );
params.append( TQString::fromLatin1("WIDTH=\"%1\"").arg( objbase->getAttribute(ATTR_WIDTH).string() ) );
else if (embed && !embed->getAttribute(ATTR_WIDTH).isEmpty()) {
params.append( TQString::tqfromLatin1("WIDTH=\"%1\"").arg( embed->getAttribute(ATTR_WIDTH).string() ) );
params.append( TQString::fromLatin1("WIDTH=\"%1\"").arg( embed->getAttribute(ATTR_WIDTH).string() ) );
objbase->setAttribute(ATTR_WIDTH, embed->getAttribute(ATTR_WIDTH));
}
if (!objbase->getAttribute(ATTR_HEIGHT).isEmpty())
params.append( TQString::tqfromLatin1("HEIGHT=\"%1\"").arg( objbase->getAttribute(ATTR_HEIGHT).string() ) );
params.append( TQString::fromLatin1("HEIGHT=\"%1\"").arg( objbase->getAttribute(ATTR_HEIGHT).string() ) );
else if (embed && !embed->getAttribute(ATTR_HEIGHT).isEmpty()) {
params.append( TQString::tqfromLatin1("HEIGHT=\"%1\"").arg( embed->getAttribute(ATTR_HEIGHT).string() ) );
params.append( TQString::fromLatin1("HEIGHT=\"%1\"").arg( embed->getAttribute(ATTR_HEIGHT).string() ) );
objbase->setAttribute(ATTR_HEIGHT, embed->getAttribute(ATTR_HEIGHT));
}
@ -808,7 +808,7 @@ void RenderPartObject::updateWidget()
serviceType = "application/x-activex-handler";
#endif
if(classId.find(TQString::tqfromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000")) >= 0) {
if(classId.find(TQString::fromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000")) >= 0) {
// It is ActiveX, but the nsplugin system handling
// should also work, that's why we don't override the
// serviceType with application/x-activex-handler
@ -817,17 +817,17 @@ void RenderPartObject::updateWidget()
// with nspluginviewer (Niko)
serviceType = "application/x-shockwave-flash";
}
else if(classId.find(TQString::tqfromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")) >= 0)
else if(classId.find(TQString::fromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")) >= 0)
serviceType = "audio/x-pn-realaudio-plugin";
else if(classId.find(TQString::tqfromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) >= 0 ||
objbase->classId.find(TQString::tqfromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")) >= 0)
else if(classId.find(TQString::fromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) >= 0 ||
objbase->classId.find(TQString::fromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")) >= 0)
serviceType = "application/x-java-applet";
// http://www.apple.com/quicktime/tools_tips/tutorials/activex.html
else if(classId.find(TQString::tqfromLatin1("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B")) >= 0)
else if(classId.find(TQString::fromLatin1("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B")) >= 0)
serviceType = "video/quicktime";
// http://msdn.microsoft.com/library/en-us/dnwmt/html/adding_windows_media_to_web_pages__etse.asp?frame=true
else if(objbase->classId.find(TQString::tqfromLatin1("6BF52A52-394A-11d3-B153-00C04F79FAA6")) >= 0 ||
classId.find(TQString::tqfromLatin1("22D6f312-B0F6-11D0-94AB-0080C74C7E95")) >= 0)
else if(objbase->classId.find(TQString::fromLatin1("6BF52A52-394A-11d3-B153-00C04F79FAA6")) >= 0 ||
classId.find(TQString::fromLatin1("22D6f312-B0F6-11D0-94AB-0080C74C7E95")) >= 0)
serviceType = "video/x-msvideo";
else

@ -379,7 +379,7 @@ void RenderGlyph::paint(PaintInfo& paintInfo, int _tx, int _ty)
diamond[2] = TQPoint(x+s, y+2*s);
diamond[3] = TQPoint(x, y+s);
p->setBrush( color );
p->tqdrawConvexPolygon( diamond, 0, 4 );
p->drawConvexPolygon( diamond, 0, 4 );
return;
}
case LNONE:

@ -637,7 +637,7 @@ int RenderLayer::verticalScrollbarWidth()
#ifdef APPLE_CHANGES
return m_vBar->width();
#else
return m_vBar->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
return m_vBar->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent);
#endif
}
@ -650,7 +650,7 @@ int RenderLayer::horizontalScrollbarHeight()
#ifdef APPLE_CHANGES
return m_hBar->height();
#else
return m_hBar->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
return m_hBar->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent);
#endif
}
@ -691,7 +691,7 @@ void RenderLayer::positionScrollbars(const TQRect& absBounds)
TQScrollBar *b = m_hBar;
if (!m_hBar)
b = m_vBar;
int sw = b->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent);
int sw = b->tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent);
if (m_vBar) {
TQRect vBarRect = TQRect(tx + w - sw + 1, ty, sw, h - (m_hBar ? sw : 0) + 1);

@ -333,7 +333,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
diamond[2] = TQPoint(x+s, y+2*s);
diamond[3] = TQPoint(x, y+s);
p->setBrush( color );
p->tqdrawConvexPolygon( diamond, 0, 4 );
p->drawConvexPolygon( diamond, 0, 4 );
return;
}
case LNONE:
@ -344,21 +344,21 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
if( style()->direction() == LTR) {
p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item);
p->drawText(_tx + fm.width(m_item), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip,
TQString::tqfromLatin1(". "));
TQString::fromLatin1(". "));
}
else {
const TQString& punct(TQString::tqfromLatin1(" ."));
const TQString& punct(TQString::fromLatin1(" ."));
p->drawText(_tx, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, punct);
p->drawText(_tx + fm.width(punct), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item);
}
} else {
if (style()->direction() == LTR) {
const TQString& punct(TQString::tqfromLatin1(". "));
const TQString& punct(TQString::fromLatin1(". "));
p->drawText(_tx-offset/2, _ty, 0, 0, Qt::AlignRight|TQt::DontClip, punct);
p->drawText(_tx-offset/2-fm.width(punct), _ty, 0, 0, Qt::AlignRight|TQt::DontClip, m_item);
}
else {
const TQString& punct(TQString::tqfromLatin1(" ."));
const TQString& punct(TQString::fromLatin1(" ."));
p->drawText(_tx+offset/2, _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, punct);
p->drawText(_tx+offset/2+fm.width(punct), _ty, 0, 0, Qt::AlignLeft|TQt::DontClip, m_item);
}
@ -543,7 +543,7 @@ void RenderListMarker::calcMinMaxWidth()
default:
KHTMLAssert(false);
}
m_markerWidth = fm.width(m_item) + fm.width(TQString::tqfromLatin1(". "));
m_markerWidth = fm.width(m_item) + fm.width(TQString::fromLatin1(". "));
}
end:

@ -1164,15 +1164,15 @@ TQString RenderObject::information() const
<< " mB: " << marginBottom() << " qB: " << isBottomMarginQuirk()
<< "}"
<< (isTableCell() ?
( TQString::tqfromLatin1(" [r=") +
( TQString::fromLatin1(" [r=") +
TQString::number( static_cast<const RenderTableCell *>(this)->row() ) +
TQString::tqfromLatin1(" c=") +
TQString::fromLatin1(" c=") +
TQString::number( static_cast<const RenderTableCell *>(this)->col() ) +
TQString::tqfromLatin1(" rs=") +
TQString::fromLatin1(" rs=") +
TQString::number( static_cast<const RenderTableCell *>(this)->rowSpan() ) +
TQString::tqfromLatin1(" cs=") +
TQString::fromLatin1(" cs=") +
TQString::number( static_cast<const RenderTableCell *>(this)->colSpan() ) +
TQString::tqfromLatin1("]") ) : TQString::null );
TQString::fromLatin1("]") ) : TQString::null );
if ( layer() )
ts << " layer=" << layer();
if ( continuation() )

@ -558,7 +558,7 @@ static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx,
if ( external ) {
// even hackier!
TQPainter pt( pm );
const TQColor c = widget->tqcolorGroup().base();
const TQColor c = widget->colorGroup().base();
for (int i = 0; i < cnt; ++i)
pt.fillRect( br[i], c );
} else {
@ -672,7 +672,7 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e)
// don't allow the widget to react to wheel event unless its
// currently focused. this avoids accidentally changing a select box
// or something while wheeling a webpage.
if (tqApp->tqfocusWidget() != widget() &&
if (tqApp->focusWidget() != widget() &&
widget()->focusPolicy() <= TQ_StrongFocus) {
TQT_TQWHEELEVENT(e)->ignore();
TQApplication::sendEvent(view(), e);

@ -943,7 +943,7 @@ TQString RegressionTest::getPartOutput( OutputType type)
getPartDOMOutput( outputStream, m_part, 0 );
}
dump.replace( m_baseDir + "/tests", TQString::tqfromLatin1( "REGRESSION_SRCDIR" ) );
dump.replace( m_baseDir + "/tests", TQString::fromLatin1( "REGRESSION_SRCDIR" ) );
return dump;
}
@ -1138,7 +1138,7 @@ void RegressionTest::doFailureReport( const TQString& test, int failures )
if ( failures & RenderFailure ) {
renderDiff += "<pre>";
FILE *pipe = popen( TQString::tqfromLatin1( "diff -u baseline/%1-render %3/%2-render" )
FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-render %3/%2-render" )
.arg ( test, test, relOutputDir ).latin1(), "r" );
TQTextIStream *is = new TQTextIStream( pipe );
for ( int line = 0; line < 100 && !is->eof(); ++line ) {
@ -1154,7 +1154,7 @@ void RegressionTest::doFailureReport( const TQString& test, int failures )
if ( failures & DomFailure ) {
domDiff += "<pre>";
FILE *pipe = popen( TQString::tqfromLatin1( "diff -u baseline/%1-dom %3/%2-dom" )
FILE *pipe = popen( TQString::fromLatin1( "diff -u baseline/%1-dom %3/%2-dom" )
.arg ( test, test, relOutputDir ).latin1(), "r" );
TQTextIStream *is = new TQTextIStream( pipe );
for ( int line = 0; line < 100 && !is->eof(); ++line ) {

@ -98,7 +98,7 @@ QFakeFontEngine::QFakeFontEngine( XFontStruct *fs, const char *name, int size )
: QFontEngineXLFD( fs, name, 0)
{
pixS = size;
ahem = TQString::tqfromLatin1(name).contains("ahem");
ahem = TQString::fromLatin1(name).contains("ahem");
}
QFakeFontEngine::~QFakeFontEngine()

@ -123,7 +123,7 @@ int main(int argc, char *argv[])
doc->setURLCursor(TQCursor(Qt::PointingHandCursor));
a.setTopWidget(doc->widget());
TQWidget::connect(doc, TQT_SIGNAL(setWindowCaption(const TQString &)),
doc->widget()->tqtopLevelWidget(), TQT_SLOT(setCaption(const TQString &)));
doc->widget()->topLevelWidget(), TQT_SLOT(setCaption(const TQString &)));
doc->widget()->show();
toplevel->show();
((TQScrollView *)doc->widget())->viewport()->show();
@ -142,7 +142,7 @@ void Dummy::doBenchmark()
results.clear();
TQString directory = KFileDialog::getExistingDirectory(settings.readPathEntry("path"), m_part->view(),
TQString::tqfromLatin1("Please select directory with tests"));
TQString::fromLatin1("Please select directory with tests"));
if (!directory.isEmpty()) {
settings.writePathEntry("path", directory);
@ -184,14 +184,14 @@ void Dummy::nextRun()
for (int pos = 0; pos < timings.size(); ++pos) {
int t = timings[pos];
if (pos < COLD_RUNS)
m_part->write(TQString::tqfromLatin1("<td>(Cold):") + TQString::number(t) + "</td>");
m_part->write(TQString::fromLatin1("<td>(Cold):") + TQString::number(t) + "</td>");
else {
total += t;
m_part->write(TQString::tqfromLatin1("<td><i>") + TQString::number(t) + "</i></td>");
m_part->write(TQString::fromLatin1("<td><i>") + TQString::number(t) + "</i></td>");
}
}
m_part->write(TQString::tqfromLatin1("<td>Average:<b>") + TQString::number(double(total) / HOT_RUNS) + "</b></td>");
m_part->write(TQString::fromLatin1("<td>Average:<b>") + TQString::number(double(total) / HOT_RUNS) + "</b></td>");
m_part->write("</tr>");
}

@ -48,7 +48,7 @@ EventImpl::EventImpl()
m_currentTarget = 0;
m_eventPhase = 0;
m_target = 0;
m_createTime = TQDateTime::tqcurrentDateTime();
m_createTime = TQDateTime::currentDateTime();
m_defaultHandled = false;
}
@ -67,7 +67,7 @@ EventImpl::EventImpl(EventId _id, bool canBubbleArg, bool cancelableArg)
m_currentTarget = 0;
m_eventPhase = 0;
m_target = 0;
m_createTime = TQDateTime::tqcurrentDateTime();
m_createTime = TQDateTime::currentDateTime();
m_defaultHandled = false;
}
@ -739,7 +739,7 @@ DOMString KeyboardEventImpl::keyIdentifier() const
{
if (unsigned special = virtKeyVal())
if (const char* id = keyIdentifiersToVirtKeys()->toLeft(special))
return TQString::tqfromLatin1(id);
return TQString::fromLatin1(id);
if (unsigned tqunicode = keyVal())
return TQString(TQChar(tqunicode));

@ -1387,7 +1387,7 @@ void DocumentImpl::write( const TQString &text )
if (m_view)
m_view->part()->resetFromScript();
m_tokenizer->setAutoClose();
write(TQString::tqfromLatin1("<html>"));
write(TQString::fromLatin1("<html>"));
}
m_tokenizer->write(text, false);
}

@ -964,7 +964,7 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io )
if( fourcc != FOURCC_DDS ) {
kdDebug(399) << "This is not a DDS file." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -976,7 +976,7 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io )
if( s.atEnd() || !IsValid( header ) ) {
kdDebug(399) << "This DDS file is not valid." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -984,7 +984,7 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io )
if( !IsSupported( header ) ) {
kdDebug(399) << "This DDS file is not supported." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -1002,12 +1002,12 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io )
if( result == false ) {
kdDebug(399) << "Error loading DDS file." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
io->setImage( img );
io->setqStatus( 0 );
io->seStatus( 0 );
}

@ -234,7 +234,7 @@ KDE_EXPORT void kimgio_eps_read (TQImageIO *image)
TQImage myimage;
if( myimage.load (tmpFile.name()) ) {
image->setImage (myimage);
image->setqStatus (0);
image->seStatus (0);
kdDebug(399) << "kimgio EPS: success!" << endl;
}
else
@ -290,5 +290,5 @@ KDE_EXPORT void kimgio_eps_write( TQImageIO *imageio )
inFile.close();
imageio->setqStatus(0);
imageio->seStatus(0);
}

@ -148,7 +148,7 @@ KDE_EXPORT void kimgio_exr_read( TQImageIO *io )
}
io->setImage( image );
io->setqStatus( 0 );
io->seStatus( 0 );
}
catch (const std::exception &exc)
{

@ -225,7 +225,7 @@ KDE_EXPORT void kimgio_hdr_read( TQImageIO * io )
{
kdDebug(399) << "Unknown HDR format." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -238,7 +238,7 @@ KDE_EXPORT void kimgio_hdr_read( TQImageIO * io )
{
kdDebug(399) << "Invalid HDR file." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -249,12 +249,12 @@ KDE_EXPORT void kimgio_hdr_read( TQImageIO * io )
{
kdDebug(399) << "Error loading HDR file." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
io->setImage( img );
io->setqStatus( 0 );
io->seStatus( 0 );
}

@ -306,7 +306,7 @@ extern "C" KDE_EXPORT void kimgio_ico_read( TQImageIO* io )
icon.setText( "X-HotspotY", 0, TQString::number( selected->hotspotY ) );
}
io->setImage(icon);
io->setqStatus(0);
io->seStatus(0);
}
}

@ -163,7 +163,7 @@ kimgio_jp2_read( TQImageIO* io )
if( gs.altimage ) jas_image_destroy( gs.altimage );
io->setImage( image );
io->setqStatus( 0 );
io->seStatus( 0 );
} // kimgio_jp2_read
@ -309,7 +309,7 @@ kimgio_jp2_write( TQImageIO* io )
// everything went fine
io->setqStatus( IO_Ok );
io->seStatus( IO_Ok );
} // kimgio_jp2_write
#endif // HAVE_JASPER

@ -269,7 +269,7 @@ KDE_EXPORT void kimgio_pcx_read( TQImageIO *io )
if ( s.tqdevice()->size() < 128 )
{
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -279,7 +279,7 @@ KDE_EXPORT void kimgio_pcx_read( TQImageIO *io )
if ( header.Manufacturer != 10 || s.atEnd())
{
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -323,11 +323,11 @@ KDE_EXPORT void kimgio_pcx_read( TQImageIO *io )
if ( !img.isNull() )
{
io->setImage( img );
io->setqStatus( 0 );
io->seStatus( 0 );
}
else
{
io->setqStatus( -1 );
io->seStatus( -1 );
}
}
@ -526,7 +526,7 @@ KDE_EXPORT void kimgio_pcx_write( TQImageIO *io )
writeImage24( img, s, header );
}
io->setqStatus( 0 );
io->seStatus( 0 );
}
/* vim: et sw=2 ts=2

@ -250,7 +250,7 @@ void kimgio_psd_read( TQImageIO *io )
if( s.atEnd() || !IsValid( header ) ) {
kdDebug(399) << "This PSD file is not valid." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -258,7 +258,7 @@ void kimgio_psd_read( TQImageIO *io )
if( !IsSupported( header ) ) {
kdDebug(399) << "This PSD file is not supported." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -266,12 +266,12 @@ void kimgio_psd_read( TQImageIO *io )
if( !LoadPSD(s, header, img) ) {
kdDebug(399) << "Error loading PSD file." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
io->setImage( img );
io->setqStatus( 0 );
io->seStatus( 0 );
}

@ -38,12 +38,12 @@ KDE_EXPORT void kimgio_rgb_read(TQImageIO *io)
if (!sgi.readImage(img)) {
io->setImage(TQImage());
io->setqStatus(-1);
io->seStatus(-1);
return;
}
io->setImage(img);
io->setqStatus(0);
io->seStatus(0);
}
@ -53,9 +53,9 @@ KDE_EXPORT void kimgio_rgb_write(TQImageIO *io)
TQImage img = io->image();
if (!sgi.writeImage(img))
io->setqStatus(-1);
io->seStatus(-1);
io->setqStatus(0);
io->seStatus(0);
}

@ -330,7 +330,7 @@ KDE_EXPORT void kimgio_tga_read( TQImageIO *io )
if( s.atEnd() ) {
kdDebug(399) << "This TGA file is not valid." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -338,7 +338,7 @@ KDE_EXPORT void kimgio_tga_read( TQImageIO *io )
if( !IsSupported(tga) ) {
kdDebug(399) << "This TGA file is not supported." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
@ -349,13 +349,13 @@ KDE_EXPORT void kimgio_tga_read( TQImageIO *io )
if( result == false ) {
kdDebug(399) << "Error loading TGA file." << endl;
io->setImage( TQImage() );
io->setqStatus( -1 );
io->seStatus( -1 );
return;
}
io->setImage( img );
io->setqStatus( 0 );
io->seStatus( 0 );
}
@ -385,6 +385,6 @@ KDE_EXPORT void kimgio_tga_write( TQImageIO *io )
s << TQ_UINT8( tqAlpha( color ) );
}
io->setqStatus( 0 );
io->seStatus( 0 );
}

@ -140,7 +140,7 @@ KDE_EXPORT void kimgio_tiff_read( TQImageIO *io )
TIFFClose( tiff );
io->setImage( image );
io->setqStatus ( 0 );
io->seStatus ( 0 );
}
KDE_EXPORT void kimgio_tiff_write( TQImageIO * )

@ -42,7 +42,7 @@ KDE_EXPORT void kimgio_xcf_read(TQImageIO *io)
KDE_EXPORT void kimgio_xcf_write(TQImageIO *io)
{
kdDebug(399) << "XCF: write support not implemented" << endl;
io->setqStatus(-1);
io->seStatus(-1);
}
///////////////////////////////////////////////////////////////////////////////
@ -190,7 +190,7 @@ kdDebug() << tag << " " << xcf_image.width << " " << xcf_image.height << " " <<
}
io->setImage(xcf_image.image);
io->setqStatus(0);
io->seStatus(0);
}

@ -94,7 +94,7 @@ KDE_EXPORT void kimgio_xv_read( TQImageIO *_imageio )
}
_imageio->setImage( image );
_imageio->setqStatus( 0 );
_imageio->seStatus( 0 );
free(block);
return;
@ -164,6 +164,6 @@ KDE_EXPORT void kimgio_xv_write( TQImageIO *imageio )
}
delete[] buffer;
imageio->setqStatus( 0 );
imageio->seStatus( 0 );
}

@ -182,7 +182,7 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup)
objId(), "terminateKDE()", false );
TQString prefix = locateLocal("socket", "klauncher");
KTempFile domainname(prefix, TQString::tqfromLatin1(".slave-socket"));
KTempFile domainname(prefix, TQString::fromLatin1(".slave-socket"));
if (domainname.status() != 0)
{
// Sever error!

@ -39,13 +39,13 @@ int main(int argc, char *argv[])
TQCString dcopService;
int pid;
int result = KApplication::startServiceByDesktopName(
TQString::tqfromLatin1("konsole"), TQString::null, &error, &dcopService, &pid );
TQString::fromLatin1("konsole"), TQString::null, &error, &dcopService, &pid );
printf("Result = %d, error = \"%s\", dcopService = \"%s\", pid = %d\n",
result, error.ascii(), dcopService.data(), pid);
result = KApplication::startServiceByDesktopName(
TQString::tqfromLatin1("konqueror"), TQString::null, &error, &dcopService, &pid );
TQString::fromLatin1("konqueror"), TQString::null, &error, &dcopService, &pid );
printf("Result = %d, error = \"%s\", dcopService = \"%s\", pid = %d\n",
result, error.ascii(), dcopService.data(), pid);

@ -447,7 +447,7 @@ void KBookmark::updateAccessMetadata()
{
kdDebug(7043) << "KBookmark::updateAccessMetadata " << address() << " " << url().prettyURL() << endl;
const uint timet = TQDateTime::tqcurrentDateTime().toTime_t();
const uint timet = TQDateTime::currentDateTime().toTime_t();
setMetaDataItem( "time_added", TQString::number( timet ), DontOverwriteMetaData );
setMetaDataItem( "time_visited", TQString::number( timet ) );

@ -313,7 +313,7 @@ static TQString handleToolbarDragMoveEvent(
int index = 0;
KToolBarButton* b;
b = dynamic_cast<KToolBarButton*>(tb->tqchildAt(pos));
b = dynamic_cast<KToolBarButton*>(tb->childAt(pos));
KAction *a = 0;
TQString address;
atFirst = false;
@ -394,7 +394,7 @@ static KAction* handleToolbarMouseButton(TQPoint pos, TQPtrList<KAction> actions
Q_ASSERT(tb);
KToolBarButton *b;
b = dynamic_cast<KToolBarButton*>(tb->tqchildAt(pos));
b = dynamic_cast<KToolBarButton*>(tb->childAt(pos));
if (!b)
return 0;

@ -191,7 +191,7 @@ void KNSBookmarkExporterImpl::write(KBookmarkGroup parent) {
fstream.setEncoding(m_utf8 ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale);
TQString charset
= m_utf8 ? "UTF-8" : TQString::tqfromLatin1(TQTextCodec::codecForLocale()->name()).upper();
= m_utf8 ? "UTF-8" : TQString::fromLatin1(TQTextCodec::codecForLocale()->name()).upper();
fstream << "<!DOCTYPE NETSCAPE-Bookmark-file-1>" << endl
<< i18n("<!-- This file was generated by Konqueror -->") << endl

@ -329,7 +329,7 @@ bool KBookmarkManager::saveAs( const TQString & filename, bool toolbarCache ) co
// Save the bookmark toolbar folder for quick loading
// but only when it will actually make things quicker
const TQString cacheFilename = filename + TQString::tqfromLatin1(".tbcache");
const TQString cacheFilename = filename + TQString::fromLatin1(".tbcache");
if(toolbarCache && !root().isToolbarGroup())
{
KSaveFile cacheFile( cacheFilename );
@ -388,7 +388,7 @@ KBookmarkGroup KBookmarkManager::toolbar()
if(!m_docIsLoaded)
{
kdDebug(7043) << "KBookmarkManager::toolbar trying cache" << endl;
const TQString cacheFilename = m_bookmarksFile + TQString::tqfromLatin1(".tbcache");
const TQString cacheFilename = m_bookmarksFile + TQString::fromLatin1(".tbcache");
TQFileInfo bmInfo(m_bookmarksFile);
TQFileInfo cacheInfo(cacheFilename);
if (m_toolbarDoc.isNull() &&
@ -614,11 +614,11 @@ void KBookmarkManager::setEditorOptions( const TQString& caption, bool browser )
void KBookmarkManager::slotEditBookmarks()
{
KProcess proc;
proc << TQString::tqfromLatin1("keditbookmarks");
proc << TQString::fromLatin1("keditbookmarks");
if (!dptr()->m_editorCaption.isNull())
proc << TQString::tqfromLatin1("--customcaption") << dptr()->m_editorCaption;
proc << TQString::fromLatin1("--customcaption") << dptr()->m_editorCaption;
if (!dptr()->m_browserEditor)
proc << TQString::tqfromLatin1("--nobrowser");
proc << TQString::fromLatin1("--nobrowser");
proc << m_bookmarksFile;
proc.start(KProcess::DontCare);
}
@ -626,8 +626,8 @@ void KBookmarkManager::slotEditBookmarks()
void KBookmarkManager::slotEditBookmarksAtAddress( const TQString& address )
{
KProcess proc;
proc << TQString::tqfromLatin1("keditbookmarks")
<< TQString::tqfromLatin1("--address") << address
proc << TQString::fromLatin1("keditbookmarks")
<< TQString::fromLatin1("--address") << address
<< m_bookmarksFile;
proc.start(KProcess::DontCare);
}
@ -690,7 +690,7 @@ void KBookmarkManager::updateFavicon( const TQString &url, const TQString &favic
TQString KBookmarkManager::userBookmarksFile()
{
return locateLocal("data", TQString::tqfromLatin1("konqueror/bookmarks.xml"));
return locateLocal("data", TQString::fromLatin1("konqueror/bookmarks.xml"));
}
KBookmarkManager* KBookmarkManager::userBookmarksManager()

@ -81,7 +81,7 @@ HTTPFilterMD5::HTTPFilterMD5()
TQString
HTTPFilterMD5::md5()
{
return TQString::tqfromLatin1(context.base64Digest());
return TQString::fromLatin1(context.base64Digest());
}
void

@ -3,7 +3,7 @@
const int kfile_area = 250;
#define DefaultViewStyle TQString::tqfromLatin1("SimpleView")
#define DefaultViewStyle TQString::fromLatin1("SimpleView")
#define DefaultPannerPosition 40
#define DefaultMixDirsAndFiles false
#define DefaultShowStatusLine false
@ -14,19 +14,19 @@ const int kfile_area = 250;
#define DefaultRecentURLsNumber 15
#define DefaultDirectoryFollowing true
#define DefaultAutoSelectExtChecked true
#define ConfigGroup TQString::tqfromLatin1("KFileDialog Settings")
#define RecentURLs TQString::tqfromLatin1("Recent URLs")
#define RecentFiles TQString::tqfromLatin1("Recent Files")
#define RecentURLsNumber TQString::tqfromLatin1("Maximum of recent URLs")
#define RecentFilesNumber TQString::tqfromLatin1("Maximum of recent files")
#define DialogWidth TQString::tqfromLatin1("Width (%1)")
#define DialogHeight TQString::tqfromLatin1("Height (%1)")
#define ConfigShowStatusLine TQString::tqfromLatin1("ShowStatusLine")
#define AutoDirectoryFollowing TQString::tqfromLatin1("Automatic directory following")
#define PathComboCompletionMode TQString::tqfromLatin1("PathCombo Completionmode")
#define LocationComboCompletionMode TQString::tqfromLatin1("LocationCombo Completionmode")
#define ShowSpeedbar TQString::tqfromLatin1("Show Speedbar")
#define ShowBookmarks TQString::tqfromLatin1("Show Bookmarks")
#define AutoSelectExtChecked TQString::tqfromLatin1("Automatically select filename extension")
#define ConfigGroup TQString::fromLatin1("KFileDialog Settings")
#define RecentURLs TQString::fromLatin1("Recent URLs")
#define RecentFiles TQString::fromLatin1("Recent Files")
#define RecentURLsNumber TQString::fromLatin1("Maximum of recent URLs")
#define RecentFilesNumber TQString::fromLatin1("Maximum of recent files")
#define DialogWidth TQString::fromLatin1("Width (%1)")
#define DialogHeight TQString::fromLatin1("Height (%1)")
#define ConfigShowStatusLine TQString::fromLatin1("ShowStatusLine")
#define AutoDirectoryFollowing TQString::fromLatin1("Automatic directory following")
#define PathComboCompletionMode TQString::fromLatin1("PathCombo Completionmode")
#define LocationComboCompletionMode TQString::fromLatin1("LocationCombo Completionmode")
#define ShowSpeedbar TQString::fromLatin1("Show Speedbar")
#define ShowBookmarks TQString::fromLatin1("Show Bookmarks")
#define AutoSelectExtChecked TQString::fromLatin1("Automatically select filename extension")
#endif

@ -582,14 +582,14 @@ KACLListView::KACLListView( TQWidget* parent, const char* name )
struct passwd *user = 0;
setpwent();
while ( ( user = getpwent() ) != 0 ) {
m_allUsers << TQString::tqfromLatin1( user->pw_name );
m_allUsers << TQString::fromLatin1( user->pw_name );
}
endpwent();
struct group *gr = 0;
setgrent();
while ( ( gr = getgrent() ) != 0 ) {
m_allGroups << TQString::tqfromLatin1( gr->gr_name );
m_allGroups << TQString::fromLatin1( gr->gr_name );
}
endgrent();
m_allUsers.sort();

@ -300,7 +300,7 @@ void KCombiView::slotSortingChanged( TQDir::SortSpec sorting )
KFileView *KCombiView::focusView( KFileView *preferred ) const
{
TQWidget *w = tqfocusWidget();
TQWidget *w = focusWidget();
KFileView *other = (right == preferred) ? left : right;
return (preferred && w == preferred->widget()) ? preferred : other;
}

@ -111,13 +111,13 @@ KDirOperator::KDirOperator(const KURL& _url,
TQString strPath = TQDir::currentDirPath();
strPath.append('/');
currUrl = KURL();
currUrl.setProtocol(TQString::tqfromLatin1("file"));
currUrl.setProtocol(TQString::fromLatin1("file"));
currUrl.setPath(strPath);
}
else {
currUrl = _url;
if ( currUrl.protocol().isEmpty() )
currUrl.setProtocol(TQString::tqfromLatin1("file"));
currUrl.setProtocol(TQString::fromLatin1("file"));
currUrl.addPath("/"); // make sure we have a trailing slash!
}
@ -414,7 +414,7 @@ bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory )
{
url.addPath( *it );
exists = KIO::NetAccess::exists( url, false, 0 );
writeOk = !exists && KIO::NetAccess::mkdir( url, tqtopLevelWidget() );
writeOk = !exists && KIO::NetAccess::mkdir( url, topLevelWidget() );
}
if ( exists ) // url was already existant
@ -484,7 +484,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items,
if ( doIt ) {
KIO::DeleteJob *job = KIO::del( urls, false, showProgress );
job->setWindow (tqtopLevelWidget());
job->setWindow (topLevelWidget());
job->setAutoErrorHandlingEnabled( true, parent );
return job;
}
@ -547,7 +547,7 @@ KIO::CopyJob * KDirOperator::trash( const KFileItemList& items,
if ( doIt ) {
KIO::CopyJob *job = KIO::trash( urls, showProgress );
job->setWindow (tqtopLevelWidget());
job->setWindow (topLevelWidget());
job->setAutoErrorHandlingEnabled( true, parent );
return job;
}
@ -651,7 +651,7 @@ void KDirOperator::setURL(const KURL& _newurl, bool clearforward)
if ( !isReadable( newurl ) ) {
// maybe newurl is a file? check its parent directory
newurl.cd(TQString::tqfromLatin1(".."));
newurl.cd(TQString::fromLatin1(".."));
if ( !isReadable( newurl ) ) {
resetCursor();
KMessageBox::error(viewWidget(),
@ -777,7 +777,7 @@ KURL KDirOperator::url() const
void KDirOperator::cdUp()
{
KURL tmp(currUrl);
tmp.cd(TQString::tqfromLatin1(".."));
tmp.cd(TQString::fromLatin1(".."));
setURL(tmp, true);
}
@ -1120,7 +1120,7 @@ void KDirOperator::setDirLister( KDirLister *lister )
dir->setAutoUpdate( true );
TQWidget* mainWidget = tqtopLevelWidget();
TQWidget* mainWidget = topLevelWidget();
dir->setMainWindow (mainWidget);
kdDebug (kfile_area) << "mainWidget=" << mainWidget << endl;
@ -1253,7 +1253,7 @@ void KDirOperator::slotCompletionMatch(const TQString& match)
void KDirOperator::setupActions()
{
myActionCollection = new KActionCollection( tqtopLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" );
myActionCollection = new KActionCollection( topLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" );
actionMenu = new KActionMenu( i18n("Menu"), myActionCollection, "popupMenu" );
upAction = KStdAction::up( TQT_TQOBJECT(this), TQT_SLOT( cdUp() ), myActionCollection, "up" );
@ -1273,7 +1273,7 @@ void KDirOperator::setupActions()
this, TQT_SLOT( trashSelected( KAction::ActivationReason, TQt::ButtonState ) ) );
new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, TQT_TQOBJECT(this),
TQT_SLOT( deleteSelected() ), myActionCollection, "delete" );
mkdirAction->setIcon( TQString::tqfromLatin1("folder_new") );
mkdirAction->setIcon( TQString::fromLatin1("folder_new") );
reloadAction->setText( i18n("Reload") );
reloadAction->setShortcut( KStdAccel::shortcut( KStdAccel::Reload ));
@ -1293,7 +1293,7 @@ void KDirOperator::setupActions()
TQT_TQOBJECT(this), TQT_SLOT( slotSortReversed() ),
myActionCollection, "reversed" );
TQString sortGroup = TQString::tqfromLatin1("sort");
TQString sortGroup = TQString::fromLatin1("sort");
byNameAction->setExclusiveGroup( sortGroup );
byDateAction->setExclusiveGroup( sortGroup );
bySizeAction->setExclusiveGroup( sortGroup );
@ -1337,7 +1337,7 @@ void KDirOperator::setupActions()
TQT_SLOT( togglePreview( bool )));
TQString viewGroup = TQString::tqfromLatin1("view");
TQString viewGroup = TQString::fromLatin1("view");
shortAction->setExclusiveGroup( viewGroup );
detailedAction->setExclusiveGroup( viewGroup );
@ -1386,7 +1386,7 @@ void KDirOperator::setupMenu(int whichActions)
if (currUrl.isLocalFile() && !(KApplication::keyboardMouseState() & TQt::ShiftButton))
actionMenu->insert( myActionCollection->action( "trash" ) );
KConfig *globalconfig = KGlobal::config();
KConfigGroupSaver cs( globalconfig, TQString::tqfromLatin1("KDE") );
KConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") );
if (!currUrl.isLocalFile() || (KApplication::keyboardMouseState() & TQt::ShiftButton) ||
globalconfig->readBoolEntry("ShowDeleteCommand", false))
actionMenu->insert( myActionCollection->action( "delete" ) );
@ -1450,45 +1450,45 @@ void KDirOperator::readConfig( KConfig *kc, const TQString& group )
defaultView = 0;
int sorting = 0;
TQString viewStyle = kc->readEntry( TQString::tqfromLatin1("View Style"),
TQString::tqfromLatin1("Simple") );
if ( viewStyle == TQString::tqfromLatin1("Detail") )
TQString viewStyle = kc->readEntry( TQString::fromLatin1("View Style"),
TQString::fromLatin1("Simple") );
if ( viewStyle == TQString::fromLatin1("Detail") )
defaultView |= KFile::Detail;
else
defaultView |= KFile::Simple;
if ( kc->readBoolEntry( TQString::tqfromLatin1("Separate Directories"),
if ( kc->readBoolEntry( TQString::fromLatin1("Separate Directories"),
DefaultMixDirsAndFiles ) )
defaultView |= KFile::SeparateDirs;
if ( kc->readBoolEntry(TQString::tqfromLatin1("Show Preview"), false))
if ( kc->readBoolEntry(TQString::fromLatin1("Show Preview"), false))
defaultView |= KFile::PreviewContents;
if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort case insensitively"),
if ( kc->readBoolEntry( TQString::fromLatin1("Sort case insensitively"),
DefaultCaseInsensitive ) )
sorting |= TQDir::IgnoreCase;
if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort directories first"),
if ( kc->readBoolEntry( TQString::fromLatin1("Sort directories first"),
DefaultDirsFirst ) )
sorting |= TQDir::DirsFirst;
TQString name = TQString::tqfromLatin1("Name");
TQString sortBy = kc->readEntry( TQString::tqfromLatin1("Sort by"), name );
TQString name = TQString::fromLatin1("Name");
TQString sortBy = kc->readEntry( TQString::fromLatin1("Sort by"), name );
if ( sortBy == name )
sorting |= TQDir::Name;
else if ( sortBy == TQString::tqfromLatin1("Size") )
else if ( sortBy == TQString::fromLatin1("Size") )
sorting |= TQDir::Size;
else if ( sortBy == TQString::tqfromLatin1("Date") )
else if ( sortBy == TQString::fromLatin1("Date") )
sorting |= TQDir::Time;
mySorting = static_cast<TQDir::SortSpec>( sorting );
setSorting( mySorting );
if ( kc->readBoolEntry( TQString::tqfromLatin1("Show hidden files"),
if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"),
DefaultShowHidden ) ) {
showHiddenAction->setChecked( true );
dir->setShowingDotFiles( true );
}
if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort reversed"),
if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"),
DefaultSortReversed ) )
reverseAction->setChecked( true );
@ -1505,18 +1505,18 @@ void KDirOperator::writeConfig( KConfig *kc, const TQString& group )
if ( !group.isEmpty() )
kc->setGroup( group );
TQString sortBy = TQString::tqfromLatin1("Name");
TQString sortBy = TQString::fromLatin1("Name");
if ( KFile::isSortBySize( mySorting ) )
sortBy = TQString::tqfromLatin1("Size");
sortBy = TQString::fromLatin1("Size");
else if ( KFile::isSortByDate( mySorting ) )
sortBy = TQString::tqfromLatin1("Date");
kc->writeEntry( TQString::tqfromLatin1("Sort by"), sortBy );
sortBy = TQString::fromLatin1("Date");
kc->writeEntry( TQString::fromLatin1("Sort by"), sortBy );
kc->writeEntry( TQString::tqfromLatin1("Sort reversed"),
kc->writeEntry( TQString::fromLatin1("Sort reversed"),
reverseAction->isChecked() );
kc->writeEntry( TQString::tqfromLatin1("Sort case insensitively"),
kc->writeEntry( TQString::fromLatin1("Sort case insensitively"),
caseInsensitiveAction->isChecked() );
kc->writeEntry( TQString::tqfromLatin1("Sort directories first"),
kc->writeEntry( TQString::fromLatin1("Sort directories first"),
dirsFirstAction->isChecked() );
// don't save the separate dirs or preview when an application specific
@ -1530,26 +1530,26 @@ void KDirOperator::writeConfig( KConfig *kc, const TQString& group )
if ( !appSpecificPreview ) {
if ( separateDirsAction->isEnabled() )
kc->writeEntry( TQString::tqfromLatin1("Separate Directories"),
kc->writeEntry( TQString::fromLatin1("Separate Directories"),
separateDirsAction->isChecked() );
KToggleAction *previewAction = static_cast<KToggleAction*>(myActionCollection->action("preview"));
if ( previewAction->isEnabled() ) {
bool hasPreview = previewAction->isChecked();
kc->writeEntry( TQString::tqfromLatin1("Show Preview"), hasPreview );
kc->writeEntry( TQString::fromLatin1("Show Preview"), hasPreview );
}
}
kc->writeEntry( TQString::tqfromLatin1("Show hidden files"),
kc->writeEntry( TQString::fromLatin1("Show hidden files"),
showHiddenAction->isChecked() );
KFile::FileView fv = static_cast<KFile::FileView>( m_viewKind );
TQString style;
if ( KFile::isDetailView( fv ) )
style = TQString::tqfromLatin1("Detail");
style = TQString::fromLatin1("Detail");
else if ( KFile::isSimpleView( fv ) )
style = TQString::tqfromLatin1("Simple");
kc->writeEntry( TQString::tqfromLatin1("View Style"), style );
style = TQString::fromLatin1("Simple");
kc->writeEntry( TQString::fromLatin1("View Style"), style );
kc->setGroup( oldGroup );
}

@ -248,7 +248,7 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item )
{
// scroll to make item the topmost item
view()->ensureItemVisible( item );
TQRect r = view()->tqitemRect( item );
TQRect r = view()->itemRect( item );
if ( r.isValid() )
{
int x, y;
@ -426,7 +426,7 @@ void KDirSelectDialog::slotMkdir()
{
folderurl.addPath( *it );
exists = KIO::NetAccess::exists( folderurl, false, 0 );
writeOk = !exists && KIO::NetAccess::mkdir( folderurl, tqtopLevelWidget() );
writeOk = !exists && KIO::NetAccess::mkdir( folderurl, topLevelWidget() );
}
if ( exists ) // url was already existant

@ -100,7 +100,7 @@ void KDiskFreeSp::dfDone()
TQTextStream t (dfStringErrOut, IO_ReadOnly);
TQString s=t.readLine();
if ( (s.isEmpty()) || ( s.left(10) != TQString::tqfromLatin1("Filesystem") ) )
if ( (s.isEmpty()) || ( s.left(10) != TQString::fromLatin1("Filesystem") ) )
kdError() << "Error running df command... got [" << s << "]" << endl;
while ( !t.eof() ) {
TQString u,v;

@ -54,7 +54,7 @@ KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQStrin
d->encoding->clear ();
TQString sEncoding = encoding;
if (sEncoding.isEmpty())
sEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding());
sEncoding = TQString::fromLatin1(KGlobal::locale()->encoding());
TQStringList encodings (KGlobal::charsets()->availableEncodingNames());
int insert = 0;

@ -78,7 +78,7 @@ public:
TQRect rect() const
{
TQRect r = listView()->tqitemRect(this);
TQRect r = listView()->itemRect(this);
return TQRect( listView()->viewportToContents( r.topLeft() ),
TQSize( r.width(), r.height() ) );
}

@ -258,7 +258,7 @@ void KFileDialog::setMimeFilter( const TQStringList& mimeTypes,
filterWidget->setMimeFilter( mimeTypes, defaultType );
TQStringList types = TQStringList::split(" ", filterWidget->currentFilter());
types.append( TQString::tqfromLatin1( "inode/directory" ));
types.append( TQString::fromLatin1( "inode/directory" ));
ops->clearFilter();
ops->setMimeFilter( types );
d->hasDefaultFilter = !defaultType.isEmpty();
@ -357,7 +357,7 @@ void KFileDialog::slotOk()
bool multi = (mode() & KFile::Files) != 0;
KFileItemListIterator it( *items );
TQString endQuote = TQString::tqfromLatin1("\" ");
TQString endQuote = TQString::fromLatin1("\" ");
TQString name, files;
while ( it.current() ) {
name = (*it)->name();
@ -402,7 +402,7 @@ void KFileDialog::slotOk()
}
}
KURL url = KIO::NetAccess::mostLocalURL(d->url,tqtopLevelWidget());
KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget());
if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly &&
!url.isLocalFile() ) {
// ### after message freeze, add message for directories!
@ -446,7 +446,7 @@ void KFileDialog::slotOk()
return;
}
KURL url = KIO::NetAccess::mostLocalURL(selectedURL,tqtopLevelWidget());
KURL url = KIO::NetAccess::mostLocalURL(selectedURL,topLevelWidget());
if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly &&
!url.isLocalFile() ) {
KMessageBox::sorry( d->mainWidget,
@ -555,7 +555,7 @@ void KFileDialog::slotOk()
it != list.end(); ++it )
{
job = KIO::stat( *it, !(*it).isLocalFile() );
job->setWindow (tqtopLevelWidget());
job->setWindow (topLevelWidget());
KIO::Scheduler::scheduleJob( job );
d->statJobs.append( job );
connect( job, TQT_SIGNAL( result(KIO::Job *) ),
@ -565,7 +565,7 @@ void KFileDialog::slotOk()
}
job = KIO::stat(d->url,!d->url.isLocalFile());
job->setWindow (tqtopLevelWidget());
job->setWindow (topLevelWidget());
d->statJobs.append( job );
connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotStatResult(KIO::Job*)));
}
@ -1548,7 +1548,7 @@ TQString KFileDialog::selectedFile() const
{
if ( result() == TQDialog::Accepted )
{
KURL url = KIO::NetAccess::mostLocalURL(d->url,tqtopLevelWidget());
KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget());
if (url.isLocalFile())
return url.path();
else {
@ -1570,7 +1570,7 @@ TQStringList KFileDialog::selectedFiles() const
KURL::List urls = parseSelectedURLs();
TQValueListConstIterator<KURL> it = urls.begin();
while ( it != urls.end() ) {
url = KIO::NetAccess::mostLocalURL(*it,tqtopLevelWidget());
url = KIO::NetAccess::mostLocalURL(*it,topLevelWidget());
if ( url.isLocalFile() )
list.append( url.path() );
++it;
@ -1737,7 +1737,7 @@ void KFileDialog::readConfig( KConfig *kc, const TQString& group )
d->autoSelectExtChecked = kc->readBoolEntry (AutoSelectExtChecked, DefaultAutoSelectExtChecked);
updateAutoSelectExtension ();
int w1 = tqminimumSize().width();
int w1 = minimumSize().width();
int w2 = toolbar->sizeHint().width() + 10;
if (w1 < w2)
setMinimumWidth(w2);
@ -2068,7 +2068,7 @@ void KFileDialog::updateLocationEditExtension (const TQString &lastExtension)
{
// exists?
KIO::UDSEntry t;
if (KIO::NetAccess::stat (url, t, tqtopLevelWidget()))
if (KIO::NetAccess::stat (url, t, topLevelWidget()))
{
kdDebug (kfile_area) << "\tfile exists" << endl;
@ -2146,7 +2146,7 @@ void KFileDialog::appendExtension (KURL &url)
// exists?
KIO::UDSEntry t;
if (KIO::NetAccess::stat (url, t, tqtopLevelWidget()))
if (KIO::NetAccess::stat (url, t, topLevelWidget()))
{
kdDebug (kfile_area) << "\tfile exists - won't append extension" << endl;
return;
@ -2265,7 +2265,7 @@ void KFileDialog::toggleBookmarks(bool show)
connect( d->bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )),
TQT_SLOT( enterURL( const TQString& )));
toolbar->insertButton(TQString::tqfromLatin1("bookmark"),
toolbar->insertButton(TQString::fromLatin1("bookmark"),
(int)HOTLIST_BUTTON, true,
i18n("Bookmarks"), 5);
toolbar->getButton(HOTLIST_BUTTON)->setPopup(d->bookmarkHandler->menu(),

@ -129,7 +129,7 @@ void KFileFilterCombo::setMimeFilter( const TQStringList& types,
{
clear();
filters.clear();
TQString delim = TQString::tqfromLatin1(", ");
TQString delim = TQString::fromLatin1(", ");
d->hasAllSupportedFiles = false;
m_allTypes = defaultType.isEmpty() && (types.count() > 1);

@ -70,8 +70,8 @@ public:
parent->actionCollection(),
"large rows" );
smallColumns->setExclusiveGroup(TQString::tqfromLatin1("IconView mode"));
largeRows->setExclusiveGroup(TQString::tqfromLatin1("IconView mode"));
smallColumns->setExclusiveGroup(TQString::fromLatin1("IconView mode"));
largeRows->setExclusiveGroup(TQString::fromLatin1("IconView mode"));
previews = new KToggleAction( i18n("Thumbnail Previews"), 0,
parent->actionCollection(),
@ -191,7 +191,7 @@ void KFileIconView::readConfig( KConfig *kc, const TQString& group )
{
TQString gr = group.isEmpty() ? TQString("KFileIconView") : group;
KConfigGroupSaver cs( kc, gr );
TQString small = TQString::tqfromLatin1("SmallColumns");
TQString small = TQString::fromLatin1("SmallColumns");
d->previewIconSize = kc->readNumEntry( "Preview Size", DEFAULT_PREVIEW_SIZE );
d->previews->setChecked( kc->readBoolEntry( "ShowPreviews", DEFAULT_SHOW_PREVIEWS ) );
@ -214,8 +214,8 @@ void KFileIconView::writeConfig( KConfig *kc, const TQString& group )
KConfigGroupSaver cs( kc, gr );
TQString viewMode = d->smallColumns->isChecked() ?
TQString::tqfromLatin1("SmallColumns") :
TQString::tqfromLatin1("LargeRows");
TQString::fromLatin1("SmallColumns") :
TQString::fromLatin1("LargeRows");
if(!kc->hasDefault( "ViewMode" ) && viewMode == DEFAULT_VIEW_MODE )
kc->revertToDefault( "ViewMode" );
else
@ -251,7 +251,7 @@ void KFileIconView::showToolTip( TQIconViewItem *item )
int w = maxItemWidth() - ( itemTextPos() == TQIconView::Bottom ? 0 :
item->pixmapRect().width() ) - 4;
if ( fontMetrics().width( item->text() ) >= w ) {
toolTip = new TQLabel( TQString::tqfromLatin1(" %1 ").arg(item->text()), 0,
toolTip = new TQLabel( TQString::fromLatin1(" %1 ").arg(item->text()), 0,
"myToolTip",
(WFlags)(WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM) );
toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box );
@ -268,7 +268,7 @@ void KFileIconView::showToolTip( TQIconViewItem *item )
toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y());
}
toolTip->setFont( TQToolTip::font() );
toolTip->tqsetPalette( TQToolTip::palette(), true );
toolTip->setPalette( TQToolTip::palette(), true );
toolTip->show();
}
}
@ -340,10 +340,10 @@ void KFileIconView::insertItem( KFileItem *i )
TQIconView* qview = static_cast<TQIconView*>( this );
// Since creating and initializing an item leads to a tqrepaint,
// we disable updates on the IconView for a while.
qview->tqsetUpdatesEnabled( false );
qview->setUpdatesEnabled( false );
KFileIconViewItem *item = new KFileIconViewItem( qview, i );
initItem( item, i, true );
qview->tqsetUpdatesEnabled( true );
qview->setUpdatesEnabled( true );
if ( !i->isMimeTypeKnown() )
m_resolver->m_lstPendingMimeIconItems.append( item );

@ -522,7 +522,7 @@ void KFileTreeView::slotAnimation()
}
uint & iconNumber = it.data().iconNumber;
TQString icon = TQString::tqfromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) );
TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) );
// kdDebug(250) << "Loading icon " << icon << endl;
item->setPixmap( 0, DesktopIcon( icon,KIcon::SizeSmall,KIcon::ActiveState )); // KFileTreeViewFactory::instance() ) );
@ -666,7 +666,7 @@ void KFileTreeViewToolTip::maybeTip( const TQPoint & )
if ( item ) {
TQString text = static_cast<KFileViewItem*>( item )->toolTipText();
if ( !text.isEmpty() )
tip ( m_view->tqitemRect( item ), text );
tip ( m_view->itemRect( item ), text );
}
#endif
}

@ -122,7 +122,7 @@ void KIconCanvas::slotLoadFiles()
TQApplication::setOverrideCursor(tqwaitCursor);
// disable updates to not trigger paint events when adding child items
tqsetUpdatesEnabled( false );
setUpdatesEnabled( false );
#ifdef HAVE_LIBART
KSVGIconEngine *svgEngine = new KSVGIconEngine();
@ -191,7 +191,7 @@ void KIconCanvas::slotLoadFiles()
#endif
// enable updates since we have to draw the whole view now
tqsetUpdatesEnabled( true );
setUpdatesEnabled( true );
TQApplication::restoreOverrideCursor();
d->m_bLoading = false;
@ -259,7 +259,7 @@ void KIconDialog::init()
mGroupOrSize = KIcon::Desktop;
mContext = KIcon::Any;
mType = 0;
mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::tqfromLatin1("*.png"));
mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png"));
TQWidget *main = new TQWidget( this );
setMainWidget(main);

@ -181,7 +181,7 @@ KNotifyDialog::~KNotifyDialog()
void KNotifyDialog::addApplicationEvents( const char *appName )
{
addApplicationEvents( TQString::fromUtf8( appName ) +
TQString::tqfromLatin1( "/eventsrc" ) );
TQString::fromLatin1( "/eventsrc" ) );
}
void KNotifyDialog::addApplicationEvents( const TQString& path )
@ -1005,10 +1005,10 @@ Application::Application( const TQString &path )
m_events = 0L;
config = new KConfig(config_file, false, false);
kc = new KConfig(path, true, false, "data");
kc->setGroup( TQString::tqfromLatin1("!Global!") );
m_icon = kc->readEntry(TQString::tqfromLatin1("IconName"),
TQString::tqfromLatin1("misc"));
m_description = kc->readEntry( TQString::tqfromLatin1("Comment"),
kc->setGroup( TQString::fromLatin1("!Global!") );
m_icon = kc->readEntry(TQString::fromLatin1("IconName"),
TQString::fromLatin1("misc"));
m_description = kc->readEntry( TQString::fromLatin1("Comment"),
i18n("No description available") );
int index = path.find( '/' );
@ -1070,10 +1070,10 @@ void Application::reloadEvents( bool revertToDefaults )
Event *e = 0L;
TQString global = TQString::tqfromLatin1("!Global!");
TQString default_group = TQString::tqfromLatin1("<default>");
TQString name = TQString::tqfromLatin1("Name");
TQString comment = TQString::tqfromLatin1("Comment");
TQString global = TQString::fromLatin1("!Global!");
TQString default_group = TQString::fromLatin1("<default>");
TQString name = TQString::fromLatin1("Name");
TQString comment = TQString::fromLatin1("Comment");
TQStringList conflist = kc->groupList();
TQStringList::ConstIterator it = conflist.begin();

@ -279,8 +279,8 @@ void KApplicationTree::slotSelectionChanged(TQListViewItem* i)
void KApplicationTree::resizeEvent( TQResizeEvent * e)
{
setColumnWidth(0, width()-TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent)
-2*TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth));
setColumnWidth(0, width()-TQApplication::tqstyle().pixelMetric(TQStyle::PM_ScrollBarExtent)
-2*TQApplication::tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth));
KListView::resizeEvent(e);
}
@ -340,7 +340,7 @@ KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const TQString&_text,
{
TQString caption = KStringHandler::csqueeze( _urls.first().prettyURL() );
if (_urls.count() > 1)
caption += TQString::tqfromLatin1("...");
caption += TQString::fromLatin1("...");
setCaption(caption);
setServiceType( _urls );
init( _text, _value );
@ -376,7 +376,7 @@ void KOpenWithDlg::setServiceType( const KURL::List& _urls )
if ( _urls.count() == 1 )
{
qServiceType = KMimeType::findByURL( _urls.first())->name();
if (qServiceType == TQString::tqfromLatin1("application/octet-stream"))
if (qServiceType == TQString::fromLatin1("application/octet-stream"))
qServiceType = TQString::null;
}
else
@ -413,13 +413,13 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value )
KHistoryCombo *combo = new KHistoryCombo();
combo->setDuplicatesEnabled( false );
KConfig *kc = KGlobal::config();
KConfigGroupSaver ks( kc, TQString::tqfromLatin1("Open-with settings") );
int max = kc->readNumEntry( TQString::tqfromLatin1("Maximum history"), 15 );
KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") );
int max = kc->readNumEntry( TQString::fromLatin1("Maximum history"), 15 );
combo->setMaxCount( max );
int mode = kc->readNumEntry(TQString::tqfromLatin1("CompletionMode"),
int mode = kc->readNumEntry(TQString::fromLatin1("CompletionMode"),
KGlobalSettings::completionMode());
combo->setCompletionMode((KGlobalSettings::Completion)mode);
TQStringList list = kc->readListEntry( TQString::tqfromLatin1("History") );
TQStringList list = kc->readListEntry( TQString::fromLatin1("History") );
combo->setHistoryItems( list, true );
edit = new KURLRequester( combo, this );
}
@ -483,8 +483,8 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value )
// check to see if we use konsole if not disable the nocloseonexit
// because we don't know how to do this on other terminal applications
KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") );
TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::tqfromLatin1("konsole"));
KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole"));
if (bReadOnly || preferredTerminal != "konsole")
nocloseonexit->hide();
@ -666,13 +666,13 @@ void KOpenWithDlg::slotOK()
if (terminal->isChecked())
{
KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") );
preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::tqfromLatin1("konsole"));
KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole"));
m_command = preferredTerminal;
// only add --noclose when we are sure it is konsole we're using
if (preferredTerminal == "konsole" && nocloseonexit->isChecked())
m_command += TQString::tqfromLatin1(" --noclose");
m_command += TQString::tqfromLatin1(" -e ");
m_command += TQString::fromLatin1(" --noclose");
m_command += TQString::fromLatin1(" -e ");
m_command += edit->url();
kdDebug(250) << "Setting m_command to " << m_command << endl;
}
@ -740,7 +740,7 @@ void KOpenWithDlg::slotOK()
{
desktop = new KDesktopFile(newPath);
}
desktop->writeEntry("Type", TQString::tqfromLatin1("Application"));
desktop->writeEntry("Type", TQString::fromLatin1("Application"));
desktop->writeEntry("Name", initialServiceName);
desktop->writePathEntry("Exec", fullExec);
if (terminal->isChecked())
@ -814,9 +814,9 @@ void KOpenWithDlg::accept()
combo->addToHistory( edit->url() );
KConfig *kc = KGlobal::config();
KConfigGroupSaver ks( kc, TQString::tqfromLatin1("Open-with settings") );
kc->writeEntry( TQString::tqfromLatin1("History"), combo->historyItems() );
kc->writeEntry(TQString::tqfromLatin1("CompletionMode"),
KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") );
kc->writeEntry( TQString::fromLatin1("History"), combo->historyItems() );
kc->writeEntry(TQString::fromLatin1("CompletionMode"),
combo->completionMode());
// don't store the completion-list, as it contains all of KURLCompletion's
// executables

@ -516,7 +516,7 @@ void KPropertiesDialog::insertPages()
if ( mimetype.isEmpty() )
return;
TQString query = TQString::tqfromLatin1(
TQString query = TQString::fromLatin1(
"('KPropsDlg/Plugin' in ServiceTypes) and "
"((not exist [X-KDE-Protocol]) or "
" ([X-KDE-Protocol] == '%1' ) )" ).arg(item->url().protocol());
@ -718,7 +718,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
kdDebug() << "url=" << url << " bDesktopFile=" << bDesktopFile << " isLocal=" << isLocal << " isReallyLocal=" << isReallyLocal << endl;
mode_t mode = item->mode();
bool hasDirs = item->isDir() && !item->isLink();
bool hasRoot = url.path() == TQString::tqfromLatin1("/");
bool hasRoot = url.path() == TQString::fromLatin1("/");
TQString iconStr = KMimeType::iconForURL(url, mode);
TQString directory = properties->kurl().directory();
TQString protocol = properties->kurl().protocol();
@ -831,7 +831,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
magicMimeComment = TQString::null;
}
if ( url.path() == TQString::tqfromLatin1("/") )
if ( url.path() == TQString::fromLatin1("/") )
hasRoot = true;
if ( (*it)->isDir() && !(*it)->isLink() )
{
@ -859,7 +859,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ )
{
KIconButton *iconButton = new KIconButton( d->m_frame );
int bsize = 66 + 2 * iconButton->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin);
int bsize = 66 + 2 * iconButton->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin);
iconButton->setFixedSize(bsize, bsize);
iconButton->setIconSize(48);
iconButton->setStrictIconSize(false);
@ -883,7 +883,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
this, TQT_SLOT( slotIconChanged() ) );
} else {
TQLabel *iconLabel = new TQLabel( d->m_frame );
int bsize = 66 + 2 * iconLabel->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin);
int bsize = 66 + 2 * iconLabel->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin);
iconLabel->setFixedSize(bsize, bsize);
iconLabel->setPixmap( KGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) );
iconArea = iconLabel;
@ -942,7 +942,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
//TODO: wrap for win32 or mac?
TQPushButton *button = new TQPushButton(box);
TQIconSet iconSet = SmallIconSet(TQString::tqfromLatin1("configure"));
TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("configure"));
TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
button->setIconSet( iconSet );
button->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
@ -1136,9 +1136,9 @@ void KFilePropsPlugin::slotEditFileType()
else
mime = d->mimeType;
//TODO: wrap for win32 or mac?
TQString keditfiletype = TQString::tqfromLatin1("keditfiletype");
TQString keditfiletype = TQString::fromLatin1("keditfiletype");
KRun::runCommand( keditfiletype
+ " --parent " + TQString::number( (ulong)properties->tqtopLevelWidget()->winId())
+ " --parent " + TQString::number( (ulong)properties->topLevelWidget()->winId())
+ " " + KProcess::quote(mime),
keditfiletype, keditfiletype /*unused*/);
#endif
@ -1234,7 +1234,7 @@ void KFilePropsPlugin::slotDirSizeFinished( KIO::Job * job )
KIO::filesize_t totalSize = static_cast<KDirSize*>(job)->totalSize();
KIO::filesize_t totalFiles = static_cast<KDirSize*>(job)->totalFiles();
KIO::filesize_t totalSubdirs = static_cast<KDirSize*>(job)->totalSubdirs();
m_sizeLabel->setText( TQString::tqfromLatin1("%1 (%2)\n%3, %4")
m_sizeLabel->setText( TQString::fromLatin1("%1 (%2)\n%3, %4")
.arg(KIO::convertSize(totalSize))
.arg(KGlobal::locale()->formatNumber(totalSize, 0))
.arg(i18n("1 file","%n files",totalFiles))
@ -1439,7 +1439,7 @@ void KFilePropsPlugin::applyIconChanges()
if (S_ISDIR(properties->item()->mode()))
{
path = url.path(1) + TQString::tqfromLatin1(".directory");
path = url.path(1) + TQString::fromLatin1(".directory");
// don't call updateUrl because the other tabs (i.e. permissions)
// apply to the directory, not the .directory file.
}
@ -1753,7 +1753,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
kcom->setOrder(KCompletion::Sorted);
setpwent();
for (i=0; ((user = getpwent()) != 0L) && (i < maxEntries); i++)
kcom->addItem(TQString::tqfromLatin1(user->pw_name));
kcom->addItem(TQString::fromLatin1(user->pw_name));
endpwent();
usrEdit->setCompletionMode((i < maxEntries) ? KGlobalSettings::CompletionAuto :
KGlobalSettings::CompletionNone);
@ -1781,7 +1781,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
for (i=0; ((ge = getgrent()) != 0L) && (i < maxEntries); i++)
{
if (IamRoot)
groupList += TQString::tqfromLatin1(ge->gr_name);
groupList += TQString::fromLatin1(ge->gr_name);
else
{
/* pick the groups to which the user belongs */
@ -1802,7 +1802,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
/* add the effective Group to the list .. */
ge = getgrgid (getegid());
if (ge) {
TQString name = TQString::tqfromLatin1(ge->gr_name);
TQString name = TQString::fromLatin1(ge->gr_name);
if (name.isEmpty())
name.setNum(ge->gr_gid);
if (groupList.find(name) == groupList.end())
@ -2639,7 +2639,7 @@ void KURLPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
config.writeEntry( "Type", TQString::tqfromLatin1("Link"));
config.writeEntry( "Type", TQString::fromLatin1("Link"));
config.writePathEntry( "URL", URLEdit->url() );
// Users can't create a Link .desktop file with a Name field,
// but distributions can. Update the Name field in that case.
@ -2796,7 +2796,7 @@ void KBindingPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
config.writeEntry( "Type", TQString::tqfromLatin1("MimeType") );
config.writeEntry( "Type", TQString::fromLatin1("MimeType") );
config.writeEntry( "Patterns", patternEdit->text() );
config.writeEntry( "Comment", commentEdit->text() );
@ -2852,8 +2852,8 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
if ((mountPoint != "-") && (mountPoint != "none") && !mountPoint.isEmpty()
&& device != "none")
{
devices.append( device + TQString::tqfromLatin1(" (")
+ mountPoint + TQString::tqfromLatin1(")") );
devices.append( device + TQString::fromLatin1(" (")
+ mountPoint + TQString::fromLatin1(")") );
m_devicelist.append(device);
d->mountpointlist.append(mountPoint);
}
@ -2916,7 +2916,7 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
layout->addMultiCellWidget(sep, 6, 6, 0, 1);
unmounted = new KIconButton( d->m_frame );
int bsize = 66 + 2 * unmounted->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin);
int bsize = 66 + 2 * unmounted->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin);
unmounted->setFixedSize(bsize, bsize);
unmounted->setIconType(KIcon::Desktop, KIcon::Device);
layout->addWidget(unmounted, 7, 0);
@ -3077,7 +3077,7 @@ void KDevicePropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
config.writeEntry( "Type", TQString::tqfromLatin1("FSDevice") );
config.writeEntry( "Type", TQString::fromLatin1("FSDevice") );
config.writeEntry( "Dev", device->currentText() );
config.writeEntry( "MountPoint", mountpoint->text() );
@ -3362,7 +3362,7 @@ void KDesktopPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
config.writeEntry( "Type", TQString::tqfromLatin1("Application"));
config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writeEntry( "Comment", w->commentEdit->text() );
config.writeEntry( "Comment", w->commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "GenericName", w->genNameEdit->text() );
@ -3446,9 +3446,9 @@ void KDesktopPropsPlugin::slotAdvanced()
// check to see if we use konsole if not do not add the nocloseonexit
// because we don't know how to do this on other terminal applications
KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") );
KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
TQString::tqfromLatin1("konsole"));
TQString::fromLatin1("konsole"));
bool terminalCloseBool = false;
@ -3493,7 +3493,7 @@ void KDesktopPropsPlugin::slotAdvanced()
int i, maxEntries = 1000;
setpwent();
for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++)
kcom->addItem(TQString::tqfromLatin1(pw->pw_name));
kcom->addItem(TQString::fromLatin1(pw->pw_name));
endpwent();
if (i < maxEntries)
{
@ -3672,9 +3672,9 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
// check to see if we use konsole if not do not add the nocloseonexit
// because we don't know how to do this on other terminal applications
KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") );
KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
TQString::tqfromLatin1("konsole"));
TQString::fromLatin1("konsole"));
int posOptions = 1;
d->nocloseonexitCheck = 0L;
@ -3767,7 +3767,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
int i, maxEntries = 1000;
setpwent();
for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++)
kcom->addItem(TQString::tqfromLatin1(pw->pw_name));
kcom->addItem(TQString::fromLatin1(pw->pw_name));
endpwent();
if (i < maxEntries)
{
@ -3854,7 +3854,7 @@ void KExecPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
config.writeEntry( "Type", TQString::tqfromLatin1("Application"));
config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writePathEntry( "Exec", execEdit->text() );
config.writePathEntry( "SwallowExec", swallowExecEdit->text() );
config.writeEntry( "SwallowTitle", swallowTitleEdit->text() );
@ -3862,7 +3862,7 @@ void KExecPropsPlugin::applyChanges()
TQString temp = terminalEdit->text();
if (d->nocloseonexitCheck )
if ( d->nocloseonexitCheck->isChecked() )
temp += TQString::tqfromLatin1("--noclose ");
temp += TQString::fromLatin1("--noclose ");
temp = temp.stripWhiteSpace();
config.writeEntry( "TerminalOptions", temp );
config.writeEntry( "X-KDE-SubstituteUID", suidCheck->isChecked() );
@ -4097,7 +4097,7 @@ void KApplicationPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
config.writeEntry( "Type", TQString::tqfromLatin1("Application"));
config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writeEntry( "Comment", commentEdit->text() );
config.writeEntry( "Comment", commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "GenericName", genNameEdit->text() );

@ -52,13 +52,13 @@ static KConfig *recentdirs_readList(TQString &key, TQStringList &result, bool re
if (key[1] == ':')
{
key = key.mid(2);
config = new KSimpleConfig(TQString::tqfromLatin1("krecentdirsrc"), readOnly);
config = new KSimpleConfig(TQString::fromLatin1("krecentdirsrc"), readOnly);
}
else
{
key = key.mid(1);
config = KGlobal::config();
config->setGroup(TQString::tqfromLatin1("Recent Dirs"));
config->setGroup(TQString::fromLatin1("Recent Dirs"));
}
result=config->readPathListEntry(key);

@ -45,7 +45,7 @@
TQString KRecentDocument::recentDocumentDirectory()
{
// need to change this path, not sure where
return locateLocal("data", TQString::tqfromLatin1("RecentDocuments/"));
return locateLocal("data", TQString::fromLatin1("RecentDocuments/"));
}
TQStringList KRecentDocument::recentDocuments()
@ -88,9 +88,9 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName)
kdDebug(250) << "KRecentDocument::add for " << openStr << endl;
KConfig *config = KGlobal::config();
TQString oldGrp = config->group();
config->setGroup(TQString::tqfromLatin1("RecentDocuments"));
bool useRecent = config->readBoolEntry(TQString::tqfromLatin1("UseRecent"), true);
int maxEntries = config->readNumEntry(TQString::tqfromLatin1("MaxEntries"), 10);
config->setGroup(TQString::fromLatin1("RecentDocuments"));
bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true);
int maxEntries = config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10);
config->setGroup(oldGrp);
if(!useRecent)
@ -100,7 +100,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName)
TQString dStr = path + url.fileName();
TQString ddesktop = dStr + TQString::tqfromLatin1(".desktop");
TQString ddesktop = dStr + TQString::fromLatin1(".desktop");
int i=1;
// check for duplicates
@ -108,7 +108,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName)
// see if it points to the same file and application
KSimpleConfig tmp(ddesktop);
tmp.setDesktopGroup();
if(tmp.readEntry(TQString::tqfromLatin1("X-KDE-LastOpenedWith"))
if(tmp.readEntry(TQString::fromLatin1("X-KDE-LastOpenedWith"))
== desktopEntryName)
{
utime(TQFile::encodeName(ddesktop), NULL);
@ -118,7 +118,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName)
++i;
if ( i > maxEntries )
break;
ddesktop = dStr + TQString::tqfromLatin1("[%1].desktop").arg(i);
ddesktop = dStr + TQString::fromLatin1("[%1].desktop").arg(i);
}
TQDir dir(path);
@ -129,7 +129,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName)
TQStringList::Iterator it;
it = list.begin();
while(i > maxEntries-1){
TQFile::remove(dir.absPath() + TQString::tqfromLatin1("/") + (*it));
TQFile::remove(dir.absPath() + TQString::fromLatin1("/") + (*it));
--i, ++it;
}
}
@ -137,15 +137,15 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName)
// create the applnk
KSimpleConfig conf(ddesktop);
conf.setDesktopGroup();
conf.writeEntry( TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("Link") );
conf.writePathEntry( TQString::tqfromLatin1("URL"), openStr );
conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") );
conf.writePathEntry( TQString::fromLatin1("URL"), openStr );
// If you change the line below, change the test in the above loop
conf.writeEntry( TQString::tqfromLatin1("X-KDE-LastOpenedWith"), desktopEntryName );
conf.writeEntry( TQString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName );
TQString name = url.fileName();
if (name.isEmpty())
name = openStr;
conf.writeEntry( TQString::tqfromLatin1("Name"), name );
conf.writeEntry( TQString::tqfromLatin1("Icon"), KMimeType::iconForURL( url ) );
conf.writeEntry( TQString::fromLatin1("Name"), name );
conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) );
}
void KRecentDocument::add(const TQString &openStr, bool isUrl)
@ -170,8 +170,8 @@ void KRecentDocument::clear()
int KRecentDocument::maximumItems()
{
KConfig *config = KGlobal::config();
KConfigGroupSaver sa(config, TQString::tqfromLatin1("RecentDocuments"));
return config->readNumEntry(TQString::tqfromLatin1("MaxEntries"), 10);
KConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments"));
return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10);
}

@ -64,7 +64,7 @@ protected:
if ( item ) {
TQString text = static_cast<KURLBarItem*>( item )->toolTip();
if ( !text.isEmpty() )
tip( m_view->tqitemRect( item ), text );
tip( m_view->itemRect( item ), text );
}
}
@ -188,11 +188,11 @@ void KURLBarItem::paint( TQPainter *p )
if ( isCurrent() || isSelected() ) {
int h = height( box );
TQBrush brush = box->tqcolorGroup().brush( TQColorGroup::Highlight );
TQBrush brush = box->colorGroup().brush( TQColorGroup::Highlight );
p->fillRect( 0, 0, w, h, brush );
TQPen pen = p->pen();
TQPen oldPen = pen;
pen.setColor( box->tqcolorGroup().mid() );
pen.setColor( box->colorGroup().mid() );
p->setPen( pen );
p->drawPoint( 0, 0 );
@ -225,10 +225,10 @@ void KURLBarItem::paint( TQPainter *p )
int xPos = pm->width() + margin + 2;
if ( isCurrent() || isSelected() ) {
p->setPen( box->tqcolorGroup().highlight().dark(115) );
p->setPen( box->colorGroup().highlight().dark(115) );
p->drawText( xPos + ( TQApplication::reverseLayout() ? -1 : 1),
yPos + 1, visibleText );
p->setPen( box->tqcolorGroup().highlightedText() );
p->setPen( box->colorGroup().highlightedText() );
}
p->drawText( xPos, yPos, visibleText );
@ -257,10 +257,10 @@ void KURLBarItem::paint( TQPainter *p )
x = QMAX( x, margin );
if ( isCurrent() || isSelected() ) {
p->setPen( box->tqcolorGroup().highlight().dark(115) );
p->setPen( box->colorGroup().highlight().dark(115) );
p->drawText( x + ( TQApplication::reverseLayout() ? -1 : 1),
y + 1, visibleText );
p->setPen( box->tqcolorGroup().highlightedText() );
p->setPen( box->colorGroup().highlightedText() );
}
p->drawText( x, y, visibleText );
@ -844,7 +844,7 @@ KURLBarListBox::~KURLBarListBox()
void KURLBarListBox::paintEvent( TQPaintEvent* )
{
TQPainter p(this);
p.setPen( tqcolorGroup().mid() );
p.setPen( colorGroup().mid() );
p.drawRect( 0, 0, width(), height() );
}
@ -980,7 +980,7 @@ KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url,
if ( KGlobal::instance()->aboutData() )
appName = KGlobal::instance()->aboutData()->programName();
if ( appName.isEmpty() )
appName = TQString::tqfromLatin1( KGlobal::instance()->instanceName() );
appName = TQString::fromLatin1( KGlobal::instance()->instanceName() );
m_appLocal = new TQCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box );
m_appLocal->setChecked( appLocal );
TQWhatsThis::add( m_appLocal,

@ -31,7 +31,7 @@ class KURLComboBox::KURLComboBoxPrivate
{
public:
KURLComboBoxPrivate() {
dirpix = SmallIcon(TQString::tqfromLatin1("folder"));
dirpix = SmallIcon(TQString::fromLatin1("folder"));
}
TQPixmap dirpix;
@ -72,7 +72,7 @@ void KURLComboBox::init( Mode mode )
setTrapReturnKey( true );
setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
opendirPix = SmallIcon(TQString::tqfromLatin1("folder_open"));
opendirPix = SmallIcon(TQString::fromLatin1("folder_open"));
connect( this, TQT_SIGNAL( activated( int )), TQT_SLOT( slotActivated( int )));
}

@ -206,7 +206,7 @@ void KURLRequester::init()
d->edit = new KLineEdit( this, "line edit" );
myButton = new KURLDragPushButton( this, "kfile button");
TQIconSet iconSet = SmallIconSet(TQString::tqfromLatin1("fileopen"));
TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("fileopen"));
TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
myButton->setIconSet( iconSet );
myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );

@ -10,7 +10,7 @@ int main( int argc, char **argv )
KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : TQString::null );
if ( u.isValid() )
KMessageBox::information( 0L,
TQString::tqfromLatin1("You selected the url: %1")
TQString::fromLatin1("You selected the url: %1")
.arg( u.prettyURL() ), "Selected URL" );
return 0;

@ -25,7 +25,7 @@ void KFDTest::doit()
if ( dlg->exec() == KDialog::Accepted )
{
KMessageBox::information(0, TQString::tqfromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
}
// tqApp->quit();

@ -148,7 +148,7 @@ int main(int argc, char **argv)
{
for( int i = 1; i < argc; i++ )
{
argv1 = TQString::tqfromLatin1(argv[i]);
argv1 = TQString::fromLatin1(argv[i]);
kdDebug() << "Opening " << argv1 << endl;
if( argv1 == "-d" )
tf->setDirOnly();

@ -51,11 +51,11 @@ int main(int argc, char **argv)
TQString argv1;
TQString startDir;
if (argc > 1)
argv1 = TQString::tqfromLatin1(argv[1]);
argv1 = TQString::fromLatin1(argv[1]);
if ( argc > 2 )
startDir = TQString::tqfromLatin1( argv[2]);
startDir = TQString::fromLatin1( argv[2]);
if (argv1 == TQString::tqfromLatin1("diroperator")) {
if (argv1 == TQString::fromLatin1("diroperator")) {
KDirOperator *op = new KDirOperator(startDir, 0, "operator");
op->setViewConfig( KGlobal::config(), "TestGroup" );
op->setView(KFile::Simple);
@ -64,24 +64,24 @@ int main(int argc, char **argv)
a.exec();
}
else if (argv1 == TQString::tqfromLatin1("justone")) {
else if (argv1 == TQString::fromLatin1("justone")) {
TQString name = KFileDialog::getOpenFileName(startDir);
qDebug("filename=%s",name.latin1());
}
else if (argv1 == TQString::tqfromLatin1("existingURL")) {
else if (argv1 == TQString::fromLatin1("existingURL")) {
KURL url = KFileDialog::getExistingURL();
qDebug("URL=%s",url.url().latin1());
name1 = url.url();
}
else if (argv1 == TQString::tqfromLatin1("preview")) {
else if (argv1 == TQString::fromLatin1("preview")) {
KURL u = KFileDialog::getImageOpenURL();
qDebug("filename=%s", u.url().latin1());
}
else if (argv1 == TQString::tqfromLatin1("preselect")) {
names = KFileDialog::getOpenFileNames(TQString::tqfromLatin1("/etc/passwd"));
else if (argv1 == TQString::fromLatin1("preselect")) {
names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd"));
TQStringList::Iterator it = names.begin();
while ( it != names.end() ) {
qDebug("selected file: %s", (*it).latin1());
@ -89,10 +89,10 @@ int main(int argc, char **argv)
}
}
else if (argv1 == TQString::tqfromLatin1("dirs"))
else if (argv1 == TQString::fromLatin1("dirs"))
name1 = KFileDialog::getExistingDirectory();
else if (argv1 == TQString::tqfromLatin1("heap")) {
else if (argv1 == TQString::fromLatin1("heap")) {
KFileDialog *dlg = new KFileDialog( startDir, TQString::null, 0L,
"file dialog", true );
dlg->setMode( KFile::File);
@ -104,33 +104,33 @@ int main(int argc, char **argv)
if ( urlBar )
{
urlBar->insertDynamicItem( KURL("ftp://ftp.kde.org"),
TQString::tqfromLatin1("KDE FTP Server") );
TQString::fromLatin1("KDE FTP Server") );
}
if ( dlg->exec() == KDialog::Accepted )
name1 = dlg->selectedURL().url();
}
else if ( argv1 == TQString::tqfromLatin1("eventloop") )
else if ( argv1 == TQString::fromLatin1("eventloop") )
{
KFDTest *test = new KFDTest( startDir );
return a.exec();
}
else if (argv1 == TQString::tqfromLatin1("save")) {
else if (argv1 == TQString::fromLatin1("save")) {
KURL u = KFileDialog::getSaveURL();
// TQString(TQDir::homeDirPath() + TQString::tqfromLatin1("/testfile")),
// TQString(TQDir::homeDirPath() + TQString::fromLatin1("/testfile")),
// TQString::null, 0L);
name1 = u.url();
}
else if (argv1 == TQString::tqfromLatin1("icon")) {
else if (argv1 == TQString::fromLatin1("icon")) {
KIconDialog dlg;
TQString icon = dlg.selectIcon();
kdDebug() << icon << endl;
}
// else if ( argv1 == TQString::tqfromLatin1("dirselect") ) {
// else if ( argv1 == TQString::fromLatin1("dirselect") ) {
// KURL url;
// url.setPath( "/" );
// KURL selected = KDirSelectDialog::selectDirectory( url );
@ -140,7 +140,7 @@ int main(int argc, char **argv)
else {
KFileDialog dlg(startDir,
TQString::tqfromLatin1("*|All Files\n"
TQString::fromLatin1("*|All Files\n"
"*.lo *.o *.la|All libtool Files"),
0, 0, true);
// dlg.setFilter( "*.tdevelop" );
@ -177,7 +177,7 @@ int main(int argc, char **argv)
}
if (!(name1.isNull()))
KMessageBox::information(0, TQString::tqfromLatin1("You selected the file " ) + name1,
TQString::tqfromLatin1("Your Choice"));
KMessageBox::information(0, TQString::fromLatin1("You selected the file " ) + name1,
TQString::fromLatin1("Your Choice"));
return 0;
}

@ -10,7 +10,7 @@ int main( int argc, char **argv )
qDebug( "Selected url: %s", url.url().latin1());
KURLRequester *req = new KURLRequester();
KEditListBox *el = new KEditListBox( TQString::tqfromLatin1("Test"), req->customEditor() );
KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() );
el->show();
return app.exec();
}

@ -158,7 +158,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
AutoLogin &log = *it;
if ( (mode & defaultOnly) == defaultOnly &&
log.machine == TQString::tqfromLatin1("default") &&
log.machine == TQString::fromLatin1("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::tqfromLatin1("preset") &&
log.machine == TQString::fromLatin1("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::tqfromLatin1( buf+start, idx-start);
return TQString::fromLatin1( 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::tqfromLatin1(buf, tail).stripWhiteSpace();
TQString mac = TQString::fromLatin1(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::tqfromLatin1("default");
l.machine = TQString::fromLatin1("default");
}
else if (strncasecmp(buf+pos, "preset", 6) == 0 )
{
pos += 6;
l.machine = TQString::tqfromLatin1("preset");
l.machine = TQString::fromLatin1("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::tqfromLatin1("ftp");
type = l.type = TQString::fromLatin1("ftp");
// kdDebug() << "Type: " << l.type << endl;
macro = extract( buf, "macdef", pos );

@ -121,7 +121,7 @@ void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
break;
}
}
if ( !isLink && relativePath != TQString::tqfromLatin1("..") )
if ( !isLink && relativePath != TQString::fromLatin1("..") )
{
ChmodInfo info;
info.url = m_lstItems.first()->url(); // base directory

@ -186,7 +186,7 @@ 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::tqfromLatin1("data:") + url.path();
TQString &raw_url = header_info.url = TQString::fromLatin1("data:") + url.path();
int raw_url_len = (int)raw_url.length();
// jump over scheme part (must be "data:", we don't even check that)

@ -137,7 +137,7 @@ void DataSlave::send(int cmd, const TQByteArray &arr) {
break;
default:
error(ERR_UNSUPPORTED_ACTION,
unsupportedActionErrorString(TQString::tqfromLatin1("data"),cmd));
unsupportedActionErrorString(TQString::fromLatin1("data"),cmd));
}/*end switch*/
}

@ -97,7 +97,7 @@ KIO_EXPORT TQString KIO::number( KIO::filesize_t size )
{
char charbuf[256];
sprintf(charbuf, "%lld", size);
return TQString::tqfromLatin1(charbuf);
return TQString::fromLatin1(charbuf);
}
KIO_EXPORT unsigned int KIO::calculateRemainingSeconds( KIO::filesize_t totalSize,
@ -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::tqfromLatin1("localhost") : errorText );
result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::fromLatin1("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::tqcurrentDateTime(),
datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(),
false );
ret << errorName;
ret << TQString::tqfromLatin1( "<qt><p><b>" ) + errorName +
TQString::tqfromLatin1( "</b></p><p>" ) + description +
TQString::tqfromLatin1( "</p>" );
ret2 = TQString::tqfromLatin1( "<qt><p>" );
ret << TQString::fromLatin1( "<qt><p><b>" ) + errorName +
TQString::fromLatin1( "</b></p><p>" ) + description +
TQString::fromLatin1( "</p>" );
ret2 = TQString::fromLatin1( "<qt><p>" );
if ( !techName.isEmpty() )
ret2 += i18n( "<b>Technical reason</b>: " ) + techName + TQString::tqfromLatin1( "</p>" );
ret2 += i18n( "<b>Technical reason</b>: " ) + techName + TQString::fromLatin1( "</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::tqfromLatin1( "</li></ul>" );
ret2 += TQString::fromLatin1( "</li></ul>" );
}
if ( !solutions.isEmpty() ) {
ret2 += i18n( "<p><b>Possible solutions</b>:</p><ul><li>" );
ret2 += solutions.join( "</li><li>" );
ret2 += TQString::tqfromLatin1( "</li></ul>" );
ret2 += TQString::fromLatin1( "</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::tqcurrentDateTime(),
datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(),
false );
TQString errorName, techName, description;
@ -1738,7 +1738,7 @@ static TQString get_mount_info(const TQString& filename,
if ( is_my_mountpoint( mounted[i].f_mntonname, realname, max ) )
{
mountPoint = TQFile::decodeName(mounted[i].f_mntonname);
fstype = TQString::tqfromLatin1(mounttype);
fstype = TQString::fromLatin1(mounttype);
check_mount_point( mounttype, mounted[i].f_mntfromname,
isautofs, isslow );
// keep going, looking for a potentially better one
@ -1805,7 +1805,7 @@ static TQString get_mount_info(const TQString& filename,
if ( is_my_mountpoint( mountedto, realname, max ) )
{
mountPoint = TQFile::decodeName(mountedto);
fstype = TQString::tqfromLatin1(ent->vfsent_name);
fstype = TQString::fromLatin1(ent->vfsent_name);
check_mount_point(ent->vfsent_name, device_name, isautofs, isslow);
if (ismanual == Unseen)

@ -792,7 +792,7 @@ 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) << TQ_INT8( ro ? 1 : 0 )
<< TQString::tqfromLatin1(fstype) << dev << point;
<< TQString::fromLatin1(fstype) << dev << point;
SimpleJob *job = special( KURL("file:/"), packedArgs, showProgressInfo );
if ( showProgressInfo )
Observer::self()->mounting( job, dev, point );
@ -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::tqfromLatin1("inode/directory");
m_mimetype = TQString::fromLatin1("inode/directory");
emit TransferJob::mimetype( this, m_mimetype );
m_error = 0;
}
@ -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::tqfromLatin1("devices"))
if ((*it).uSource.protocol()==TQString::fromLatin1("devices"))
{
TQByteArray data;
TQByteArray param;
@ -3395,20 +3395,20 @@ void CopyJob::copyNextFile()
config.setDesktopGroup();
KURL url = (*it).uSource;
url.setPass( "" );
config.writePathEntry( TQString::tqfromLatin1("URL"), url.url() );
config.writeEntry( TQString::tqfromLatin1("Name"), url.url() );
config.writeEntry( TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("Link") );
config.writePathEntry( TQString::fromLatin1("URL"), url.url() );
config.writeEntry( TQString::fromLatin1("Name"), url.url() );
config.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") );
TQString protocol = (*it).uSource.protocol();
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
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
else
config.writeEntry( TQString::tqfromLatin1("Icon"), TQString::tqfromLatin1("unknown") );
config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("unknown") );
config.sync();
files.remove( it );
m_processedFiles++;
@ -4651,7 +4651,7 @@ TQFile *CacheInfo::cachedFile()
ok = false;
time_t date;
time_t tqcurrentDate = time(0);
time_t currentDate = 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(tqcurrentDate, date) > m_maxCacheAge))
if (m_maxCacheAge && (difftime(currentDate, date) > m_maxCacheAge))
{
m_bMustRevalidate = true;
m_expireDate = tqcurrentDate;
m_expireDate = currentDate;
}
}
@ -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(tqcurrentDate, date) >= 0)
if (!date || difftime(currentDate, date) >= 0)
m_bMustRevalidate = true;
m_expireDate = date;
}

@ -623,8 +623,8 @@ TQString KACL::KACLPrivate::getUserName( uid_t uid ) const
if ( !temp ) {
struct passwd *user = getpwuid( uid );
if ( user ) {
m_usercache.insert( uid, new TQString(TQString::tqfromLatin1(user->pw_name)) );
return TQString::tqfromLatin1( user->pw_name );
m_usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) );
return TQString::fromLatin1( user->pw_name );
}
else
return TQString::number( uid );
@ -641,8 +641,8 @@ TQString KACL::KACLPrivate::getGroupName( gid_t gid ) const
if ( !temp ) {
struct group *grp = getgrgid( gid );
if ( grp ) {
m_groupcache.insert( gid, new TQString(TQString::tqfromLatin1(grp->gr_name)) );
return TQString::tqfromLatin1( grp->gr_name );
m_groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) );
return TQString::fromLatin1( 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::tqfromLatin1( aclString );
TQString ret = TQString::fromLatin1( aclString );
acl_free( (void*)aclString );
return ret;
}

@ -375,7 +375,7 @@ KArchiveDirectory * KArchive::rootDir()
TQString username = pw ? TQFile::decodeName(pw->pw_name) : TQString::number( getuid() );
TQString groupname = grp ? TQFile::decodeName(grp->gr_name) : TQString::number( getgid() );
d->rootDir = new KArchiveDirectory( this, TQString::tqfromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, TQString::null );
d->rootDir = new KArchiveDirectory( this, TQString::fromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, TQString::null );
}
return d->rootDir;
}

@ -167,11 +167,11 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const
if ( !datatype.isEmpty() )
{
constr = TQString::tqfromLatin1( "DataType == '%1'" ).arg( datatype );
constr = TQString::fromLatin1( "DataType == '%1'" ).arg( datatype );
}
if ( !mimetype.isEmpty() )
{
TQString tmp = TQString::tqfromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype );
TQString tmp = TQString::fromLatin1( "'%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-tdelibs!
if ( instance )
{
TQString tmp = TQString::tqfromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() );
TQString tmp = TQString::fromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() );
if ( constr.isEmpty() )
constr = tmp;
else

@ -1041,7 +1041,7 @@ TQString KFileItem::parsePermissions(mode_t perm) const
if (hasExtendedACL())
p[10]='+';
return TQString::tqfromLatin1(p);
return TQString::fromLatin1(p);
}
// check if we need to cache this

@ -937,7 +937,7 @@ KFilePlugin* KFileMetaInfoProvider::loadPlugin( const TQString& mimeType, const
query = "(not exist [X-KDE-Protocol])";
queryMimeType = mimeType;
} else {
query = TQString::tqfromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol);
query = TQString::fromLatin1( "[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

@ -90,7 +90,7 @@ void KFileShare::readConfig() // static
{
// Create KFileSharePrivate instance
KFileSharePrivate::self();
KSimpleConfig config(TQString::tqfromLatin1(FILESHARECONF),true);
KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
s_sharingEnabled = config.readEntry("FILESHARING", "yes") == "yes";
s_restricted = config.readEntry("RESTRICT", "yes") == "yes";
@ -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::tqfromLatin1(":/usr/sbin");
TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::fromLatin1(":/usr/sbin");
TQString exe = KStandardDirs::findExe( exeName, path );
if (exe.isEmpty())
kdError() << exeName << " not found in " << path << endl;

@ -100,18 +100,18 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio)
{
if (mLib.isEmpty())
{
iio->setqStatus(1); // Error
iio->seStatus(1); // Error
return;
}
TQString libpath = KLibLoader::findLibrary(mLib.ascii());
if ( libpath.isEmpty())
{
iio->setqStatus(1); // Error
iio->seStatus(1); // Error
return;
}
lt_dlhandle libhandle = lt_dlopen( TQFile::encodeName(libpath) );
if (libhandle == 0) {
iio->setqStatus(1); // error
iio->seStatus(1); // error
kdWarning() << "KImageIOFormat::callLibFunc: couldn't dlopen " << mLib << "(" << lt_dlerror() << ")" << endl;
return;
}
@ -123,7 +123,7 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio)
lt_ptr func = lt_dlsym(libhandle, funcName.ascii());
if (func == NULL) {
iio->setqStatus(1); // error
iio->seStatus(1); // error
kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl;
}
mReadFunc = (void (*)(TQImageIO *))func;
@ -134,7 +134,7 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio)
lt_ptr func = lt_dlsym(libhandle, funcName.ascii());
if (func == NULL) {
iio->setqStatus(1); // error
iio->seStatus(1); // error
kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl;
}
mWriteFunc = (void (*)(TQImageIO *))func;
@ -145,12 +145,12 @@ KImageIOFormat::callLibFunc( bool read, TQImageIO *iio)
if (mReadFunc)
mReadFunc(iio);
else
iio->setqStatus(1); // Error
iio->seStatus(1); // Error
else
if (mWriteFunc)
mWriteFunc(iio);
else
iio->setqStatus(1); // Error
iio->seStatus(1); // Error
}
@ -232,7 +232,7 @@ KImageIOFactory::createPattern( KImageIO::Mode _mode)
patterns.sort();
patterns.prepend(allPatterns);
TQString pattern = patterns.join(TQString::tqfromLatin1("\n"));
TQString pattern = patterns.join(TQString::fromLatin1("\n"));
return pattern;
}
@ -256,7 +256,7 @@ KImageIOFactory::readImage( TQImageIO *iio)
}
if (!format || !format->bRead)
{
iio->setqStatus(1); // error
iio->seStatus(1); // error
return;
}
@ -283,7 +283,7 @@ KImageIOFactory::writeImage( TQImageIO *iio)
}
if (!format || !format->bWrite)
{
iio->setqStatus(1); // error
iio->seStatus(1); // error
return;
}

@ -525,7 +525,7 @@ class KMimeMagicUtimeConf
public:
KMimeMagicUtimeConf()
{
tmpDirs << TQString::tqfromLatin1("/tmp"); // default value
tmpDirs << TQString::fromLatin1("/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 :}

@ -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::tqfromLatin1("inode/directory") );
return mimeType( TQString::fromLatin1("inode/directory") );
else
return defaultMimeTypePtr(); // == 'no idea', e.g. for "data:,foo/"
}
@ -382,15 +382,15 @@ void KMimeType::init( KDesktopFile * config )
m_lstPatterns = config->readListEntry( "Patterns", ';' );
// Read the X-KDE-AutoEmbed setting and store it in the properties map
TQString XKDEAutoEmbed = TQString::tqfromLatin1("X-KDE-AutoEmbed");
TQString XKDEAutoEmbed = TQString::fromLatin1("X-KDE-AutoEmbed");
if ( config->hasKey( XKDEAutoEmbed ) )
m_mapProps.insert( XKDEAutoEmbed, TQVariant( config->readBoolEntry( XKDEAutoEmbed ), 0 ) );
TQString XKDEText = TQString::tqfromLatin1("X-KDE-text");
TQString XKDEText = TQString::fromLatin1("X-KDE-text");
if ( config->hasKey( XKDEText ) )
m_mapProps.insert( XKDEText, config->readBoolEntry( XKDEText ) );
TQString XKDEIsAlso = TQString::tqfromLatin1("X-KDE-IsAlso");
TQString XKDEIsAlso = TQString::fromLatin1("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::tqfromLatin1("X-KDE-PatternsAccuracy");
TQString XKDEPatternsAccuracy = TQString::fromLatin1("X-KDE-PatternsAccuracy");
if ( config->hasKey( XKDEPatternsAccuracy ) )
m_mapProps.insert( XKDEPatternsAccuracy, config->readEntry( XKDEPatternsAccuracy ) );
@ -838,7 +838,7 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf
KURL mpURL;
mpURL.setPath( mp );
// Open a new window
retval = KRun::runURL( mpURL, TQString::tqfromLatin1("inode/directory") );
retval = KRun::runURL( mpURL, TQString::fromLatin1("inode/directory") );
}
else
{

@ -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::tqfromLatin1("keditfiletype");
TQString keditfiletype = TQString::fromLatin1("keditfiletype");
KRun::runCommand( keditfiletype
+ " --parent " + TQString::number( (ulong)tqtopLevelWidget()->winId())
+ " --parent " + TQString::number( (ulong)topLevelWidget()->winId())
+ " " + KProcess::quote(mt),
keditfiletype, keditfiletype /*unused*/);
}

@ -277,7 +277,7 @@ TQString KProtocolManager::proxyForURL( const KURL &url )
break;
}
return (proxy.isEmpty() ? TQString::tqfromLatin1("DIRECT") : proxy);
return (proxy.isEmpty() ? TQString::fromLatin1("DIRECT") : proxy);
}
void KProtocolManager::badProxy( const TQString &proxy )
@ -462,7 +462,7 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers )
if( modifiers.contains('p') )
{
// TODO: determine this value instead of hardcoding it...
supp += TQString::tqfromLatin1("; X11");
supp += TQString::fromLatin1("; X11");
}
if( modifiers.contains('m') )
{
@ -471,13 +471,13 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers )
if( modifiers.contains('l') )
{
TQStringList languageList = KGlobal::locale()->languageList();
TQStringList::Iterator it = languageList.find( TQString::tqfromLatin1("C") );
TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") );
if( it != languageList.end() )
{
if( languageList.contains( TQString::tqfromLatin1("en") ) > 0 )
if( languageList.contains( TQString::fromLatin1("en") ) > 0 )
languageList.remove( it );
else
(*it) = TQString::tqfromLatin1("en");
(*it) = TQString::fromLatin1("en");
}
if( languageList.count() )
supp += TQString("; %1").arg(languageList.join(", "));

@ -37,13 +37,13 @@ TQString KRemoteEncoding::decode(const TQCString& name) const
{
#ifdef CHECK_UTF8
if (codec->mibEnum() == 106 && !KStringHandler::isUtf8(name))
return TQString::tqfromLatin1(name);
return TQString::fromLatin1(name);
#endif
TQString result = codec->toUnicode(name);
if (codec->fromUnicode(result) != name)
// fallback in case of decoding failure
return TQString::tqfromLatin1(name);
return TQString::fromLatin1(name);
return result;
}

@ -62,7 +62,7 @@ bool KSambaSharePrivate::load() {
* @return wether a smb.conf was found.
**/
bool KSambaSharePrivate::findSmbConf() {
KSimpleConfig config(TQString::tqfromLatin1(FILESHARECONF),true);
KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
smbConf = config.readEntry("SMBCONF");
if ( TQFile::exists(smbConf) )

@ -35,7 +35,7 @@ template class TQPtrList<KURIFilterPlugin>;
KURIFilterPlugin::KURIFilterPlugin( TQObject *parent, const char *name, double pri )
:TQObject( parent, name )
{
m_strName = TQString::tqfromLatin1( name );
m_strName = TQString::fromLatin1( name );
m_dblPriority = pri;
}
@ -173,30 +173,30 @@ TQString KURIFilterData::iconName()
TQString exeName = m_pURI.url();
exeName = exeName.mid( exeName.findRev( '/' ) + 1 ); // strip path if given
KService::Ptr service = KService::serviceByDesktopName( exeName );
if (service && service->icon() != TQString::tqfromLatin1( "unknown" ))
if (service && service->icon() != TQString::fromLatin1( "unknown" ))
m_strIconName = service->icon();
// Try to find an icon with the same name as the binary (useful for non-kde apps)
else if ( !KGlobal::iconLoader()->loadIcon( exeName, KIcon::NoGroup, 16, KIcon::DefaultState, 0, true ).isNull() )
m_strIconName = exeName;
else
// not found, use default
m_strIconName = TQString::tqfromLatin1("exec");
m_strIconName = TQString::fromLatin1("exec");
break;
}
case KURIFilterData::HELP:
{
m_strIconName = TQString::tqfromLatin1("khelpcenter");
m_strIconName = TQString::fromLatin1("khelpcenter");
break;
}
case KURIFilterData::SHELL:
{
m_strIconName = TQString::tqfromLatin1("konsole");
m_strIconName = TQString::fromLatin1("konsole");
break;
}
case KURIFilterData::ERROR:
case KURIFilterData::BLOCKED:
{
m_strIconName = TQString::tqfromLatin1("error");
m_strIconName = TQString::fromLatin1("error");
break;
}
default:

@ -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::tqfromLatin1("unknown");
m_mimetype = TQString::fromLatin1("unknown");
KIO::Job * job = KIO::mimetype( url );
job->setWindow (window);
connect( job, TQT_SIGNAL( result (KIO::Job *) ),
@ -462,7 +462,7 @@ bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray*
connect( job, TQT_SIGNAL( result (KIO::Job *) ),
this, TQT_SLOT( slotResult (KIO::Job *) ) );
TQMetaObject *meta = job->tqmetaObject();
TQMetaObject *meta = job->metaObject();
static const char dataSignal[] = "data(KIO::Job*,const " TQBYTEARRAY_OBJECT_NAME_STRING "&)";
if ( meta->findSignal( dataSignal ) != -1 ) {

@ -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->tqtopLevelWidget());
TQRect d = KGlobalSettings::desktopGeometry(label->topLevelWidget());
pref_width = d.width() / 4;
rt.setWidth(pref_width-10);

@ -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 tqmaximumSize;
unsigned long maximumSize;
// the size for the icon overlay
int iconSize;
// the transparency of the blended mimetype icon
@ -246,7 +246,7 @@ void PreviewJob::startPreview()
// Read configuration value for the maximum allowed size
KConfig * config = KGlobal::config();
KConfigGroupSaver cgs( config, "PreviewSettings" );
d->tqmaximumSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ );
d->maximumSize = 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->tqmaximumSize &&
if ( filesize_t((*it).m_long) > d->maximumSize &&
!d->ignoreMaximumSize &&
!d->currentItem.plugin->property("IgnoreMaximumSize").toBool() )
{

@ -273,7 +273,7 @@ void SessionData::reset()
// Get language settings...
TQStringList languageList = KGlobal::locale()->languagesTwoAlpha();
TQStringList::Iterator it = languageList.find( TQString::tqfromLatin1("C") );
TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") );
if ( it != languageList.end() )
{
if ( languageList.contains( english ) > 0 )
@ -286,7 +286,7 @@ void SessionData::reset()
d->language = languageList.join( ", " );
d->charsets = TQString::tqfromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower();
d->charsets = TQString::fromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower();
KProtocolManager::reparseConfiguration();
}

@ -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::tqfromLatin1(".slave-socket"));
KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket"));
if ( socketfile.status() != 0 )
{
error_text = i18n("Unable to create io-slave: %1").arg(strerror(errno));
@ -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::tqfromLatin1(".slave-socket"));
KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket"));
if ( socketfile.status() != 0 )
return 0;

@ -618,10 +618,10 @@ public:
* KIO::AuthInfo authInfo;
* if ( openPassDlg( authInfo ) )
* {
* kdDebug() << TQString::tqfromLatin1("User: ")
* kdDebug() << TQString::fromLatin1("User: ")
* << authInfo.username << endl;
* kdDebug() << TQString::tqfromLatin1("Password: ")
* << TQString::tqfromLatin1("Not displayed here!") << endl;
* kdDebug() << TQString::fromLatin1("Password: ")
* << TQString::fromLatin1("Not displayed here!") << endl;
* }
* \endcode
*
@ -635,10 +635,10 @@ public:
* TQString errorMsg = "You entered an incorrect password.";
* if ( openPassDlg( authInfo, errorMsg ) )
* {
* kdDebug() << TQString::tqfromLatin1("User: ")
* kdDebug() << TQString::fromLatin1("User: ")
* << authInfo.username << endl;
* kdDebug() << TQString::tqfromLatin1("Password: ")
* << TQString::tqfromLatin1("Not displayed here!") << endl;
* kdDebug() << TQString::fromLatin1("Password: ")
* << TQString::fromLatin1("Not displayed here!") << endl;
* }
* \endcode
*

@ -94,7 +94,7 @@ static TQString makeWalletKey( const TQString& key, const TQString& realm )
// Helper for storeInWallet/readFromWallet
static TQString makeMapKey( const char* key, int entryNumber )
{
TQString str = TQString::tqfromLatin1( key );
TQString str = TQString::fromLatin1( key );
if ( entryNumber > 1 )
str += "-" + TQString::number( entryNumber );
return str;

@ -871,7 +871,7 @@ TQDateTime KSSLCertificate::getQDTNotBefore() const {
#ifdef KSSL_HAVE_SSL
return ASN1_UTCTIME_QDateTime(X509_get_notBefore(d->m_cert), NULL);
#else
return TQDateTime::tqcurrentDateTime();
return TQDateTime::currentDateTime();
#endif
}
@ -880,7 +880,7 @@ TQDateTime KSSLCertificate::getQDTNotAfter() const {
#ifdef KSSL_HAVE_SSL
return ASN1_UTCTIME_QDateTime(X509_get_notAfter(d->m_cert), NULL);
#else
return TQDateTime::tqcurrentDateTime();
return TQDateTime::currentDateTime();
#endif
}

@ -273,14 +273,14 @@ void KSSLInfoDlg::displayCert(KSSLCertificate *x) {
d->_serialNum->setText(x->getSerialNumber());
cspl = d->_validFrom->palette();
if (x->getQDTNotBefore() > TQDateTime::tqcurrentDateTime(Qt::UTC))
if (x->getQDTNotBefore() > TQDateTime::currentDateTime(Qt::UTC))
cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
d->_validFrom->setPalette(cspl);
d->_validFrom->setText(x->getNotBefore());
cspl = d->_validUntil->palette();
if (x->getQDTNotAfter() < TQDateTime::tqcurrentDateTime(Qt::UTC))
if (x->getQDTNotAfter() < TQDateTime::currentDateTime(Qt::UTC))
cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
d->_validUntil->setPalette(cspl);
@ -305,8 +305,8 @@ void KSSLInfoDlg::displayCert(KSSLCertificate *x) {
ksv = ksvl.first();
if (ksv == KSSLCertificate::SelfSigned) {
if (x->getQDTNotAfter() > TQDateTime::tqcurrentDateTime(Qt::UTC) &&
x->getQDTNotBefore() < TQDateTime::tqcurrentDateTime(Qt::UTC)) {
if (x->getQDTNotAfter() > TQDateTime::currentDateTime(Qt::UTC) &&
x->getQDTNotBefore() < TQDateTime::currentDateTime(Qt::UTC)) {
if (KSSLSigners().useForSSL(*x))
ksv = KSSLCertificate::Ok;
} else {

@ -65,7 +65,7 @@ void KSSLPeerInfo::setPeerHost(TQString realHost) {
#ifdef Q_WS_WIN //TODO kresolver not ported
d->peerHost = d->peerHost.lower();
#else
d->peerHost = TQString::tqfromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost));
d->peerHost = TQString::fromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost));
#endif
}

@ -48,7 +48,7 @@ TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool tq
if ( tqunicode ) {
str = UnicodeLE2TQString( (TQChar*) c, len >> 1 );
} else {
str = TQString::tqfromLatin1( c, len );
str = TQString::fromLatin1( c, len );
}
return str;
}
@ -299,7 +299,7 @@ TQByteArray KNTLM::createBlob( const TQByteArray &targetinfo )
Blob *bl = (Blob *) blob.data();
bl->signature = KFromToBigEndian( (TQ_UINT32) 0x01010000 );
TQ_UINT64 now = TQDateTime::tqcurrentDateTime().toTime_t();
TQ_UINT64 now = TQDateTime::currentDateTime().toTime_t();
now += (TQ_UINT64)3600*(TQ_UINT64)24*(TQ_UINT64)134774;
now *= (TQ_UINT64)10000000;
bl->timestamp = KFromToLittleEndian( now );

@ -101,11 +101,11 @@ int main(int argc, char **argv) {
if (!fromaddr.isEmpty()) {
TQString name = emailConfig.getSetting(KEMailSettings::RealName);
if (!name.isEmpty())
fromaddr = name + TQString::tqfromLatin1(" <") + fromaddr + TQString::tqfromLatin1(">");
fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">");
} else {
struct passwd *p;
p = getpwuid(getuid());
fromaddr = TQString::tqfromLatin1(p->pw_name);
fromaddr = TQString::fromLatin1(p->pw_name);
fromaddr += "@";
char buffer[256];
buffer[0] = '\0';
@ -117,7 +117,7 @@ int main(int argc, char **argv) {
TQString server = emailConfig.getSetting(KEMailSettings::OutServer);
if (server.isEmpty())
server=TQString::tqfromLatin1("bugs.kde.org");
server=TQString::fromLatin1("bugs.kde.org");
SMTP *sm = new SMTP;
BugMailer bm(sm);
@ -129,7 +129,7 @@ int main(int argc, char **argv) {
sm->setSenderAddress(fromaddr);
sm->setRecipientAddress(recipient);
sm->setMessageSubject(subject);
sm->setMessageHeader(TQString::tqfromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient.data()));
sm->setMessageHeader(TQString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient.data()));
sm->setMessageBody(text);
sm->sendMessage();

@ -134,7 +134,7 @@ void SMTP::sendMessage(void)
kdDebug() << "state was == FINISHED\n" << endl;
finished = false;
state = IN;
writeString = TQString::tqfromLatin1("helo %1\r\n").arg(domainName);
writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName);
write(sock->socket(), writeString.ascii(), writeString.length());
}
if(connected){
@ -262,7 +262,7 @@ void SMTP::processLine(TQString *line)
switch(stat){
case GREET: //220
state = IN;
writeString = TQString::tqfromLatin1("helo %1\r\n").arg(domainName);
writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
@ -273,19 +273,19 @@ void SMTP::processLine(TQString *line)
switch(state){
case IN:
state = READY;
writeString = TQString::tqfromLatin1("mail from: %1\r\n").arg(senderAddress);
writeString = TQString::fromLatin1("mail from: %1\r\n").arg(senderAddress);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
case READY:
state = SENTFROM;
writeString = TQString::tqfromLatin1("rcpt to: %1\r\n").arg(recipientAddress);
writeString = TQString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
case SENTFROM:
state = SENTTO;
writeString = TQString::tqfromLatin1("data\r\n");
writeString = TQString::fromLatin1("data\r\n");
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());