mirror of
https://invent.kde.org/network/falkon.git
synced 2024-09-21 09:42:10 +02:00
WebPage: Make the loadFinished workaround for all Qt 5.10 versions
See #2479
This commit is contained in:
parent
99eb9c8089
commit
9e3423ff9e
|
@ -82,7 +82,7 @@ void WebViewTest::loadSignalsChangePageTest()
|
|||
view.setPage(page2);
|
||||
|
||||
// WebPage: Workaround for broken load started/finished signals in QtWebEngine 5.10
|
||||
const int loadFinishedEmitCount = qstrcmp(qVersion(), "5.10.0") == 0 ? 2 : 1;
|
||||
const int loadFinishedEmitCount = qstrncmp(qVersion(), "5.10.", 5) == 0 ? 2 : 1;
|
||||
|
||||
QTRY_COMPARE(loadFinishedSpy.count(), loadFinishedEmitCount);
|
||||
QCOMPARE(loadStartedSpy.count(), 0);
|
||||
|
|
|
@ -100,7 +100,7 @@ WebPage::WebPage(QObject* parent)
|
|||
});
|
||||
|
||||
// Workaround for broken load started/finished signals in QtWebEngine 5.10
|
||||
if (qstrcmp(qVersion(), "5.10.0") == 0) {
|
||||
if (qstrncmp(qVersion(), "5.10.", 5) == 0) {
|
||||
connect(this, &QWebEnginePage::loadProgress, this, [this](int progress) {
|
||||
if (progress == 100) {
|
||||
emit loadFinished(true);
|
||||
|
|
Loading…
Reference in New Issue
Block a user