Fix the fix for #391300 to require only QtWebEngine 5.10, not Qt 5.10
ClosedPublic

Authored by kkofler on May 12 2018, 1:33 AM.

Details

Summary

QtWebEngine can be newer than the rest of Qt (e.g., on Fedora 27).

This fixes the version check in WebView::savePageAs to use a macro
defined in config.h.cmake based on the version of QtWebEngineWidgets
rather than relying on QT_VERSION, which is the version of QtCore.

CCBUG: 391300

Test Plan

Fedora 27 build (of the original revision): https://koji.fedoraproject.org/koji/buildinfo?buildID=1081337

Diff Detail

Repository
R875 Falkon
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kkofler created this revision.May 12 2018, 1:33 AM
Restricted Application added a subscriber: falkon. · View Herald TranscriptMay 12 2018, 1:33 AM
kkofler requested review of this revision.May 12 2018, 1:33 AM
drosca requested changes to this revision.May 12 2018, 7:09 AM

This should be done for all QtWebEngine checks (5.10, 5.11) and should be in config.h with #cmakedefine01 so it can be used as #if HAVE_QTWEBENGINE_5_10

This revision now requires changes to proceed.May 12 2018, 7:09 AM

I don't see a 5.11 check anywhere, at least in Falkon/3.0.

Also, all the existing macros in config.h.cmake are #cmakedefine, not #cmakedefine01, so are you sure you want the latter even though it would be inconsistent?

Also, all the existing macros in config.h.cmake are #cmakedefine, not #cmakedefine01, so are you sure you want the latter even though it would be inconsistent?

Yes, the other ones were ported from qmake, but new defines should use cmakedefine01 as that will also produce warning when forgetting including config.h header, instead of just silently ignoring it.

Wouldn't it make sense to port the existing PORTABLE_BUILD and DISABLE_DBUS defines too, then? But that's material for a separate commit in any case.

kkofler updated this revision to Diff 34013.May 12 2018, 11:14 AM
kkofler edited the summary of this revision. (Show Details)
kkofler edited the test plan for this revision. (Show Details)

This version now uses #cmakedefine01 as requested.

I can easily add a macro for 5.11 if you want, but would not be used anywhere on the Falkon/3.0 branch against which I did the change.

drosca accepted this revision.May 12 2018, 11:16 AM
This revision is now accepted and ready to land.May 12 2018, 11:16 AM
This revision was automatically updated to reflect the committed changes.