forked from LuminanceHDR/LuminanceHDR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathluminance-hdr-2.5.0-qtwebkit.patch
171 lines (149 loc) · 7 KB
/
luminance-hdr-2.5.0-qtwebkit.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
diff -rupN luminance-hdr-2.5.0/CMakeLists.txt luminance-hdr-2.5.0-new/CMakeLists.txt
--- luminance-hdr-2.5.0/CMakeLists.txt 2017-04-09 12:25:01.000000000 +0200
+++ luminance-hdr-2.5.0-new/CMakeLists.txt 2017-04-09 12:45:59.162231357 +0200
@@ -34,8 +34,8 @@ find_package(Qt5Core REQUIRED)
find_package(Qt5Concurrent REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Gui REQUIRED)
-find_package(Qt5WebEngineCore REQUIRED)
-find_package(Qt5WebEngineWidgets REQUIRED)
+find_package(Qt5WebKit REQUIRED)
+find_package(Qt5WebKitWidgets REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5Sql REQUIRED)
find_package(Qt5Svg REQUIRED)
@@ -53,7 +53,7 @@ ENDIF(WIN32)
set(LIBS ${LIBS}
${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QT_QTNETWORK_LIBRARIES}
- ${QT_QTWEBENGINE_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES})
+ ${QT_QTWEBKIT_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES})
FIND_PACKAGE(Git)
IF(GIT_FOUND)
I file binari luminance-hdr-2.5.0/.git/index e luminance-hdr-2.5.0-new/.git/index sono diversi
diff -rupN luminance-hdr-2.5.0/src/HelpBrowser/CMakeLists.txt luminance-hdr-2.5.0-new/src/HelpBrowser/CMakeLists.txt
--- luminance-hdr-2.5.0/src/HelpBrowser/CMakeLists.txt 2017-04-09 12:25:01.000000000 +0200
+++ luminance-hdr-2.5.0-new/src/HelpBrowser/CMakeLists.txt 2017-04-09 12:45:59.181231204 +0200
@@ -28,7 +28,7 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H})
QT5_WRAP_UI(FILES_UI_H ${FILES_UI})
ADD_LIBRARY(helpbrowser ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H} ${FILES_HXX})
-qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebEngineCore WebEngineWidgets PrintSupport)
+qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebKit WebKitWidgets PrintSupport)
SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} ${FILES_HXX} PARENT_SCOPE)
SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} helpbrowser PARENT_SCOPE)
diff -rupN luminance-hdr-2.5.0/src/HelpBrowser/helpbrowser.cpp luminance-hdr-2.5.0-new/src/HelpBrowser/helpbrowser.cpp
--- luminance-hdr-2.5.0/src/HelpBrowser/helpbrowser.cpp 2017-04-09 12:25:01.000000000 +0200
+++ luminance-hdr-2.5.0-new/src/HelpBrowser/helpbrowser.cpp 2017-04-09 12:57:33.073960371 +0200
@@ -166,8 +166,6 @@ HelpBrowser::HelpBrowser(QWidget* parent
HelpBrowser::HelpBrowser( QWidget* parent, const QString& /*caption*/, const QString& guiLanguage, const QString& jumpToSection, const QString& jumpToFile):
QMainWindow( parent ),
zoomFactor(1.0),
- //m_textBrowser(new QTextDocument),
- m_textBrowser(new QTextBrowser),
m_Ui(new Ui::HelpBrowser)
{
m_Ui->setupUi(this);
@@ -347,13 +345,6 @@ void HelpBrowser::languageChange()
void HelpBrowser::print()
{
- /* TODO With this method images aren't loaded so I'm passing the html page to a QTextBrowser
- m_Ui->htmlPage->page()->toHtml([this](const QString &result){
- this->m_textBrowser->setHtml(result);
- this->printAvailable();
- });
- */
- m_textBrowser->setSource(m_Ui->htmlPage->page()->url());
this->printAvailable();
}
@@ -365,19 +356,12 @@ void HelpBrowser::printAvailable()
if (dialog.exec())
{
- m_textBrowser->print(&printer);
+ m_Ui->htmlPage->print(&printer);
}
}
void HelpBrowser::printPreview()
{
- /* TODO With this method images aren't loaded so I'm passing the html page to a QTextBrowser
- m_Ui->htmlPage->page()->toHtml([this](const QString &result){
- this->m_textBrowser->setHtml(result);
- this->printPreviewAvailable();
- });
- */
- m_textBrowser->setSource(m_Ui->htmlPage->page()->url());
this->printPreviewAvailable();
}
@@ -392,7 +376,7 @@ void HelpBrowser::printPreviewAvailable(
void HelpBrowser::paintRequested(QPrinter *printer)
{
- m_textBrowser->print(printer);
+ m_Ui->htmlPage->print(printer);
}
void HelpBrowser::searchingButton_clicked()
@@ -789,6 +773,6 @@ void HelpBrowser::loadFinished(bool) {
statusBar()->showMessage("");
}
-void HelpBrowser::linkHovered (const QString &url) {
+void HelpBrowser::linkHovered (const QString &url, const QString &, const QString &) {
statusBar()->showMessage(url);
}
diff -rupN luminance-hdr-2.5.0/src/HelpBrowser/helpbrowser.h luminance-hdr-2.5.0-new/src/HelpBrowser/helpbrowser.h
--- luminance-hdr-2.5.0/src/HelpBrowser/helpbrowser.h 2017-04-09 12:25:01.000000000 +0200
+++ luminance-hdr-2.5.0-new/src/HelpBrowser/helpbrowser.h 2017-04-09 12:55:41.611767473 +0200
@@ -64,8 +64,6 @@
#include <QXmlInputSource>
#include <QEvent>
#include <QTreeWidgetItem>
-//#include <QTextEdit>
-#include <QTextBrowser>
class ScHelpTreeModel;
class QPrinter;
@@ -132,10 +130,6 @@ protected:
QMap<QString, QString> quickHelpIndex;
QMap<QString, QPair<QString, QString> > bookmarkIndex;
- // I need to keep this around because page()->toHtml( <callback> ) is asynchronous
- //QSharedPointer<QTextDocument> m_textDocument;
- QSharedPointer<QTextBrowser> m_textBrowser;
-
protected slots:
virtual void languageChange();
void histChosen(QAction* i);
@@ -215,7 +209,7 @@ protected slots:
/*! \brief Restore Default Cursor */
void loadFinished(bool);
- void linkHovered (const QString &);
+ void linkHovered (const QString &, const QString &, const QString &);
signals:
void closed();
diff -rupN luminance-hdr-2.5.0/src/HelpBrowser/sctextbrowser.cpp luminance-hdr-2.5.0-new/src/HelpBrowser/sctextbrowser.cpp
--- luminance-hdr-2.5.0/src/HelpBrowser/sctextbrowser.cpp 2017-04-09 12:25:01.000000000 +0200
+++ luminance-hdr-2.5.0-new/src/HelpBrowser/sctextbrowser.cpp 2017-04-09 12:45:59.183231188 +0200
@@ -57,7 +57,7 @@ for which a new license (GPL+exception)
#include "sctextbrowser.h"
ScTextBrowser::ScTextBrowser( QWidget * parent )
- : QWebEngineView(parent)
+ : QWebView(parent)
{
}
diff -rupN luminance-hdr-2.5.0/src/HelpBrowser/sctextbrowser.h luminance-hdr-2.5.0-new/src/HelpBrowser/sctextbrowser.h
--- luminance-hdr-2.5.0/src/HelpBrowser/sctextbrowser.h 2017-04-09 12:25:01.000000000 +0200
+++ luminance-hdr-2.5.0-new/src/HelpBrowser/sctextbrowser.h 2017-04-09 12:45:59.184231179 +0200
@@ -45,9 +45,9 @@ for which a new license (GPL+exception)
#define SCTEXTBROWSER_H
#include <QUrl>
-#include <QWebEngineView>
+#include <QWebView>
-class ScTextBrowser : public QWebEngineView
+class ScTextBrowser : public QWebView
{
Q_OBJECT
QUrl m_home;
diff -rupN luminance-hdr-2.5.0/src/UI/CMakeLists.txt luminance-hdr-2.5.0-new/src/UI/CMakeLists.txt
--- luminance-hdr-2.5.0/src/UI/CMakeLists.txt 2017-04-09 12:25:01.000000000 +0200
+++ luminance-hdr-2.5.0-new/src/UI/CMakeLists.txt 2017-04-09 12:45:59.184231179 +0200
@@ -41,7 +41,7 @@ QT5_WRAP_CPP(FILES_MOC ${FILES_H})
QT5_WRAP_UI(FILES_UI_H ${FILES_UI})
ADD_LIBRARY(ui ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H})
-qt5_use_modules(ui Core Concurrent Gui Widgets WebEngineWidgets)
+qt5_use_modules(ui Core Concurrent Gui Widgets WebKitWidgets)
SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} PARENT_SCOPE)
SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} ui PARENT_SCOPE)