Small fix on facebookauthentication's credential handling method,
authorlampehe-local <henri.lampela@ixonos.com>
Fri, 14 May 2010 10:38:24 +0000 (13:38 +0300)
committerlampehe-local <henri.lampela@ixonos.com>
Fri, 14 May 2010 10:38:24 +0000 (13:38 +0300)
since qjson parser cannot handle 64-bit integers.
Also added Q_UNUSED for grab patrameter in mainwindow's grabZoomKeys method
Reviewed by: Kaj Wallin

src/facebookservice/facebookauthentication.cpp
src/ui/mainwindow.cpp

index 2f41d0e..0f7d544 100644 (file)
@@ -103,8 +103,14 @@ bool FacebookAuthentication::updateCredentials(const QUrl &url)
                         qDebug() << "Session Key" << result[SESSION_KEY].toString();
                         m_loginCredentials.setSessionKey(result[SESSION_KEY].toString());
 
-                        qDebug() << "userID" << result[USER_ID].toString();
-                        m_loginCredentials.setUserID(result[USER_ID].toString());
+//                        // commeted out until qjson parser can handle 64-bit integers
+//                        qDebug() << "userID" << result[USER_ID].toString();
+//                        m_loginCredentials.setUserID(result[USER_ID].toString().toAscii());
+
+                        // dirty fix, get user id from session_key
+                        QStringList list = result[SESSION_KEY].toString().split("-");
+                        m_loginCredentials.setUserID(list.at(1));
+                        qDebug() << m_loginCredentials.userID();
 
                         qDebug() << "Expires" << result[EXPIRES].toString();
                         m_loginCredentials.setExpires(result[EXPIRES].toString());
index 5f02de0..f9ba87c 100644 (file)
@@ -369,6 +369,8 @@ void MainWindow::grabZoomKeys(bool grab)
                      PropModeReplace,
                      reinterpret_cast<unsigned char *>(&val),
                      1);
+#else
+    Q_UNUSED(grab);
 #endif // Q_WS_MAEMO_5
 }