forked from pool/marble
Accepting request 658492 from KDE:Applications
KDE Applications 18.12 OBS-URL: https://build.opensuse.org/request/show/658492 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/marble?expand=0&rev=110
This commit is contained in:
commit
29ecd16b7a
@ -1,34 +0,0 @@
|
||||
From b8db30a58396060034ac76aa5f7d408b6c467d5f Mon Sep 17 00:00:00 2001
|
||||
From: "Friedrich W. H. Kossebau" <kossebau@kde.org>
|
||||
Date: Fri, 19 Oct 2018 17:40:43 +0200
|
||||
Subject: Fix MarbleConfig.cmake file to update to port to QtWebEngine
|
||||
|
||||
---
|
||||
src/lib/marble/MarbleConfig.cmake.in | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lib/marble/MarbleConfig.cmake.in b/src/lib/marble/MarbleConfig.cmake.in
|
||||
index 4f6fc17..ec39b79 100644
|
||||
--- a/src/lib/marble/MarbleConfig.cmake.in
|
||||
+++ b/src/lib/marble/MarbleConfig.cmake.in
|
||||
@@ -8,13 +8,15 @@ if (_CMakeFindDependencyMacro_FOUND)
|
||||
find_dependency(Qt5Xml @REQUIRED_QT_VERSION@)
|
||||
find_dependency(Qt5Widgets @REQUIRED_QT_VERSION@)
|
||||
if (NOT MARBLE_NO_WEBKITWIDGETS)
|
||||
- find_dependency(Qt5WebKitWidgets @REQUIRED_QT_VERSION@)
|
||||
+ find_dependency(Qt5WebEngine @REQUIRED_QT_VERSION@)
|
||||
+ find_dependency(Qt5WebEngineWidgets @REQUIRED_QT_VERSION@)
|
||||
endif()
|
||||
else()
|
||||
find_package(Qt5Xml REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
if (NOT MARBLE_NO_WEBKITWIDGETS)
|
||||
- find_package(Qt5WebKitWidgets REQUIRED)
|
||||
+ find_package(Qt5WebEngine REQUIRED)
|
||||
+ find_package(Qt5WebEngineWidgets REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
@ -1,799 +0,0 @@
|
||||
From b42ee5c83d77761ef7d8bf8635662159bc2884bb Mon Sep 17 00:00:00 2001
|
||||
From: Torsten Rahn <rahn@kde.org>
|
||||
Date: Wed, 17 Oct 2018 15:21:28 +0200
|
||||
Subject: Differential Revision: https://phabricator.kde.org/D698
|
||||
|
||||
Port to QtWebEngine (finally!)
|
||||
---
|
||||
CMakeLists.txt | 6 +-
|
||||
src/apps/behaim/CMakeLists.txt | 2 +
|
||||
src/apps/marble-maps/CMakeLists.txt | 2 +
|
||||
src/lib/marble/CMakeLists.txt | 3 +-
|
||||
src/lib/marble/LegendWidget.cpp | 2 -
|
||||
src/lib/marble/LegendWidget.ui | 2 +-
|
||||
src/lib/marble/MarbleLegendBrowser.cpp | 108 ++++++++++-----------
|
||||
src/lib/marble/MarbleLegendBrowser.h | 31 ++++--
|
||||
src/lib/marble/MarbleWebView.cpp | 4 +-
|
||||
src/lib/marble/MarbleWebView.h | 25 ++++-
|
||||
src/lib/marble/PopupItem.cpp | 47 ++++-----
|
||||
src/lib/marble/PopupItem.h | 6 +-
|
||||
src/lib/marble/TinyWebBrowser.cpp | 23 +++--
|
||||
src/lib/marble/TinyWebBrowser.h | 10 +-
|
||||
src/lib/marble/WebPopupWidget.ui | 14 ++-
|
||||
src/lib/marble/cloudsync/RouteItemDelegate.cpp | 2 +-
|
||||
.../geodata/handlers/dgml/DgmlIconTagHandler.cpp | 4 +-
|
||||
17 files changed, 165 insertions(+), 126 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2ea05eb..dd13e4c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -130,11 +130,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL Android)
|
||||
else()
|
||||
find_package(Qt5 ${REQUIRED_QT_VERSION}
|
||||
COMPONENTS
|
||||
- WebKit
|
||||
- WebKitWidgets
|
||||
+ WebEngine
|
||||
+ WebEngineWidgets
|
||||
)
|
||||
|
||||
- if ( NOT Qt5WebKitWidgets_FOUND )
|
||||
+ if ( NOT Qt5WebEngineWidgets_FOUND )
|
||||
set ( MARBLE_NO_WEBKITWIDGETS TRUE )
|
||||
endif()
|
||||
endif()
|
||||
diff --git a/src/apps/behaim/CMakeLists.txt b/src/apps/behaim/CMakeLists.txt
|
||||
index b8ad26c..bbed8a9 100644
|
||||
--- a/src/apps/behaim/CMakeLists.txt
|
||||
+++ b/src/apps/behaim/CMakeLists.txt
|
||||
@@ -25,6 +25,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL Android)
|
||||
Qt5::Positioning
|
||||
Qt5::AndroidExtras
|
||||
Qt5::Multimedia
|
||||
+ Qt5::WebEngineWidgets
|
||||
+ Qt5::WebEngine
|
||||
)
|
||||
else()
|
||||
set(TARGET marble-behaim)
|
||||
diff --git a/src/apps/marble-maps/CMakeLists.txt b/src/apps/marble-maps/CMakeLists.txt
|
||||
index 14be2c0..a52818c 100644
|
||||
--- a/src/apps/marble-maps/CMakeLists.txt
|
||||
+++ b/src/apps/marble-maps/CMakeLists.txt
|
||||
@@ -30,6 +30,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL Android)
|
||||
Qt5::AndroidExtras
|
||||
Qt5::Multimedia
|
||||
Qt5::QuickControls2
|
||||
+ Qt5::WebEngineWidgets
|
||||
+ Qt5::WebEngine
|
||||
)
|
||||
else()
|
||||
set(TARGET marble-maps)
|
||||
diff --git a/src/lib/marble/CMakeLists.txt b/src/lib/marble/CMakeLists.txt
|
||||
index 3f1afa7..64d0cec 100644
|
||||
--- a/src/lib/marble/CMakeLists.txt
|
||||
+++ b/src/lib/marble/CMakeLists.txt
|
||||
@@ -394,7 +394,8 @@ target_link_libraries(marblewidget
|
||||
if (NOT MARBLE_NO_WEBKITWIDGETS)
|
||||
target_link_libraries(marblewidget
|
||||
LINK_PUBLIC
|
||||
- Qt5::WebKitWidgets
|
||||
+ Qt5::WebEngineWidgets
|
||||
+ Qt5::WebEngine
|
||||
)
|
||||
endif ()
|
||||
if (NOT MARBLE_NO_DBUS)
|
||||
diff --git a/src/lib/marble/LegendWidget.cpp b/src/lib/marble/LegendWidget.cpp
|
||||
index c6949ae..8f9c237 100644
|
||||
--- a/src/lib/marble/LegendWidget.cpp
|
||||
+++ b/src/lib/marble/LegendWidget.cpp
|
||||
@@ -22,8 +22,6 @@ using namespace Marble;
|
||||
#include "ui_LegendWidget.h"
|
||||
#endif
|
||||
|
||||
-#include "MarbleLegendBrowser.h"
|
||||
-
|
||||
namespace Marble
|
||||
{
|
||||
|
||||
diff --git a/src/lib/marble/LegendWidget.ui b/src/lib/marble/LegendWidget.ui
|
||||
index 5a41ffd..14c7633 100644
|
||||
--- a/src/lib/marble/LegendWidget.ui
|
||||
+++ b/src/lib/marble/LegendWidget.ui
|
||||
@@ -28,7 +28,7 @@
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>MarbleLegendBrowser</class>
|
||||
- <extends>QWebView</extends>
|
||||
+ <extends>QWebEngineView</extends>
|
||||
<header>MarbleLegendBrowser.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
diff --git a/src/lib/marble/MarbleLegendBrowser.cpp b/src/lib/marble/MarbleLegendBrowser.cpp
|
||||
index c06fe9a..d5a4a87 100644
|
||||
--- a/src/lib/marble/MarbleLegendBrowser.cpp
|
||||
+++ b/src/lib/marble/MarbleLegendBrowser.cpp
|
||||
@@ -24,8 +24,9 @@
|
||||
#include <QRegExp>
|
||||
|
||||
#ifndef MARBLE_NO_WEBKITWIDGETS
|
||||
-#include <QWebFrame>
|
||||
-#include <QWebElement>
|
||||
+#include <QWebEnginePage>
|
||||
+#include <QWebChannel>
|
||||
+#include "MarbleWebView.h"
|
||||
#endif
|
||||
|
||||
#include <QTextDocument>
|
||||
@@ -49,10 +50,11 @@ namespace Marble
|
||||
class MarbleLegendBrowserPrivate
|
||||
{
|
||||
public:
|
||||
- MarbleModel *m_marbleModel;
|
||||
+ MarbleModel *m_marbleModel;
|
||||
QMap<QString, bool> m_checkBoxMap;
|
||||
QMap<QString, QPixmap> m_symbolMap;
|
||||
QString m_currentThemeId;
|
||||
+ MarbleJsWrapper *m_jsWrapper;
|
||||
};
|
||||
|
||||
|
||||
@@ -64,14 +66,7 @@ MarbleLegendBrowser::MarbleLegendBrowser( QWidget *parent )
|
||||
d( new MarbleLegendBrowserPrivate )
|
||||
{
|
||||
d->m_marbleModel = nullptr;
|
||||
-
|
||||
-#ifndef MARBLE_NO_WEBKITWIDGETS
|
||||
- QWebFrame *frame = page()->mainFrame();
|
||||
- connect(frame, SIGNAL(javaScriptWindowObjectCleared()),
|
||||
- this, SLOT(injectCheckBoxChecker()));
|
||||
- page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
|
||||
- connect( this, SIGNAL(linkClicked(QUrl)), this, SLOT(openLinkExternally(QUrl)) );
|
||||
-#endif
|
||||
+ d->m_jsWrapper = new MarbleJsWrapper(this);
|
||||
}
|
||||
|
||||
MarbleLegendBrowser::~MarbleLegendBrowser()
|
||||
@@ -92,7 +87,7 @@ void MarbleLegendBrowser::setMarbleModel( MarbleModel *marbleModel )
|
||||
|
||||
QSize MarbleLegendBrowser::sizeHint() const
|
||||
{
|
||||
- return QSize( 180, 320 );
|
||||
+ return QSize( 320, 320 );
|
||||
}
|
||||
|
||||
void MarbleLegendBrowser::initTheme()
|
||||
@@ -153,6 +148,7 @@ void MarbleLegendBrowser::loadLegend()
|
||||
TemplateDocument doc(finalHtml);
|
||||
finalHtml = doc.finalText();
|
||||
|
||||
+ injectWebChannel(finalHtml);
|
||||
reverseSupportCheckboxes(finalHtml);
|
||||
|
||||
// Generate some parts of the html from the MapTheme <Legend> tag.
|
||||
@@ -166,18 +162,20 @@ void MarbleLegendBrowser::loadLegend()
|
||||
QUrl baseUrl = QUrl::fromLocalFile( legendPath );
|
||||
|
||||
// Set the html string in the QTextBrowser.
|
||||
- setHtml(finalHtml, baseUrl);
|
||||
+ MarbleWebPage * page = new MarbleWebPage(this);
|
||||
+ connect( page, SIGNAL(linkClicked(QUrl)), this, SLOT(openLinkExternally(QUrl)) );
|
||||
+ page->setHtml(finalHtml, baseUrl);
|
||||
+ setPage(page);
|
||||
|
||||
- QTextDocument *document = new QTextDocument(page()->mainFrame()->toHtml());
|
||||
- d->m_marbleModel->setLegend( document );
|
||||
-#endif
|
||||
-}
|
||||
+ QWebChannel *channel = new QWebChannel(page);
|
||||
+ channel->registerObject(QStringLiteral("Marble"), d->m_jsWrapper);
|
||||
+ page->setWebChannel(channel);
|
||||
|
||||
-void MarbleLegendBrowser::injectCheckBoxChecker()
|
||||
-{
|
||||
-#ifndef MARBLE_NO_WEBKITWIDGETS
|
||||
- QWebFrame *frame = page()->mainFrame();
|
||||
- frame->addToJavaScriptWindowObject( "Marble", this );
|
||||
+ if ( d->m_marbleModel ) {
|
||||
+ page->toHtml([=]( QString document ) {
|
||||
+ d->m_marbleModel->setLegend( new QTextDocument(document) );
|
||||
+ });
|
||||
+ }
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -194,6 +192,7 @@ bool MarbleLegendBrowser::event( QEvent * event )
|
||||
{
|
||||
// "Delayed initialization": legend gets created only
|
||||
if ( event->type() == QEvent::Show ) {
|
||||
+ setVisible(true);
|
||||
loadLegend();
|
||||
return true;
|
||||
}
|
||||
@@ -218,8 +217,7 @@ QString MarbleLegendBrowser::readHtml( const QUrl & name )
|
||||
void MarbleLegendBrowser::translateHtml( QString & html )
|
||||
{
|
||||
// must match string extraction in Messages.sh
|
||||
- // TODO: html.remove also changes html, is that intended?
|
||||
- QString s = html.remove(0, html.indexOf(QLatin1String("<body>")));
|
||||
+ QString s = html;
|
||||
QRegExp rx( "</?\\w+((\\s+\\w+(\\s*=\\s*(?:\".*\"|'.*'|[^'\">\\s]+))?)+\\s*|\\s*)/?>" );
|
||||
rx.setMinimal( true );
|
||||
s.replace( rx, "\n" );
|
||||
@@ -232,6 +230,18 @@ void MarbleLegendBrowser::translateHtml( QString & html )
|
||||
html.replace(*i, QCoreApplication::translate("Legends", (*i).toUtf8().constData()));
|
||||
}
|
||||
|
||||
+void MarbleLegendBrowser::injectWebChannel(QString &html)
|
||||
+{
|
||||
+ QString webChannelCode = "<script type=\"text/javascript\" src=\"qrc:///qtwebchannel/qwebchannel.js\"></script>";
|
||||
+ webChannelCode += "<script> document.addEventListener(\"DOMContentLoaded\", function() {"
|
||||
+ "new QWebChannel(qt.webChannelTransport, function (channel) {"
|
||||
+ "Marble = channel.objects.Marble;"
|
||||
+ "});"
|
||||
+ "}); </script>"
|
||||
+ "</head>";
|
||||
+ html.replace("</head>", webChannelCode);
|
||||
+}
|
||||
+
|
||||
void MarbleLegendBrowser::reverseSupportCheckboxes(QString &html)
|
||||
{
|
||||
const QString old = "<a href=\"checkbox:cities\"/>";
|
||||
@@ -241,7 +251,7 @@ void MarbleLegendBrowser::reverseSupportCheckboxes(QString &html)
|
||||
checked = "checked";
|
||||
|
||||
const QString repair = QLatin1String(
|
||||
- "<input type=\"checkbox\" "
|
||||
+ "<input style=\"position: relative; top: -4px;\" type=\"checkbox\" "
|
||||
"onchange=\"Marble.setCheckedProperty(this.name, this.checked);\" ") + checked + QLatin1String(" name=\"cities\"/>");
|
||||
|
||||
html.replace(old, repair);
|
||||
@@ -283,7 +293,7 @@ QString MarbleLegendBrowser::generateSectionsHtml()
|
||||
if(!section->radio().isEmpty()) {
|
||||
checkBoxString = QLatin1String(
|
||||
"<label class=\"section-head\">"
|
||||
- "<input type=\"radio\" "
|
||||
+ "<input style=\"position: relative; top: -4px;\" type=\"radio\" "
|
||||
"onchange=\"Marble.setRadioCheckedProperty(this.value, this.name ,this.checked);\" ") +
|
||||
checked + QLatin1String(" value=\"") + section->connectTo() + QLatin1String("\" name=\"") + section->radio() + QLatin1String("\" /><span>")
|
||||
+ heading +
|
||||
@@ -292,7 +302,7 @@ QString MarbleLegendBrowser::generateSectionsHtml()
|
||||
} else {
|
||||
checkBoxString = QLatin1String(
|
||||
"<label class=\"section-head\">"
|
||||
- "<input type=\"checkbox\" "
|
||||
+ "<input style=\"position: relative; top: -4px;\" type=\"checkbox\" "
|
||||
"onchange=\"Marble.setCheckedProperty(this.name, this.checked);\" ") + checked + QLatin1String(" name=\"") + section->connectTo() + QLatin1String("\" /><span>")
|
||||
+ heading +
|
||||
QLatin1String("</span></label>");
|
||||
@@ -330,20 +340,24 @@ QString MarbleLegendBrowser::generateSectionsHtml()
|
||||
src = QUrl::fromLocalFile( path ).toString();
|
||||
styleDiv = QLatin1String("width: ") + QString::number(pixmapWidth) + QLatin1String("px; height: ") +
|
||||
QString::number(pixmapHeight) + QLatin1String("px;");
|
||||
+ } else {
|
||||
+ // Workaround for rendered border around empty images in webkit
|
||||
+ src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|
||||
}
|
||||
// NOTICE. There are some pixmaps without image, so we should
|
||||
// create just a plain rectangle with set color
|
||||
- else if (item->icon()->color().isValid()) {
|
||||
+ if (QColor(item->icon()->color()).isValid()) {
|
||||
const QColor color = item->icon()->color();
|
||||
styleDiv = QLatin1String("width: ") + QString::number(pixmapWidth) + QLatin1String("px; height: ") +
|
||||
QString::number(pixmapHeight) + QLatin1String("px; background-color: ") + color.name() + QLatin1Char(';');
|
||||
}
|
||||
+ styleDiv += " position: relative; top: -3px;";
|
||||
const QString text = QCoreApplication::translate("DGML", item->text().toUtf8().constData());
|
||||
QString html = QLatin1String(
|
||||
"<div class=\"legend-entry\">"
|
||||
" <label>") + checkBoxString + QLatin1String(
|
||||
" <img class=\"image-pic\" src=\"") + src + QLatin1String("\" style=\"") + styleDiv + QLatin1String("\"/>"
|
||||
- " <span class=\"notation\">") + text + QLatin1String("</span>"
|
||||
+ " <span class=\"kotation\" >") + text + QLatin1String("</span>"
|
||||
" </label>"
|
||||
"</div>");
|
||||
customLegendString += html;
|
||||
@@ -356,39 +370,19 @@ QString MarbleLegendBrowser::generateSectionsHtml()
|
||||
|
||||
void MarbleLegendBrowser::setCheckedProperty( const QString& name, bool checked )
|
||||
{
|
||||
-#ifndef MARBLE_NO_WEBKITWIDGETS
|
||||
- QWebElement box = page()->mainFrame()->findFirstElement(QLatin1String("input[name=") + name + QLatin1Char(']'));
|
||||
- if (!box.isNull()) {
|
||||
- if (checked != d->m_checkBoxMap[name]) {
|
||||
- d->m_checkBoxMap[name] = checked;
|
||||
- emit toggledShowProperty( name, checked );
|
||||
- }
|
||||
+ if (checked != d->m_checkBoxMap[name]) {
|
||||
+ d->m_checkBoxMap[name] = checked;
|
||||
+ emit toggledShowProperty( name, checked );
|
||||
}
|
||||
-
|
||||
- update();
|
||||
-#endif
|
||||
}
|
||||
|
||||
void MarbleLegendBrowser::setRadioCheckedProperty( const QString& value, const QString& name , bool checked )
|
||||
{
|
||||
-#ifndef MARBLE_NO_WEBKITWIDGETS
|
||||
- QWebElement box = page()->mainFrame()->findFirstElement(QLatin1String("input[value=") + value + QLatin1Char(']'));
|
||||
- QWebElementCollection boxes = page()->mainFrame()->findAllElements(QLatin1String("input[name=") + name + QLatin1Char(']'));
|
||||
- QString currentValue;
|
||||
- for(int i=0; i<boxes.count(); ++i) {
|
||||
- currentValue = boxes.at(i).attribute("value");
|
||||
- d->m_checkBoxMap[currentValue]=false;
|
||||
- emit toggledShowProperty( currentValue, false );
|
||||
- }
|
||||
- if (!box.isNull()) {
|
||||
- if (checked != d->m_checkBoxMap[value]) {
|
||||
- d->m_checkBoxMap[value] = checked;
|
||||
- emit toggledShowProperty( value, checked );
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- update();
|
||||
-#endif
|
||||
+ Q_UNUSED(value)
|
||||
+ if (checked != d->m_checkBoxMap[name]) {
|
||||
+ d->m_checkBoxMap[name] = checked;
|
||||
+ emit toggledShowProperty( name, checked );
|
||||
+ }
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/src/lib/marble/MarbleLegendBrowser.h b/src/lib/marble/MarbleLegendBrowser.h
|
||||
index b77b035..6f568e9 100644
|
||||
--- a/src/lib/marble/MarbleLegendBrowser.h
|
||||
+++ b/src/lib/marble/MarbleLegendBrowser.h
|
||||
@@ -46,19 +46,17 @@ class MARBLE_EXPORT MarbleLegendBrowser : public MarbleWebView
|
||||
void setMarbleModel( MarbleModel *marbleModel );
|
||||
QSize sizeHint() const override;
|
||||
|
||||
- public Q_SLOTS:
|
||||
- void setCheckedProperty( const QString& name, bool checked );
|
||||
- void setRadioCheckedProperty( const QString& value,const QString& name, bool checked );
|
||||
-
|
||||
-
|
||||
Q_SIGNALS:
|
||||
void toggledShowProperty( const QString&, bool );
|
||||
void tourLinkClicked( const QString &url );
|
||||
|
||||
+ public Q_SLOTS:
|
||||
+ void setCheckedProperty( const QString& name, bool checked );
|
||||
+ void setRadioCheckedProperty( const QString& value,const QString& name, bool checked );
|
||||
+
|
||||
private Q_SLOTS:
|
||||
void initTheme();
|
||||
void loadLegend();
|
||||
- void injectCheckBoxChecker();
|
||||
void openLinkExternally( const QUrl &url );
|
||||
|
||||
protected:
|
||||
@@ -68,13 +66,32 @@ class MARBLE_EXPORT MarbleLegendBrowser : public MarbleWebView
|
||||
static void translateHtml(QString &html);
|
||||
|
||||
private:
|
||||
+ void injectWebChannel( QString &html );
|
||||
void reverseSupportCheckboxes( QString &html );
|
||||
-
|
||||
private:
|
||||
Q_DISABLE_COPY( MarbleLegendBrowser )
|
||||
MarbleLegendBrowserPrivate * const d;
|
||||
};
|
||||
|
||||
+class MarbleJsWrapper : public QObject
|
||||
+{
|
||||
+ Q_OBJECT
|
||||
+public:
|
||||
+ explicit MarbleJsWrapper( MarbleLegendBrowser* parent ) : m_parent(parent) {}
|
||||
+
|
||||
+public Q_SLOTS:
|
||||
+ void setCheckedProperty( const QString& name, bool checked )
|
||||
+ {
|
||||
+ m_parent->setCheckedProperty(name, checked);
|
||||
+ }
|
||||
+ void setRadioCheckedProperty( const QString& value,const QString& name, bool checked )
|
||||
+ {
|
||||
+ m_parent->setRadioCheckedProperty(value, name, checked);
|
||||
+ }
|
||||
+private:
|
||||
+ MarbleLegendBrowser * m_parent;
|
||||
+};
|
||||
+
|
||||
}
|
||||
|
||||
#endif
|
||||
diff --git a/src/lib/marble/MarbleWebView.cpp b/src/lib/marble/MarbleWebView.cpp
|
||||
index 16ec4ea..a4982f0 100644
|
||||
--- a/src/lib/marble/MarbleWebView.cpp
|
||||
+++ b/src/lib/marble/MarbleWebView.cpp
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <QClipboard>
|
||||
|
||||
MarbleWebView::MarbleWebView(QWidget *parent) :
|
||||
- QWebView(parent),
|
||||
+ QWebEngineView(parent),
|
||||
m_contextMenu(new QMenu(this)),
|
||||
m_copyAction(new QAction(this))
|
||||
{
|
||||
@@ -52,7 +52,7 @@ void MarbleWebView::keyPressEvent(QKeyEvent *event)
|
||||
return;
|
||||
}
|
||||
|
||||
- QWebView::keyPressEvent(event);
|
||||
+ QWebEngineView::keyPressEvent(event);
|
||||
}
|
||||
|
||||
#include "moc_MarbleWebView.cpp"
|
||||
diff --git a/src/lib/marble/MarbleWebView.h b/src/lib/marble/MarbleWebView.h
|
||||
index 8c84b7b..7ae71fc 100644
|
||||
--- a/src/lib/marble/MarbleWebView.h
|
||||
+++ b/src/lib/marble/MarbleWebView.h
|
||||
@@ -11,11 +11,32 @@
|
||||
#ifndef MARBLEWEBVIEW_H
|
||||
#define MARBLEWEBVIEW_H
|
||||
|
||||
-#include <QWebView>
|
||||
+#include <QWebEngineView>
|
||||
+#include <QWebEnginePage>
|
||||
+#include <QPaintEvent>
|
||||
|
||||
#include "marble_export.h"
|
||||
|
||||
-class MARBLE_EXPORT MarbleWebView : public QWebView
|
||||
+class MARBLE_EXPORT MarbleWebPage : public QWebEnginePage
|
||||
+{
|
||||
+ Q_OBJECT
|
||||
+public:
|
||||
+ explicit MarbleWebPage(QObject *parent = nullptr) : QWebEnginePage(parent){}
|
||||
+
|
||||
+Q_SIGNALS:
|
||||
+ void linkClicked(const QUrl & url);
|
||||
+protected:
|
||||
+ bool acceptNavigationRequest(const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame) override {
|
||||
+ Q_UNUSED(isMainFrame)
|
||||
+ if (type == QWebEnginePage::NavigationTypeLinkClicked) {
|
||||
+ emit linkClicked(url);
|
||||
+ return false;
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+class MARBLE_EXPORT MarbleWebView : public QWebEngineView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
diff --git a/src/lib/marble/PopupItem.cpp b/src/lib/marble/PopupItem.cpp
|
||||
index 2415f88..16b6949 100644
|
||||
--- a/src/lib/marble/PopupItem.cpp
|
||||
+++ b/src/lib/marble/PopupItem.cpp
|
||||
@@ -17,11 +17,13 @@
|
||||
#ifdef MARBLE_NO_WEBKITWIDGETS
|
||||
#include "NullMarbleWebView.h"
|
||||
#else
|
||||
-#include <QWebView>
|
||||
-#include <QWebHistory>
|
||||
+#include <QWebEngineView>
|
||||
+#include <QWebEngineHistory>
|
||||
+#include <QWebEngineSettings>
|
||||
#include "MarbleWebView.h"
|
||||
#endif
|
||||
|
||||
+#include <QDebug>
|
||||
#include <QPointer>
|
||||
#include <QPrinter>
|
||||
#include <QPrintDialog>
|
||||
@@ -38,17 +40,16 @@ namespace Marble
|
||||
PopupItem::PopupItem( QObject* parent ) :
|
||||
QObject( parent ),
|
||||
BillboardGraphicsItem(),
|
||||
- m_widget( new QWidget ),
|
||||
+ m_widget( new QWidget() ),
|
||||
m_textColor( QColor(Qt::black) ),
|
||||
m_backColor( QColor(Qt::white) ),
|
||||
m_needMouseRelease(false)
|
||||
{
|
||||
- setCacheMode( ItemCoordinateCache );
|
||||
+// setCacheMode( ItemCoordinateCache );
|
||||
setVisible( false );
|
||||
setSize( QSizeF( 300.0, 320.0 ) );
|
||||
|
||||
m_ui.setupUi( m_widget );
|
||||
-
|
||||
m_ui.goBackButton->setVisible( false );
|
||||
connect( m_ui.goBackButton, SIGNAL(clicked()), this, SLOT(goBack()) );
|
||||
|
||||
@@ -59,13 +60,15 @@ PopupItem::PopupItem( QObject* parent ) :
|
||||
connect( m_ui.printButton, SIGNAL(clicked()), this, SLOT(printContent()) );
|
||||
#endif
|
||||
|
||||
+ m_widget->setVisible(true);
|
||||
+ m_widget->setAttribute(Qt::WA_DontShowOnScreen);
|
||||
m_widget->setAttribute( Qt::WA_NoSystemBackground, true );
|
||||
QPalette palette = m_ui.webView->palette();
|
||||
palette.setBrush(QPalette::Base, Qt::transparent);
|
||||
- m_ui.webView->setPalette(palette);
|
||||
#ifndef MARBLE_NO_WEBKITWIDGETS
|
||||
- m_ui.webView->page()->setPalette(palette);
|
||||
- m_ui.webView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
|
||||
+ m_ui.webView->setPalette(palette);
|
||||
+ m_ui.webView->page()->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessFileUrls, true);
|
||||
+ m_ui.webView->page()->settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, true);
|
||||
#endif
|
||||
m_ui.webView->setAttribute(Qt::WA_OpaquePaintEvent, false);
|
||||
m_ui.webView->setUrl( QUrl( "about:blank" ) );
|
||||
@@ -73,11 +76,10 @@ PopupItem::PopupItem( QObject* parent ) :
|
||||
connect( m_ui.hideButton, SIGNAL(clicked()), this, SIGNAL(hide()) );
|
||||
|
||||
#ifndef MARBLE_NO_WEBKITWIDGETS
|
||||
- connect( m_ui.webView, SIGNAL(titleChanged(QString)), m_ui.titleText, SLOT(setText(QString)) );
|
||||
- connect( m_ui.webView, SIGNAL(urlChanged(QUrl)), this, SLOT(updateBackButton()) );
|
||||
+ connect( m_ui.webView->page(), SIGNAL(titleChanged(QString)), m_ui.titleText, SLOT(setText(QString)) );
|
||||
+ connect( m_ui.webView->page(), SIGNAL(urlChanged(QUrl)), this, SLOT(updateBackButton()) );
|
||||
// Update the popupitem on changes while loading the webpage
|
||||
- connect( m_ui.webView->page(), SIGNAL(repaintRequested(QRect)), this, SLOT(requestUpdate()) );
|
||||
- connect(m_ui.webView->page(), SIGNAL(linkClicked(QUrl)), this, SLOT(openUrl(QUrl)));
|
||||
+ connect(m_ui.webView, SIGNAL(loadFinished(bool)), this, SLOT(requestUpdate()));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -99,13 +101,11 @@ void PopupItem::setPrintButtonVisible( bool display )
|
||||
void PopupItem::setUrl( const QUrl &url )
|
||||
{
|
||||
m_ui.webView->setUrl( url );
|
||||
- setVisible( true );
|
||||
|
||||
QPalette palette = m_ui.webView->palette();
|
||||
palette.setBrush(QPalette::Base, Qt::transparent);
|
||||
- m_ui.webView->setPalette(palette);
|
||||
#ifndef MARBLE_NO_WEBKITWIDGETS
|
||||
- m_ui.webView->page()->setPalette(palette);
|
||||
+ m_ui.webView->setPalette(palette);
|
||||
#endif
|
||||
m_ui.webView->setAttribute(Qt::WA_OpaquePaintEvent, false);
|
||||
|
||||
@@ -181,7 +181,7 @@ void PopupItem::paint( QPainter *painter )
|
||||
image = pixmap("marble/webpopup/arrow2_topleft");
|
||||
painter->drawPixmap( 0, size().height() / 2, image );
|
||||
}
|
||||
- m_widget->render( painter, QPoint( image.width() - 3, 0 ), QRegion() );
|
||||
+ m_widget->render( painter, QPoint( image.width() - 3, 0 ) );
|
||||
} else if ( alignment() & Qt::AlignLeft ) {
|
||||
popupRect.setRect( -10, -10,
|
||||
size().width() - ( image.width() - 3 ),
|
||||
@@ -359,7 +359,7 @@ void PopupItem::printContent() const
|
||||
QPrinter printer;
|
||||
QPointer<QPrintDialog> dialog = new QPrintDialog(&printer);
|
||||
if (dialog->exec() == QPrintDialog::Accepted) {
|
||||
- m_ui.webView->print(&printer);
|
||||
+ m_ui.webView->page()->print(&printer, [=](bool){});
|
||||
}
|
||||
delete dialog;
|
||||
#endif
|
||||
@@ -369,10 +369,11 @@ void PopupItem::printContent() const
|
||||
void PopupItem::updateBackButton()
|
||||
{
|
||||
#ifndef MARBLE_NO_WEBKITWIDGETS
|
||||
- bool const hasHistory = m_ui.webView->history()->count() > 1;
|
||||
- bool const previousIsHtml = !m_content.isEmpty() && m_ui.webView->history()->currentItemIndex() == 1;
|
||||
- bool const atStart = m_ui.webView->history()->currentItemIndex() <= 1;
|
||||
- bool const currentIsHtml = m_ui.webView->url() == QUrl( "about:blank" );
|
||||
+ bool const hasHistory = m_ui.webView->page()->history()->count() > 1;
|
||||
+ bool const previousIsHtml = !m_content.isEmpty() && m_ui.webView->page()->history()->currentItemIndex() == 1;
|
||||
+ bool const atStart = m_ui.webView->page()->history()->currentItemIndex() <= 1;
|
||||
+ bool const currentIsHtml = m_ui.webView->page()->url() == QUrl( "about:blank" );
|
||||
+
|
||||
m_ui.goBackButton->setVisible( hasHistory && !currentIsHtml && ( previousIsHtml || !atStart ) );
|
||||
#endif
|
||||
}
|
||||
@@ -380,8 +381,8 @@ void PopupItem::updateBackButton()
|
||||
void PopupItem::goBack()
|
||||
{
|
||||
#ifndef MARBLE_NO_WEBKITWIDGETS
|
||||
- if ( m_ui.webView->history()->currentItemIndex() == 1 && !m_content.isEmpty() ) {
|
||||
- m_ui.webView->setHtml( m_content, m_baseUrl );
|
||||
+ if ( m_ui.webView->page()->history()->currentItemIndex() == 1 && !m_content.isEmpty() ) {
|
||||
+ m_ui.webView->page()->setHtml( m_content, m_baseUrl );
|
||||
} else {
|
||||
m_ui.webView->back();
|
||||
}
|
||||
diff --git a/src/lib/marble/PopupItem.h b/src/lib/marble/PopupItem.h
|
||||
index bf2f209..220dd3d 100644
|
||||
--- a/src/lib/marble/PopupItem.h
|
||||
+++ b/src/lib/marble/PopupItem.h
|
||||
@@ -35,7 +35,7 @@ namespace Marble
|
||||
* This class represents graphics item for information bubble.
|
||||
* Mostly used by @see MapInfoDialog.
|
||||
*
|
||||
- * It has nice API for QWebView and methods for styling it.
|
||||
+ * It has nice API for QWebEngineView and methods for styling it.
|
||||
*
|
||||
*/
|
||||
class PopupItem : public QObject, public BillboardGraphicsItem
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
* @brief Print button visibility indicator
|
||||
*
|
||||
* There is a button in the header of item with print icon.
|
||||
- * It used to print the content of QWebView inside.
|
||||
+ * It used to print the content of QWebEngineView inside.
|
||||
* This method indicates visibility of this button.
|
||||
*
|
||||
* @see setPrintButtonVisible();
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
* @brief Sets visibility of the print button
|
||||
*
|
||||
* There is a button in the header of item with print icon.
|
||||
- * It used to print the content of QWebView inside
|
||||
+ * It used to print the content of QWebEngineView inside
|
||||
*
|
||||
* This method sets visibility of this button.
|
||||
*
|
||||
diff --git a/src/lib/marble/TinyWebBrowser.cpp b/src/lib/marble/TinyWebBrowser.cpp
|
||||
index dbce339..0220f38 100644
|
||||
--- a/src/lib/marble/TinyWebBrowser.cpp
|
||||
+++ b/src/lib/marble/TinyWebBrowser.cpp
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "MarbleDebug.h"
|
||||
#include "MarbleDirs.h"
|
||||
#include "MarbleLocale.h"
|
||||
+#include "MarbleWebView.h"
|
||||
|
||||
namespace Marble
|
||||
{
|
||||
@@ -42,20 +43,22 @@ static QString guessWikipediaDomain()
|
||||
}
|
||||
|
||||
TinyWebBrowser::TinyWebBrowser( QWidget* parent )
|
||||
- : QWebView( parent ),
|
||||
+ : QWebEngineView( parent ),
|
||||
d( nullptr )
|
||||
{
|
||||
+ MarbleWebPage * page = new MarbleWebPage();
|
||||
+ setPage(page);
|
||||
+
|
||||
connect( this, SIGNAL(statusBarMessage(QString)),
|
||||
this, SIGNAL(statusMessage(QString)) );
|
||||
|
||||
- page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
|
||||
- connect( this, SIGNAL(linkClicked(QUrl)),
|
||||
+ connect( page, SIGNAL(linkClicked(QUrl)),
|
||||
this, SLOT(openExternalLink(QUrl)) );
|
||||
connect( this, SIGNAL(titleChanged(QString)),
|
||||
this, SLOT(setWindowTitle(QString)) );
|
||||
|
||||
- pageAction( QWebPage::OpenLinkInNewWindow )->setEnabled( false );
|
||||
- pageAction( QWebPage::OpenLinkInNewWindow )->setVisible( false );
|
||||
+ pageAction( QWebEnginePage::OpenLinkInNewWindow )->setEnabled( false );
|
||||
+ pageAction( QWebEnginePage::OpenLinkInNewWindow )->setVisible( false );
|
||||
}
|
||||
|
||||
TinyWebBrowser::~TinyWebBrowser()
|
||||
@@ -79,19 +82,15 @@ void TinyWebBrowser::print()
|
||||
|
||||
QPointer<QPrintDialog> dlg = new QPrintDialog( &printer, this );
|
||||
if ( dlg->exec() )
|
||||
- QWebView::print( &printer );
|
||||
+ page()->print( &printer, [=](bool){} );
|
||||
delete dlg;
|
||||
#endif
|
||||
}
|
||||
|
||||
-QWebView *TinyWebBrowser::createWindow( QWebPage::WebWindowType type )
|
||||
+QWebEngineView *TinyWebBrowser::createWindow( QWebEnginePage::WebWindowType type )
|
||||
{
|
||||
+ Q_UNUSED(type)
|
||||
TinyWebBrowser *view = new TinyWebBrowser( this );
|
||||
-
|
||||
- if ( type == QWebPage::WebModalDialog ) {
|
||||
- view->setWindowModality( Qt::WindowModal );
|
||||
- }
|
||||
-
|
||||
return view;
|
||||
}
|
||||
|
||||
diff --git a/src/lib/marble/TinyWebBrowser.h b/src/lib/marble/TinyWebBrowser.h
|
||||
index c6103b2..0475b23 100644
|
||||
--- a/src/lib/marble/TinyWebBrowser.h
|
||||
+++ b/src/lib/marble/TinyWebBrowser.h
|
||||
@@ -13,7 +13,7 @@
|
||||
#define MARBLE_TINYWEBBROWSER_H
|
||||
|
||||
// Qt
|
||||
-#include <QWebView>
|
||||
+#include <QWebEngineView>
|
||||
|
||||
// Marble
|
||||
#include "marble_export.h"
|
||||
@@ -27,12 +27,12 @@ namespace Marble
|
||||
class TinyWebBrowserPrivate;
|
||||
|
||||
/**
|
||||
- * This class provides a tiny web browser based on QWebView (WebKit).
|
||||
- * It is different from QWebView as it has the button "Open in new Window"
|
||||
+ * This class provides a tiny web browser based on QWebEngineView (WebKit).
|
||||
+ * It is different from QWebEngineView as it has the button "Open in new Window"
|
||||
* disabled per default and instead opens every link in the default web
|
||||
* browser of the user.
|
||||
*/
|
||||
-class MARBLE_EXPORT TinyWebBrowser : public QWebView
|
||||
+class MARBLE_EXPORT TinyWebBrowser : public QWebEngineView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -48,7 +48,7 @@ class MARBLE_EXPORT TinyWebBrowser : public QWebView
|
||||
void statusMessage( const QString& );
|
||||
|
||||
protected:
|
||||
- QWebView *createWindow( QWebPage::WebWindowType type ) override;
|
||||
+ QWebEngineView *createWindow( QWebEnginePage::WebWindowType type ) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void openExternalLink( const QUrl& );
|
||||
diff --git a/src/lib/marble/WebPopupWidget.ui b/src/lib/marble/WebPopupWidget.ui
|
||||
index 8cf7103..e129b73 100644
|
||||
--- a/src/lib/marble/WebPopupWidget.ui
|
||||
+++ b/src/lib/marble/WebPopupWidget.ui
|
||||
@@ -18,9 +18,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
- <item row="1" column="0" colspan="4">
|
||||
- <widget class="MarbleWebView" name="webView" native="true"/>
|
||||
- </item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QToolButton" name="goBackButton">
|
||||
<property name="text">
|
||||
@@ -58,11 +55,20 @@
|
||||
<iconset resource="libmarble.qrc">
|
||||
<normaloff>:/marble/webpopup/icon-remove.png</normaloff>:/marble/webpopup/icon-remove.png</iconset>
|
||||
</property>
|
||||
+ <property name="popupMode">
|
||||
+ <enum>QToolButton::DelayedPopup</enum>
|
||||
+ </property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
- </widget>
|
||||
+ <property name="arrowType">
|
||||
+ <enum>Qt::NoArrow</enum>
|
||||
+ </property>
|
||||
+ </widget>
|
||||
</item>
|
||||
+ <item row="1" column="0" colspan="4">
|
||||
+ <widget class="MarbleWebView" name="webView" native="true"/>
|
||||
+ </item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
diff --git a/src/lib/marble/cloudsync/RouteItemDelegate.cpp b/src/lib/marble/cloudsync/RouteItemDelegate.cpp
|
||||
index 98ad8bb..586ba22 100644
|
||||
--- a/src/lib/marble/cloudsync/RouteItemDelegate.cpp
|
||||
+++ b/src/lib/marble/cloudsync/RouteItemDelegate.cpp
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifdef MARBLE_NO_WEBKITWIDGETS
|
||||
#include <QWidget>
|
||||
#else
|
||||
-#include <QWebView>
|
||||
+#include <QWebEngineView>
|
||||
#endif
|
||||
|
||||
#include <QApplication>
|
||||
diff --git a/src/lib/marble/geodata/handlers/dgml/DgmlIconTagHandler.cpp b/src/lib/marble/geodata/handlers/dgml/DgmlIconTagHandler.cpp
|
||||
index d0c49ec..e26bf72 100644
|
||||
--- a/src/lib/marble/geodata/handlers/dgml/DgmlIconTagHandler.cpp
|
||||
+++ b/src/lib/marble/geodata/handlers/dgml/DgmlIconTagHandler.cpp
|
||||
@@ -47,9 +47,7 @@ GeoNode* DgmlIconTagHandler::parse(GeoParser& parser) const
|
||||
QString pixmapRelativePath = parser.attribute(dgmlAttr_pixmap).trimmed();
|
||||
|
||||
QColor color;
|
||||
- if (pixmapRelativePath.isEmpty()) {
|
||||
- color.setNamedColor(parser.attribute(dgmlAttr_color).trimmed());
|
||||
- }
|
||||
+ color.setNamedColor(parser.attribute(dgmlAttr_color).trimmed());
|
||||
|
||||
GeoSceneIcon *icon = nullptr;
|
||||
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a81c9047a9596922671eca91007dc066cbe10e4424e44f3980673494c839b331
|
||||
size 52419996
|
3
marble-18.12.0.tar.xz
Normal file
3
marble-18.12.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:db39df148d327a61fd6080d4b3e55c8734762e4042c98386229fe3fbbcd85f52
|
||||
size 52415644
|
@ -1,3 +1,61 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 14 06:09:21 UTC 2018 - lbeltrame@kde.org
|
||||
|
||||
- Update to 18.12.0
|
||||
* New bugfix release
|
||||
* For more details please see:
|
||||
* https://www.kde.org/announcements/announce-applications-18.12.0.php
|
||||
- Changes since 18.11.90:
|
||||
* No code changes since 18.11.90
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 03 20:56:18 UTC 2018 - lbeltrame@kde.org
|
||||
|
||||
- Update to 18.11.90
|
||||
* New bugfix release
|
||||
* For more details please see:
|
||||
* https://www.kde.org/announcements/announce-applications-18.12-rc.php
|
||||
- Changes since 18.11.80:
|
||||
* No code changes since 18.11.80
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 20 06:23:01 UTC 2018 - Luca Beltrame <lbeltrame@kde.org>
|
||||
|
||||
- Run spec-cleaner
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 20 05:57:31 UTC 2018 - lbeltrame@kde.org
|
||||
|
||||
- Update to 18.11.80
|
||||
* New feature release
|
||||
* For more details please see:
|
||||
* https://www.kde.org/announcements/announce-applications-18.12-beta.php
|
||||
- Changes since 18.08.3:
|
||||
* Add donation url to appdata
|
||||
* Fix Appstreamercli minor issues
|
||||
* Add caption to the screenshot
|
||||
* Remove extra semicolons
|
||||
* Fix qt_Marble.pri file to update to port to QtWebEngine
|
||||
* Fix MarbleConfig.cmake file to update to port to QtWebEngine
|
||||
* Example update.
|
||||
* - Fix another CMake CMP0071 warning - Supress Qt5SerialPort warning for optional aprs plugin
|
||||
* Differential Revision: https://phabricator.kde.org/D698
|
||||
* Adjust the Tropics position.
|
||||
* Fix minor typo
|
||||
* Fix minor EBN issues and typos
|
||||
* Skip SVG in Krazy checks
|
||||
* BUG: 394517 Changing nominatim to https. (kde#394517)
|
||||
* Export all of the Astro stuff as well
|
||||
* Export the CMake target on Windows as well.
|
||||
* Restore the installation of the CMake target configuration files.
|
||||
* ensure "make install" on windows also installs development header files
|
||||
* Avoid "QObject::disconnect: Unexpected null parameter" error on application stop
|
||||
* Make it possible to build Marble with KDE Android tooling
|
||||
* latitudes must be normalized with normalizeLat
|
||||
- Dropped patches, now upstream:
|
||||
* Fix-MarbleConfig.cmake-to-find-QtWebEngine.patch
|
||||
* Port-to-QtWebEngine.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 08 20:43:49 UTC 2018 - lbeltrame@kde.org
|
||||
|
||||
@ -54,7 +112,7 @@ Thu Jul 26 13:01:04 UTC 2018 - lbeltrame@kde.org
|
||||
- Update to 18.07.80
|
||||
* New feature release
|
||||
* For more details please see:
|
||||
* https://www.kde.org/announcements/announce-applications-18.07.80.php
|
||||
* https://www.kde.org/announcements/announce-applications-18.08-beta.php
|
||||
- Changes since 18.04.3:
|
||||
* avoid runtime error about unknown signal when compiled without WebKit
|
||||
* No version number for the libs on Android
|
||||
@ -127,7 +185,7 @@ Fri Apr 06 07:10:13 CEST 2018 - lbeltrame@kde.org
|
||||
- Update to 18.03.90
|
||||
* New feature release
|
||||
* For more details please see:
|
||||
* https://www.kde.org/announcements/announce-applications-18.03.90.php
|
||||
* https://www.kde.org/announcements/announce-applications-18.04-rc.php
|
||||
- Changes since 17.12.3:
|
||||
* Fix build with Qt 5.11 (missing headers)
|
||||
* Fix installation dir of plasma wallpaper plugin to match id
|
||||
@ -248,7 +306,7 @@ Sat Aug 5 18:19:34 UTC 2017 - christophe@krop.fr
|
||||
|
||||
- Update to KDE Applications 17.07.90
|
||||
* KDE Applications 17.07.90
|
||||
* https://www.kde.org/announcements/announce-applications-17.07.90.php
|
||||
* https://www.kde.org/announcements/announce-applications-17.08-rc.php
|
||||
- Drop Fix-plain-map-and-political-map-showing-no-content.patch
|
||||
(merged upstream)
|
||||
|
||||
@ -348,7 +406,7 @@ Sat Mar 25 23:10:51 CET 2017 - lbeltrame@kde.org
|
||||
- Update to 17.03.80
|
||||
* New feature release
|
||||
* For more details please see:
|
||||
* https://www.kde.org/announcements/announce-applications-17.03.80.php
|
||||
* https://www.kde.org/announcements/announce-applications-17.04-beta.php
|
||||
- Changes since 16.12.3:
|
||||
* Too many changes to list here
|
||||
|
||||
@ -452,7 +510,7 @@ Mon Aug 8 15:48:49 UTC 2016 - tittiatcoke@gmail.com
|
||||
|
||||
- Update to KDE Applications 16.07.90
|
||||
* KDE Applications 16.07.90 (16.08-RC)
|
||||
* https://www.kde.org/announcements/announce-applications-16.07.90.php
|
||||
* https://www.kde.org/announcements/announce-applications-16.08-rc.php
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
@ -607,7 +665,7 @@ Fri Aug 7 07:04:33 UTC 2015 - tittiatcoke@gmail.com
|
||||
|
||||
- Update to KDE Applications 15.07.90
|
||||
* KDE Applications 15.08.0 RC1
|
||||
* https://www.kde.org/announcements/announce-applications-15.07.90.php
|
||||
* https://www.kde.org/announcements/announce-applications-15.08-rc.php
|
||||
* Marble is now Qt5/KF5 based
|
||||
|
||||
- Drop patch do_not_build_qtonly_and_mobile.diff which is no
|
||||
|
56
marble.spec
56
marble.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package marble
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,30 +12,25 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%bcond_without lang
|
||||
|
||||
%define _so -28
|
||||
%define _so_astro 1
|
||||
Name: marble
|
||||
Version: 18.08.3
|
||||
Release: 0
|
||||
%define kf5_version 5.26.0
|
||||
# Latest stable Applications (e.g. 17.08 in KA, but 17.11.80 in KUA)
|
||||
%{!?_kapp_version: %define _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
|
||||
%bcond_without lang
|
||||
Name: marble
|
||||
Version: 18.12.0
|
||||
Release: 0
|
||||
Summary: Generic map viewer
|
||||
# License note: the tools directory contains GPL-3 tools, but they are neither built nor installed by the package
|
||||
License: LGPL-2.1+
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Amusements/Teaching/Other
|
||||
Url: http://edu.kde.org
|
||||
URL: http://edu.kde.org
|
||||
Source0: marble-%{version}.tar.xz
|
||||
# PATCH-FEATURE-UPSTREAM
|
||||
Patch0: Port-to-QtWebEngine.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: Fix-MarbleConfig.cmake-to-find-QtWebEngine.patch
|
||||
BuildRequires: extra-cmake-modules
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gpsd-devel
|
||||
@ -71,10 +66,6 @@ BuildRequires: pkgconfig(Qt5SerialPort)
|
||||
BuildRequires: pkgconfig(Qt5Sql)
|
||||
BuildRequires: pkgconfig(Qt5Svg)
|
||||
BuildRequires: pkgconfig(Qt5Test)
|
||||
%ifarch %{ix86} x86_64 %{arm} aarch64 mips mips64
|
||||
# Only include WebEngine on platforms where it is available
|
||||
BuildRequires: pkgconfig(Qt5WebEngineWidgets)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(Qt5Widgets)
|
||||
BuildRequires: pkgconfig(Qt5Xml)
|
||||
Requires: %{name}-data = %{version}
|
||||
@ -84,10 +75,13 @@ Requires: marble-frontend = %{version}
|
||||
Recommends: %{name}-doc = %{version}
|
||||
Obsoletes: marble5 < %{version}
|
||||
Provides: marble5 < %{version}
|
||||
%ifarch %{ix86} x86_64 %{arm} aarch64 mips mips64
|
||||
# Only include WebEngine on platforms where it is available
|
||||
BuildRequires: pkgconfig(Qt5WebEngineWidgets)
|
||||
%endif
|
||||
%if %{with lang}
|
||||
Recommends: %{name}-lang
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
Marble is a viewer of map data.
|
||||
@ -96,7 +90,7 @@ Marble is a viewer of map data.
|
||||
Summary: Qt Frontend for Marble
|
||||
Group: Amusements/Teaching/Other
|
||||
Requires: %{name} = %{version}
|
||||
Conflicts: otherproviders(marble-frontend)
|
||||
Conflicts: marble-frontend
|
||||
Provides: marble-frontend = %{version}
|
||||
|
||||
%description qt
|
||||
@ -107,7 +101,7 @@ Summary: The KDE optimized frontend for Marble and several Plasmoids/Wall
|
||||
Group: Amusements/Teaching/Other
|
||||
Requires: %{name} = %{version}
|
||||
Supplements: packageand(marble:plasma5-desktop)
|
||||
Conflicts: otherproviders(marble-frontend)
|
||||
Conflicts: marble-frontend
|
||||
Provides: marble-frontend = %{version}
|
||||
|
||||
%description kde
|
||||
@ -129,13 +123,13 @@ Summary: Generic map viewer: Build Environment
|
||||
Group: Development/Libraries/KDE
|
||||
Requires: libastro%{_so_astro} = %{version}
|
||||
Requires: libmarblewidget-qt5%{_so} = %{version}
|
||||
%ifarch %{ix86} x86_64 %{arm} aarch64 mips mips64
|
||||
Requires: pkgconfig(Qt5WebEngineWidgets)
|
||||
%endif
|
||||
Requires: pkgconfig(Qt5Widgets)
|
||||
Requires: pkgconfig(Qt5Xml)
|
||||
Obsoletes: marble5-devel < %{version}
|
||||
Provides: marble5-devel = %{version}
|
||||
%ifarch %{ix86} x86_64 %{arm} aarch64 mips mips64
|
||||
Requires: pkgconfig(Qt5WebEngineWidgets)
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
Development headers and libraries for Marble.
|
||||
@ -174,7 +168,6 @@ The astronomy library for the satellites plugin.
|
||||
|
||||
%prep
|
||||
%setup -q -n marble-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
export SUSE_ASNEEDED=0
|
||||
@ -188,7 +181,7 @@ export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
|
||||
%kf5_makeinstall -C build
|
||||
%if %{with lang}
|
||||
%find_lang %{name} --with-man --all-name --with-qt
|
||||
%kf5_find_htmldocs
|
||||
%{kf5_find_htmldocs}
|
||||
%endif
|
||||
%fdupes %{buildroot}
|
||||
|
||||
@ -198,8 +191,8 @@ export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
|
||||
%postun -n libastro%{_so_astro} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc CREDITS ChangeLog COPYING* LICENSE* MANIFESTO.txt
|
||||
%license COPYING* LICENSE*
|
||||
%doc CREDITS ChangeLog MANIFESTO.txt
|
||||
%config %{_kf5_configdir}/marble.knsrc
|
||||
%exclude %{_datadir}/marble/data
|
||||
%{_kf5_applicationsdir}/marble_geo.desktop
|
||||
@ -224,7 +217,6 @@ export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
|
||||
%{_kf5_sharedir}/mime/packages/geo.xml
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc BUGS CODING
|
||||
%{_includedir}/astro/
|
||||
%{_includedir}/marble/
|
||||
@ -235,28 +227,22 @@ export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
|
||||
%{_kf5_mkspecsdir}/qt_Marble.pri
|
||||
|
||||
%files data
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/marble/data
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%doc %lang(en) %{_kf5_htmldir}/en/marble/
|
||||
|
||||
%files -n libmarblewidget-qt5%{_so}
|
||||
%defattr(-,root,root)
|
||||
%{_kf5_libdir}/libmarblewidget-qt5.so.*
|
||||
|
||||
%files -n libastro%{_so_astro}
|
||||
%defattr(-,root,root)
|
||||
%{_kf5_libdir}/libastro.so.*
|
||||
|
||||
%files qt
|
||||
%defattr(-,root,root)
|
||||
%{_kf5_applicationsdir}/org.kde.marble-qt.desktop
|
||||
%{_kf5_bindir}/marble-qt
|
||||
|
||||
%files kde
|
||||
%defattr(-,root,root)
|
||||
%{_kf5_applicationsdir}/org.kde.marble.desktop
|
||||
%{_kf5_bindir}/marble
|
||||
%dir %{_datadir}/plasma
|
||||
@ -265,7 +251,7 @@ export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
|
||||
|
||||
%if %{with lang}
|
||||
%files lang -f %{name}.lang
|
||||
%doc COPYING*
|
||||
%license COPYING*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user