1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-02 04:10:20 +02:00

Use new QTweetLib 0.5 API for PIN values so leading zeros are respected

This commit is contained in:
Jeff Mitchell
2012-03-09 18:23:48 -05:00
parent e1edd9c5ee
commit c6cd6821bf
2 changed files with 6 additions and 6 deletions

View File

@@ -12,15 +12,15 @@ TomahawkOAuthTwitter::TomahawkOAuthTwitter( QNetworkAccessManager *nam, QObject*
} }
int const QString
TomahawkOAuthTwitter::authorizationWidget() TomahawkOAuthTwitter::authorizationWidget()
{ {
bool ok; 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); 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) if ( ok && !str.isEmpty() )
return i; return str;
return 0; return QString();
} }
void void

View File

@@ -17,7 +17,7 @@ public:
~TomahawkOAuthTwitter() {} ~TomahawkOAuthTwitter() {}
protected: protected:
virtual int authorizationWidget(); virtual const QString authorizationWidget();
private slots: private slots:
void error(); void error();