SloxFolderManager::SloxFolderManager( SloxBase *res, const KURL & baseUrl ) : mDownloadJob( 0 ), mBaseUrl( baseUrl ), mRes( res ) { kdDebug() << k_funcinfo << baseUrl << endl; readFolders(); }
SloxFolderManager::SloxFolderManager( SloxBase *res, const KUrl & baseUrl ) : mDownloadJob( 0 ), mBaseUrl( baseUrl ), mRes( res ) { kDebug() << baseUrl; readFolders(); }
void SloxFolderManager::slotResult( KIO::Job *job ) { kdDebug() << k_funcinfo << endl; if ( job->error() ) { job->showErrorDialog( 0 ); } else { kdDebug() << k_funcinfo << " success, writing to " << cacheFile() << endl; QFile f( cacheFile() ); if ( !f.open( IO_WriteOnly ) ) { kdDebug() << "Unable to open '" << cacheFile() << "'" << endl; return; } QTextStream stream ( &f ); stream << mDownloadJob->response(); f.close(); readFolders(); } mDownloadJob = 0; emit foldersUpdated(); }
void SloxFolderManager::slotResult( KJob *job ) { kDebug() ; if ( job->error() ) { static_cast<KIO::Job*>(job)->ui()->showErrorMessage(); } else { kDebug() <<" success, writing to" << cacheFile(); QFile f( cacheFile() ); if ( !f.open( QIODevice::WriteOnly ) ) { kDebug() <<"Unable to open '" << cacheFile() <<"'"; return; } QTextStream stream ( &f ); stream << mDownloadJob->response(); f.close(); readFolders(); } mDownloadJob = 0; emit foldersUpdated(); }