[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdeplasma-addons/4.7] libs/rtm: BUG: 279029 Initialize static
From:       Andrew Stromme <astromme () chatonka ! com>
Date:       2011-08-09 6:01:15
Message-ID: 20110809060115.6765AA60AE () git ! kde ! org
[Download RAW message or body]

Git commit 59148e2f1f570eefe05c2e368816c506e40333c6 by Andrew Stromme.
Committed on 09/08/2011 at 07:48.
Pushed by astromme into branch '4.7'.

BUG: 279029 Initialize static variables to known values to fix RTM login

M  +3    -3    libs/rtm/request.cpp

http://commits.kde.org/kdeplasma-addons/59148e2f1f570eefe05c2e368816c506e40333c6

diff --git a/libs/rtm/request.cpp b/libs/rtm/request.cpp
index 7ac735a..1304cb5 100644
--- a/libs/rtm/request.cpp
+++ b/libs/rtm/request.cpp
@@ -49,10 +49,10 @@ void RTM::Request::addArgument(const QString &name, const QString \
&value) {  
 void RTM::Request::sendRequest()
 {
-  static QDateTime lastRequest;
-  static unsigned int queueSize;
+  static QDateTime lastRequest = \
QDateTime::fromMSecsSinceEpoch(QDateTime::currentMSecsSinceEpoch() - 1050); +  static \
unsigned int queueSize = 0;  
-  int margin = lastRequest.msecsTo(QDateTime::currentDateTime());
+  qint64 margin = lastRequest.msecsTo(QDateTime::currentDateTime());
 
   // Follow RTM's TOS and only do 1 request per second.
   if (margin <= 1000) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic