diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-08 15:37:56 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-08 15:37:56 -0500 |
commit | a71fa0953d227ac2b418a4acd1602db4ecf55825 (patch) | |
tree | 746bbf189af883f4bc96bf377f3741bbda884100 /tdenewstuff/provider.cpp | |
parent | 58c3aed2bb340467aa9734a9141ebe1d89e4074b (diff) | |
download | tdelibs-a71fa0953d227ac2b418a4acd1602db4ecf55825.tar.gz tdelibs-a71fa0953d227ac2b418a4acd1602db4ecf55825.zip |
Add progress and error signals to tdenewstuff
This relates to Bug 2127
Diffstat (limited to 'tdenewstuff/provider.cpp')
-rw-r--r-- | tdenewstuff/provider.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tdenewstuff/provider.cpp b/tdenewstuff/provider.cpp index ee76d887b..022570b01 100644 --- a/tdenewstuff/provider.cpp +++ b/tdenewstuff/provider.cpp @@ -234,7 +234,7 @@ TQDomElement Provider::createDomElement( TQDomDocument &doc, TQDomElement &paren void Provider::slotJobData( TDEIO::Job *, const TQByteArray &data ) { - kdDebug() << "ProviderLoader::slotJobData()" << endl; + kdDebug() << "Provider::slotJobData()" << endl; if ( data.size() == 0 ) return; @@ -369,6 +369,8 @@ void ProviderLoader::load( const TQString &type, const TQString &providersList ) TQT_SLOT( slotJobResult( TDEIO::Job * ) ) ); connect( job, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), TQT_SLOT( slotJobData( TDEIO::Job *, const TQByteArray & ) ) ); + connect( job, TQT_SIGNAL( percent (TDEIO::Job *, unsigned long) ), + TQT_SIGNAL( percent (TDEIO::Job *, unsigned long) ) ); // job->dumpObjectInfo(); } @@ -388,6 +390,8 @@ void ProviderLoader::slotJobResult( TDEIO::Job *job ) { if ( job->error() ) { job->showErrorDialog( TQT_TQWIDGET(parent()) ); + emit error(); + return; } kdDebug() << "--PROVIDERS-START--" << endl << mJobData << "--PROV_END--" @@ -396,6 +400,7 @@ void ProviderLoader::slotJobResult( TDEIO::Job *job ) TQDomDocument doc; if ( !doc.setContent( mJobData ) ) { KMessageBox::error( TQT_TQWIDGET(parent()), i18n("Error parsing providers list.") ); + emit error(); return; } @@ -403,6 +408,8 @@ void ProviderLoader::slotJobResult( TDEIO::Job *job ) if ( providers.isNull() ) { kdDebug() << "No document in Providers.xml." << endl; + emit error(); + return; } TQDomNode n; |