diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-05-03 01:13:38 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-05-03 01:13:38 +0200 |
commit | f36e33a6a568026f123808c7f5c87dace6703f94 (patch) | |
tree | 1c77067c320ead831bd7bba6c59d56a94fe8216f /src | |
parent | Clean up WebView (diff) | |
download | smolbote-f36e33a6a568026f123808c7f5c87dace6703f94.tar.xz |
QTBUG-65223 workaround
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/webengine/webview.cpp | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5757a6d..0f3d0d5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -59,4 +59,8 @@ target_link_libraries(poi configuration bookmarks downloads) +target_compile_definitions(poi + PRIVATE QTBUG_65223_WORKAROUND +) + install(TARGETS poi RUNTIME DESTINATION bin CONFIGURATIONS Release) diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index b9dfaa7..1dca046 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -33,6 +33,14 @@ WebView::WebView(WebProfile *profile, QWidget *parent) m_loaded = true; }); +#if defined(QTBUG_65223_WORKAROUND) + connect(this, &QWebEngineView::loadProgress, this, [this](int progress) { + if(progress == 100) { + emit loadFinished(true); + } + }); +#endif + m_pageMenu = new PageMenu(this); m_toolsMenu = new PageToolsMenu(this); } |