optional-qtwebengine-06-fa2783c88d8dbbe124396d5e57523e5abcd689e2
authorDebian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Mon, 8 Jun 2020 07:17:12 +0000 (08:17 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Mon, 8 Jun 2020 07:17:12 +0000 (08:17 +0100)
commit fa2783c88d8dbbe124396d5e57523e5abcd689e2
Author: Nathan Ho <nathan@snappizz.com>
Date:   Sun Jun 2 01:43:39 2019 -0700

    sclang: Rename QT_WEBENGINE to SC_USE_WEBENGINE

Gbp-Pq: Name optional-qtwebengine-06-fa2783c88d8dbbe124396d5e57523e5abcd689e2

HelpSource/Classes/HelpBrowser.schelp
HelpSource/Classes/WebView.schelp
QtCollider/CMakeLists.txt
QtCollider/factories.cpp
QtCollider/interface.cpp
QtCollider/style/ProxyStyle.cpp
lang/CMakeLists.txt

index c507afea0bbbbae73a3ab36e6c09dd014dfca5b5..20e94abbbd1325284e644f819c515cca5e9009e7 100644 (file)
@@ -9,7 +9,7 @@ HelpBrowser is the GUI help browser that lets you browse the documentation of Su
 
 Note that this is not the same as the help browser built into the IDE.
 
-Since the Qt WebEngine dependency is hefty and difficult to install on some systems, it is possible for sclang to have been built without WebView support (using the CMake flag code:: -DQT_WEBENGINE=OFF :: at compile). If so, attempting to invoke this class will throw an error.
+Since the Qt WebEngine dependency is hefty and difficult to install on some systems, it is possible for sclang to have been built without WebView support (using the CMake flag code:: -DSC_USE_WEBENGINE=OFF :: at compile). If so, attempting to invoke this class will throw an error.
 
 classmethods::
 private:: getOldWrapUrl, initClass
index d22bafb046bc3fb8e37650dcec3c01acce620bc2..74cf94344f7157227b67f1dbd4c39b62f38f4f05 100644 (file)
@@ -6,7 +6,7 @@ DESCRIPTION::
 
 WebView displays web pages and provides all the standard browsing functionality.
 
-Since the Qt WebEngine dependency is hefty and difficult to install on some systems, it is possible for sclang to have been built without WebView support (using the CMake flag code:: -DQT_WEBENGINE=OFF :: at compile). If so, attempting to invoke this class will throw an error.
+Since the Qt WebEngine dependency is hefty and difficult to install on some systems, it is possible for sclang to have been built without WebView support (using the CMake flag code:: -DSC_USE_WEBENGINE=OFF :: at compile). If so, attempting to invoke this class will throw an error.
 
 CLASSMETHODS::
 
index 398fad80a21f40eeae2cb3546b0d1fd673340861..e4ca9878043be3fdcc73554591ce74240a9862ba 100644 (file)
@@ -1,5 +1,5 @@
 set(REQUIRED_QT_VERSION 5.7)
-option(QT_WEBENGINE "Build with Qt WebEngine." ON)
+option(SC_USE_WEBENGINE "Build with Qt WebEngine." ON)
 
 ###############################################################################
 # Components and libraries
@@ -22,7 +22,7 @@ set (QT_COLLIDER_LIBS
   Qt5::Quick Qt5::Qml Qt5::Sql Qt5::OpenGL Qt5::Svg
   ${MATH_LIBRARY})
 
-if(QT_WEBENGINE)
+if(SC_USE_WEBENGINE)
   list(APPEND QT_COMPONENTS WebEngine WebEngineCore WebEngineWidgets)
   list(APPEND QT_COLLIDER_LIBS Qt5::WebEngineCore Qt5::WebEngineWidgets)
 endif()
@@ -144,7 +144,7 @@ if(QT_COLLIDER_LANG_CLIENT)
     list(APPEND QT_COLLIDER_SRCS ${QT_COLLIDER_DIR}/LanguageClient.cpp)
 endif()
 
-if(QT_WEBENGINE)
+if(SC_USE_WEBENGINE)
   list(APPEND QT_COLLIDER_HDRS
     ${QT_COLLIDER_DIR}/widgets/QcWebView.h
     ${QT_COLLIDER_DIR}/widgets/web_page.hpp
index a5a667ac38888cc0250d09c0eb726098256fe8c0..c3d04b6f3865c3bf580f87d089c982ed174eda35 100644 (file)
@@ -66,7 +66,7 @@ static void doLoadFactories() {
     QC_ADD_FACTORY(QcGridLayout);
     QC_ADD_FACTORY(QcStackLayout);
     QC_ADD_FACTORY(QtDownload);
-#ifdef QT_WEBENGINE
+#ifdef SC_USE_WEBENGINE
     QC_ADD_FACTORY(WebView);
 #endif
 #ifdef __APPLE__
index 941d5132d1191f69ca97c3c62980beb2cb11e5f5..d3f5c2046216313f6d08ede68259cdc45cc819c9 100644 (file)
@@ -30,7 +30,7 @@
 #include <QEventLoop>
 #include <QDir>
 
-#ifdef QT_WEBENGINE
+#ifdef SC_USE_WEBENGINE
 #    include <QWebEngineSettings>
 #endif
 
@@ -82,7 +82,7 @@ void QtCollider::init() {
 
         gSystemPalette = qcApp->palette();
 
-#ifdef QT_WEBENGINE
+#ifdef SC_USE_WEBENGINE
         // Enable javascript localStorage for WebViews
         QWebEngineSettings::globalSettings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, true);
 #endif
index a1d68830f7d88ccd999b4de11a2a996d999a7cda..38a0b77a7e8da764b06d5962f969e16624e78add 100644 (file)
@@ -6,7 +6,7 @@
 #include <QStyleOptionSlider>
 #include <QPainter>
 
-#ifdef QT_WEBENGINE
+#ifdef SC_USE_WEBENGINE
 #    include <QWebEngineView>
 #endif
 
@@ -33,7 +33,7 @@ static bool AlwaysShowScrollbars() {
 
 void ProxyStyle::drawComplexControl(ComplexControl ctrl, const QStyleOptionComplex* opt, QPainter* p,
                                     const QWidget* w) const {
-#ifdef QT_WEBENGINE
+#ifdef SC_USE_WEBENGINE
     // FIXME: this is a workaround for the WebKit bug #104116 (or a variation on it).
     if (ctrl == QStyle::CC_ScrollBar && qobject_cast<const QWebEngineView*>(w) != 0
         && opt->type == QStyleOption::SO_Slider) {
@@ -45,7 +45,7 @@ void ProxyStyle::drawComplexControl(ComplexControl ctrl, const QStyleOptionCompl
         QProxyStyle::drawComplexControl(ctrl, &opt2, p, w);
         return;
     }
-#endif // QT_WEBENGINE
+#endif // SC_USE_WEBENGINE
 
     if (ctrl == QStyle::CC_ScrollBar && AlwaysShowScrollbars()) {
         const QStyleOptionSlider* optSlider = static_cast<const QStyleOptionSlider*>(opt);
index 313a742774a2b801fe8e2de4826fe13adb3a8813..05cd992bcee9335c33f23c6dc0975e40770c9edc 100644 (file)
@@ -182,9 +182,9 @@ if(SC_QT OR SC_IDE)
        message(STATUS "Found Qt: " ${QtCore_location} )
     get_filename_component(QT_BIN_PATH ${QtCore_location} DIRECTORY CACHE)
 
-  if(QT_WEBENGINE)
+  if(SC_USE_WEBENGINE)
     message(STATUS "Building with QtWebEngine")
-    target_compile_definitions(libsclang PUBLIC QT_WEBENGINE)
+    target_compile_definitions(libsclang PUBLIC SC_USE_WEBENGINE)
   endif()
        target_link_libraries(libsclang ${QT_COLLIDER_LIBS})
 endif()