From 6268960f55b75dd8f5ea664b6513083b5a34fd8f Mon Sep 17 00:00:00 2001 From: Tejas Dinkar Date: Jun 13 2009 06:03:57 +0000 Subject: Patch To fix the twitpocalypse See http://news.cnet.com/8301-17939_109-10264002-2.html --- diff --git a/choqok-0.6-twitpocalypse.patch b/choqok-0.6-twitpocalypse.patch new file mode 100644 index 0000000..01aa821 --- /dev/null +++ b/choqok-0.6-twitpocalypse.patch @@ -0,0 +1,672 @@ +diff -ur choqok-0.6/src/account.cpp choqok/src/account.cpp +--- choqok-0.6/src/account.cpp 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/account.cpp 2009-06-13 11:25:47.194144419 +0530 +@@ -48,12 +48,12 @@ + setServiceType( account.serviceType(), account.homepage() ); + } + +-uint Account::userId() const ++qulonglong Account::userId() const + { + return mUserId; + } + +-void Account::setUserId( uint id ) ++void Account::setUserId( qulonglong id ) + { + mUserId = id; + } +diff -ur choqok-0.6/src/account.h choqok/src/account.h +--- choqok-0.6/src/account.h 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/account.h 2009-06-13 11:25:47.225144802 +0530 +@@ -38,8 +38,8 @@ + + ~Account(); + +- uint userId() const; +- void setUserId( uint id ); ++ qulonglong userId() const; ++ void setUserId( qulonglong id ); + + QString username() const; + void setUsername( const QString &name ); +@@ -67,7 +67,7 @@ + void setServiceType( Service type, const QString &homepage = QString() ); + + private: +- uint mUserId; ++ qulonglong mUserId; + QString mUsername; + QString mPassword; + QString mServiceName; +diff -ur choqok-0.6/src/accountmanager.cpp choqok/src/accountmanager.cpp +--- choqok-0.6/src/accountmanager.cpp 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/accountmanager.cpp 2009-06-13 11:25:47.228142879 +0530 +@@ -177,7 +177,7 @@ + Account a; + KConfigGroup accountGrp( conf, list[i] ); + a.setUsername( accountGrp.readEntry( "username", QString() ) ); +- a.setUserId( accountGrp.readEntry( "userId", uint( -1 ) ) ); ++ a.setUserId( accountGrp.readEntry( "userId", qulonglong( -1 ) ) ); + a.setAlias( accountGrp.readEntry( "alias", QString() ) ); + int service_type = accountGrp.readEntry( "service_type", -1 ); + QString homepage = accountGrp.readEntry( "homepage", QString() ); +@@ -202,7 +202,7 @@ + kDebug() << "Password loaded from config file."; + } + a.setError( false ); +- if ( a.userId() == ( uint ) - 1 ) {///Just for compatibility with previous versions ++ if ( a.userId() == ( qulonglong ) - 1 ) {///Just for compatibility with previous versions + Account *account = new Account( a ); + Backend *b = new Backend( account ); + connect( b, SIGNAL( userVerified( Account* ) ), this, SLOT( userVerified( Account* ) ) ); +diff -ur choqok-0.6/src/backend.cpp choqok/src/backend.cpp +--- choqok-0.6/src/backend.cpp 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/backend.cpp 2009-06-13 11:25:47.267169912 +0530 +@@ -57,7 +57,7 @@ + kDebug(); + } + +-void Backend::postNewStatus( const QString & statusMessage, uint replyToStatusId ) ++void Backend::postNewStatus( const QString & statusMessage, qulonglong replyToStatusId ) + { + kDebug(); + KUrl url( mCurrentAccount->apiPath() ); +@@ -186,7 +186,7 @@ + jobList<apiPath() ); +@@ -274,7 +274,7 @@ + else if ( element.tagName() == "text" ) + post.content = element.text(); + else if ( element.tagName() == "id" ) +- post.statusId = element.text().toInt(); ++ post.statusId = element.text().toULongLong(); + else if ( element.tagName() == "in_reply_to_status_id" ) + post.replyToStatusId = element.text().toULongLong(); + else if ( element.tagName() == "in_reply_to_user_id" ) +@@ -295,7 +295,7 @@ + } else if ( subElement.tagName() == "profile_image_url" ) { + post.user.profileImageUrl = subElement.text(); + } else if ( subElement.tagName() == "id" ) { +- post.user.userId = subElement.text().toUInt(); ++ post.user.userId = subElement.text().toULongLong(); + } else if ( subElement.tagName() == "name" ) { + post.user.name = subElement.text(); + } else if ( subElement.tagName() == QString ( "description" ) ) { +@@ -368,7 +368,7 @@ + return msg; + } + QDomNode node2 = root.firstChild(); +-// uint senderId = 0, recipientId = 0; ++// qulonglong senderId = 0, recipientId = 0; + User sender, recipient; + QString timeStr;//, senderScreenName, recipientScreenName, senderProfileImageUrl, senderName, + // senderDescription, recipientProfileImageUrl, recipientName, recipientDescription; +@@ -379,7 +379,7 @@ + else if ( element.tagName() == "text" ) + msg.content = element.text(); + else if ( element.tagName() == "id" ) +- msg.statusId = element.text().toInt(); ++ msg.statusId = element.text().toULongLong(); + else if ( element.tagName() == "sender_id" ) + sender.userId = element.text().toULongLong(); + else if ( element.tagName() == "recipient_id" ) +@@ -483,7 +483,7 @@ + return mLatestErrorString; + } + +-void Backend::requestFavorited( uint statusId, bool isFavorite ) ++void Backend::requestFavorited( qulonglong statusId, bool isFavorite ) + { + kDebug(); + KUrl url( mCurrentAccount->apiPath() ); +@@ -507,7 +507,7 @@ + jobList<apiPath() ); +@@ -529,7 +529,7 @@ + jobList<apiPath() ); +@@ -778,7 +778,7 @@ + QString timeStr; + while ( !node2.isNull() ) { + if ( node2.toElement().tagName() == "id" ) { +- mCurrentAccount->setUserId( node2.toElement().text().toUInt() ); ++ mCurrentAccount->setUserId( node2.toElement().text().toULongLong() ); + break; + } + node2 = node2.nextSibling(); +@@ -844,7 +844,7 @@ + QDomNode node3 = node2.firstChild(); + while ( !node3.isNull() ) { + if ( node3.toElement().tagName() == "id" ) { +- mCurrentAccount->setUserId( node3.toElement().text().toUInt() ); ++ mCurrentAccount->setUserId( node3.toElement().text().toULongLong() ); + emit userVerified( mCurrentAccount ); + return; + } +@@ -878,7 +878,7 @@ + job->start(); + } + +-void Backend::requestDMessages( uint latestStatusId, DMessageType type, int page ) ++void Backend::requestDMessages( qulonglong latestStatusId, DMessageType type, int page ) + { + kDebug(); + KUrl url( mCurrentAccount->apiPath() ); +@@ -1078,7 +1078,7 @@ + url.setPass( mCurrentAccount->password() ); + } + +-void Backend::requestSingleStatus( uint statusId ) ++void Backend::requestSingleStatus( qulonglong statusId ) + { + kDebug(); + KUrl url( mCurrentAccount->apiPath() ); +diff -ur choqok-0.6/src/backend.h choqok/src/backend.h +--- choqok-0.6/src/backend.h 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/backend.h 2009-06-13 11:25:47.271144650 +0530 +@@ -55,15 +55,15 @@ + static QString shortenUrl(const QString &baseUrl); + + public slots: +- void postNewStatus( const QString &statusMessage, uint replyToStatusId = 0 ); ++ void postNewStatus( const QString &statusMessage, qulonglong replyToStatusId = 0 ); + void twitPicCreatePost(const KUrl &picUrl, const QString &message); + void sendDMessage( const QString &screenName, const QString &message ); +- void requestTimeLine( uint latestStatusId, TimeLineType type, int page = 0 ); +- void requestDMessages( uint latestStatusId, DMessageType type, int page = 0 ); +- void requestSingleStatus( uint statusId ); +- void requestFavorited( uint statusId, bool isFavorite ); +- void requestDestroy( uint statusId ); +- void requestDestroyDMessage( uint statusId ); ++ void requestTimeLine( qulonglong latestStatusId, TimeLineType type, int page = 0 ); ++ void requestDMessages( qulonglong latestStatusId, DMessageType type, int page = 0 ); ++ void requestSingleStatus( qulonglong statusId ); ++ void requestFavorited( qulonglong statusId, bool isFavorite ); ++ void requestDestroy( qulonglong statusId ); ++ void requestDestroyDMessage( qulonglong statusId ); + void abortPostNewStatus(); + void settingsChanged(); + void listFollowersScreenName(); +@@ -116,7 +116,7 @@ + QString mLatestErrorString; + QMap mRequestTimelineMap; + QMap mRequestDMessagesMap; +- QMap mRequestSingleStatusMap; ++ QMap mRequestSingleStatusMap; + + QMap mPostNewStatusBuffer; + QMap mSendDMessageBuffer; +diff -ur choqok-0.6/src/datacontainers.h choqok/src/datacontainers.h +--- choqok-0.6/src/datacontainers.h 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/datacontainers.h 2009-06-13 11:25:47.303142857 +0530 +@@ -28,7 +28,7 @@ + + struct User { + public: +- uint userId; ++ qulonglong userId; + QString name; + QString screenName; + QString location; +@@ -43,12 +43,12 @@ + struct Status { + public: + QDateTime creationDateTime; +- uint statusId; ++ qulonglong statusId; + QString content; + QString source; + bool isTruncated; +- uint replyToStatusId; +- uint replyToUserId; ++ qulonglong replyToStatusId; ++ qulonglong replyToUserId; + bool isFavorited; + QString replyToUserScreenName; + User user; +diff -ur choqok-0.6/src/identicasearch.cpp choqok/src/identicasearch.cpp +--- choqok-0.6/src/identicasearch.cpp 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/identicasearch.cpp 2009-06-13 11:25:47.306143168 +0530 +@@ -56,7 +56,7 @@ + kDebug(); + } + +-KUrl IdenticaSearch::buildUrl( QString query, int option, uint sinceStatusId, uint count, uint page ) ++KUrl IdenticaSearch::buildUrl( QString query, int option, qulonglong sinceStatusId, qulonglong count, qulonglong page ) + { + kDebug(); + Q_UNUSED(sinceStatusId); +@@ -89,7 +89,7 @@ + return url; + } + +-void IdenticaSearch::requestSearchResults( QString query, int option, uint sinceStatusId, uint count, uint page ) ++void IdenticaSearch::requestSearchResults( QString query, int option, qulonglong sinceStatusId, qulonglong count, qulonglong page ) + { + kDebug(); + Q_UNUSED(count); +@@ -156,7 +156,7 @@ + Status status; + + QDomAttr statusIdAttr = node.toElement().attributeNode( "rdf:about" ); +- uint statusId = 0; ++ qulonglong statusId = 0; + sscanf( qPrintable( statusIdAttr.value() ), + qPrintable( mSearchUrl + "notice/%d" ), &statusId ); + +diff -ur choqok-0.6/src/identicasearch.h choqok/src/identicasearch.h +--- choqok-0.6/src/identicasearch.h 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/identicasearch.h 2009-06-13 11:25:47.311143176 +0530 +@@ -45,15 +45,15 @@ + virtual ~IdenticaSearch(); + + private: +- virtual KUrl buildUrl( QString query, int option, uint sinceStatusId = 0, uint count = 0, uint page = 1 ); ++ virtual KUrl buildUrl( QString query, int option, qulonglong sinceStatusId = 0, qulonglong count = 0, qulonglong page = 1 ); + QList* parseRss( const QByteArray &buffer ); + + public slots: + virtual void requestSearchResults( QString query, + int option, +- uint sinceStatusId = 0, +- uint count = 0, +- uint page = 1 ); ++ qulonglong sinceStatusId = 0, ++ qulonglong count = 0, ++ qulonglong page = 1 ); + + protected slots: + virtual void searchResultsReturned( KJob *job ); +diff -ur choqok-0.6/src/mainwindow.cpp choqok/src/mainwindow.cpp +--- choqok-0.6/src/mainwindow.cpp 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/mainwindow.cpp 2009-06-13 11:25:47.324168576 +0530 +@@ -286,12 +286,12 @@ + + SearchWindow* searchWin = new SearchWindow( tmp->currentAccount(), 0 ); + +- connect( searchWin, SIGNAL( forwardReply( const QString&, uint, bool ) ), +- tmp, SLOT( prepareReply( const QString&, uint, bool ) ) ); ++ connect( searchWin, SIGNAL( forwardReply( const QString&, qulonglong, bool ) ), ++ tmp, SLOT( prepareReply( const QString&, qulonglong, bool ) ) ); + connect( searchWin, SIGNAL(forwardReTweet(const QString&)), + tmp, SLOT( reTweet(const QString&) ) ); +- connect( searchWin, SIGNAL( forwardFavorited( uint, bool ) ), +- tmp->getBackend(), SLOT( requestFavorited( uint, bool ) ) ); ++ connect( searchWin, SIGNAL( forwardFavorited( qulonglong, bool ) ), ++ tmp->getBackend(), SLOT( requestFavorited( qulonglong, bool ) ) ); + connect( this, SIGNAL( updateSearchResults() ), + searchWin, SLOT( updateSearchResults() ) ); + connect( timelineTimer, SIGNAL( timeout() ), +diff -ur choqok-0.6/src/search.cpp choqok/src/search.cpp +--- choqok-0.6/src/search.cpp 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/search.cpp 2009-06-13 11:25:47.357147075 +0530 +@@ -45,7 +45,7 @@ + return mSearchTypes; + } + +-KUrl Search::buildUrl( QString query, int option, uint sinceStatusId, uint count, uint page ) ++KUrl Search::buildUrl( QString query, int option, qulonglong sinceStatusId, qulonglong count, qulonglong page ) + { + Q_UNUSED(query); + Q_UNUSED(option); +@@ -55,7 +55,7 @@ + return KUrl(); + } + +-void Search::requestSearchResults( QString query, int option, uint sinceStatusId, uint count, uint page ) ++void Search::requestSearchResults( QString query, int option, qulonglong sinceStatusId, qulonglong count, qulonglong page ) + { + Q_UNUSED(query); + Q_UNUSED(option); +diff -ur choqok-0.6/src/search.h choqok/src/search.h +--- choqok-0.6/src/search.h 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/search.h 2009-06-13 11:25:47.361166860 +0530 +@@ -50,14 +50,14 @@ + QMap > getSearchTypes(); + + private: +- virtual KUrl buildUrl( QString query, int option, uint sinceStatusId = 0, uint count = 0, uint page = 1 ); ++ virtual KUrl buildUrl( QString query, int option, qulonglong sinceStatusId = 0, qulonglong count = 0, qulonglong page = 1 ); + + public slots: + virtual void requestSearchResults( QString query, + int option, +- uint sinceStatusId = 0, +- uint count = 0, +- uint page = 1 ); ++ qulonglong sinceStatusId = 0, ++ qulonglong count = 0, ++ qulonglong page = 1 ); + + protected slots: + virtual void searchResultsReturned( KJob *job ); +@@ -71,7 +71,7 @@ + // The QString in the QPair is a human readable string describing what the type searches for. The boolean value + // determines whether or not the search type is traversable (if the forward and back buttons should be displayed). + QMap > mSearchTypes; +- uint mSinceStatusId; ++ qulonglong mSinceStatusId; + QString mSearchUrl; + Account* mAccount; + }; +diff -ur choqok-0.6/src/searchwindow.cpp choqok/src/searchwindow.cpp +--- choqok-0.6/src/searchwindow.cpp 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/searchwindow.cpp 2009-06-13 11:25:47.375173042 +0530 +@@ -207,7 +207,7 @@ + kDebug(); + if( isVisible() && !lastSearchQuery.isNull() && page == 1 ) + { +- uint sinceStatusId = 0; ++ qulonglong sinceStatusId = 0; + if( listResults.count() ) + sinceStatusId = listResults.last()->currentStatus().statusId; + +@@ -246,11 +246,11 @@ + for( ; it != endIt; ++it ) { + StatusWidget *wt = new StatusWidget( &mAccount, this ); + +- connect( wt, SIGNAL( sigReply( const QString&, uint, bool ) ), +- this, SIGNAL( forwardReply( const QString&, uint, bool ) ) ); ++ connect( wt, SIGNAL( sigReply( const QString&, qulonglong, bool ) ), ++ this, SIGNAL( forwardReply( const QString&, qulonglong, bool ) ) ); + connect( wt, SIGNAL(sigReTweet(const QString&)), SIGNAL(forwardReTweet(const QString&))); +- connect( wt, SIGNAL( sigFavorite( uint, bool ) ), +- this, SIGNAL( forwardFavorited( uint, bool ) ) ); ++ connect( wt, SIGNAL( sigFavorite( qulonglong, bool ) ), ++ this, SIGNAL( forwardFavorited( qulonglong, bool ) ) ); + connect (wt,SIGNAL(sigSearch(int,QString)),this,SLOT(updateSearchArea(int,QString))); + + wt->setAttribute( Qt::WA_DeleteOnClose ); +@@ -402,7 +402,7 @@ + + void SearchWindow::pageChange() + { +- page = ui.txtPage->text().toUInt(); ++ page = ui.txtPage->text().toULongLong(); + ui.lblStatus->setText( i18n( "Fetching Page %1...", QString::number( page ) ) ); + mSearch->requestSearchResults( lastSearchQuery, + lastSearchType, +diff -ur choqok-0.6/src/searchwindow.h choqok/src/searchwindow.h +--- choqok-0.6/src/searchwindow.h 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/searchwindow.h 2009-06-13 11:25:47.383143679 +0530 +@@ -69,8 +69,8 @@ + void error( QString message ); + + signals: +- void forwardReply( const QString &username, uint statusId, bool dMsg ); +- void forwardFavorited( uint statusId, bool isFavorite ); ++ void forwardReply( const QString &username, qulonglong statusId, bool dMsg ); ++ void forwardFavorited( qulonglong statusId, bool isFavorite ); + void forwardReTweet( const QString &text ); + // void updateTimeLines(); + +@@ -95,8 +95,8 @@ + Account mAccount; + Search* mSearch; + Ui::searchwidget_base ui; +- uint page; +- uint lastValidPage; ++ qulonglong page; ++ qulonglong lastValidPage; + QString lastSearchQuery; + int lastSearchType; + QIntValidator* intValidator; +diff -ur choqok-0.6/src/statuswidget.h choqok/src/statuswidget.h +--- choqok-0.6/src/statuswidget.h 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/statuswidget.h 2009-06-13 11:25:47.424170687 +0530 +@@ -64,9 +64,9 @@ + void setUiStyle(); + signals: + void sigSearch(int type, const QString & search); +- void sigReply( const QString &userName, uint statusId, bool dMsg ); +- void sigDestroy( uint statusId ); +- void sigFavorite( uint statusId, bool isFavorite ); ++ void sigReply( const QString &userName, qulonglong statusId, bool dMsg ); ++ void sigDestroy( qulonglong statusId ); ++ void sigFavorite( qulonglong statusId, bool isFavorite ); + void sigReTweet( const QString &text ); + + protected slots: +diff -ur choqok-0.6/src/timelinewidget.cpp choqok/src/timelinewidget.cpp +--- choqok-0.6/src/timelinewidget.cpp 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/timelinewidget.cpp 2009-06-13 11:25:47.448177583 +0530 +@@ -292,7 +292,7 @@ + } + + void TimeLineWidget::addNewStatusesToUi( QList< Status > & statusList, QBoxLayout * layoutToAddStatuses, +- QMap *list, Backend::TimeLineType type ) ++ QMap *list, Backend::TimeLineType type ) + { + kDebug(); + bool allInOne = Settings::showAllNotifiesInOne(); +@@ -317,12 +317,12 @@ + StatusWidget *wt = new StatusWidget( &mCurrentAccount, this ); + wt->setAttribute( Qt::WA_DeleteOnClose ); + wt->setCurrentStatus( *it ); +- connect( wt, SIGNAL( sigReply( const QString&, uint, bool ) ), +- this, SLOT( prepareReply( const QString&, uint, bool ) ) ); +- connect( wt, SIGNAL( sigFavorite( uint, bool ) ), +- twitter, SLOT( requestFavorited( uint, bool ) ) ); +- connect( wt, SIGNAL( sigDestroy( uint ) ), +- this, SLOT( requestDestroy( uint ) ) ); ++ connect( wt, SIGNAL( sigReply( const QString&, qulonglong, bool ) ), ++ this, SLOT( prepareReply( const QString&, qulonglong, bool ) ) ); ++ connect( wt, SIGNAL( sigFavorite( qulonglong, bool ) ), ++ twitter, SLOT( requestFavorited( qulonglong, bool ) ) ); ++ connect( wt, SIGNAL( sigDestroy( qulonglong ) ), ++ this, SLOT( requestDestroy( qulonglong ) ) ); + connect(wt,SIGNAL(sigSearch(int,QString)),this,SIGNAL(sigSearch(int,QString))); + connect(wt, SIGNAL(sigReTweet(const QString&)), this, SLOT(reTweet(const QString&))); + +@@ -349,7 +349,7 @@ + } + if ( allInOne && Settings::notifyType() != SettingsBase::LibNotify ) + notifyStr += ""; +- uint latestId = statusList.last().statusId; ++ qulonglong latestId = statusList.last().statusId; + if ( type == Backend::HomeTimeLine && latestId > latestHomeStatusId ) { + kDebug() << "Latest home statusId sets to: " << latestId; + latestHomeStatusId = latestId; +@@ -507,15 +507,15 @@ + KConfigGroup grp( &statusesBackup, groupList[i] ); + Status st; + st.creationDateTime = grp.readEntry( "created_at", QDateTime::currentDateTime() ); +- st.statusId = grp.readEntry( "id", ( uint ) 0 ); ++ st.statusId = grp.readEntry( "id", ( qulonglong ) 0 ); + st.content = grp.readEntry( "text", QString() ); + st.source = grp.readEntry( "source", QString() ); + st.isTruncated = grp.readEntry( "truncated", false ); +- st.replyToStatusId = grp.readEntry( "in_reply_to_status_id", ( uint ) 0 ); +- st.replyToUserId = grp.readEntry( "in_reply_to_user_id", ( uint ) 0 ); ++ st.replyToStatusId = grp.readEntry( "in_reply_to_status_id", ( qulonglong ) 0 ); ++ st.replyToUserId = grp.readEntry( "in_reply_to_user_id", ( qulonglong ) 0 ); + st.isFavorited = grp.readEntry( "favorited", false ); + st.replyToUserScreenName = grp.readEntry( "in_reply_to_screen_name", QString() ); +- st.user.userId = grp.readEntry( "userId", ( uint ) 0 ); ++ st.user.userId = grp.readEntry( "userId", ( qulonglong ) 0 ); + st.user.screenName = grp.readEntry( "screen_name", QString() ); + st.user.name = grp.readEntry( "name", QString() ); + st.user.profileImageUrl = grp.readEntry( "profile_image_url", QString() ); +@@ -538,7 +538,7 @@ + return list; + } + +-void TimeLineWidget::prepareReply( const QString &userName, uint statusId, bool dMsg ) ++void TimeLineWidget::prepareReply( const QString &userName, qulonglong statusId, bool dMsg ) + { + kDebug(); + emit showMe(); +@@ -555,14 +555,14 @@ + txtNewStatus->setFocus( Qt::OtherFocusReason ); + } + +-void TimeLineWidget::updateStatusList( QMap *list ) ++void TimeLineWidget::updateStatusList( QMap *list ) + { + kDebug(); + int toBeDelete = list->count() - Settings::countOfStatusesOnMain(); + + if ( toBeDelete > 0 ) { +- QMap::const_iterator it = list->constBegin(); +- QMap::const_iterator endIt = list->constEnd(); ++ QMap::const_iterator it = list->constBegin(); ++ QMap::const_iterator endIt = list->constEnd(); + for ( ; it != endIt && toBeDelete > 0; ++it ) { + StatusWidget* wt = it.value(); + if ( !wt->isRead() ) +@@ -574,7 +574,7 @@ + } + } + +-void TimeLineWidget::clearTimeLineList( QMap * list ) ++void TimeLineWidget::clearTimeLineList( QMap * list ) + { + kDebug(); + qDeleteAll(*list); +@@ -669,7 +669,7 @@ + toBeDestroied->close(); + } + +-void TimeLineWidget::requestDestroy( uint statusId ) ++void TimeLineWidget::requestDestroy( qulonglong statusId ) + { + if ( KMessageBox::warningYesNo( this, i18n( "Are you sure you wish to destroy this status?" ) ) == KMessageBox::Yes ) { + toBeDestroied = qobject_cast ( sender() ); +diff -ur choqok-0.6/src/timelinewidget.h choqok/src/timelinewidget.h +--- choqok-0.6/src/timelinewidget.h 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/timelinewidget.h 2009-06-13 11:25:47.457175585 +0530 +@@ -62,7 +62,7 @@ + void abortPostNewStatus(); + void aboutQuit(); + void reTweet( const QString &text ); +- void prepareReply( const QString &userName, uint statusId, bool dMsg ); ++ void prepareReply( const QString &userName, qulonglong statusId, bool dMsg ); + + protected slots: + void requestFavoritedDone( bool isError ); +@@ -76,7 +76,7 @@ + + void postingNewStatusDone( bool isError ); + +- void requestDestroy( uint statusId ); ++ void requestDestroy( qulonglong statusId ); + + void checkNewStatusCharactersCount( int numOfChars ); + +@@ -108,7 +108,7 @@ + + private: + void setDefaultDirection(); +- void addNewStatusesToUi( QList< Status > & statusList, QBoxLayout *layoutToAddStatuses, QMap *list, ++ void addNewStatusesToUi( QList< Status > & statusList, QBoxLayout *layoutToAddStatuses, QMap *list, + Backend::TimeLineType type = Backend::HomeTimeLine ); + void disableApp(); + void enableApp(); +@@ -123,9 +123,9 @@ + + QList< Status > loadStatuses( QString fileName ); + +- void updateStatusList( QMap *list ); ++ void updateStatusList( QMap *list ); + +- void clearTimeLineList( QMap *list ); ++ void clearTimeLineList( QMap *list ); + + void loadConfigurations(); + void updateUi(); +@@ -135,12 +135,12 @@ + Backend *twitter; + StatusTextEdit *txtNewStatus; + QLabel *lblCounter; +- QMap listHomeStatus; +- QMap listReplyStatus; +- QMap listInboxStatus; +- QMap listOutboxStatus; ++ QMap listHomeStatus; ++ QMap listReplyStatus; ++ QMap listInboxStatus; ++ QMap listOutboxStatus; + QList listUnreadStatuses; +- uint replyToStatusId; ++ qulonglong replyToStatusId; + bool isStartMode;//used for Notify, if true: notify will not send for any or all new twits, if false will send. + + int unreadStatusCount; +@@ -152,10 +152,10 @@ + StatusWidget *toBeDestroied; + + Account mCurrentAccount; +- uint latestHomeStatusId; +- uint latestReplyStatusId; +- uint latestInboxStatusId; +- uint latestOutboxStatusId; ++ qulonglong latestHomeStatusId; ++ qulonglong latestReplyStatusId; ++ qulonglong latestInboxStatusId; ++ qulonglong latestOutboxStatusId; + + QStringList friendsList; + KUrl mediaToAttach; +diff -ur choqok-0.6/src/twittersearch.cpp choqok/src/twittersearch.cpp +--- choqok-0.6/src/twittersearch.cpp 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/twittersearch.cpp 2009-06-13 11:25:47.473394758 +0530 +@@ -59,7 +59,7 @@ + kDebug(); + } + +-KUrl TwitterSearch::buildUrl( QString query, int option, uint sinceStatusId, uint count, uint page ) ++KUrl TwitterSearch::buildUrl( QString query, int option, qulonglong sinceStatusId, qulonglong count, qulonglong page ) + { + kDebug(); + QString formattedQuery; +@@ -94,7 +94,7 @@ + return url; + } + +-void TwitterSearch::requestSearchResults( QString query, int option, uint sinceStatusId, uint count, uint page ) ++void TwitterSearch::requestSearchResults( QString query, int option, qulonglong sinceStatusId, qulonglong count, qulonglong page ) + { + kDebug(); + +diff -ur choqok-0.6/src/twittersearch.h choqok/src/twittersearch.h +--- choqok-0.6/src/twittersearch.h 2009-05-22 21:21:39.000000000 +0530 ++++ choqok/src/twittersearch.h 2009-06-13 11:25:47.476392206 +0530 +@@ -45,15 +45,15 @@ + virtual ~TwitterSearch(); + + private: +- virtual KUrl buildUrl( QString query, int option, uint sinceStatusId = 0, uint count = 0, uint page = 1 ); ++ virtual KUrl buildUrl( QString query, int option, qulonglong sinceStatusId = 0, qulonglong count = 0, qulonglong page = 1 ); + QList* parseAtom( const QByteArray &buffer ); + + public slots: + virtual void requestSearchResults( QString query, + int option, +- uint sinceStatusId = 0, +- uint count = 0, +- uint page = 1 ); ++ qulonglong sinceStatusId = 0, ++ qulonglong count = 0, ++ qulonglong page = 1 ); + + protected slots: + virtual void searchResultsReturned( KJob *job ); diff --git a/choqok.spec b/choqok.spec index 6309c94..f06e3bf 100644 --- a/choqok.spec +++ b/choqok.spec @@ -1,7 +1,7 @@ Summary: Choqok KDE Micro-Blogging Client Name: choqok Version: 0.6 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3 Group: Applications/Internet URL: http://choqok.gnufolks.org/ @@ -13,6 +13,8 @@ BuildRequires: cmake >= 2.6 BuildRequires: kdelibs4-devel BuildRequires: gettext +Patch0: choqok-0.6-twitpocalypse.patch + %description A Free/Open Source micro-blogging client for K Desktop Environment. The name comes from an ancient Persian word, which means Sparrow! @@ -20,6 +22,7 @@ Choqok currently supports Twitter.com and Identi.ca services. %prep %setup -q +%patch0 -p1 -b .twitpocalypse %build mkdir -p %{_target_platform} @@ -50,6 +53,8 @@ rm -rf %{buildroot} %{_kde4_sharedir}/config.kcfg/choqok.kcfg %changelog +* Sat Jun 13 2009 Tejas Dinkar - 0.6-5 +- Fixed the twitpocalypse (via patch) * Wed May 27 2009 Tejas Dinkar - 0.6-4 - Changed to 0.6 * Fri Apr 10 2009 Tejas Dinkar - 0.5-3