diff --git a/src/modules/webview/WebViewStep.cpp b/src/modules/webview/WebViewStep.cpp index d66c87f36..d787b8ec6 100644 --- a/src/modules/webview/WebViewStep.cpp +++ b/src/modules/webview/WebViewStep.cpp @@ -28,7 +28,7 @@ WebViewStep::WebViewStep( QObject* parent ) #ifdef WEBVIEW_WITH_WEBENGINE QtWebEngine::initialize(); #endif - m_view = new C_QWEBVIEW(); + m_view = new WebViewWidget(); #ifdef WEBVIEW_WITH_WEBKIT m_view->settings()->setFontFamily( QWebSettings::StandardFont, m_view->settings()->fontFamily( QWebSettings::SansSerifFont ) ); diff --git a/src/modules/webview/WebViewStep.h b/src/modules/webview/WebViewStep.h index 6fd71222e..700da2856 100644 --- a/src/modules/webview/WebViewStep.h +++ b/src/modules/webview/WebViewStep.h @@ -20,20 +20,21 @@ #include -#ifdef WEBVIEW_WITH_WEBKIT -#define C_QWEBVIEW QWebView -#endif -#ifdef WEBVIEW_WITH_WEBENGINE -#ifdef C_QWEBVIEW +#if defined( WEBVIEW_WITH_WEBKIT ) && defined( WEBVIEW_WITH_WEBENGINE ) #error Both WEBENGINE and WEBKIT enabled #endif -#define C_QWEBVIEW QWebEngineView -#endif -#ifndef C_QWEBVIEW +#if !defined( WEBVIEW_WITH_WEBKIT ) && !defined( WEBVIEW_WITH_WEBENGINE ) #error Neither WEBENGINE nor WEBKIT enabled #endif -class C_QWEBVIEW; +#ifdef WEBVIEW_WITH_WEBKIT +class QWebView; +using WebViewWidget = QWebView; +#endif +#ifdef WEBVIEW_WITH_WEBENGINE +class QWebEngineView; +using WebViewWidget = QWebEngineView; +#endif class PLUGINDLLEXPORT WebViewStep : public Calamares::ViewStep { @@ -60,7 +61,7 @@ public: void setConfigurationMap( const QVariantMap& configurationMap ) override; private: - C_QWEBVIEW* m_view; + WebViewWidget* m_view; QString m_url; QString m_prettyName; };