From 5e92fc2d049ba6fbe6d86d43f615ad002cbf02e3 Mon Sep 17 00:00:00 2001 From: petrushka Date: Wed, 10 Apr 2013 11:22:24 +0400 Subject: [PATCH 1/3] Fix: add QT5 support --- ext/jasmine-webkit-specrunner/Page.h | 6 +++++- ext/jasmine-webkit-specrunner/Runner.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ext/jasmine-webkit-specrunner/Page.h b/ext/jasmine-webkit-specrunner/Page.h index bae094d..a78eafe 100644 --- a/ext/jasmine-webkit-specrunner/Page.h +++ b/ext/jasmine-webkit-specrunner/Page.h @@ -2,7 +2,11 @@ #define JHW_PAGE #include -#include +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + #include +#else + #include +#endif class Page: public QWebPage { Q_OBJECT diff --git a/ext/jasmine-webkit-specrunner/Runner.h b/ext/jasmine-webkit-specrunner/Runner.h index 3f1f01b..b09a595 100644 --- a/ext/jasmine-webkit-specrunner/Runner.h +++ b/ext/jasmine-webkit-specrunner/Runner.h @@ -2,7 +2,11 @@ #define JHW_RUNNER #include -#include +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + #include +#else + #include +#endif #include #include #include -- 2.45.2 From 6013dad62b03a3b16c4819ef398ac23332cf6469 Mon Sep 17 00:00:00 2001 From: petrushka Date: Wed, 10 Apr 2013 11:30:26 +0400 Subject: [PATCH 2/3] Fix: some headers cleanup --- ext/jasmine-webkit-specrunner/Page.cpp | 3 --- ext/jasmine-webkit-specrunner/Runner.cpp | 8 -------- ext/jasmine-webkit-specrunner/Runner.h | 6 ------ 3 files changed, 17 deletions(-) diff --git a/ext/jasmine-webkit-specrunner/Page.cpp b/ext/jasmine-webkit-specrunner/Page.cpp index cdfa396..b49ba2c 100644 --- a/ext/jasmine-webkit-specrunner/Page.cpp +++ b/ext/jasmine-webkit-specrunner/Page.cpp @@ -1,7 +1,4 @@ -#include -#include #include - #include "Page.h" Page::Page() : QWebPage() {} diff --git a/ext/jasmine-webkit-specrunner/Runner.cpp b/ext/jasmine-webkit-specrunner/Runner.cpp index 66943a5..988bb58 100644 --- a/ext/jasmine-webkit-specrunner/Runner.cpp +++ b/ext/jasmine-webkit-specrunner/Runner.cpp @@ -1,11 +1,3 @@ -#include -#include -#include -#include -#include -#include -#include - #include "Runner.h" #include "Page.h" diff --git a/ext/jasmine-webkit-specrunner/Runner.h b/ext/jasmine-webkit-specrunner/Runner.h index b09a595..57afb4a 100644 --- a/ext/jasmine-webkit-specrunner/Runner.h +++ b/ext/jasmine-webkit-specrunner/Runner.h @@ -1,12 +1,6 @@ #ifndef JHW_RUNNER #define JHW_RUNNER -#include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) - #include -#else - #include -#endif #include #include #include -- 2.45.2 From f80499ecd83f68f2dd5a06702aeeeec29c4a8116 Mon Sep 17 00:00:00 2001 From: petrushka Date: Wed, 10 Apr 2013 11:58:13 +0400 Subject: [PATCH 3/3] Fix: don't include Qt5 webkit widget headers --- ext/jasmine-webkit-specrunner/common.pri | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/jasmine-webkit-specrunner/common.pri b/ext/jasmine-webkit-specrunner/common.pri index b80fe37..4c4e6f7 100644 --- a/ext/jasmine-webkit-specrunner/common.pri +++ b/ext/jasmine-webkit-specrunner/common.pri @@ -1,7 +1,12 @@ TEMPLATE = app CONFIG -= app_bundle QMAKE_INFO_PLIST = Info.plist -QT += network webkit +QT += network +greaterThan(QT_MAJOR_VERSION, 4) { + QT += webkitwidgets +} else { + QT += webkit +} SOURCES = Page.cpp Runner.cpp HEADERS = Page.h Runner.h -- 2.45.2