fix windows build

This commit is contained in:
Juergen E. Fischer 2015-05-22 08:38:56 +02:00
parent f2d4d3083b
commit 5910adf55e
3 changed files with 60 additions and 57 deletions

View File

@ -24,13 +24,13 @@
#include <QPainter>
#include <QUrl>
class QWebFrame : public QObject
class CORE_EXPORT QWebFrame : public QObject
{
Q_OBJECT
Q_OBJECT
public:
QWebFrame( QObject* parent = 0 )
:QObject( parent )
: QObject( parent )
{
}

View File

@ -28,47 +28,48 @@
#include <QNetworkAccessManager>
#include <QPalette>
class QWebSettings : public QObject
class CORE_EXPORT QWebSettings : public QObject
{
Q_OBJECT
public:
enum WebAttribute {
AutoLoadImages,
JavascriptEnabled,
JavaEnabled,
PluginsEnabled,
PrivateBrowsingEnabled,
JavascriptCanOpenWindows,
JavascriptCanAccessClipboard,
DeveloperExtrasEnabled,
LinksIncludedInFocusChain,
ZoomTextOnly,
PrintElementBackgrounds,
OfflineStorageDatabaseEnabled,
OfflineWebApplicationCacheEnabled,
LocalStorageEnabled,
LocalContentCanAccessRemoteUrls,
DnsPrefetchEnabled,
XSSAuditingEnabled,
AcceleratedCompositingEnabled,
SpatialNavigationEnabled,
LocalContentCanAccessFileUrls,
TiledBackingStoreEnabled,
FrameFlatteningEnabled,
SiteSpecificQuirksEnabled,
JavascriptCanCloseWindows,
WebGLEnabled,
CSSRegionsEnabled,
HyperlinkAuditingEnabled,
CSSGridLayoutEnabled,
ScrollAnimatorEnabled,
CaretBrowsingEnabled,
NotificationsEnabled
enum WebAttribute
{
AutoLoadImages,
JavascriptEnabled,
JavaEnabled,
PluginsEnabled,
PrivateBrowsingEnabled,
JavascriptCanOpenWindows,
JavascriptCanAccessClipboard,
DeveloperExtrasEnabled,
LinksIncludedInFocusChain,
ZoomTextOnly,
PrintElementBackgrounds,
OfflineStorageDatabaseEnabled,
OfflineWebApplicationCacheEnabled,
LocalStorageEnabled,
LocalContentCanAccessRemoteUrls,
DnsPrefetchEnabled,
XSSAuditingEnabled,
AcceleratedCompositingEnabled,
SpatialNavigationEnabled,
LocalContentCanAccessFileUrls,
TiledBackingStoreEnabled,
FrameFlatteningEnabled,
SiteSpecificQuirksEnabled,
JavascriptCanCloseWindows,
WebGLEnabled,
CSSRegionsEnabled,
HyperlinkAuditingEnabled,
CSSGridLayoutEnabled,
ScrollAnimatorEnabled,
CaretBrowsingEnabled,
NotificationsEnabled
};
explicit QWebSettings( QObject* parent = 0 )
:QObject( parent )
: QObject( parent )
{
}
@ -90,21 +91,23 @@ class QWebPage : public QObject
public:
enum LinkDelegationPolicy {
DontDelegateLinks,
DelegateExternalLinks,
DelegateAllLinks
enum LinkDelegationPolicy
{
DontDelegateLinks,
DelegateExternalLinks,
DelegateAllLinks
};
enum WebWindowType {
WebBrowserWindow,
WebModalDialog
enum WebWindowType
{
WebBrowserWindow,
WebModalDialog
};
explicit QWebPage( QObject* parent = 0 )
: QObject( parent )
, mSettings( new QWebSettings() )
, mFrame( new QWebFrame() )
: QObject( parent )
, mSettings( new QWebSettings() )
, mFrame( new QWebFrame() )
{
}
@ -124,7 +127,7 @@ class QWebPage : public QObject
Q_UNUSED( palette );
}
void setViewportSize(const QSize & size) const
void setViewportSize( const QSize & size ) const
{
Q_UNUSED( size );
}

View File

@ -22,26 +22,26 @@
#ifdef WITH_QTWEBKIT
#include <QtWebKit/QWebView>
class QgsWebView : public QWebView
class CORE_EXPORT QgsWebView : public QWebView
{
Q_OBJECT
public:
explicit QgsWebView(QWidget* parent = 0)
: QWebView( parent )
explicit QgsWebView( QWidget* parent = 0 )
: QWebView( parent )
{}
};
#else
#include "qgswebpage.h"
class QgsWebView : public QWidget
class CORE_EXPORT QgsWebView : public QWidget
{
Q_OBJECT
public:
explicit QgsWebView(QWidget *parent = 0)
: QWidget(parent )
, mSettings( new QWebSettings() )
, mPage( new QWebPage() )
explicit QgsWebView( QWidget *parent = 0 )
: QWidget( parent )
, mSettings( new QWebSettings() )
, mPage( new QWebPage() )
{
}
@ -77,7 +77,7 @@ class QgsWebView : public QWidget
Q_UNUSED( html );
}
virtual QgsWebView* createWindow(QWebPage::WebWindowType)
virtual QgsWebView* createWindow( QWebPage::WebWindowType )
{
return new QgsWebView();
}