diff options
author | Slávek Banko <[email protected]> | 2013-06-29 12:56:53 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-07-04 03:11:35 +0200 |
commit | 5f5e7c5455d52826b0bd50f64fcffb7695ce970d (patch) | |
tree | c8ee8792d3fb139365abbf70c2255f1e69d2aa34 /src/webquerybibsonomy.cpp | |
parent | 251c9a439759c830d34c70683d0fc9454d703010 (diff) | |
download | kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.tar.gz kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.zip |
Initial TQt conversion
Diffstat (limited to 'src/webquerybibsonomy.cpp')
-rw-r--r-- | src/webquerybibsonomy.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/webquerybibsonomy.cpp b/src/webquerybibsonomy.cpp index 135d72b..eec1d3f 100644 --- a/src/webquerybibsonomy.cpp +++ b/src/webquerybibsonomy.cpp @@ -17,11 +17,11 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include <qapplication.h> -#include <qfile.h> -#include <qregexp.h> -#include <qstring.h> -#include <qspinbox.h> +#include <ntqapplication.h> +#include <ntqfile.h> +#include <ntqregexp.h> +#include <ntqstring.h> +#include <ntqspinbox.h> #include <klocale.h> #include <klineedit.h> @@ -35,20 +35,20 @@ namespace KBibTeX { - WebQueryBibSonomyWidget::WebQueryBibSonomyWidget( QWidget *parent, const char *name ) + WebQueryBibSonomyWidget::WebQueryBibSonomyWidget( TQWidget *parent, const char *name ) : WebQueryWidget( parent, name ) { init(); Settings *settings = Settings::self(); - QString value = settings->getWebQueryDefault( "BibSonomy" ); - value = value == QString::null ? "" : value; + TQString value = settings->getWebQueryDefault( "BibSonomy" ); + value = value == TQString::null ? "" : value; lineEditQuery->setText( value ); slotTextChanged( value, true ); } - WebQueryBibSonomy::WebQueryBibSonomy( QWidget* parent ): WebQuery( parent ) + WebQueryBibSonomy::WebQueryBibSonomy( TQWidget* parent ): WebQuery( parent ) { m_widget = new WebQueryBibSonomyWidget( parent ); } @@ -58,17 +58,17 @@ namespace KBibTeX delete m_widget; } - QString WebQueryBibSonomy::title() + TQString WebQueryBibSonomy::title() { return i18n( "BibSonomy" ); } - QString WebQueryBibSonomy::disclaimer() + TQString WebQueryBibSonomy::disclaimer() { return i18n( "BibSonomy bookmark sharing system" ); } - QString WebQueryBibSonomy::disclaimerURL() + TQString WebQueryBibSonomy::disclaimerURL() { return "http://www.bibsonomy.org/help/about/"; } @@ -86,7 +86,7 @@ namespace KBibTeX setNumStages( 1 ); - QString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" ); + TQString searchTerm = m_widget->lineEditQuery->text().stripWhiteSpace().replace( '$', "" ); if ( searchTerm.isEmpty() ) { setEndSearch( WebQuery::statusInvalidQuery ); @@ -95,7 +95,7 @@ namespace KBibTeX int numberOfResults = m_widget->spinBoxMaxHits->value(); - KURL url = KURL( QString( "http://www.bibsonomy.org/bib/search/%2?items=%1" ).arg( numberOfResults ) .arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) ); + KURL url = KURL( TQString( "http://www.bibsonomy.org/bib/search/%2?items=%1" ).arg( numberOfResults ) .arg( searchTerm.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) ); BibTeX::File *bibFile = downloadBibTeXFile( url ); if ( bibFile != NULL && !m_aborted ) @@ -110,10 +110,10 @@ namespace KBibTeX } else if ( !m_aborted ) { - QString message = KIO::NetAccess::lastErrorString(); + TQString message = KIO::NetAccess::lastErrorString(); if ( message.isEmpty() ) message.prepend( '\n' ); - message.prepend( QString( i18n( "Querying database '%1' failed." ) ).arg( title() ) ); + message.prepend( TQString( i18n( "Querying database '%1' failed." ) ).arg( title() ) ); KMessageBox::error( m_parent, message ); setEndSearch( WebQuery::statusError ); } |