<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,29 +1,46 @@
-# Copyright (c) 2009 Ingmar Vanhassel &lt;ingmar@exherbo.org&gt;
+# Find QJSON - JSON handling library for Qt
+#
+# This module defines
+#  QJSON_FOUND - whether the qsjon library was found
+#  QJSON_LIBRARIES - the qjson library
+#  QJSON_INCLUDE_DIR - the include path of the qjson library
 #
-# Redistribution and use is allowed according to the terms of the BSD license.
 
-find_path(QJSON_INCLUDE_DIR json_driver.hh
-  PATH_SUFFIXES qjson
-)
+if (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
 
-find_library(QJSON_LIBRARIES NAMES qjson)
+  # Already in cache
+  set (QJSON_FOUND TRUE)
 
-if (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
-  set(QJSON_FOUND TRUE)
-endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
+else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
 
-if (QJSON_FOUND)
-  if (NOT QJson_FIND_QUIETLY)
-    message(STATUS &quot;Found QJson: libs - ${QJSON_LIBRARIES}; includes - ${QJSON_INCLUDE_DIR}&quot;)
-  endif (NOT QJson_FIND_QUIETLY)
-else (QJSON_FOUND)
-  if (QJson_FIND_REQUIRED)
-    message(FATAL_ERROR &quot;Could NOT find QJson&quot;)
-  endif (QJson_FIND_REQUIRED)
-endif (QJSON_FOUND)
-
-mark_as_advanced(
-  QJSON_INCLUDE_DIR
-  QJSON_LIBRARIES
-)
+  if (NOT WIN32)
+    # use pkg-config to get the values of QJSON_INCLUDE_DIRS
+    # and QJSON_LIBRARY_DIRS to add as hints to the find commands.
+    include (FindPkgConfig)
+    pkg_check_modules (QJSON REQUIRED QJson&gt;=0.5)
+  endif (NOT WIN32)
 
+  find_library (QJSON_LIBRARIES
+    NAMES
+    qjson
+    PATHS
+    ${QJSON_LIBRARY_DIRS}
+    ${LIB_INSTALL_DIR}
+    ${KDE4_LIB_DIR}
+  )
+
+  find_path (QJSON_INCLUDE_DIR
+    NAMES
+    parser.h
+    PATH_SUFFIXES
+    qjson
+    PATHS
+    ${QJSON_INCLUDE_DIRS}
+    ${INCLUDE_INSTALL_DIR}
+    ${KDE4_INCLUDE_DIR}
+  )
+
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR)
+
+endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)</diff>
      <filename>cmake/modules/FindQJson.cmake</filename>
    </modified>
    <modified>
      <diff>@@ -40,7 +40,7 @@
 #include &lt;QtNetwork/QNetworkCookieJar&gt;
 #include &lt;QtNetwork/QNetworkDiskCache&gt;
 
-#include &lt;qjson/json_driver.hh&gt;
+#include &lt;qjson/parser.h&gt;
 
 #include &quot;facebook/chatservice.h&quot;
 #include &quot;facebook/chatmessage.h&quot;
@@ -614,10 +614,10 @@ void ChatService::decodeGetMessagesResponse( QIODevice *input )
     input-&gt;read(QString(&quot;for (;;);&quot;).count());
     QString json = input-&gt;readAll();
     
-    JSonDriver parser;
+    QJson::Parser parser;
     
     bool status = true;
-    QVariant result = parser.parse(json, &amp;status);
+    QVariant result = parser.parse(json.toAscii(), &amp;status);
     
     qDebug() &lt;&lt; json;
 
@@ -757,7 +757,7 @@ void ChatService::decodeGetMessagesResponse( QIODevice *input )
     }
     else
     {
-        qDebug() &lt;&lt; &quot;invalid reply: &quot; &lt;&lt; parser.error();
+        qDebug() &lt;&lt; &quot;invalid reply: &quot; &lt;&lt; parser.errorString();
         qDebug() &lt;&lt; json;
         
     }
@@ -793,9 +793,9 @@ void ChatService::decodeBuddyListResponse( QIODevice *responseInput )
     responseInput-&gt;read(QString(&quot;for (;;);&quot;).count());
     QString json = responseInput-&gt;readAll();
 
-    JSonDriver parser;    
+    QJson::Parser parser;    
     bool status = true;
-    QVariant result = parser.parse(json, &amp;status);
+    QVariant result = parser.parse(json.toAscii(), &amp;status);
     
     if (!status)
     {</diff>
      <filename>facebook/chatservice.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@
 #define FACEBOOKADDCONTACTPAGE_H
 
 #include &lt;addcontactpage.h&gt;
-#include &quot;ui_facebookaddui.h&quot;
+#include &quot;ui_facebookadd.h&quot;
 
 namespace Kopete { class Account; }
 namespace Kopete { class MetaContact; }</diff>
      <filename>facebookaddcontactpage.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c42ceeb7b76b79e235a2c365fff16a67b64b5e4d</id>
    </parent>
  </parents>
  <author>
    <name>Alexandru Scvortov</name>
    <email>scvalex@gmail.com</email>
  </author>
  <url>http://github.com/dmacvicar/kopete-facebook/commit/c314a9d6c4c6d08a50ad1aaf127018198a8c153b</url>
  <id>c314a9d6c4c6d08a50ad1aaf127018198a8c153b</id>
  <committed-date>2009-07-21T09:29:42-07:00</committed-date>
  <authored-date>2009-07-21T09:29:42-07:00</authored-date>
  <message>fixed QJson and misc errors</message>
  <tree>0ad9e5fe6849c6ec05a4e22510c01325aed4cf09</tree>
  <committer>
    <name>Alexandru Scvortov</name>
    <email>scvalex@gmail.com</email>
  </committer>
</commit>
