[webview] reduce #defines
This commit is contained in:
parent
f26ff07046
commit
a7cf1b18ce
@ -28,7 +28,7 @@ WebViewStep::WebViewStep( QObject* parent )
|
|||||||
#ifdef WEBVIEW_WITH_WEBENGINE
|
#ifdef WEBVIEW_WITH_WEBENGINE
|
||||||
QtWebEngine::initialize();
|
QtWebEngine::initialize();
|
||||||
#endif
|
#endif
|
||||||
m_view = new C_QWEBVIEW();
|
m_view = new WebViewWidget();
|
||||||
#ifdef WEBVIEW_WITH_WEBKIT
|
#ifdef WEBVIEW_WITH_WEBKIT
|
||||||
m_view->settings()->setFontFamily( QWebSettings::StandardFont,
|
m_view->settings()->setFontFamily( QWebSettings::StandardFont,
|
||||||
m_view->settings()->fontFamily( QWebSettings::SansSerifFont ) );
|
m_view->settings()->fontFamily( QWebSettings::SansSerifFont ) );
|
||||||
|
@ -20,20 +20,21 @@
|
|||||||
|
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
#ifdef WEBVIEW_WITH_WEBKIT
|
#if defined( WEBVIEW_WITH_WEBKIT ) && defined( WEBVIEW_WITH_WEBENGINE )
|
||||||
#define C_QWEBVIEW QWebView
|
|
||||||
#endif
|
|
||||||
#ifdef WEBVIEW_WITH_WEBENGINE
|
|
||||||
#ifdef C_QWEBVIEW
|
|
||||||
#error Both WEBENGINE and WEBKIT enabled
|
#error Both WEBENGINE and WEBKIT enabled
|
||||||
#endif
|
#endif
|
||||||
#define C_QWEBVIEW QWebEngineView
|
#if !defined( WEBVIEW_WITH_WEBKIT ) && !defined( WEBVIEW_WITH_WEBENGINE )
|
||||||
#endif
|
|
||||||
#ifndef C_QWEBVIEW
|
|
||||||
#error Neither WEBENGINE nor WEBKIT enabled
|
#error Neither WEBENGINE nor WEBKIT enabled
|
||||||
#endif
|
#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
|
class PLUGINDLLEXPORT WebViewStep : public Calamares::ViewStep
|
||||||
{
|
{
|
||||||
@ -60,7 +61,7 @@ public:
|
|||||||
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
C_QWEBVIEW* m_view;
|
WebViewWidget* m_view;
|
||||||
QString m_url;
|
QString m_url;
|
||||||
QString m_prettyName;
|
QString m_prettyName;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user