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

diff --git a/HelpSource/Classes/HelpBrowser.schelp b/HelpSource/Classes/HelpBrowser.schelp
index c507afea0..20e94abbb 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 d22bafb04..74cf94344 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 398fad80a..e4ca98780 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 a5a667ac3..c3d04b6f3 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 cdc788649..09951ef27 100644
--- a/QtCollider/interface.cpp
+++ b/QtCollider/interface.cpp
@@ -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
diff --git a/QtCollider/style/ProxyStyle.cpp b/QtCollider/style/ProxyStyle.cpp
index a1d68830f..38a0b77a7 100644
--- a/QtCollider/style/ProxyStyle.cpp
+++ b/QtCollider/style/ProxyStyle.cpp
@@ -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);
diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt
index 313a74277..05cd992bc 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()
