diff --git a/Add-fallback-InputHandler.patch b/Add-fallback-InputHandler.patch new file mode 100644 index 0000000..beb41a5 --- /dev/null +++ b/Add-fallback-InputHandler.patch @@ -0,0 +1,51 @@ +From c2daba4216d83b90599d4fbb405e1a6ba633c9a8 Mon Sep 17 00:00:00 2001 +From: Mohammed Nafees +Date: Thu, 6 Jul 2017 14:13:44 +0530 +Subject: Add fallback InputHandler to prevent crash when adding bookmark with + UTM view angle + +BUG: 381872 +--- + src/lib/marble/LatLonEdit.cpp | 20 +++++++++++--------- + 1 file changed, 11 insertions(+), 9 deletions(-) + +diff --git a/src/lib/marble/LatLonEdit.cpp b/src/lib/marble/LatLonEdit.cpp +index 0d64c59..c000cb6 100644 +--- a/src/lib/marble/LatLonEdit.cpp ++++ b/src/lib/marble/LatLonEdit.cpp +@@ -562,21 +562,23 @@ void LatLonEdit::setNotation(GeoDataCoordinates::Notation notation) + d->m_inputHandler = new DMInputHandler(d); + break; + case GeoDataCoordinates::UTM: +- /** @todo implement */ ++ /** @todo see below */ + break; + case GeoDataCoordinates::Astro: +- /** @todo implement */ ++ /** @todo see below */ + break; + } + +- if (d->m_inputHandler) { +- d->m_notation = notation; +- d->m_inputHandler->setupUi(); +- d->m_inputHandler->setupMinMax(d->m_dimension); +- d->m_inputHandler->setValue(d->m_value); +- } else { +- Q_ASSERT(false && "Support for this notation has not been implemented yet"); ++ if (!d->m_inputHandler) { ++ /** @todo Temporary fallback to DecimalInputHandler ++ * Implement proper handlers for UTM and Astro */ ++ d->m_inputHandler = new DecimalInputHandler(d); + } ++ ++ d->m_notation = notation; ++ d->m_inputHandler->setupUi(); ++ d->m_inputHandler->setupMinMax(d->m_dimension); ++ d->m_inputHandler->setValue(d->m_value); + } + + void LatLonEdit::checkFloatValueOverflow() +-- +cgit v0.11.2 + diff --git a/Fix-utm-enum-value.patch b/Fix-utm-enum-value.patch deleted file mode 100644 index 4650865..0000000 --- a/Fix-utm-enum-value.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 7859bf1cc1fdaf07b70446b1530358bff7bf43e3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dennis=20Nienh=C3=BCser?= -Date: Tue, 29 Dec 2015 11:18:23 +0100 -Subject: Fix utm enum value - ---- - src/lib/marble/EditBookmarkDialog.cpp | 2 +- - src/lib/marble/EditPlacemarkDialog.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/lib/marble/EditBookmarkDialog.cpp b/src/lib/marble/EditBookmarkDialog.cpp -index c9a87a8..6ee5e91 100644 ---- a/src/lib/marble/EditBookmarkDialog.cpp -+++ b/src/lib/marble/EditBookmarkDialog.cpp -@@ -161,7 +161,7 @@ void EditBookmarkDialog::setMarbleWidget( MarbleWidget* widget ) - const GeoDataCoordinates::Notation notation = - (defaultAngleUnit == DecimalDegree) ? GeoDataCoordinates::Decimal : - (defaultAngleUnit == DMSDegree) ? GeoDataCoordinates::DMS : -- /* else, UTM */ GeoDataCoordinates::DMS; -+ /* else, UTM */ GeoDataCoordinates::UTM; - d->m_ui.m_header->setNotation(notation); - - d->m_manager = new ReverseGeocodingRunnerManager( d->m_widget->model(), this ); -diff --git a/src/lib/marble/EditPlacemarkDialog.cpp b/src/lib/marble/EditPlacemarkDialog.cpp -index cfab9f1..ab8ad1f 100644 ---- a/src/lib/marble/EditPlacemarkDialog.cpp -+++ b/src/lib/marble/EditPlacemarkDialog.cpp -@@ -134,7 +134,7 @@ EditPlacemarkDialog::EditPlacemarkDialog( GeoDataPlacemark *placemark, - const GeoDataCoordinates::Notation notation = - (defaultAngleUnit == DecimalDegree) ? GeoDataCoordinates::Decimal : - (defaultAngleUnit == DMSDegree) ? GeoDataCoordinates::DMS : -- /* else, UTM */ GeoDataCoordinates::DMS; -+ /* else, UTM */ GeoDataCoordinates::UTM; - d->m_header->setNotation( notation ); - } - connect( d->m_header, SIGNAL(valueChanged()), this, SLOT( --- -cgit v0.11.2 - diff --git a/marble.changes b/marble.changes index 4901a86..cfe59ec 100644 --- a/marble.changes +++ b/marble.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 6 09:23:33 UTC 2017 - wbauer@tmo.at + +- Drop Fix-utm-enum-value.patch +- Add Add-fallback-InputHandler.patch from upstream instead to fix + the crash (boo#1044747, kde#381872) + ------------------------------------------------------------------- Tue Jul 4 11:37:39 UTC 2017 - wbauer@tmo.at diff --git a/marble.spec b/marble.spec index 924bc79..952f8af 100644 --- a/marble.spec +++ b/marble.spec @@ -31,8 +31,8 @@ License: LGPL-2.1+ Group: Amusements/Teaching/Other Url: http://edu.kde.org Source0: marble-%{version}.tar.xz -# PATCH-FIX-UPSTREAM Fix-utm-enum-value.patch boo#1044747, kde#381872 -- revert this upstream commit, it causes the "Edit Bookmark" dialog to crash if you set the View Angle to UTM -Patch1: Fix-utm-enum-value.patch +# PATCH-FIX-UPSTREAM Add-fallback-InputHandler.patch boo#1044747, kde#381872 -- fix crash when opening the "Edit Bookmark" dialog if you set the View Angle to UTM +Patch1: Add-fallback-InputHandler.patch # PATCH-FIX-UPSTREAM Fix-plain-map-and-political-map-showing-no-content.patch kde#379297 -- fix display of the plain map and the political map Patch2: Fix-plain-map-and-political-map-showing-no-content.patch BuildRequires: extra-cmake-modules @@ -160,7 +160,7 @@ The astronomy library for the satellites plugin. %prep %setup -q -n marble-%{version} -%patch1 -Rp1 +%patch1 -p1 %patch2 -p1 %build