diff options
author | Andras Becsi <andras.becsi@theqtcompany.com> | 2015-02-02 16:41:04 +0100 |
---|---|---|
committer | Andras Becsi <andras.becsi@theqtcompany.com> | 2015-02-02 16:36:30 +0000 |
commit | 2ad0c1e8c134a8d4f60593b7747450bba8319bb0 (patch) | |
tree | 912b70daacf3ce32921b3eec7d7a540d8a6b5e51 /src/core | |
parent | 315f3ccf1e8ee697688d50012307a1cb6747a6b7 (diff) |
Fix widgets download state update
Since the DownloadState enum of core does not match the DownloadState
enum of QWebEngineDownloadItem we should never directly compare it,
instead we should convert with the toDownloadState() function,
to fix the missing emission of the finished() signal.
This patch also adds static asserts to verify the match of chromium's
DownloadItem::DownloadState and our core DownloadState.
Change-Id: I51110f55598230e380e15948f75219976d3a68a0
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/download_manager_delegate_qt.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp index c46bfb080..78d5f909a 100644 --- a/src/core/download_manager_delegate_qt.cpp +++ b/src/core/download_manager_delegate_qt.cpp @@ -53,6 +53,11 @@ #include "type_conversion.h" #include "qtwebenginecoreglobal.h" +ASSERT_ENUMS_MATCH(content::DownloadItem::IN_PROGRESS, BrowserContextAdapterClient::DownloadInProgress) +ASSERT_ENUMS_MATCH(content::DownloadItem::COMPLETE, BrowserContextAdapterClient::DownloadCompleted) +ASSERT_ENUMS_MATCH(content::DownloadItem::CANCELLED, BrowserContextAdapterClient::DownloadCancelled) +ASSERT_ENUMS_MATCH(content::DownloadItem::INTERRUPTED, BrowserContextAdapterClient::DownloadInterrupted) + DownloadManagerDelegateQt::DownloadManagerDelegateQt(BrowserContextAdapter *contextAdapter) : m_contextAdapter(contextAdapter) , m_currentId(0) |