~aacid/unity8/fix_testDash

« back to all changes in this revision

Viewing changes to plugins/Dash/CMakeLists.txt

  • Committer: CI bot
  • Author(s): Albert Astals
  • Date: 2014-12-02 09:24:51 UTC
  • mfrom: (1368.17.17 asyncCroppedImageSizer)
  • Revision ID: ps-jenkins@lists.canonical.com-20141202092451-jr8woeiy90bfucxj
Make CroppedImageSizer async

QImageReader can block waiting on disk I/O so let's not have it on the main thread. 

CroppedImageSizerAsyncWorker is using a QFuture via QtConcurrent::run to get a thread and do the work. CroppedImageSizerAsyncWorker is created by CroppedImageSizer but deletes itself, either when the work has been finished or when it's aborted by CroppedImageSizer. This is why it's held with a QPointer in CroppedImageSizer. Fixes: #1384374
Approved by: Michał Sawicz, Michael Zanetti

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    ${CMAKE_CURRENT_SOURCE_DIR}
12
12
    ${CMAKE_CURRENT_BINARY_DIR}
13
13
    ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
14
 
    ${Qt5Quick_INCLUDE_DIRS}
15
14
    ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
16
15
    ${Qt5V8_PRIVATE_INCLUDE_DIR}
17
16
)
26
25
    horizontaljournal.cpp
27
26
    organicgrid.cpp
28
27
    croppedimagesizer.cpp
 
28
    croppedimagesizerasyncworker.cpp
29
29
    )
30
30
 
31
31
add_library(Dash-qml MODULE
37
37
    ${Qt5Quick_LIBRARIES}
38
38
    )
39
39
 
40
 
qt5_use_modules(Dash-qml Qml Quick)
 
40
qt5_use_modules(Dash-qml Qml Quick Concurrent)
41
41
 
42
42
add_unity8_plugin(Dash 0.1 Dash TARGETS Dash-qml)