From f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 29 Jun 2013 16:33:55 +0200 Subject: Initial TDE conversion --- src/webquerygooglescholar.cpp | 44 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/webquerygooglescholar.cpp') diff --git a/src/webquerygooglescholar.cpp b/src/webquerygooglescholar.cpp index b8fdc04..5822440 100644 --- a/src/webquerygooglescholar.cpp +++ b/src/webquerygooglescholar.cpp @@ -23,13 +23,13 @@ #include #include #include -#include +#include #include -#include +#include #include -#include -#include +#include +#include #include @@ -112,9 +112,9 @@ namespace KBibTeX /** prepare HTTP request (buffer, signals, job) */ m_transferJobBuffer = new TQBuffer(); m_transferJobBuffer->open( IO_WriteOnly ); - KIO::TransferJob* m_transferJob = KIO::get( KURL( "http://scholar.google.com/scholar_ncr" ), false, false ); - connect( m_transferJob, SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, SLOT( slotData( KIO::Job *, const TQByteArray & ) ) ); - connect( m_transferJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinishedStartpage( KIO::Job * ) ) ); + TDEIO::TransferJob* m_transferJob = TDEIO::get( KURL( "http://scholar.google.com/scholar_ncr" ), false, false ); + connect( m_transferJob, SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), this, SLOT( slotData( TDEIO::Job *, const TQByteArray & ) ) ); + connect( m_transferJob, SIGNAL( result( TDEIO::Job * ) ), this, SLOT( slotFinishedStartpage( TDEIO::Job * ) ) ); } void WebQueryGoogleScholar::cancelQuery() @@ -125,7 +125,7 @@ namespace KBibTeX setEndSearch( WebQuery::statusError ); } - void WebQueryGoogleScholar::slotFinishedStartpage( KIO::Job *job ) + void WebQueryGoogleScholar::slotFinishedStartpage( TDEIO::Job *job ) { /** close and delete buffer (content does not matter) */ m_transferJobBuffer->close(); @@ -153,13 +153,13 @@ namespace KBibTeX /** prepare next HTTP request for preferences page (buffer, signals, job) */ m_transferJobBuffer = new TQBuffer(); m_transferJobBuffer->open( IO_WriteOnly ); - KIO::TransferJob* m_transferJob = KIO::get( KURL( "http://scholar.google.com/scholar_preferences?hl=en" ), false, false ); - connect( m_transferJob, SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, SLOT( slotData( KIO::Job *, const TQByteArray & ) ) ); - connect( m_transferJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinishedLoadingSettings( KIO::Job * ) ) ); + TDEIO::TransferJob* m_transferJob = TDEIO::get( KURL( "http://scholar.google.com/scholar_preferences?hl=en" ), false, false ); + connect( m_transferJob, SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), this, SLOT( slotData( TDEIO::Job *, const TQByteArray & ) ) ); + connect( m_transferJob, SIGNAL( result( TDEIO::Job * ) ), this, SLOT( slotFinishedLoadingSettings( TDEIO::Job * ) ) ); } - void WebQueryGoogleScholar::slotFinishedLoadingSettings( KIO::Job *job ) + void WebQueryGoogleScholar::slotFinishedLoadingSettings( TDEIO::Job *job ) { /** close and delete buffer (content does not matter) */ m_transferJobBuffer->close(); @@ -197,12 +197,12 @@ namespace KBibTeX KURL nextUrl( formFieldsToUrl( "http://scholar.google.com/scholar_setprefs", keyValues ) ); m_transferJobBuffer = new TQBuffer(); m_transferJobBuffer->open( IO_WriteOnly ); - KIO::TransferJob* m_transferJob = KIO::get( nextUrl, false, false ); - connect( m_transferJob, SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, SLOT( slotData( KIO::Job *, const TQByteArray & ) ) ); - connect( m_transferJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinishedSavingSettings( KIO::Job * ) ) ); + TDEIO::TransferJob* m_transferJob = TDEIO::get( nextUrl, false, false ); + connect( m_transferJob, SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), this, SLOT( slotData( TDEIO::Job *, const TQByteArray & ) ) ); + connect( m_transferJob, SIGNAL( result( TDEIO::Job * ) ), this, SLOT( slotFinishedSavingSettings( TDEIO::Job * ) ) ); } - void WebQueryGoogleScholar::slotFinishedSavingSettings( KIO::Job *job ) + void WebQueryGoogleScholar::slotFinishedSavingSettings( TDEIO::Job *job ) { /** close and delete buffer (content does not matter) */ m_transferJobBuffer->close(); @@ -238,12 +238,12 @@ namespace KBibTeX KURL nextUrl( formFieldsToUrl( "http://scholar.google.com/scholar", keyValues ) ); m_transferJobBuffer = new TQBuffer(); m_transferJobBuffer->open( IO_WriteOnly ); - KIO::TransferJob* m_transferJob = KIO::get( nextUrl, false, false ); - connect( m_transferJob, SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, SLOT( slotData( KIO::Job *, const TQByteArray & ) ) ); - connect( m_transferJob, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinishedReceivingResultOverview( KIO::Job * ) ) ); + TDEIO::TransferJob* m_transferJob = TDEIO::get( nextUrl, false, false ); + connect( m_transferJob, SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ), this, SLOT( slotData( TDEIO::Job *, const TQByteArray & ) ) ); + connect( m_transferJob, SIGNAL( result( TDEIO::Job * ) ), this, SLOT( slotFinishedReceivingResultOverview( TDEIO::Job * ) ) ); } - void WebQueryGoogleScholar::slotFinishedReceivingResultOverview( KIO::Job *job ) + void WebQueryGoogleScholar::slotFinishedReceivingResultOverview( TDEIO::Job *job ) { /** close and delete buffer (content does not matter) */ m_transferJobBuffer->close(); @@ -307,7 +307,7 @@ namespace KBibTeX void WebQueryGoogleScholar::readAndChangeConfig() { - KConfig cfg( "kcookiejarrc" ); + TDEConfig cfg( "kcookiejarrc" ); cfg.setGroup( "Cookie Policy" ); m_originalEnableCookies = cfg.readBoolEntry( "Cookies", true ); m_originalSessionCookies = cfg.readBoolEntry( "AcceptSessionCookies", true ); @@ -340,7 +340,7 @@ namespace KBibTeX void WebQueryGoogleScholar::restoreConfig() { - KConfig cfg( "kcookiejarrc" ); + TDEConfig cfg( "kcookiejarrc" ); cfg.setGroup( "Cookie Policy" ); cfg.writeEntry( "CookieGlobalAdvice", m_originalCookieGlobalAdvice ); cfg.writeEntry( "Cookies", m_originalEnableCookies ); -- cgit v1.2.3