Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 22, 2015
1 parent f2d4d30 commit 5910adf
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 57 deletions.
6 changes: 3 additions & 3 deletions src/core/qgswebframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{

}
Expand Down
93 changes: 48 additions & 45 deletions src/core/qgswebpage.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{

}
Expand All @@ -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() )
{
}

Expand All @@ -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 );
}
Expand Down
18 changes: 9 additions & 9 deletions src/core/qgswebview.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
{
}

Expand Down Expand Up @@ -77,7 +77,7 @@ class QgsWebView : public QWidget
Q_UNUSED( html );
}

virtual QgsWebView* createWindow(QWebPage::WebWindowType)
virtual QgsWebView* createWindow( QWebPage::WebWindowType )
{
return new QgsWebView();
}
Expand Down

0 comments on commit 5910adf

Please sign in to comment.