From fc24a734d045c1c5cfafa5e079810b1475b6f4f5 Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Sat, 29 Jun 2019 02:02:25 +0100 Subject: [PATCH] optional-qtwebengine-06-fa2783c88d8dbbe124396d5e57523e5abcd689e2 commit fa2783c88d8dbbe124396d5e57523e5abcd689e2 Author: Nathan Ho 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 | 2 +- HelpSource/Classes/WebView.schelp | 2 +- QtCollider/CMakeLists.txt | 6 +++--- QtCollider/factories.cpp | 2 +- QtCollider/interface.cpp | 4 ++-- QtCollider/style/ProxyStyle.cpp | 6 +++--- lang/CMakeLists.txt | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/HelpSource/Classes/HelpBrowser.schelp b/HelpSource/Classes/HelpBrowser.schelp index c507afe..20e94ab 100644 --- a/HelpSource/Classes/HelpBrowser.schelp +++ b/HelpSource/Classes/HelpBrowser.schelp @@ -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 diff --git a/HelpSource/Classes/WebView.schelp b/HelpSource/Classes/WebView.schelp index d22bafb..74cf943 100644 --- a/HelpSource/Classes/WebView.schelp +++ b/HelpSource/Classes/WebView.schelp @@ -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:: diff --git a/QtCollider/CMakeLists.txt b/QtCollider/CMakeLists.txt index 398fad8..e4ca987 100644 --- a/QtCollider/CMakeLists.txt +++ b/QtCollider/CMakeLists.txt @@ -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 diff --git a/QtCollider/factories.cpp b/QtCollider/factories.cpp index a5a667a..c3d04b6 100644 --- a/QtCollider/factories.cpp +++ b/QtCollider/factories.cpp @@ -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__ diff --git a/QtCollider/interface.cpp b/QtCollider/interface.cpp index 941d513..d3f5c20 100644 --- a/QtCollider/interface.cpp +++ b/QtCollider/interface.cpp @@ -30,7 +30,7 @@ #include #include -#ifdef QT_WEBENGINE +#ifdef SC_USE_WEBENGINE # include #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 diff --git a/QtCollider/style/ProxyStyle.cpp b/QtCollider/style/ProxyStyle.cpp index a1d6883..38a0b77 100644 --- a/QtCollider/style/ProxyStyle.cpp +++ b/QtCollider/style/ProxyStyle.cpp @@ -6,7 +6,7 @@ #include #include -#ifdef QT_WEBENGINE +#ifdef SC_USE_WEBENGINE # include #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(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(opt); diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt index 313a742..05cd992 100644 --- a/lang/CMakeLists.txt +++ b/lang/CMakeLists.txt @@ -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() -- 2.30.2