Compatibility with Qt5

Issue #4 resolved
Ben Ford created an issue

I'm attempting to get this library to run under Qt 5.0.2 with Qt Creator 2.7.0. I am using the "2013-04-22" version. So far I have attempted this on the following platforms with identical results:

  • Windows 7 64-bit
  • Ubuntu 12.04 32-bit (VM)

I have two issues, which might be related to my configuration of Qt Creator. I opened the project by opening "qjsonrpc.pro"

Cannot find feature qttest_p4 This happens when I attempt to run QMake. Though running the unit tests is optional, I would like to get this working. After searching around for a bit, I haven't found much about "qttest_p4". This error occurs in several .pro files which contain the following line:

load(qttest_p4)

I can run QMake if these lines are commented out. The next trouble spot occurs after attempting to Build All.

JsonFormat and Other Missing Stuff

Anything referencing "JsonFormat" is failing. Perhaps it was not declared or there is an incompatibility with Qt 5?

// QT Creator output indicates that QJsonDocument::JsonFormat is not declared
  QJsonDocument::JsonFormat wireFormat() const;
    void setWireFormat(QJsonDocument::JsonFormat format);

Most of these errors are related to JsonFormat.See attached image for details.

Comments (4)

  1. Matt Broadstone

    hey, thanks for the bug report. yeah, I've known about this one for a few weeks but haven't gotten around to a fix for it.. The problem is that on qt 4.x I build QJson by hand, but there isn't need to in Qt 5. As you correctly identified, JsonFormat does not exist in Qt 5.0.x, but it was added in the Qt 5.1.x branch. I will see if I can get a fix for just Qt 5.0.x in within the next few days.

    the qttest_p4 stuff is just so you can run "make check" on a 4.x build, I can get rid of those as well.

  2. Log in to comment