Code clean-up added code blocks for headers and added QJson related lines to src.pro fetch_users
authorlampehe-local <henri.lampela@ixonos.com>
Mon, 26 Apr 2010 07:12:06 +0000 (10:12 +0300)
committerlampehe-local <henri.lampela@ixonos.com>
Mon, 26 Apr 2010 07:12:06 +0000 (10:12 +0300)
Reviewed by: Kaj Wallin

src/situareservice/situareservice.h
src/src.pro
src/user/user.h

index cc703ee..35998ca 100644 (file)
@@ -60,6 +60,10 @@ public:
     */
     ~SituareService();
 
+    /*******************************************************************************
+     * MEMBER FUNCTIONS AND SLOTS
+     ******************************************************************************/
+
     /**
     * @brief Retrieves location user and friends information from Situare server
     *
@@ -91,7 +95,6 @@ public slots:
     */
     void requestFinished(QNetworkReply *reply);
 
-
     /**
     * @brief Public slot, which indicates when facebook credentials are ready
     *
@@ -121,6 +124,13 @@ private:
     QString formUrlParameters(const QPointF &coordinates, QString status = 0, QString publish = 0);
 
     /**
+    * @brief Parses user and friend data from JSON string
+    *
+    * @param jsonReply JSON string
+    */
+    void parseUserData(const QByteArray &jsonReply);
+
+    /**
     * @brief Sends http request
     *
     * @param url destination
@@ -129,12 +139,9 @@ private:
     */
     void sendRequest(const QUrl &url, const QString &cookieType, const QString &cookie);
 
-    /**
-    * @brief Parses user and friend data from JSON string
-    *
-    * @param jsonReply JSON string
-    */
-    void parseUserData(const QByteArray &jsonReply);
+    /*******************************************************************************
+     * SIGNALS
+     ******************************************************************************/
 
 signals:
 
@@ -152,7 +159,11 @@ signals:
     * @param user instance of user
     * @param friendList list of friends
     */
-    void userDataChanged(User &user, QList<User *> &friendList); // not final
+    void userDataChanged(User &user, QList<User *> &friendList);
+
+    /*******************************************************************************
+     * DATA MEMBERS
+     ******************************************************************************/
 
 private:
 
@@ -160,8 +171,6 @@ private:
     QList<QNetworkReply *> m_currentRequests; ///< List of current http requests
     FacebookAuthentication m_facebookAuthentication; ///< Pointer to FacebookAuthentication
     QNetworkAccessManager *m_networkManager; ///< Pointer to QNetworkAccessManager
-    //QList<User *> m_friendList;
-    //User m_user;
 };
 
 #endif // SITUARESERVICE_H
index b6bf66f..5ae8c1b 100644 (file)
@@ -3,7 +3,7 @@
 # -------------------------------------------------
 TARGET = ../situare
 TEMPLATE = app
-INCLUDEPATH += "/home/lampehe-local/Downloads/qjson/src"
+INCLUDEPATH += "/usr/include/qjson"
 LIBS += "-lqjson"
 RESOURCES += images.qrc
 SOURCES += main.cpp \
@@ -55,6 +55,22 @@ QT += network \
     message(install headers with: sudo apt-get install libgl-dev libglu-dev)
 }
 
+!maemo5 {
+    message(QJson built in)
+    message(Make sure you have QJson development headers installed)
+    message(install headers with: sudo apt-get install libqjson-dev)
+}
+
+maemo5 {
+    message(QJson built in)
+    message(Make sure you have QJson development headers installed)
+    message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
+    message(and deb-src http://repository.maemo.org/extras-devel fremantle free non-free)
+    message(to scratchbox's sources.list in /etc/apt)
+    message(run: apt-get update)
+    message(install headers with: apt-get install libqjson-dev)
+}
+
 # -----------------------------------------------------------------
 # Debian packetizing additions
 # -----------------------------------------------------------------
index a281a43..968003a 100644 (file)
@@ -44,6 +44,10 @@ public:
          const QUrl imageUrl, const QString timestamp, const bool type, const QString userId,
          const QString units = 0, const double value = 0);
 
+    /*******************************************************************************
+     * MEMBER FUNCTIONS AND SLOTS
+     ******************************************************************************/
+
     /**
     * @brief Set address
     *
@@ -151,6 +155,10 @@ public:
     */
     QString userId() const;
 
+    /*******************************************************************************
+     * DATA MEMBERS
+     ******************************************************************************/
+
 private:
     QString m_address; ///< placeholder for address information
     QPointF m_coordinates; ///< placeholder for coordinates