From 6952a389ea3159eda0bb78cc31c0b2d9999e8d79 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Fri, 22 May 2015 11:48:02 +0200 Subject: [PATCH] Fix compiling without QtWebKit This makes it possible to compile QGIS master for Android. Hooray! --- src/app/composer/qgscomposer.cpp | 1 + src/app/composer/qgscomposer.h | 1 + src/core/CMakeLists.txt | 7 --- src/core/qgswebframe.cpp | 52 -------------------- src/core/qgswebpage.cpp | 83 -------------------------------- src/core/qgswebpage.h | 5 +- 6 files changed, 6 insertions(+), 143 deletions(-) delete mode 100644 src/core/qgswebframe.cpp delete mode 100644 src/core/qgswebpage.cpp diff --git a/src/app/composer/qgscomposer.cpp b/src/app/composer/qgscomposer.cpp index 2252ac9b882..e8661ac7f32 100644 --- a/src/app/composer/qgscomposer.cpp +++ b/src/app/composer/qgscomposer.cpp @@ -79,6 +79,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/composer/qgscomposer.h b/src/app/composer/qgscomposer.h index a199b5682cb..ebc5d740f03 100644 --- a/src/app/composer/qgscomposer.h +++ b/src/app/composer/qgscomposer.h @@ -51,6 +51,7 @@ class QUndoView; class QComboBox; class QLabel; class QTreeView; +class QPrinter; /** \ingroup MapComposer * \brief A gui for composing a printable map. diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index a9385e24ff0..4abe5564b9c 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -291,13 +291,6 @@ SET(QGIS_CORE_SRCS raster/qgshuesaturationfilter.cpp ) -IF (NOT WITH_QTWEBKIT) - SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS} - qgswebpage.cpp - qgswebframe.cpp - ) -ENDIF(NOT WITH_QTWEBKIT) - IF(ENABLE_MODELTEST) SET(MODELTEST_SRCS ../../tests/qt_modeltest/modeltest.cpp diff --git a/src/core/qgswebframe.cpp b/src/core/qgswebframe.cpp deleted file mode 100644 index 36106ff31d4..00000000000 --- a/src/core/qgswebframe.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/*************************************************************************** - - ---------------------------------------------------- - date : 19.5.2015 - copyright : (C) 2015 by Matthias Kuhn - email : matthias (at) opengis.ch - *************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include "qgswebframe.h" - -QWebFrame::QWebFrame() -{ - -} - -void QWebFrame::setZoomFactor(qreal factor) -{ - -} - -void QWebFrame::setScrollBarPolicy(Qt::Orientation, Qt::ScrollBarPolicy) -{ - -} - -void QWebFrame::setHtml(const QString&, const QUrl) -{ - -} - -QSize QWebFrame::contentsSize() const -{ - -} - -void QWebFrame::render( QPainter*, const QRegion ) -{ - -} - -void QWebFrame::addToJavaScriptWindowObject(const QString&, QObject*) -{ - -} - diff --git a/src/core/qgswebpage.cpp b/src/core/qgswebpage.cpp deleted file mode 100644 index e033c31d583..00000000000 --- a/src/core/qgswebpage.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*************************************************************************** - - ---------------------------------------------------- - date : 19.5.2015 - copyright : (C) 2015 by Matthias Kuhn - email : matthias (at) opengis.ch - *************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include "qgswebpage.h" - -QWebSettings::QWebSettings(QObject* parent) -{ - -} - -void QWebSettings::setUserStyleSheetUrl(const QUrl&) -{ - -} - -void QWebSettings::setAttribute(QWebSettings::WebAttribute, bool on) -{ - -} - - -QWebPage::QWebPage(QObject* parent) -{ - -} - -QPalette QWebPage::palette() const -{ - -} - -void QWebPage::setPalette(const QPalette& palette) -{ - -} - -void QWebPage::setViewportSize(const QSize& size) const -{ - -} - -void QWebPage::setLinkDelegationPolicy(QWebPage::LinkDelegationPolicy) -{ - -} - -void QWebPage::setNetworkAccessManager(QNetworkAccessManager* networkAccessManager) -{ - -} - -QWebFrame*QWebPage::mainFrame() const -{ - -} - -QWebSettings*QWebPage::settings() const -{ - -} - -QSize QWebPage::viewportSize() const -{ - -} - - -QMenu*QWebPage::createStandardContextMenu() -{ - -} diff --git a/src/core/qgswebpage.h b/src/core/qgswebpage.h index 7feb5b98953..a72ff0d5cfa 100644 --- a/src/core/qgswebpage.h +++ b/src/core/qgswebpage.h @@ -144,7 +144,10 @@ class QWebPage : public QObject Q_UNUSED( size ); } - void setLinkDelegationPolicy( LinkDelegationPolicy ); + void setLinkDelegationPolicy( LinkDelegationPolicy linkDelegationPolicy ) + { + Q_UNUSED( linkDelegationPolicy ); + } void setNetworkAccessManager( QNetworkAccessManager* networkAccessManager ) {