[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [marble/Applications/16.08] src/plugins/render/satellites: First half-done approach to Satellites se
From:       Friedrich W. H. Kossebau <kossebau () kde ! org>
Date:       2016-07-31 17:06:42
Message-ID: E1bTuCI-0005kM-Rw () code ! kde ! org
[Download RAW message or body]

Git commit 2933b24f4dbd002a8a366357c0084d567ee72c63 by Friedrich W. H. Kossebau.
Committed on 31/07/2016 at 17:06.
Pushed by kossebau into branch 'Applications/16.08'.

First half-done approach to Satellites settings mess

M  +6    -10   src/plugins/render/satellites/SatellitesPlugin.cpp

http://commits.kde.org/marble/2933b24f4dbd002a8a366357c0084d567ee72c63

diff --git a/src/plugins/render/satellites/SatellitesPlugin.cpp \
b/src/plugins/render/satellites/SatellitesPlugin.cpp index 4034d55..b24cada 100644
--- a/src/plugins/render/satellites/SatellitesPlugin.cpp
+++ b/src/plugins/render/satellites/SatellitesPlugin.cpp
@@ -46,16 +46,7 @@ SatellitesPlugin::SatellitesPlugin( const MarbleModel *marbleModel \
)  m_configDialog, SLOT(setDialogActive(bool)) );
 
     setVisible( false );
-    // TODO: due to the async fetching of data sources there is some race condition
-    // on multiple calls of this method, this needs some closer look
-    // The plugin used to call here
-    // setSettings( QHash<QString, QVariant>() );
-    // to set some defaults. But this resulted in idList being garbaged with more \
                and more
-    // duplicated entries of MSC at each app start, as the default setting would \
                trigger
-    // some addition of ids later on, when in the meantime the setSettings() call \
                from
-    // the plugin user on startup would set idList with the ids stored from last \
                run.
-    // For now we just rely on the plugin user calling setSettings and have the \
                default
-    // set then if needed.
+    setSettings(QHash<QString, QVariant>());
 
     m_showOrbitAction = new QAction( tr( "Display orbit" ), this );
     m_showOrbitAction->setCheckable( true );
@@ -283,6 +274,10 @@ void SatellitesPlugin::setSettings( const QHash<QString, \
QVariant> &settings )  {
     RenderPlugin::setSettings( settings );
 
+    // reset
+    m_newDataSources.clear();
+    // TODO: cancel also all on-going downloads
+
     // add default data sources
     if( !settings.contains( "dataSources" ) ) {
         QStringList dsList;
@@ -346,6 +341,7 @@ void SatellitesPlugin::updateSettings()
         return;
     }
 
+    // TODO: cancel also all on-going downloads
     m_satModel->clear();
     
     m_configModel->clear();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic