summaryrefslogtreecommitdiffstats
path: root/konq-plugins/uachanger
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/uachanger')
-rw-r--r--konq-plugins/uachanger/uachangerplugin.cpp52
-rw-r--r--konq-plugins/uachanger/uachangerplugin.h3
2 files changed, 28 insertions, 27 deletions
diff --git a/konq-plugins/uachanger/uachangerplugin.cpp b/konq-plugins/uachanger/uachangerplugin.cpp
index b6ad880..fb5d840 100644
--- a/konq-plugins/uachanger/uachangerplugin.cpp
+++ b/konq-plugins/uachanger/uachangerplugin.cpp
@@ -47,12 +47,12 @@ K_EXPORT_COMPONENT_FACTORY (libuachangerplugin, UAChangerPluginFactory (&aboutda
#define UA_PTOS(x) (*it)->property(x).toString()
-#define QFL1(x) TQString::fromLatin1(x)
+#define TQFL1(x) TQString::tqfromLatin1(x)
-UAChangerPlugin::UAChangerPlugin( TQObject* parent, const char* name,
+UAChangerPlugin::UAChangerPlugin( TQObject* tqparent, const char* name,
const TQStringList & )
- :KParts::Plugin( parent, name ),
+ :KParts::Plugin( tqparent, name ),
m_bSettingsLoaded(false), m_part(0L), m_config(0L)
{
setInstance(UAChangerPlugin::instance());
@@ -65,9 +65,9 @@ UAChangerPlugin::UAChangerPlugin( TQObject* parent, const char* name,
m_pUAMenu->setEnabled ( false );
- if ( parent && parent->inherits( "KHTMLPart" ) )
+ if ( tqparent && tqparent->inherits( "KHTMLPart" ) )
{
- m_part = static_cast<KHTMLPart*>(parent);
+ m_part = static_cast<KHTMLPart*>(tqparent);
connect( m_part, TQT_SIGNAL(started(KIO::Job*)), this,
TQT_SLOT(slotStarted(KIO::Job*)) );
}
@@ -101,13 +101,13 @@ void UAChangerPlugin::parseDescFiles()
TQStringList languageList = KGlobal::locale()->languageList();
if ( languageList.count() )
{
- TQStringList::Iterator it = languageList.find(QFL1("C"));
+ TQStringList::Iterator it = languageList.tqfind(TQFL1("C"));
if( it != languageList.end() )
{
- if( languageList.contains( QFL1("en") ) > 0 )
+ if( languageList.tqcontains( TQFL1("en") ) > 0 )
languageList.remove( it );
else
- (*it) = QFL1("en");
+ (*it) = TQFL1("en");
}
}
@@ -124,32 +124,32 @@ void UAChangerPlugin::parseDescFiles()
if ( (*it)->property("X-KDE-UA-DYNAMIC-ENTRY").toBool() )
{
- tmp.replace( QFL1("appSysName"), QFL1(utsn.sysname) );
- tmp.replace( QFL1("appSysRelease"), QFL1(utsn.release) );
- tmp.replace( QFL1("appMachineType"), QFL1(utsn.machine) );
- tmp.replace( QFL1("appLanguage"), languageList.join(QFL1(", ")) );
- tmp.replace( QFL1("appPlatform"), QFL1("X11") );
+ tmp.tqreplace( TQFL1("appSysName"), TQFL1(utsn.sysname) );
+ tmp.tqreplace( TQFL1("appSysRelease"), TQFL1(utsn.release) );
+ tmp.tqreplace( TQFL1("appMachineType"), TQFL1(utsn.machine) );
+ tmp.tqreplace( TQFL1("appLanguage"), languageList.join(TQFL1(", ")) );
+ tmp.tqreplace( TQFL1("appPlatform"), TQFL1("X11") );
}
- if ( m_lstIdentity.contains(tmp) )
+ if ( m_lstIdentity.tqcontains(tmp) )
continue; // Ignore dups!
m_lstIdentity << tmp;
- tmp = TQString("%1 %2").arg(UA_PTOS("X-KDE-UA-SYSNAME")).arg(UA_PTOS("X-KDE-UA-SYSRELEASE"));
+ tmp = TQString("%1 %2").tqarg(UA_PTOS("X-KDE-UA-SYSNAME")).tqarg(UA_PTOS("X-KDE-UA-SYSRELEASE"));
if ( tmp.stripWhiteSpace().isEmpty() )
{
if(tag == "NN" || tag == "IE" || tag == "MOZ")
- tmp = i18n("Version %1").arg(UA_PTOS("X-KDE-UA-VERSION"));
+ tmp = i18n("Version %1").tqarg(UA_PTOS("X-KDE-UA-VERSION"));
else
- tmp = TQString("%1 %2").arg(UA_PTOS("X-KDE-UA-NAME")).arg(UA_PTOS("X-KDE-UA-VERSION"));
+ tmp = TQString("%1 %2").tqarg(UA_PTOS("X-KDE-UA-NAME")).tqarg(UA_PTOS("X-KDE-UA-VERSION"));
}
else
{
if(tag == "NN" || tag == "IE" || tag == "MOZ")
- tmp = i18n("Version %1 on %2").arg(UA_PTOS("X-KDE-UA-VERSION")).arg(tmp);
+ tmp = i18n("Version %1 on %2").tqarg(UA_PTOS("X-KDE-UA-VERSION")).tqarg(tmp);
else
- tmp = i18n("%1 %2 on %3").arg(UA_PTOS("X-KDE-UA-NAME")).arg(UA_PTOS("X-KDE-UA-VERSION")).arg(tmp);
+ tmp = i18n("%1 %2 on %3").tqarg(UA_PTOS("X-KDE-UA-NAME")).tqarg(UA_PTOS("X-KDE-UA-VERSION")).tqarg(tmp);
}
m_lstAlias << tmp;
@@ -161,7 +161,7 @@ void UAChangerPlugin::parseDescFiles()
{
if ( m_lstAlias[(*e)] > tmp ) {
ualist.insert( e, m_lstAlias.count()-1 );
- tmp = TQString::null;
+ tmp = TQString();
}
++e;
}
@@ -212,7 +212,7 @@ void UAChangerPlugin::slotAboutToShow()
m_pUAMenu->popupMenu()->clear();
m_pUAMenu->popupMenu()->insertTitle(i18n("Identify As")); // imho title doesn't need colon..
- TQString host = m_currentURL.isLocalFile() ? QFL1("localhost") : m_currentURL.host();
+ TQString host = m_currentURL.isLocalFile() ? TQFL1("localhost") : m_currentURL.host();
m_currentUserAgent = KProtocolManager::userAgentForHost(host);
//kdDebug(90130) << "User Agent: " << m_currentUserAgent << endl;
@@ -267,7 +267,7 @@ void UAChangerPlugin::slotItemSelected( int id )
TQString host;
m_currentUserAgent = m_lstIdentity[id];
- host = m_currentURL.isLocalFile() ? QFL1("localhost") : filterHost( m_currentURL.host() );
+ host = m_currentURL.isLocalFile() ? TQFL1("localhost") : filterHost( m_currentURL.host() );
m_config->setGroup( host.lower() );
m_config->writeEntry( "UserAgent", m_currentUserAgent );
@@ -304,7 +304,7 @@ void UAChangerPlugin::slotDefault()
if (partList.count() == 1)
break;
- domains << partList.join(QFL1("."));
+ domains << partList.join(TQFL1("."));
partList.remove(partList.begin());
}
@@ -336,7 +336,7 @@ void UAChangerPlugin::slotDefault()
void UAChangerPlugin::updateIOSlaves ()
{
// Inform running http(s) io-slaves about the change...
- if (!DCOPRef("*", "KIO::Scheduler").send("reparseSlaveConfiguration", TQString::null))
+ if (!DCOPRef("*", "KIO::Scheduler").send("reparseSlaveConfiguration", TQString()))
kdWarning() << "UAChangerPlugin::updateIOSlaves: Unable to update running application!" << endl;
}
@@ -379,7 +379,7 @@ TQString UAChangerPlugin::findTLD (const TQString &hostname)
// it should be <surname>.name since people should not be able
// to set cookies for everyone with the same surname.
// Matches <surname>.name
- if( partList[1].lower() == QFL1("name") )
+ if( partList[1].lower() == TQFL1("name") )
{
break;
}
@@ -399,7 +399,7 @@ TQString UAChangerPlugin::findTLD (const TQString &hostname)
}
}
- domains.append(partList.join(QFL1(".")));
+ domains.append(partList.join(TQFL1(".")));
partList.remove(partList.begin()); // Remove part
}
diff --git a/konq-plugins/uachanger/uachangerplugin.h b/konq-plugins/uachanger/uachangerplugin.h
index 7732574..ef5abd4 100644
--- a/konq-plugins/uachanger/uachangerplugin.h
+++ b/konq-plugins/uachanger/uachangerplugin.h
@@ -41,9 +41,10 @@ namespace KIO
class UAChangerPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- UAChangerPlugin( TQObject* parent, const char* name,
+ UAChangerPlugin( TQObject* tqparent, const char* name,
const TQStringList & );
~UAChangerPlugin();