Merge lp:~marcustomlinson/unity-scopes-api/lp-1275931 into lp:unity-scopes-api/devel

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Michal Hruby
Approved revision: 240
Merged at revision: 240
Proposed branch: lp:~marcustomlinson/unity-scopes-api/lp-1275931
Merge into: lp:unity-scopes-api/devel
Diff against target: 26 lines (+12/-2)
1 file modified
include/unity/scopes/internal/smartscopes/HttpClientQtThread.h (+12/-2)
To merge this branch: bzr merge lp:~marcustomlinson/unity-scopes-api/lp-1275931
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Michi Henning Pending
Review via email: mp+208366@code.launchpad.net

Commit message

Added #define hack to allow unity-scopes-api to build with clang-3.4+ (To be removed when Qt is updated to 5.1.1+ on Ubuntu)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

Could you wrap that in a macro that really checks Qt's version?

#if QT_VERSION < 0x050101
  ...
#endif

review: Needs Fixing
240. By Marcus Tomlinson

Added check for Qt version before applying clang-3.4+ hack.

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

> Could you wrap that in a macro that really checks Qt's version?
>
> #if QT_VERSION < 0x050101
> ...
> #endif

done.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/unity/scopes/internal/smartscopes/HttpClientQtThread.h'
2--- include/unity/scopes/internal/smartscopes/HttpClientQtThread.h 2014-02-18 06:38:07 +0000
3+++ include/unity/scopes/internal/smartscopes/HttpClientQtThread.h 2014-02-26 14:53:52 +0000
4@@ -19,10 +19,20 @@
5 #ifndef UNITY_SCOPES_INTERNAL_SMARTSCOPES_HTTPCLIENTQTTHREAD_H
6 #define UNITY_SCOPES_INTERNAL_SMARTSCOPES_HTTPCLIENTQTTHREAD_H
7
8+// This hack allows unity-scopes-api to be built with
9+// clang-3.4+ and versions of Qt before v5.1.1.
10+#if QT_VERSION < 0x050101
11+ #define qHash(x,y) qHash(const QUrl &url, uint seed)
12+ #include <QUrl>
13+ #undef qHash
14+#else
15+ #include <QUrl>
16+#endif
17+
18+#include <QThread>
19+
20 #include <unity/util/NonCopyable.h>
21
22-#include <QThread>
23-#include <QUrl>
24 #include <mutex>
25
26 class QNetworkReply;

Subscribers

People subscribed via source and target branches

to all changes: