From fab36b2262e75e6952069491012232e3cc877d76 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Fri, 9 Mar 2012 18:23:48 -0500 Subject: [PATCH] Use new QTweetLib 0.5 API for PIN values so leading zeros are respected Conflicts: src/accounts/twitter/tomahawkoauthtwitter.h --- src/sip/twitter/tomahawkoauthtwitter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sip/twitter/tomahawkoauthtwitter.cpp b/src/sip/twitter/tomahawkoauthtwitter.cpp index 35cd98a9e..c70f66986 100644 --- a/src/sip/twitter/tomahawkoauthtwitter.cpp +++ b/src/sip/twitter/tomahawkoauthtwitter.cpp @@ -12,15 +12,15 @@ TomahawkOAuthTwitter::TomahawkOAuthTwitter( QNetworkAccessManager *nam, QObject* } -int +const QString TomahawkOAuthTwitter::authorizationWidget() { bool ok; - int i = QInputDialog::getInt(0, tr( "Twitter PIN" ), tr( "After authenticating on Twitter's web site,\nenter the displayed PIN number here:" ), 0, 0, 2147483647, 1, &ok); - if (ok) - return i; + const QString str = QInputDialog::getText(0, tr( "Twitter PIN" ), tr( "After authenticating on Twitter's web site,\nenter the displayed PIN number here:" ), QLineEdit::Normal, QString(), &ok); + if ( ok && !str.isEmpty() ) + return str; - return 0; + return QString(); } void