set(REQUIRED_QT_VERSION 5.7)
-set(QT_WEBENGINE TRUE)
+set(QT_WEBENGINE FALSE)
set( QT_USE_QTWEBENGINE TRUE ) # TODO: figure out what to do with this
QC_ADD_FACTORY(QcAction);
QC_ADD_FACTORY(QcWidgetAction);
QC_ADD_FACTORY(QcCallback);
- QC_ADD_FACTORY(WebView);
QC_ADD_FACTORY(QcWindow);
QC_ADD_FACTORY(QcScrollWindow);
QC_ADD_FACTORY(QcHBoxLayout);
QC_ADD_FACTORY(QcGridLayout);
QC_ADD_FACTORY(QcStackLayout);
QC_ADD_FACTORY(QtDownload);
+#ifdef QT_WEBENGINE
+ QC_ADD_FACTORY(WebView);
+#endif
#ifdef __APPLE__
QC_ADD_FACTORY(QcQuartzComposerView);
#endif
#include <QTimer>
#include <QEventLoop>
#include <QDir>
-#include <QWebEngineSettings>
+
+#ifdef QT_WEBENGINE
+# include <QWebEngineSettings>
+#endif
#ifdef Q_WS_X11
# include <X11/Xlib.h>
gSystemPalette = qcApp->palette();
+#ifdef QT_WEBENGINE
// Enable javascript localStorage for WebViews
QWebEngineSettings::globalSettings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, true);
+#endif
// NOTE: Qt may tamper with the C language locale, affecting POSIX number-string conversions.
// Revert the locale to default:
#include "../type_codec.hpp"
#include "../QcApplication.h"
#include "../QObjectProxy.h"
-#include "../widgets/QcWebView.h"
#include "../style/style.hpp"
+#include "../QcCallback.hpp"
#include "QtCollider.h"
#ifdef Q_OS_MAC
#include <QFontMetrics>
#include <QDesktopWidget>
#include <QStyleFactory>
-#include <QWebEngineSettings>
#include <QCursor>
namespace QtCollider {
#include "../QcApplication.h"
#include <QtGlobal>
-#include <QWebEngineView>
#include <QStyleOptionSlider>
#include <QPainter>
+#ifdef QT_WEBENGINE
+# include <QWebEngineView>
+#endif
+
#ifdef Q_OS_MAC
# include "../hacks/hacks_mac.hpp"
#endif
void ProxyStyle::drawComplexControl(ComplexControl ctrl, const QStyleOptionComplex* opt, QPainter* p,
const QWidget* w) const {
+#ifdef QT_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) {
QProxyStyle::drawComplexControl(ctrl, &opt2, p, w);
return;
}
+#endif // QT_WEBENGINE
if (ctrl == QStyle::CC_ScrollBar && AlwaysShowScrollbars()) {
const QStyleOptionSlider* optSlider = static_cast<const QStyleOptionSlider*>(opt);