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

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

Git commit 30c5f2d4da1485ef68abe08872f4b8fda4896101 by Andrew Stromme.
Committed on 09/08/2011 at 07:48.
Pushed by astromme into branch '4.6'.

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/30c5f2d4da1485ef68abe08872f4b8fda4896101

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