1
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:
David Rosca 2018-02-15 08:35:34 +01:00
parent 99eb9c8089
commit 9e3423ff9e
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);