Verified Commit 549f1933 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Remove defunct KNS upload functionality

The upload did not work for years and the component will be deprecated.
And in the context menu entry it is quite undiscoverable anyways, so we
are better of removing it.
parent b973663c
......@@ -43,7 +43,6 @@
#include <KStandardAction>
#include <KToggleAction>
#include <KToggleFullScreenAction>
#include <kns3/uploaddialog.h>
// Marble library classes
#include "AbstractFloatItem.h"
......@@ -198,7 +197,6 @@ MarblePart::MarblePart( QWidget *parentWidget, QObject *parent, const QVariantLi
break;
}
connect( m_controlView, SIGNAL(showUploadDialog()), this, SLOT(showUploadNewStuffDialog()) );
connect( m_controlView, SIGNAL(showMapWizard()), this, SLOT(showMapWizard()) );
connect( m_controlView, SIGNAL(mapThemeDeleted()), this, SLOT(fallBackToDefaultTheme()) );
}
......@@ -1321,19 +1319,6 @@ void MarblePart::showNewStuffDialog()
delete dialog;
}
void MarblePart::showUploadNewStuffDialog()
{
QString newStuffConfig = QStandardPaths::locate( QStandardPaths::GenericDataLocation, "marble/marble.knsrc" );
qDebug() << "KNS config file:" << newStuffConfig;
QPointer<KNS3::UploadDialog> dialog( new KNS3::UploadDialog( newStuffConfig, m_controlView ) );
qDebug() << "Creating the archive";
dialog->setUploadFile( QUrl( MapWizard::createArchive( m_controlView, m_controlView->marbleWidget()->mapThemeId() ) ) );
dialog->exec();
MapWizard::deleteArchive( m_controlView->marbleWidget()->mapThemeId() );
delete dialog;
}
void MarblePart::showDownloadRegionDialog()
{
MarbleWidget * const marbleWidget = m_controlView->marbleWidget();
......
......@@ -135,7 +135,6 @@ class MarblePart: public KParts::ReadOnlyPart
void setupStatusBar();
void showNewStuffDialog();
void showUploadNewStuffDialog();
void showDownloadRegionDialog();
void downloadRegion();
void showStatusBarContextMenu( const QPoint& pos );
......
......@@ -654,7 +654,6 @@ QList<QAction*> ControlView::setupDockWidgets( QMainWindow *mainWindow )
MapViewWidget* mapViewWidget = new MapViewWidget( this );
mapViewWidget->setMarbleWidget( marbleWidget(), m_mapThemeManager );
connect( mapViewWidget, SIGNAL(showMapWizard()), this, SIGNAL(showMapWizard()) );
connect( mapViewWidget, SIGNAL(showUploadDialog()), this, SIGNAL(showUploadDialog()) );
connect( mapViewWidget, SIGNAL(mapThemeDeleted()), this, SIGNAL(mapThemeDeleted()) );
mapViewDock->setWidget( mapViewWidget );
mainWindow->addDockWidget( Qt::LeftDockWidgetArea, mapViewDock );
......
......@@ -127,7 +127,6 @@ class ControlView : public QWidget
Q_SIGNALS:
void showMapWizard();
void showUploadDialog();
void mapThemeDeleted();
protected:
......
......@@ -31,7 +31,6 @@ public:
void setMarbleWidget (Marble::MarbleWidget* widget);
signals:
void showMapWizard ();
void showUploadDialog ();
public:
void setMapThemeId (const QString&);
void setProjection (Marble::Projection projection);
......
......@@ -660,8 +660,6 @@ void MapViewWidget::Private::showContextMenu( const QPoint& pos )
if (QFileInfo(MarbleDirs::localPath() + QLatin1String("/maps/") + currentThemePath()).exists()) {
menu.addAction( tr( "&Delete Map Theme" ), q, SLOT(deleteMap()) );
}
menu.addAction( tr( "&Upload Map..." ), q, SIGNAL(showUploadDialog()) );
menu.exec( m_mapViewUi.marbleThemeSelectView->mapToGlobal( pos ) );
}
void MapViewWidget::Private::deleteMap()
......
......@@ -75,7 +75,6 @@ private Q_SLOTS:
void mapThemeIdChanged( const QString& );
void projectionChanged( Projection );
void showMapWizard();
void showUploadDialog();
void mapThemeDeleted();
private:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment