Permalink
Browse files

Squash Merge remote branch 'qjson/master' into devel/logging-zeromq

    Merged from git://gitorious.org/qjson/qjson.git
    at 37be2b7bf4cfe9784665e520ea03683a9f14f1d0
    on devel64.ipv6.beirdo.ca as merge/qjson
  • Loading branch information...
1 parent e4752fb commit 745de06d0fbd9a3f3f462e3ad25d2b8dff2b3aa0 @Beirdo Beirdo committed Apr 24, 2012
Showing with 6,975 additions and 0 deletions.
  1. +2 −0 mythtv/external/qjson/.gitignore
  2. +98 −0 mythtv/external/qjson/CMakeLists.txt
  3. +504 −0 mythtv/external/qjson/COPYING.lib
  4. +76 −0 mythtv/external/qjson/ChangeLog
  5. +42 −0 mythtv/external/qjson/INSTALL
  6. +6 −0 mythtv/external/qjson/QJSONConfig.cmake.in
  7. +9 −0 mythtv/external/qjson/QJSONConfigVersion.cmake.in
  8. +11 −0 mythtv/external/qjson/QJson.pc.in
  9. +27 −0 mythtv/external/qjson/README
  10. +17 −0 mythtv/external/qjson/cmake_uninstall.cmake.in
  11. +305 −0 mythtv/external/qjson/doc/Doxyfile
  12. +32 −0 mythtv/external/qjson/doc/footer.html
  13. +24 −0 mythtv/external/qjson/doc/header.html
  14. +95 −0 mythtv/external/qjson/doc/qjson.dox
  15. +1 −0 mythtv/external/qjson/include/QJson/Parser
  16. +1 −0 mythtv/external/qjson/include/QJson/QObjectHelper
  17. +1 −0 mythtv/external/qjson/include/QJson/Serializer
  18. +6 −0 mythtv/external/qjson/qjson.pro
  19. +3 −0 mythtv/external/qjson/src/.gitignore
  20. +39 −0 mythtv/external/qjson/src/CMakeLists.txt
  21. +1,116 −0 mythtv/external/qjson/src/json_parser.cc
  22. +325 −0 mythtv/external/qjson/src/json_parser.hh
  23. +219 −0 mythtv/external/qjson/src/json_parser.yy
  24. +377 −0 mythtv/external/qjson/src/json_scanner.cpp
  25. +54 −0 mythtv/external/qjson/src/json_scanner.h
  26. +145 −0 mythtv/external/qjson/src/location.hh
  27. +125 −0 mythtv/external/qjson/src/parser.cpp
  28. +94 −0 mythtv/external/qjson/src/parser.h
  29. +56 −0 mythtv/external/qjson/src/parser_p.h
  30. +68 −0 mythtv/external/qjson/src/parserrunnable.cpp
  31. +67 −0 mythtv/external/qjson/src/parserrunnable.h
  32. +142 −0 mythtv/external/qjson/src/position.hh
  33. +33 −0 mythtv/external/qjson/src/qjson_debug.h
  34. +35 −0 mythtv/external/qjson/src/qjson_export.h
  35. +85 −0 mythtv/external/qjson/src/qobjecthelper.cpp
  36. +144 −0 mythtv/external/qjson/src/qobjecthelper.h
  37. +322 −0 mythtv/external/qjson/src/serializer.cpp
  38. +134 −0 mythtv/external/qjson/src/serializer.h
  39. +60 −0 mythtv/external/qjson/src/serializerrunnable.cpp
  40. +74 −0 mythtv/external/qjson/src/serializerrunnable.h
  41. +72 −0 mythtv/external/qjson/src/src.pro
  42. +129 −0 mythtv/external/qjson/src/stack.hh
  43. +1 −0 mythtv/external/qjson/tests/.gitignore
  44. +4 −0 mythtv/external/qjson/tests/CMakeLists.txt
  45. +4 −0 mythtv/external/qjson/tests/cmdline_tester/.gitignore
  46. +24 −0 mythtv/external/qjson/tests/cmdline_tester/CMakeLists.txt
  47. +87 −0 mythtv/external/qjson/tests/cmdline_tester/cmdline_tester.cpp
  48. +17 −0 mythtv/external/qjson/tests/cmdline_tester/cmdline_tester.pro
  49. +159 −0 mythtv/external/qjson/tests/cmdline_tester/cmdlineparser.cpp
  50. +64 −0 mythtv/external/qjson/tests/cmdline_tester/cmdlineparser.h
  51. +22 −0 mythtv/external/qjson/tests/cmdline_tester/example.txt
  52. +4 −0 mythtv/external/qjson/tests/parser/.gitignore
  53. +41 −0 mythtv/external/qjson/tests/parser/CMakeLists.txt
  54. +15 −0 mythtv/external/qjson/tests/parser/parser.pro
  55. +503 −0 mythtv/external/qjson/tests/parser/testparser.cpp
  56. +5 −0 mythtv/external/qjson/tests/qobjecthelper/.gitignore
  57. +48 −0 mythtv/external/qjson/tests/qobjecthelper/CMakeLists.txt
  58. +64 −0 mythtv/external/qjson/tests/qobjecthelper/person.cpp
  59. +67 −0 mythtv/external/qjson/tests/qobjecthelper/person.h
  60. +19 −0 mythtv/external/qjson/tests/qobjecthelper/qobjecthelper.pro
  61. +114 −0 mythtv/external/qjson/tests/qobjecthelper/testqobjecthelper.cpp
  62. +4 −0 mythtv/external/qjson/tests/serializer/.gitignore
  63. +41 −0 mythtv/external/qjson/tests/serializer/CMakeLists.txt
  64. +15 −0 mythtv/external/qjson/tests/serializer/serializer.pro
  65. +473 −0 mythtv/external/qjson/tests/serializer/testserializer.cpp
  66. +5 −0 mythtv/external/qjson/tests/tests.pro
@@ -0,0 +1,2 @@
+lib
+Makefile
@@ -0,0 +1,98 @@
+PROJECT(qjson)
+
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII" )
+
+# Stop cmake 2.6 from whining
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+CMAKE_POLICY(SET CMP0003 NEW)
+
+set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
+
+# compile in debug mode
+IF(NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
+ "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel.")
+ENDIF(NOT CMAKE_BUILD_TYPE)
+
+IF("${CMAKE_BUILD_TYPE}" MATCHES "^Rel.*")
+ ADD_DEFINITIONS("-DQT_NO_DEBUG_OUTPUT")
+ENDIF("${CMAKE_BUILD_TYPE}" MATCHES "^Rel.*")
+
+# Ability to disable verbose debug output
+IF(QJSON_VERBOSE_DEBUG_OUTPUT)
+ ADD_DEFINITIONS("-DQJSON_VERBOSE_DEBUG_OUTPUT")
+endif(QJSON_VERBOSE_DEBUG_OUTPUT)
+
+OPTION(OSX_FRAMEWORK "Build a Mac OS X Framework")
+SET(FRAMEWORK_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/Library/Frameworks"
+ CACHE PATH "Where to place qjson.framework if OSX_FRAMEWORK is selected")
+
+# Don't use absolute path in qjson-targets-*.cmake
+# (This will have no effect with CMake < 2.8)
+SET(QT_USE_IMPORTED_TARGETS TRUE)
+
+# Find Qt4
+FIND_PACKAGE( Qt4 REQUIRED )
+
+IF (NOT WIN32)
+ SET( QT_DONT_USE_QTGUI TRUE )
+ENDIF()
+
+# Include the cmake file needed to use qt4
+INCLUDE( ${QT_USE_FILE} )
+
+#add extra search paths for libraries and includes
+SET (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
+SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Directory where lib will install")
+SET (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
+SET (CMAKECONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${CMAKE_PROJECT_NAME}" CACHE PATH "Directory where to install QJSONConfig.cmake")
+
+set(QJSON_LIB_MAJOR_VERSION "0")
+set(QJSON_LIB_MINOR_VERSION "7")
+set(QJSON_LIB_PATCH_VERSION "1")
+
+set(QJSON_LIB_VERSION_STRING "${QJSON_LIB_MAJOR_VERSION}.${QJSON_LIB_MINOR_VERSION}.${QJSON_LIB_PATCH_VERSION}")
+
+set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib" )
+
+# pkg-config
+IF (NOT WIN32)
+ CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/QJson.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/QJson.pc
+ @ONLY)
+ INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/QJson.pc
+ DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+ENDIF (NOT WIN32)
+
+# Subdirs
+ADD_SUBDIRECTORY(src)
+IF (KDE4_BUILD_TESTS OR QJSON_BUILD_TESTS)
+ enable_testing()
+ ADD_SUBDIRECTORY(tests)
+ENDIF (KDE4_BUILD_TESTS OR QJSON_BUILD_TESTS)
+
+CONFIGURE_FILE(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+
+INSTALL(EXPORT qjson-export DESTINATION ${CMAKECONFIG_INSTALL_DIR} FILE QJSONTargets.cmake)
+
+# figure out the relative path from the installed Config.cmake file to the install prefix (which may be at
+# runtime different from the chosen CMAKE_INSTALL_PREFIX if under Windows the package was installed anywhere)
+# This relative path will be configured into the QJSONConfig.cmake
+file(RELATIVE_PATH relInstallDir ${CMAKE_INSTALL_PREFIX}/${CMAKECONFIG_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX} )
+
+# cmake-modules
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/QJSONConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/QJSONConfig.cmake
+ @ONLY)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/QJSONConfigVersion.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/QJSONConfigVersion.cmake
+ @ONLY)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/QJSONConfig.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/QJSONConfigVersion.cmake
+ DESTINATION "${CMAKECONFIG_INSTALL_DIR}")
+
+ADD_CUSTOM_TARGET(uninstall
+ "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,76 @@
+Tue Jan 31 10:15:06 CET 2012 Flavio Castelli <flavio@castelli.name>
+
+ * Make possible to build qjson as an OS X framework.
+
+Fri Nov 04 16:50:56 CET 2011 Flavio Castelli <flavio@castelli.name>
+
+ * Make possible to set double precision during serialization.
+
+Wed Aug 24 17:58:56 CEST 2011 Flavio Castelli <flavio@castelli.name>
+
+ * Buildsystem adjustments, fix issues mentioned here:
+ - http://lists.kde.org/?l=kde-buildsystem&m=130947194605100&w=3
+ - http://lists.kde.org/?l=kde-buildsystem&m=128835747626464&w=3
+ The biggest difference now is that FindQJSON.cmake is not provided
+ anymore. Instead, QJSONConfig.cmake and QJSONConfigVersion.cmake are
+ installed and can be used in find_package(QJSON) calls. Applications
+ using QJson can write their own FindQJSON.cmake files if they need to.
+
+Fri Apr 23:04:29 CEST 2011 Flavio Castelli <flavio@castelli.name>
+
+ * Fixed QVariant de-serialization. QVariant properties were ignored
+ during QVariant -> QObject conversion.
+
+Sun Dec 18:59:28 CET 2010 Flavio Castelli <flavio@castelli.name>
+
+ * It's now possible to indent the output produced by the Serializer.
+
+Mon Sep 06 18:53:02 CEST 2010 Flavio Castelli <flavio@castelli.name>
+
+ * 50% performance improvement when parsing numbers.
+
+Sun Jul 04 15:41:08 CEST 2010 Flavio Castelli <flavio@castelli.name>
+
+ * fix make install when not installing as root
+ * provide "make uninstall"
+
+Tue Jun 15 13:16:57 CEST 2010 Flavio Castelli <flavio@castelli.name>
+
+ * Allow top level values
+
+----------------------------------------------------------------------
+Sat Mar 13 23:57:00 CEST 2009 - flavio@castelli.name
+
+ * Merged the symbian branch into master,
+
+----------------------------------------------------------------------
+Sun Oct 11 19:18:00 CEST 2009 - flavio@castelli.name
+
+ * Updated to 0.6.3: fixed a bug affecting ulonglong numbers serialization.
+
+-------------------------------------------------------------------
+Wed Sep 15 19:21:00 CEST 2009 - flavio@castelli.name
+
+ * Updated to 0.6.2: fixed a bug affecting ulonglong numbers parsing.
+
+-------------------------------------------------------------------
+Wed Sep 09 09:55:00 CEST 2009 - flavio@castelli.name
+
+ * Updated to 0.6.1: relevant bugs fixed.
+ * Moved the SerializerRunnable class inside QJson namespace.
+ * Fixed a bug in cmdline_tester.
+
+-------------------------------------------------------------------
+Mon Jul 20 15:24:32 CEST 2009 - prusnak@suse.cz
+
+ * Updated to 0.6.0 (KDE SVN rev 999750).
+
+-------------------------------------------------------------------
+Mon Apr 07 00:00:00 UTC 2009 - flavio@castelli.name
+
+ * Released 0.5.1 - added unicode support.
+
+-------------------------------------------------------------------
+Mon Apr 03 00:00:00 UTC 2009 - flavio@castelli.name
+
+ * First release.
@@ -0,0 +1,42 @@
+Installing QJson
+--------------
+
+QJson requires:
+- Qt 4.0 or greater
+- cmake 2.6 or greater
+
+Some possible cmake options:
+ -DCMAKE_BUILD_TYPE=DEBUG
+ enables some debug output (other than making easier to debug the code)
+ -DQJSON_BUILD_TESTS=yes or -DKDE4_BUILD_TESTS=yes
+ builds the unit tests
+ -DCMAKE_INSTALL_PREFIX=${HOME}/testinstall
+ install qjson in a custom directory
+ -DCMAKE_INCLUDE_PATH=${HOME}/testinstall/include
+ include a custom include directory
+ -DCMAKE_LIBRARY_PATH=${HOME}/testinstall/lib
+ include a custom library directory
+ -DLIB_DESTINATION=lib64
+ if you have a 64 bit system with separate libraries for 64 bit libraries
+ -DQJSON_VERBOSE_DEBUG_OUTPUT:BOOL=ON
+ more debugging statements are generated by the parser. It's useful only if you are trying to fix the bison grammar.
+
+For Unix/Linux/Mac:
+ mkdir build
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=_preferred_path_ ..
+ make
+ make install
+ /sbin/ldconfig, if necessary
+
+For Mac:
+It's possible to build qjson as an OS X framework using the OSX_FRAMEWORK option.
+
+For Symbian:
+ Read this page: http://qjson.sourceforge.net/get_it/symbian.html
+
+For Windows:
+ Read this page: http://qjson.sourceforge.net/get_it/windows.html
+
+Please report problems to:
+ https://lists.sourceforge.net/mailman/listinfo/qjson-devel
@@ -0,0 +1,6 @@
+GET_FILENAME_COMPONENT(myDir ${CMAKE_CURRENT_LIST_FILE} PATH)
+
+SET(QJSON_LIBRARIES qjson)
+SET(QJSON_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@")
+
+include(${myDir}/QJSONTargets.cmake)
@@ -0,0 +1,9 @@
+SET(PACKAGE_VERSION "@QJSON_LIB_VERSION_STRING@")
+IF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
+ SET(PACKAGE_VERSION_EXACT TRUE)
+ENDIF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
+IF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
+ SET(PACKAGE_VERSION_COMPATIBLE TRUE)
+ELSE (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
+ SET(PACKAGE_VERSION_UNSUITABLE TRUE)
+ENDIF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
+
+Name: QJson
+Description: QJson is a qt-based library that maps JSON data to QVariant objects
+Version: @QJSON_LIB_MAJOR_VERSION@.@QJSON_LIB_MINOR_VERSION@.@QJSON_LIB_PATCH_VERSION@
+Requires: QtCore
+Libs: -L${libdir} -lqjson
+Cflags: -I${includedir}
@@ -0,0 +1,27 @@
+QJson
+-------------------------------------------------
+Website: http://qjson.sourceforge.net/
+Mailing List: https://lists.sourceforge.net/mailman/listinfo/qjson-devel
+
+Project Lead/Maintainer (2008-current):
+ Flavio Castelli <flavio@castelli.name>
+
+Install
+-------
+ For installation or compiling instructions, see the INSTALL file.
+
+License
+-------
+ This library is licensed under the Lesser GNU General Public License version 2.1.
+ See the COPYING.lib file for more information.
+
+Description
+-----------
+ JSON (JavaScript Object Notation) is a lightweight data-interchange format.
+ It can represents integer, real number, string, an ordered sequence of value, and a collection of name/value pairs.
+
+ QJson is a qt-based library that maps JSON data to QVariant objects.
+ JSON arrays will be mapped to QVariantList instances, while JSON's objects will be mapped to QVariantMap.
+
+Happy hacking
+Flavio
@@ -0,0 +1,17 @@
+IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+ MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
+ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+
+FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+STRING(REGEX REPLACE "\n" ";" files "${files}")
+FOREACH(file ${files})
+ MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
+ EXEC_PROGRAM(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ IF(NOT "${rm_retval}" STREQUAL 0)
+ MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
+ ENDIF(NOT "${rm_retval}" STREQUAL 0)
+ENDFOREACH(file)
Oops, something went wrong.

0 comments on commit 745de06

Please sign in to comment.