summaryrefslogtreecommitdiffstats
path: root/lib/compatibility/knewstuff/provider.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /lib/compatibility/knewstuff/provider.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/compatibility/knewstuff/provider.cpp')
-rw-r--r--lib/compatibility/knewstuff/provider.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/compatibility/knewstuff/provider.cpp b/lib/compatibility/knewstuff/provider.cpp
index 2ab48f18..ca7767e0 100644
--- a/lib/compatibility/knewstuff/provider.cpp
+++ b/lib/compatibility/knewstuff/provider.cpp
@@ -34,7 +34,7 @@ Provider::Provider() : mNoUpload( false )
{
}
-Provider::Provider( const QDomElement &e ) : mNoUpload( false )
+Provider::Provider( const TQDomElement &e ) : mNoUpload( false )
{
parseDomElement( e );
}
@@ -44,12 +44,12 @@ Provider::~Provider()
}
-void Provider::setName( const QString &name )
+void Provider::setName( const TQString &name )
{
mName = name;
}
-QString Provider::name() const
+TQString Provider::name() const
{
return mName;
}
@@ -110,7 +110,7 @@ bool Provider::noUpload() const
}
-void Provider::parseDomElement( const QDomElement &element )
+void Provider::parseDomElement( const TQDomElement &element )
{
if ( element.tagName() != "provider" ) return;
@@ -119,21 +119,21 @@ void Provider::parseDomElement( const QDomElement &element )
setNoUploadUrl( KURL( element.attribute("nouploadurl") ) );
setIcon( KURL( element.attribute("icon") ) );
- QDomNode n;
+ TQDomNode n;
for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement p = n.toElement();
+ TQDomElement p = n.toElement();
if ( p.tagName() == "noupload" ) setNoUpload( true );
if ( p.tagName() == "title" ) setName( p.text().stripWhiteSpace() );
}
}
-QDomElement Provider::createDomElement( QDomDocument &doc, QDomElement &parent )
+TQDomElement Provider::createDomElement( TQDomDocument &doc, TQDomElement &parent )
{
- QDomElement entry = doc.createElement( "stuff" );
+ TQDomElement entry = doc.createElement( "stuff" );
parent.appendChild( entry );
- QDomElement n = doc.createElement( "name" );
+ TQDomElement n = doc.createElement( "name" );
n.appendChild( doc.createTextNode( name() ) );
entry.appendChild( n );
@@ -141,13 +141,13 @@ QDomElement Provider::createDomElement( QDomDocument &doc, QDomElement &parent )
}
-ProviderLoader::ProviderLoader( QWidget *parentWidget ) :
+ProviderLoader::ProviderLoader( TQWidget *parentWidget ) :
mParentWidget( parentWidget )
{
mProviders.setAutoDelete( true );
}
-void ProviderLoader::load( const QString &type, const QString &providersList )
+void ProviderLoader::load( const TQString &type, const TQString &providersList )
{
kdDebug(5850) << "ProviderLoader::load()" << endl;
@@ -157,13 +157,13 @@ void ProviderLoader::load( const QString &type, const QString &providersList )
KConfig *cfg = KGlobal::config();
cfg->setGroup("KNewStuff");
- QString providersUrl = providersList;
+ TQString providersUrl = providersList;
if( providersUrl.isEmpty() )
providersUrl = cfg->readEntry( "ProvidersUrl" );
if ( providersUrl.isEmpty() ) {
// TODO: Replace the default by the real one.
- QString server = cfg->readEntry( "MasterServer",
+ TQString server = cfg->readEntry( "MasterServer",
"http://korganizer.kde.org" );
providersUrl = server + "/knewstuff/" + type + "/providers.xml";
@@ -172,23 +172,23 @@ void ProviderLoader::load( const QString &type, const QString &providersList )
kdDebug(5850) << "ProviderLoader::load(): providersUrl: " << providersUrl << endl;
KIO::TransferJob *job = KIO::get( KURL( providersUrl ) );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotJobResult( KIO::Job * ) ) );
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotJobData( KIO::Job *, const QByteArray & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotJobData( KIO::Job *, const TQByteArray & ) ) );
// job->dumpObjectInfo();
}
-void ProviderLoader::slotJobData( KIO::Job *, const QByteArray &data )
+void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data )
{
kdDebug(5850) << "ProviderLoader::slotJobData()" << endl;
if ( data.size() == 0 ) return;
- QCString str( data, data.size() + 1 );
+ TQCString str( data, data.size() + 1 );
- mJobData.append( QString::fromUtf8( str ) );
+ mJobData.append( TQString::fromUtf8( str ) );
}
void ProviderLoader::slotJobResult( KIO::Job *job )
@@ -200,21 +200,21 @@ void ProviderLoader::slotJobResult( KIO::Job *job )
kdDebug(5850) << "--PROVIDERS-START--" << endl << mJobData << "--PROV_END--"
<< endl;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( mJobData ) ) {
KMessageBox::error( mParentWidget, i18n("Error parsing providers list.") );
return;
}
- QDomElement providers = doc.documentElement();
+ TQDomElement providers = doc.documentElement();
if ( providers.isNull() ) {
kdDebug(5850) << "No document in Providers.xml." << endl;
}
- QDomNode n;
+ TQDomNode n;
for ( n = providers.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement p = n.toElement();
+ TQDomElement p = n.toElement();
mProviders.append( new Provider( p ) );
}