Merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/lok-qml-async-imageprovider into lp:ubuntu-docviewer-app
- lok-qml-async-imageprovider
- Merge into lo-viewer
Status: | Merged |
---|---|
Approved by: | Stefano Verzegnassi |
Approved revision: | 256 |
Merged at revision: | 294 |
Proposed branch: | lp:~verzegnassi-stefano/ubuntu-docviewer-app/lok-qml-async-imageprovider |
Merge into: | lp:ubuntu-docviewer-app |
Prerequisite: | lp:~ubuntu-docviewer-dev/ubuntu-docviewer-app/ubuntu-docviewer-app-re-fix |
Diff against target: |
602 lines (+162/-120) 17 files modified
po/com.ubuntu.docviewer.pot (+9/-9) src/app/qml/loView/PartsView.qml (+4/-4) src/app/qml/pdfView/PdfPresentation.qml (+1/-1) src/app/qml/ubuntu-docviewer-app.qml (+2/-2) src/plugin/libreofficetoolkit-qml-plugin/CMakeLists.txt (+1/-0) src/plugin/libreofficetoolkit-qml-plugin/lodocument.cpp (+5/-5) src/plugin/libreofficetoolkit-qml-plugin/lodocument.h (+1/-1) src/plugin/libreofficetoolkit-qml-plugin/lopartsimageprovider.cpp (+23/-31) src/plugin/libreofficetoolkit-qml-plugin/lopartsimageprovider.h (+8/-12) src/plugin/libreofficetoolkit-qml-plugin/lopartsimageresponse.cpp (+54/-0) src/plugin/libreofficetoolkit-qml-plugin/lopartsimageresponse.h (+41/-0) src/plugin/libreofficetoolkit-qml-plugin/lopartsmodel.cpp (+0/-20) src/plugin/libreofficetoolkit-qml-plugin/lopartsmodel.h (+0/-7) src/plugin/libreofficetoolkit-qml-plugin/lorendertask.cpp (+1/-1) src/plugin/libreofficetoolkit-qml-plugin/lorendertask.h (+3/-3) src/plugin/libreofficetoolkit-qml-plugin/loview.cpp (+9/-22) src/plugin/libreofficetoolkit-qml-plugin/loview.h (+0/-2) |
To merge this branch: | bzr merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/lok-qml-async-imageprovider |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jenkins Bot | continuous-integration | Approve | |
Roman Shchekin | Approve | ||
Nicholas Skaggs (community) | Needs Fixing | ||
Review via email: mp+282878@code.launchpad.net |
Commit message
Use QQuickAsyncImag
This is backported on Ubuntu/Ubuntu Touch since Qt 5.4.1-1ubuntu7.
On any other distro/OS it works only with Qt 5.6 (or later).
Description of the change
Use QQuickAsyncImag
This is backported on Ubuntu/Ubuntu Touch since Qt 5.4.1-1ubuntu7.
On any other distro/OS it works only with Qt 5.6 (or later).
Stefano Verzegnassi (verzegnassi-stefano) wrote : | # |
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:248
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Roman Shchekin (mrqtros) wrote : | # |
Just remove it and manage memory yourself (in "slotTaskRender
Stefano Verzegnassi (verzegnassi-stefano) wrote : | # |
By doing so, the app crashes any time a document is loaded.
It does not crash always at the same point, but it may occur at two different points:
1) In the internalRenderC
if (m_activeTaskCount && !task->
return;
2) In lopartsimageres
void LOPartsImageRes
{
disconnect(
if (m_task) {
delete m_task;
}
}
With the current code, I really think we should give the ownership of the task to the RenderEngine.
As we discussed earlier, the code I wrote is not so good because the ImageResponse gets the ownership and then it gives that ownership away in a asymmetrical/
Supposed that we should try to make RenderEngine work properly with different threads, could we revert to the code I wrote earlier (RenderEngine takes ownership of the tasks, and we connect to it using a BlockingQueueCo
It used to work with no issue when we tried it.
Stefano Verzegnassi (verzegnassi-stefano) wrote : | # |
I had a further look at the issue.
It seems that QQuickPixmapCache calls QQuickImageResp
We properly synchronize the threads when we queue/dequeue the task from the engine but, if the task is currently being processed, it gets deleted during its execution.
We need to ensure that the GUI thread (where RenderEngine lives) and the LOImageResponse are in sync when we delete the task.
I guess we'd be better not to give ownership of the task to a class that lives in another thread, and let RenderEngine handles its tasks at its best.
We only need to subscribe to the RenderEngine's signals, using a Qt::BlockingQue
Roman, I remember that the usage of a blocking connection was okay for you before you updated the RenderEngine.
What do you think?
- 249. By Stefano Verzegnassi
-
Moved all the RenderEngine code in LOPartsImageRes
ponse to LOPartsImagePro vider
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:249
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
- 250. By Stefano Verzegnassi
-
Merged trunk. Updated translation template.
- 251. By Stefano Verzegnassi
-
Restored 'cache:false' so that we don't display a thumbnail from a different document
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:251
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:251
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
- 252. By Stefano Verzegnassi
-
Debugging Jenkins issue with QQuickAsyncImag
eProvider
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:252
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:252
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
- 253. By Stefano Verzegnassi
-
Merged trunk, updated .pot
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:253
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Stefano Verzegnassi (verzegnassi-stefano) wrote : | # |
Still building the project against OTA-4 (May, 2014)...
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:253
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:253
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Nicholas Skaggs (nskaggs) wrote : | # |
Text conflict in po/com.
1 conflicts encountered.
Everytime something lands, you get this lovely conflict. Not sure if there's a better way for you to avoid this :-)
Nicholas Skaggs (nskaggs) wrote : | # |
In other news, jenkins should build and run this cleanly now.
Roman Shchekin (mrqtros) wrote : | # |
So, blockig connection solved all issues?
Just for inromation - you decided do not use render tasks separately from RenderEngine?
Stefano Verzegnassi (verzegnassi-stefano) wrote : | # |
- So it seems. We've discussed about it some week ago, and it seems to keep everything in sync since it waits for the ImageResponse to complete its work on the returned image.
- I moved the code that calls the RenderEngine to the image provider. This way it is used from the GUI thread and there is no problem with ownership, etc...
Roman Shchekin (mrqtros) wrote : | # |
Ok, let's merge then!
- 254. By Stefano Verzegnassi
-
Merged trunk + fixed .pot conflict
- 255. By Stefano Verzegnassi
-
Fixed LOK viewer going full-screen with a .odp/.ppt(x) document.
Both PDF full-screen presentation mode and LOK viewer were using a 'isPresentation' property with two different meaning. My fault, sorry! :/
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:255
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
- 256. By Stefano Verzegnassi
-
Removed Jenkins debug
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:256
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'po/com.ubuntu.docviewer.pot' | |||
2 | --- po/com.ubuntu.docviewer.pot 2016-02-03 13:51:11 +0000 | |||
3 | +++ po/com.ubuntu.docviewer.pot 2016-02-05 22:57:36 +0000 | |||
4 | @@ -8,7 +8,7 @@ | |||
5 | 8 | msgstr "" | 8 | msgstr "" |
6 | 9 | "Project-Id-Version: \n" | 9 | "Project-Id-Version: \n" |
7 | 10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
9 | 11 | "POT-Creation-Date: 2016-02-03 14:48+0100\n" | 11 | "POT-Creation-Date: 2016-02-05 23:40+0100\n" |
10 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
11 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
12 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
13 | @@ -216,7 +216,7 @@ | |||
14 | 216 | msgstr "" | 216 | msgstr "" |
15 | 217 | 217 | ||
16 | 218 | #: ../src/app/qml/documentPage/DocumentPage.qml:23 | 218 | #: ../src/app/qml/documentPage/DocumentPage.qml:23 |
18 | 219 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:3 | 219 | #: /tmp/lok-qml-async-imageprovider-build/po/com.ubuntu.docviewer.desktop.in.in.h:3 |
19 | 220 | msgid "Documents" | 220 | msgid "Documents" |
20 | 221 | msgstr "" | 221 | msgstr "" |
21 | 222 | 222 | ||
22 | @@ -367,21 +367,21 @@ | |||
23 | 367 | msgid "GO!" | 367 | msgid "GO!" |
24 | 368 | msgstr "" | 368 | msgstr "" |
25 | 369 | 369 | ||
27 | 370 | #: ../src/app/qml/loView/LOViewPage.qml:137 | 370 | #: ../src/app/qml/loView/LOViewPage.qml:167 |
28 | 371 | msgid "LibreOffice binaries not found." | 371 | msgid "LibreOffice binaries not found." |
29 | 372 | msgstr "" | 372 | msgstr "" |
30 | 373 | 373 | ||
32 | 374 | #: ../src/app/qml/loView/LOViewPage.qml:140 | 374 | #: ../src/app/qml/loView/LOViewPage.qml:170 |
33 | 375 | msgid "Error while loading LibreOffice." | 375 | msgid "Error while loading LibreOffice." |
34 | 376 | msgstr "" | 376 | msgstr "" |
35 | 377 | 377 | ||
37 | 378 | #: ../src/app/qml/loView/LOViewPage.qml:143 | 378 | #: ../src/app/qml/loView/LOViewPage.qml:173 |
38 | 379 | msgid "" | 379 | msgid "" |
39 | 380 | "Document not loaded.\n" | 380 | "Document not loaded.\n" |
40 | 381 | "The requested document may be corrupt or protected by a password." | 381 | "The requested document may be corrupt or protected by a password." |
41 | 382 | msgstr "" | 382 | msgstr "" |
42 | 383 | 383 | ||
44 | 384 | #: ../src/app/qml/loView/LOViewPage.qml:164 | 384 | #: ../src/app/qml/loView/LOViewPage.qml:228 |
45 | 385 | msgid "This sheet has no content." | 385 | msgid "This sheet has no content." |
46 | 386 | msgstr "" | 386 | msgstr "" |
47 | 387 | 387 | ||
48 | @@ -446,7 +446,7 @@ | |||
49 | 446 | msgid "Choose a page between 1 and %1" | 446 | msgid "Choose a page between 1 and %1" |
50 | 447 | msgstr "" | 447 | msgstr "" |
51 | 448 | 448 | ||
53 | 449 | #: ../src/app/qml/ubuntu-docviewer-app.qml:118 | 449 | #: ../src/app/qml/ubuntu-docviewer-app.qml:114 |
54 | 450 | msgid "File does not exist." | 450 | msgid "File does not exist." |
55 | 451 | msgstr "" | 451 | msgstr "" |
56 | 452 | 452 | ||
57 | @@ -464,10 +464,10 @@ | |||
58 | 464 | msgid "copy %1" | 464 | msgid "copy %1" |
59 | 465 | msgstr "" | 465 | msgstr "" |
60 | 466 | 466 | ||
62 | 467 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:1 | 467 | #: /tmp/lok-qml-async-imageprovider-build/po/com.ubuntu.docviewer.desktop.in.in.h:1 |
63 | 468 | msgid "Document Viewer" | 468 | msgid "Document Viewer" |
64 | 469 | msgstr "" | 469 | msgstr "" |
65 | 470 | 470 | ||
67 | 471 | #: /tmp/ubuntu-docviewer-app-build/po/com.ubuntu.docviewer.desktop.in.in.h:2 | 471 | #: /tmp/lok-qml-async-imageprovider-build/po/com.ubuntu.docviewer.desktop.in.in.h:2 |
68 | 472 | msgid "documents;viewer;pdf;reader;" | 472 | msgid "documents;viewer;pdf;reader;" |
69 | 473 | msgstr "" | 473 | msgstr "" |
70 | 474 | 474 | ||
71 | === modified file 'src/app/qml/loView/PartsView.qml' | |||
72 | --- src/app/qml/loView/PartsView.qml 2016-01-17 12:09:58 +0000 | |||
73 | +++ src/app/qml/loView/PartsView.qml 2016-02-05 22:57:36 +0000 | |||
74 | @@ -103,8 +103,8 @@ | |||
75 | 103 | fillMode: Image.PreserveAspectFit | 103 | fillMode: Image.PreserveAspectFit |
76 | 104 | // Do not store a cache of the thumbnail, so that we don't show | 104 | // Do not store a cache of the thumbnail, so that we don't show |
77 | 105 | // thumbnails of a previously loaded document. | 105 | // thumbnails of a previously loaded document. |
80 | 106 | cache: true // TODO PLAY WITH IT | 106 | cache: false |
81 | 107 | source: model.thumbnail | 107 | source: "image://lok/part/%1".arg(model.index) |
82 | 108 | } | 108 | } |
83 | 109 | } | 109 | } |
84 | 110 | 110 | ||
85 | @@ -172,8 +172,8 @@ | |||
86 | 172 | fillMode: Image.PreserveAspectFit | 172 | fillMode: Image.PreserveAspectFit |
87 | 173 | // Do not store a cache of the thumbnail, so that we don't show | 173 | // Do not store a cache of the thumbnail, so that we don't show |
88 | 174 | // thumbnails of a previously loaded document. | 174 | // thumbnails of a previously loaded document. |
91 | 175 | cache: true // TODO PLAY WITH IT | 175 | cache: false |
92 | 176 | source: model.thumbnail | 176 | source: "image://lok/part/%1".arg(model.index) |
93 | 177 | } | 177 | } |
94 | 178 | } | 178 | } |
95 | 179 | 179 | ||
96 | 180 | 180 | ||
97 | === modified file 'src/app/qml/pdfView/PdfPresentation.qml' | |||
98 | --- src/app/qml/pdfView/PdfPresentation.qml 2016-01-23 12:34:25 +0000 | |||
99 | +++ src/app/qml/pdfView/PdfPresentation.qml 2016-02-05 22:57:36 +0000 | |||
100 | @@ -22,7 +22,7 @@ | |||
101 | 22 | Page { | 22 | Page { |
102 | 23 | id: pdfPage | 23 | id: pdfPage |
103 | 24 | property var poppler | 24 | property var poppler |
105 | 25 | property bool isPresentation: true | 25 | property bool isPresentationMode: true |
106 | 26 | anchors.fill: parent | 26 | anchors.fill: parent |
107 | 27 | title: DocumentViewer.getFileBaseNameFromPath(poppler.path) | 27 | title: DocumentViewer.getFileBaseNameFromPath(poppler.path) |
108 | 28 | focus: true | 28 | focus: true |
109 | 29 | 29 | ||
110 | === modified file 'src/app/qml/ubuntu-docviewer-app.qml' | |||
111 | --- src/app/qml/ubuntu-docviewer-app.qml 2016-01-23 12:48:49 +0000 | |||
112 | +++ src/app/qml/ubuntu-docviewer-app.qml 2016-02-05 22:57:36 +0000 | |||
113 | @@ -34,7 +34,7 @@ | |||
114 | 34 | // force hiding Unity 8 indicators panel. | 34 | // force hiding Unity 8 indicators panel. |
115 | 35 | property bool fullscreen: commandLineProxy.fullscreen || | 35 | property bool fullscreen: commandLineProxy.fullscreen || |
116 | 36 | (!desktopMode && isLandscape && narrowWindow) || | 36 | (!desktopMode && isLandscape && narrowWindow) || |
118 | 37 | pageStack.currentPage.hasOwnProperty("isPresentation") | 37 | pageStack.currentPage.hasOwnProperty("isPresentationMode") |
119 | 38 | 38 | ||
120 | 39 | readonly property bool desktopMode: DocumentViewer.desktopMode | 39 | readonly property bool desktopMode: DocumentViewer.desktopMode |
121 | 40 | 40 | ||
122 | @@ -200,5 +200,5 @@ | |||
123 | 200 | 200 | ||
124 | 201 | property bool nightModeEnabled: false | 201 | property bool nightModeEnabled: false |
125 | 202 | layer.effect: NightModeShader {} | 202 | layer.effect: NightModeShader {} |
127 | 203 | layer.enabled: nightModeEnabled && (pageStack.depth > 1) && !pageStack.currentPage.isPresentation | 203 | layer.enabled: nightModeEnabled && (pageStack.depth > 1) && !pageStack.currentPage.isPresentationMode |
128 | 204 | } | 204 | } |
129 | 205 | 205 | ||
130 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/CMakeLists.txt' | |||
131 | --- src/plugin/libreofficetoolkit-qml-plugin/CMakeLists.txt 2016-01-20 21:48:21 +0000 | |||
132 | +++ src/plugin/libreofficetoolkit-qml-plugin/CMakeLists.txt 2016-02-05 22:57:36 +0000 | |||
133 | @@ -23,6 +23,7 @@ | |||
134 | 23 | loview.cpp | 23 | loview.cpp |
135 | 24 | sgtileitem.cpp | 24 | sgtileitem.cpp |
136 | 25 | lopartsimageprovider.cpp | 25 | lopartsimageprovider.cpp |
137 | 26 | lopartsimageresponse.cpp | ||
138 | 26 | lopartsmodel.cpp | 27 | lopartsmodel.cpp |
139 | 27 | lorendertask.cpp | 28 | lorendertask.cpp |
140 | 28 | ucunits.cpp | 29 | ucunits.cpp |
141 | 29 | 30 | ||
142 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/lodocument.cpp' | |||
143 | --- src/plugin/libreofficetoolkit-qml-plugin/lodocument.cpp 2016-01-25 12:15:43 +0000 | |||
144 | +++ src/plugin/libreofficetoolkit-qml-plugin/lodocument.cpp 2016-02-05 22:57:36 +0000 | |||
145 | @@ -170,7 +170,7 @@ | |||
146 | 170 | return result.rgbSwapped(); | 170 | return result.rgbSwapped(); |
147 | 171 | } | 171 | } |
148 | 172 | 172 | ||
150 | 173 | QImage LODocument::paintThumbnail(int part, qreal size) | 173 | QImage LODocument::paintPart(int part, const QSize &size) |
151 | 174 | { | 174 | { |
152 | 175 | if (!m_lokDocument) | 175 | if (!m_lokDocument) |
153 | 176 | return QImage(); | 176 | return QImage(); |
154 | @@ -189,11 +189,11 @@ | |||
155 | 189 | QSize resultSize; | 189 | QSize resultSize; |
156 | 190 | 190 | ||
157 | 191 | if (tWidth > tHeight) { | 191 | if (tWidth > tHeight) { |
160 | 192 | resultSize.setWidth(size); | 192 | resultSize.setWidth(size.width()); |
161 | 193 | resultSize.setHeight(size * tHeight / tWidth); | 193 | resultSize.setHeight(size.width() * tHeight / tWidth); |
162 | 194 | } else { | 194 | } else { |
165 | 195 | resultSize.setHeight(size); | 195 | resultSize.setHeight(size.height()); |
166 | 196 | resultSize.setWidth(size * tWidth / tHeight); | 196 | resultSize.setWidth(size.height() * tWidth / tHeight); |
167 | 197 | } | 197 | } |
168 | 198 | 198 | ||
169 | 199 | QImage result = QImage(resultSize.width(), resultSize.height(), QImage::Format_RGB32); | 199 | QImage result = QImage(resultSize.width(), resultSize.height(), QImage::Format_RGB32); |
170 | 200 | 200 | ||
171 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/lodocument.h' | |||
172 | --- src/plugin/libreofficetoolkit-qml-plugin/lodocument.h 2016-01-25 12:59:02 +0000 | |||
173 | +++ src/plugin/libreofficetoolkit-qml-plugin/lodocument.h 2016-02-05 22:57:36 +0000 | |||
174 | @@ -59,7 +59,7 @@ | |||
175 | 59 | QSize documentSize(int part) const; | 59 | QSize documentSize(int part) const; |
176 | 60 | 60 | ||
177 | 61 | QImage paintTile(int part, const QSize& canvasSize, const QRect& tileSize, const qreal& zoom = 1.0); | 61 | QImage paintTile(int part, const QSize& canvasSize, const QRect& tileSize, const qreal& zoom = 1.0); |
179 | 62 | QImage paintThumbnail(int part, qreal size); | 62 | QImage paintPart(int part, const QSize &size); |
180 | 63 | 63 | ||
181 | 64 | int partsCount(); | 64 | int partsCount(); |
182 | 65 | QString getPartName(int index) const; | 65 | QString getPartName(int index) const; |
183 | 66 | 66 | ||
184 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/lopartsimageprovider.cpp' | |||
185 | --- src/plugin/libreofficetoolkit-qml-plugin/lopartsimageprovider.cpp 2015-12-12 10:06:55 +0000 | |||
186 | +++ src/plugin/libreofficetoolkit-qml-plugin/lopartsimageprovider.cpp 2016-02-05 22:57:36 +0000 | |||
187 | @@ -1,5 +1,5 @@ | |||
188 | 1 | /* | 1 | /* |
190 | 2 | * Copyright (C) 2015 Canonical, Ltd. | 2 | * Copyright (C) 2015 Stefano Verzegnassi |
191 | 3 | * | 3 | * |
192 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
193 | 5 | * under the terms of the GNU General Public License version 3, as published | 5 | * under the terms of the GNU General Public License version 3, as published |
194 | @@ -15,50 +15,42 @@ | |||
195 | 15 | */ | 15 | */ |
196 | 16 | 16 | ||
197 | 17 | #include "lopartsimageprovider.h" | 17 | #include "lopartsimageprovider.h" |
198 | 18 | #include "lopartsimageresponse.h" | ||
199 | 19 | |||
200 | 18 | #include "lodocument.h" | 20 | #include "lodocument.h" |
201 | 21 | |||
202 | 19 | #include "../../app/renderengine.h" | 22 | #include "../../app/renderengine.h" |
203 | 23 | #include "lorendertask.h" | ||
204 | 20 | 24 | ||
205 | 21 | LOPartsImageProvider::LOPartsImageProvider(const QSharedPointer<LODocument>& d) | 25 | LOPartsImageProvider::LOPartsImageProvider(const QSharedPointer<LODocument>& d) |
208 | 22 | : QQuickImageProvider(QQuickImageProvider::Image), | 26 | : QQuickAsyncImageProvider() |
209 | 23 | m_document(d) | 27 | , m_document(d) |
210 | 24 | { } | 28 | { } |
211 | 25 | 29 | ||
213 | 26 | QImage LOPartsImageProvider::requestImage(const QString & id, QSize * size, const QSize & requestedSize) | 30 | QQuickImageResponse *LOPartsImageProvider::requestImageResponse(const QString & id, const QSize & requestedSize) |
214 | 27 | { | 31 | { |
215 | 28 | Q_UNUSED(size) | ||
216 | 29 | |||
217 | 30 | QString type = id.section("/", 0, 0); | 32 | QString type = id.section("/", 0, 0); |
241 | 31 | 33 | int part = id.section("/", 1, 1).toInt(); | |
242 | 32 | if (requestedSize.isNull() || type != "part" || | 34 | bool isValid = bool(!requestedSize.isNull() || type == "part"); |
243 | 33 | m_document->documentType() != LODocument::PresentationDocument) | 35 | |
244 | 34 | return QImage(); | 36 | auto response = new LOPartsImageResponse(isValid); |
245 | 35 | 37 | ||
246 | 36 | // Get info from "id". | 38 | if (isValid) { |
247 | 37 | int partNumber = id.section("/", 1, 1).toInt(); | 39 | int taskId = RenderEngine::getNextId(); |
248 | 38 | int itemId = id.section("/", 2, 2).toInt(); | 40 | response->setTaskId(taskId); |
249 | 39 | 41 | RenderEngine::instance()->enqueueTask(createTask(part, requestedSize, taskId)); | |
250 | 40 | // Once rendered images can be found in hash. | 42 | } |
251 | 41 | if (m_images.contains(itemId)) | 43 | |
252 | 42 | return m_images[itemId]; | 44 | return response; |
230 | 43 | |||
231 | 44 | const int defaultSize = 256; | ||
232 | 45 | |||
233 | 46 | RenderEngine::instance()->enqueueTask(createTask(partNumber, defaultSize, itemId)); | ||
234 | 47 | |||
235 | 48 | // Return default image (empty). | ||
236 | 49 | static QImage defaultImage; | ||
237 | 50 | if (defaultImage.isNull()) | ||
238 | 51 | defaultImage = QImage(defaultSize, defaultSize, QImage::Format_ARGB32); | ||
239 | 52 | |||
240 | 53 | return defaultImage; | ||
253 | 54 | } | 45 | } |
254 | 55 | 46 | ||
256 | 56 | ThumbnailRenderTask *LOPartsImageProvider::createTask(int part, qreal size, int id) const | 47 | ThumbnailRenderTask* LOPartsImageProvider::createTask(int part, const QSize &size, int id) const |
257 | 57 | { | 48 | { |
258 | 58 | ThumbnailRenderTask* task = new ThumbnailRenderTask(); | 49 | ThumbnailRenderTask* task = new ThumbnailRenderTask(); |
259 | 59 | task->setId(id); | 50 | task->setId(id); |
260 | 60 | task->setPart(part); | 51 | task->setPart(part); |
261 | 61 | task->setDocument(m_document); | 52 | task->setDocument(m_document); |
263 | 62 | task->setSize(size); | 53 | task->setSize(size.isEmpty() ? QSize(256, 256) : size); |
264 | 54 | |||
265 | 63 | return task; | 55 | return task; |
266 | 64 | } | 56 | } |
267 | 65 | 57 | ||
268 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/lopartsimageprovider.h' | |||
269 | --- src/plugin/libreofficetoolkit-qml-plugin/lopartsimageprovider.h 2015-12-12 10:06:55 +0000 | |||
270 | +++ src/plugin/libreofficetoolkit-qml-plugin/lopartsimageprovider.h 2016-02-05 22:57:36 +0000 | |||
271 | @@ -1,5 +1,5 @@ | |||
272 | 1 | /* | 1 | /* |
274 | 2 | * Copyright (C) 2015 Canonical, Ltd. | 2 | * Copyright (C) 2015 Stefano Verzegnassi |
275 | 3 | * | 3 | * |
276 | 4 | * This program is free software: you can redistribute it and/or modify it | 4 | * This program is free software: you can redistribute it and/or modify it |
277 | 5 | * under the terms of the GNU General Public License version 3, as published | 5 | * under the terms of the GNU General Public License version 3, as published |
278 | @@ -18,28 +18,24 @@ | |||
279 | 18 | #ifndef LOPARTSIMAGEPROVIDER_H | 18 | #ifndef LOPARTSIMAGEPROVIDER_H |
280 | 19 | #define LOPARTSIMAGEPROVIDER_H | 19 | #define LOPARTSIMAGEPROVIDER_H |
281 | 20 | 20 | ||
283 | 21 | #include <QQuickImageProvider> | 21 | // For QQuickAsyncImageProvider |
284 | 22 | #include <qquickimageprovider.h> | ||
285 | 22 | #include <QSharedPointer> | 23 | #include <QSharedPointer> |
286 | 23 | #include <QHash> | ||
287 | 24 | #include <QDebug> | ||
288 | 25 | |||
289 | 26 | #include "lorendertask.h" | ||
290 | 27 | 24 | ||
291 | 28 | class LODocument; | 25 | class LODocument; |
292 | 26 | class ThumbnailRenderTask; | ||
293 | 29 | 27 | ||
295 | 30 | class LOPartsImageProvider : public QQuickImageProvider | 28 | class LOPartsImageProvider : public QQuickAsyncImageProvider |
296 | 31 | { | 29 | { |
297 | 32 | public: | 30 | public: |
298 | 33 | LOPartsImageProvider(const QSharedPointer<LODocument>& d); | 31 | LOPartsImageProvider(const QSharedPointer<LODocument>& d); |
300 | 34 | QImage requestImage(const QString & id, QSize * size, const QSize & requestedSize); | 32 | QQuickImageResponse* requestImageResponse(const QString & id, const QSize & requestedSize); |
301 | 35 | 33 | ||
303 | 36 | QHash<int, QImage> m_images; | 34 | private: |
304 | 35 | ThumbnailRenderTask* createTask(int part, const QSize &size, int id) const; | ||
305 | 37 | 36 | ||
306 | 38 | private: | 37 | private: |
307 | 39 | QSharedPointer<LODocument> m_document; | 38 | QSharedPointer<LODocument> m_document; |
308 | 40 | |||
309 | 41 | private: | ||
310 | 42 | ThumbnailRenderTask* createTask(int part, qreal size, int id) const; | ||
311 | 43 | }; | 39 | }; |
312 | 44 | 40 | ||
313 | 45 | #endif // LOPARTSIMAGEPROVIDER_H | 41 | #endif // LOPARTSIMAGEPROVIDER_H |
314 | 46 | 42 | ||
315 | === added file 'src/plugin/libreofficetoolkit-qml-plugin/lopartsimageresponse.cpp' | |||
316 | --- src/plugin/libreofficetoolkit-qml-plugin/lopartsimageresponse.cpp 1970-01-01 00:00:00 +0000 | |||
317 | +++ src/plugin/libreofficetoolkit-qml-plugin/lopartsimageresponse.cpp 2016-02-05 22:57:36 +0000 | |||
318 | @@ -0,0 +1,54 @@ | |||
319 | 1 | /* | ||
320 | 2 | * Copyright (C) 2015 Roman Shchekin | ||
321 | 3 | * Copyright (C) 2015 Stefano Verzegnassi | ||
322 | 4 | * | ||
323 | 5 | * This program is free software: you can redistribute it and/or modify it | ||
324 | 6 | * under the terms of the GNU General Public License version 3, as published | ||
325 | 7 | * by the Free Software Foundation. | ||
326 | 8 | * | ||
327 | 9 | * This program is distributed in the hope that it will be useful, but | ||
328 | 10 | * WITHOUT ANY WARRANTY; without even the implied warranties of | ||
329 | 11 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
330 | 12 | * PURPOSE. See the GNU General Public License for more details. | ||
331 | 13 | * | ||
332 | 14 | * You should have received a copy of the GNU General Public License along | ||
333 | 15 | * with this program. If not, see <http://www.gnu.org/licenses/>. | ||
334 | 16 | */ | ||
335 | 17 | |||
336 | 18 | #include "lopartsimageresponse.h" | ||
337 | 19 | #include "lodocument.h" | ||
338 | 20 | |||
339 | 21 | #include "../../app/renderengine.h" | ||
340 | 22 | |||
341 | 23 | LOPartsImageResponse::LOPartsImageResponse(bool isRequestValid) | ||
342 | 24 | : m_taskId(0) | ||
343 | 25 | { | ||
344 | 26 | if (!isRequestValid) { | ||
345 | 27 | m_errorString = "Requested size or id are not valid."; | ||
346 | 28 | |||
347 | 29 | QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection); | ||
348 | 30 | return; | ||
349 | 31 | } | ||
350 | 32 | |||
351 | 33 | connect(RenderEngine::instance(), &RenderEngine::taskRenderFinished, | ||
352 | 34 | this, [&](AbstractRenderTask *task, QImage img) { | ||
353 | 35 | if (m_taskId == task->id() && task->type() == RttImpressThumbnail) { | ||
354 | 36 | m_image = img; | ||
355 | 37 | Q_EMIT finished(); | ||
356 | 38 | } | ||
357 | 39 | }, Qt::BlockingQueuedConnection); | ||
358 | 40 | } | ||
359 | 41 | |||
360 | 42 | LOPartsImageResponse::~LOPartsImageResponse() | ||
361 | 43 | { | ||
362 | 44 | disconnect(this); | ||
363 | 45 | |||
364 | 46 | QMetaObject::invokeMethod(RenderEngine::instance(), "dequeueTask", | ||
365 | 47 | Qt::QueuedConnection, | ||
366 | 48 | Q_ARG(int, m_taskId)); | ||
367 | 49 | } | ||
368 | 50 | |||
369 | 51 | QQuickTextureFactory * LOPartsImageResponse::textureFactory() const | ||
370 | 52 | { | ||
371 | 53 | return QQuickTextureFactory::textureFactoryForImage(m_image); | ||
372 | 54 | } | ||
373 | 0 | 55 | ||
374 | === added file 'src/plugin/libreofficetoolkit-qml-plugin/lopartsimageresponse.h' | |||
375 | --- src/plugin/libreofficetoolkit-qml-plugin/lopartsimageresponse.h 1970-01-01 00:00:00 +0000 | |||
376 | +++ src/plugin/libreofficetoolkit-qml-plugin/lopartsimageresponse.h 2016-02-05 22:57:36 +0000 | |||
377 | @@ -0,0 +1,41 @@ | |||
378 | 1 | /* | ||
379 | 2 | * Copyright (C) 2015 Stefano Verzegnassi | ||
380 | 3 | * | ||
381 | 4 | * This program is free software: you can redistribute it and/or modify it | ||
382 | 5 | * under the terms of the GNU General Public License version 3, as published | ||
383 | 6 | * by the Free Software Foundation. | ||
384 | 7 | * | ||
385 | 8 | * This program is distributed in the hope that it will be useful, but | ||
386 | 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of | ||
387 | 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
388 | 11 | * PURPOSE. See the GNU General Public License for more details. | ||
389 | 12 | * | ||
390 | 13 | * You should have received a copy of the GNU General Public License along | ||
391 | 14 | * with this program. If not, see <http://www.gnu.org/licenses/>. | ||
392 | 15 | * | ||
393 | 16 | */ | ||
394 | 17 | |||
395 | 18 | #ifndef LOPARTSIMAGERESPONSE_H | ||
396 | 19 | #define LOPARTSIMAGEPROVIDER_H | ||
397 | 20 | |||
398 | 21 | // For QQuickImageResponse | ||
399 | 22 | #include <qquickimageprovider.h> | ||
400 | 23 | |||
401 | 24 | class LOPartsImageResponse : public QQuickImageResponse | ||
402 | 25 | { | ||
403 | 26 | public: | ||
404 | 27 | LOPartsImageResponse(bool isRequestValid); | ||
405 | 28 | ~LOPartsImageResponse(); | ||
406 | 29 | |||
407 | 30 | void setTaskId(const int id) { m_taskId = id; } | ||
408 | 31 | QString errorString() const override { return m_errorString; } | ||
409 | 32 | QQuickTextureFactory * textureFactory() const override; | ||
410 | 33 | |||
411 | 34 | private: | ||
412 | 35 | QString m_errorString; | ||
413 | 36 | QImage m_image; | ||
414 | 37 | int m_taskId; | ||
415 | 38 | }; | ||
416 | 39 | |||
417 | 40 | |||
418 | 41 | #endif // LOPARTSIMAGERESPONSE_H | ||
419 | 0 | 42 | ||
420 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/lopartsmodel.cpp' | |||
421 | --- src/plugin/libreofficetoolkit-qml-plugin/lopartsmodel.cpp 2015-10-11 11:31:22 +0000 | |||
422 | +++ src/plugin/libreofficetoolkit-qml-plugin/lopartsmodel.cpp 2016-02-05 22:57:36 +0000 | |||
423 | @@ -33,8 +33,6 @@ | |||
424 | 33 | QHash<int, QByteArray> roles; | 33 | QHash<int, QByteArray> roles; |
425 | 34 | roles[IndexRole] = "index"; | 34 | roles[IndexRole] = "index"; |
426 | 35 | roles[NameRole] = "name"; | 35 | roles[NameRole] = "name"; |
427 | 36 | roles[IdRole] = "id"; | ||
428 | 37 | roles[ThumbnailRole] = "thumbnail"; | ||
429 | 38 | 36 | ||
430 | 39 | return roles; | 37 | return roles; |
431 | 40 | } | 38 | } |
432 | @@ -57,10 +55,6 @@ | |||
433 | 57 | return part.index; | 55 | return part.index; |
434 | 58 | case NameRole: | 56 | case NameRole: |
435 | 59 | return part.name; | 57 | return part.name; |
436 | 60 | case IdRole: | ||
437 | 61 | return part.id; | ||
438 | 62 | case ThumbnailRole: | ||
439 | 63 | return part.thumbnail; | ||
440 | 64 | 58 | ||
441 | 65 | default: | 59 | default: |
442 | 66 | return 0; | 60 | return 0; |
443 | @@ -79,22 +73,10 @@ | |||
444 | 79 | QVariantMap map; | 73 | QVariantMap map; |
445 | 80 | map["name"] = part.name; | 74 | map["name"] = part.name; |
446 | 81 | map["index"] = part.index; | 75 | map["index"] = part.index; |
447 | 82 | map["id"] = part.id; | ||
448 | 83 | map["thumbnail"] = part.thumbnail; | ||
449 | 84 | 76 | ||
450 | 85 | return map; | 77 | return map; |
451 | 86 | } | 78 | } |
452 | 87 | 79 | ||
453 | 88 | void LOPartsModel::notifyAboutChanges(int id) | ||
454 | 89 | { | ||
455 | 90 | for (int i = 0; i < m_entries.size(); i++) | ||
456 | 91 | if (m_entries[i].id == id) { | ||
457 | 92 | m_entries[i].thumbnail += "/cached"; | ||
458 | 93 | Q_EMIT dataChanged(createIndex(i, 0), createIndex(i + 1, 0)); | ||
459 | 94 | break; | ||
460 | 95 | } | ||
461 | 96 | } | ||
462 | 97 | |||
463 | 98 | void LOPartsModel::fillModel() { | 80 | void LOPartsModel::fillModel() { |
464 | 99 | if (!m_document) | 81 | if (!m_document) |
465 | 100 | return; | 82 | return; |
466 | @@ -112,8 +94,6 @@ | |||
467 | 112 | 94 | ||
468 | 113 | part.index = i; | 95 | part.index = i; |
469 | 114 | part.name = m_document->getPartName(i); | 96 | part.name = m_document->getPartName(i); |
470 | 115 | part.id = RenderEngine::getNextId(); | ||
471 | 116 | part.thumbnail = QString("image://lok/part/%1/%2").arg(QString::number(part.index)).arg(QString::number(part.id)); | ||
472 | 117 | 97 | ||
473 | 118 | m_entries.append(part); | 98 | m_entries.append(part); |
474 | 119 | } | 99 | } |
475 | 120 | 100 | ||
476 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/lopartsmodel.h' | |||
477 | --- src/plugin/libreofficetoolkit-qml-plugin/lopartsmodel.h 2015-12-12 10:06:55 +0000 | |||
478 | +++ src/plugin/libreofficetoolkit-qml-plugin/lopartsmodel.h 2016-02-05 22:57:36 +0000 | |||
479 | @@ -30,14 +30,11 @@ | |||
480 | 30 | { | 30 | { |
481 | 31 | public: | 31 | public: |
482 | 32 | LOPartEntry(): | 32 | LOPartEntry(): |
483 | 33 | id(0), | ||
484 | 34 | index(0) | 33 | index(0) |
485 | 35 | { } | 34 | { } |
486 | 36 | 35 | ||
487 | 37 | int id; | ||
488 | 38 | int index; | 36 | int index; |
489 | 39 | QString name; | 37 | QString name; |
490 | 40 | QString thumbnail; | ||
491 | 41 | }; | 38 | }; |
492 | 42 | 39 | ||
493 | 43 | class LOPartsModel : public QAbstractListModel | 40 | class LOPartsModel : public QAbstractListModel |
494 | @@ -50,8 +47,6 @@ | |||
495 | 50 | enum Roles { | 47 | enum Roles { |
496 | 51 | NameRole = Qt::UserRole + 1, | 48 | NameRole = Qt::UserRole + 1, |
497 | 52 | IndexRole, | 49 | IndexRole, |
498 | 53 | IdRole, | ||
499 | 54 | ThumbnailRole | ||
500 | 55 | }; | 50 | }; |
501 | 56 | 51 | ||
502 | 57 | explicit LOPartsModel(const QSharedPointer<LODocument>& document, QAbstractListModel *parent = 0); | 52 | explicit LOPartsModel(const QSharedPointer<LODocument>& document, QAbstractListModel *parent = 0); |
503 | @@ -64,8 +59,6 @@ | |||
504 | 64 | 59 | ||
505 | 65 | Q_INVOKABLE QVariantMap get(int index) const; | 60 | Q_INVOKABLE QVariantMap get(int index) const; |
506 | 66 | 61 | ||
507 | 67 | void notifyAboutChanges(int id); | ||
508 | 68 | |||
509 | 69 | Q_SIGNALS: | 62 | Q_SIGNALS: |
510 | 70 | void countChanged(); | 63 | void countChanged(); |
511 | 71 | 64 | ||
512 | 72 | 65 | ||
513 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/lorendertask.cpp' | |||
514 | --- src/plugin/libreofficetoolkit-qml-plugin/lorendertask.cpp 2016-01-07 11:23:50 +0000 | |||
515 | +++ src/plugin/libreofficetoolkit-qml-plugin/lorendertask.cpp 2016-02-05 22:57:36 +0000 | |||
516 | @@ -21,5 +21,5 @@ | |||
517 | 21 | 21 | ||
518 | 22 | QImage ThumbnailRenderTask::doWork() | 22 | QImage ThumbnailRenderTask::doWork() |
519 | 23 | { | 23 | { |
521 | 24 | return m_document->paintThumbnail(m_part, m_size); | 24 | return m_document->paintPart(m_part, m_size); |
522 | 25 | } | 25 | } |
523 | 26 | 26 | ||
524 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/lorendertask.h' | |||
525 | --- src/plugin/libreofficetoolkit-qml-plugin/lorendertask.h 2016-01-07 11:23:50 +0000 | |||
526 | +++ src/plugin/libreofficetoolkit-qml-plugin/lorendertask.h 2016-02-05 22:57:36 +0000 | |||
527 | @@ -48,10 +48,10 @@ | |||
528 | 48 | virtual RenderTaskType type() { return RttImpressThumbnail; } | 48 | virtual RenderTaskType type() { return RttImpressThumbnail; } |
529 | 49 | virtual QImage doWork(); | 49 | virtual QImage doWork(); |
530 | 50 | 50 | ||
533 | 51 | qreal size() { return m_size; } | 51 | QSize size() const { return m_size; } |
534 | 52 | void setSize(qreal s) { m_size = s; } | 52 | void setSize(const QSize & s) { m_size = s; } |
535 | 53 | protected: | 53 | protected: |
537 | 54 | qreal m_size; | 54 | QSize m_size; |
538 | 55 | }; | 55 | }; |
539 | 56 | 56 | ||
540 | 57 | #endif // LORENDERTASK_H | 57 | #endif // LORENDERTASK_H |
541 | 58 | 58 | ||
542 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/loview.cpp' | |||
543 | --- src/plugin/libreofficetoolkit-qml-plugin/loview.cpp 2016-01-29 12:12:54 +0000 | |||
544 | +++ src/plugin/libreofficetoolkit-qml-plugin/loview.cpp 2016-02-05 22:57:36 +0000 | |||
545 | @@ -344,9 +344,15 @@ | |||
546 | 344 | void LOView::slotTaskRenderFinished(AbstractRenderTask* task, QImage img) | 344 | void LOView::slotTaskRenderFinished(AbstractRenderTask* task, QImage img) |
547 | 345 | { | 345 | { |
548 | 346 | if (task->type() == RttTile) { | 346 | if (task->type() == RttTile) { |
552 | 347 | updateTileData(task, img); | 347 | int id = task->id(); |
553 | 348 | } else if (task->type() == RttImpressThumbnail) { | 348 | |
554 | 349 | updateThumbnailModel(task, img); | 349 | for (auto i = m_tiles.begin(); i != m_tiles.end(); ++i) { |
555 | 350 | SGTileItem* sgtile = i.value(); | ||
556 | 351 | if (sgtile->id() == id) { | ||
557 | 352 | sgtile->setData(img); | ||
558 | 353 | break; | ||
559 | 354 | } | ||
560 | 355 | } | ||
561 | 350 | } | 356 | } |
562 | 351 | } | 357 | } |
563 | 352 | 358 | ||
564 | @@ -401,25 +407,6 @@ | |||
565 | 401 | return task; | 407 | return task; |
566 | 402 | } | 408 | } |
567 | 403 | 409 | ||
568 | 404 | void LOView::updateTileData(AbstractRenderTask* task, QImage img) | ||
569 | 405 | { | ||
570 | 406 | int id = task->id(); | ||
571 | 407 | for (auto i = m_tiles.begin(); i != m_tiles.end(); ++i) { | ||
572 | 408 | SGTileItem* sgtile = i.value(); | ||
573 | 409 | if (sgtile->id() == id) { | ||
574 | 410 | sgtile->setData(img); | ||
575 | 411 | break; | ||
576 | 412 | } | ||
577 | 413 | } | ||
578 | 414 | } | ||
579 | 415 | |||
580 | 416 | void LOView::updateThumbnailModel(AbstractRenderTask* task, QImage img) | ||
581 | 417 | { | ||
582 | 418 | int id = task->id(); | ||
583 | 419 | if (!m_imageProvider->m_images.contains(id)) | ||
584 | 420 | m_imageProvider->m_images.insert(id, img); | ||
585 | 421 | m_partsModel->notifyAboutChanges(id); | ||
586 | 422 | } | ||
587 | 423 | 410 | ||
588 | 424 | void LOView::setError(const LibreOfficeError::Error &error) | 411 | void LOView::setError(const LibreOfficeError::Error &error) |
589 | 425 | { | 412 | { |
590 | 426 | 413 | ||
591 | === modified file 'src/plugin/libreofficetoolkit-qml-plugin/loview.h' | |||
592 | --- src/plugin/libreofficetoolkit-qml-plugin/loview.h 2016-01-21 00:29:15 +0000 | |||
593 | +++ src/plugin/libreofficetoolkit-qml-plugin/loview.h 2016-02-05 22:57:36 +0000 | |||
594 | @@ -113,8 +113,6 @@ | |||
595 | 113 | void createTile(int index, const QRect& rect); | 113 | void createTile(int index, const QRect& rect); |
596 | 114 | void clearView(); | 114 | void clearView(); |
597 | 115 | TileRenderTask* createTask(const QRect& rect, int id) const; | 115 | TileRenderTask* createTask(const QRect& rect, int id) const; |
598 | 116 | void updateTileData(AbstractRenderTask* task, QImage img); | ||
599 | 117 | void updateThumbnailModel(AbstractRenderTask* task, QImage img); | ||
600 | 118 | 116 | ||
601 | 119 | void setError(const LibreOfficeError::Error &error); | 117 | void setError(const LibreOfficeError::Error &error); |
602 | 120 | }; | 118 | }; |
@Roman, we still have to discuss about the line 398 of the diff... :)