From: Debian Multimedia Maintainers Date: Sat, 29 Jun 2019 01:02:25 +0000 (+0100) Subject: optional-qtwebengine-09-a34b19c2ca1fa5641a25b5b962a19e0fa5223452 X-Git-Tag: archive/raspbian/1%3.10.4+repack-1+rpi1~1^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=13209e9300979719b6483deaac09022e9457476b;p=supercollider.git optional-qtwebengine-09-a34b19c2ca1fa5641a25b5b962a19e0fa5223452 commit a34b19c2ca1fa5641a25b5b962a19e0fa5223452 Author: Nathan Ho Date: Sun Jun 2 01:43:43 2019 -0700 scide: Don't compile help browser code if SC_USE_WEBENGINE is off Gbp-Pq: Name optional-qtwebengine-09-a34b19c2ca1fa5641a25b5b962a19e0fa5223452 --- diff --git a/editors/sc-ide/CMakeLists.txt b/editors/sc-ide/CMakeLists.txt index 25c39a9..77d84e7 100644 --- a/editors/sc-ide/CMakeLists.txt +++ b/editors/sc-ide/CMakeLists.txt @@ -66,8 +66,6 @@ if(APPLE) set(AdditionalBundleSources ${ClassLibrary} ${HelpSource} ${BundleResources} ${Examples} ${Sounds} ${Icons}) endif() - - set ( ide_moc_hdr core/main.hpp core/sig_mux.hpp @@ -115,8 +113,6 @@ set ( ide_moc_hdr widgets/util/WebSocketTransport.hpp widgets/util/WebSocketClientWrapper.hpp widgets/util/IDEWebChannelWrapper.hpp - - ${CMAKE_SOURCE_DIR}/QtCollider/widgets/web_page.hpp ) file (GLOB_RECURSE all_hdr *hpp) @@ -148,7 +144,6 @@ set ( ide_src widgets/multi_editor.cpp widgets/post_window.cpp widgets/session_switch_dialog.cpp - widgets/help_browser.cpp widgets/audio_status_box.cpp widgets/lang_status_box.cpp widgets/code_editor/editor.cpp @@ -172,8 +167,6 @@ set ( ide_src widgets/util/WebSocketTransport.cpp widgets/style/style.cpp - ${CMAKE_SOURCE_DIR}/QtCollider/widgets/web_page.cpp - ${CMAKE_SOURCE_DIR}/common/SC_TextUtils.cpp ${CMAKE_SOURCE_DIR}/common/SC_Filesystem_macos.cpp ${CMAKE_SOURCE_DIR}/common/SC_Filesystem_win.cpp @@ -188,6 +181,20 @@ set ( ide_src ${CMAKE_SOURCE_DIR}/SCDoc/lex.scdoc.cpp ) +set(ide_webengine_moc_hdrs + widgets/help_browser.hpp + ${CMAKE_SOURCE_DIR}/QtCollider/widgets/web_page.hpp +) +set(ide_webengine_src + widgets/help_browser.cpp + ${CMAKE_SOURCE_DIR}/QtCollider/widgets/web_page.cpp +) + +if(SC_USE_WEBENGINE) + list(APPEND ide_moc_hdr ${ide_webengine_moc_hdrs}) + list(APPEND ide_src ${ide_webengine_src}) +endif() + set( ide_forms forms/settings_dialog.ui forms/settings_general.ui diff --git a/editors/sc-ide/widgets/help_browser.cpp b/editors/sc-ide/widgets/help_browser.cpp index 87e9283..05afce6 100644 --- a/editors/sc-ide/widgets/help_browser.cpp +++ b/editors/sc-ide/widgets/help_browser.cpp @@ -18,32 +18,34 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define QT_NO_DEBUG_OUTPUT - -#include "help_browser.hpp" -#include "main_window.hpp" -#include "../core/sc_process.hpp" -#include "../core/main.hpp" -#include "../core/util/overriding_action.hpp" -#include "QtCollider/widgets/web_page.hpp" -#include "QtCollider/hacks/hacks_qt.hpp" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef Q_OS_MAC -# include // QStyleFactory::create, see below -#endif +#ifdef SC_USE_WEBENGINE + +# define QT_NO_DEBUG_OUTPUT + +# include "help_browser.hpp" +# include "main_window.hpp" +# include "../core/sc_process.hpp" +# include "../core/main.hpp" +# include "../core/util/overriding_action.hpp" +# include "QtCollider/widgets/web_page.hpp" +# include "QtCollider/hacks/hacks_qt.hpp" + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# ifdef Q_OS_MAC +# include // QStyleFactory::create, see below +# endif namespace ScIDE { @@ -70,11 +72,11 @@ HelpBrowser::HelpBrowser(QWidget* parent): QWidget(parent) { // get in the way of rendering web pages mWebView->setPalette(style()->standardPalette()); -#ifdef Q_OS_MAC +# ifdef Q_OS_MAC // On macOS, checkboxes unwantedly appear in the top left-hand corner. // See QTBUG-43366, 43070, and 42948. The workaround is to set style to fusion. mWebView->setStyle(QStyleFactory::create("Fusion")); -#endif +# endif mWebView->installEventFilter(this); @@ -524,3 +526,5 @@ HelpBrowserDocklet::HelpBrowserDocklet( QWidget *parent ): } } // namespace ScIDE + +#endif // SC_USE_WEBENGINE