Commit ac3d3d7a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Newstuff was never implemented. Remove it => compile without deprecated

method
parent fc223540
......@@ -56,7 +56,6 @@ class ArenaSelector::Private
// private slots
void _k_updatePreview(QListWidgetItem* currentItem = nullptr);
void _k_updateArenaList(const QString& strArena);
void _k_openKNewStuffDialog();
void _k_setRandomArenaMode(bool randomModeEnabled);
void _k_updateRandomArenaModeArenaList(QListWidgetItem* item);
};
......@@ -108,17 +107,7 @@ void ArenaSelector::Private::setupData(KConfigSkeleton * aconfig)
{
ui.setupUi(q);
//setup KNS button
if (m_options & EnableNewStuffDownload)
{
ui.getNewButton->setIcon(QIcon::fromTheme( QStringLiteral( "get-hot-new-stuff" )));
connect(ui.getNewButton, SIGNAL(clicked()), q, SLOT(_k_openKNewStuffDialog()));
}
else
{
ui.getNewButton->hide();
}
ui.getNewButton->hide();
//The lineEdit widget holds our arena path for automatic connection via KConfigXT.
//But the user should not manipulate it directly, so we hide it.
......@@ -438,19 +427,6 @@ void ArenaSelector::Private::_k_updateArenaList(const QString& strArena)
}
}
void ArenaSelector::Private::_k_openKNewStuffDialog()
{
QPointer<KNS3::DownloadDialog> dialog = new KNS3::DownloadDialog (q);
if(dialog->exec() == QDialog::Accepted)
{
if(!(dialog->changedEntries().isEmpty()))
{
//TODO: discover new arenas and add them to the list
}
}
delete dialog;
}
void ArenaSelector::Private::_k_setRandomArenaMode(bool randomModeEnabled)
{
if(!randomModeEnabled)
......
......@@ -78,7 +78,6 @@ private:
Q_PRIVATE_SLOT(d, void _k_updatePreview(QListWidgetItem* currentItem = NULL))
Q_PRIVATE_SLOT(d, void _k_updateArenaList(const QString&))
Q_PRIVATE_SLOT(d, void _k_openKNewStuffDialog())
Q_PRIVATE_SLOT(d, void _k_setRandomArenaMode(bool randomModeEnabled))
Q_PRIVATE_SLOT(d, void _k_updateRandomArenaModeArenaList(QListWidgetItem* item))
};
......
......@@ -22,7 +22,6 @@
#include <QStandardPaths>
#include <KConfig>
#include <KLocalizedString>
#include <KNS3/DownloadDialog>
#include <QIcon>
#include <KConfigGroup>
//PlayerSelectorDelegate declaration
......@@ -44,13 +43,9 @@ struct PlayerSelector::Private
PlayerSettings* m_playerSettings;
Options m_options;
QListWidget* m_list;
QPushButton* m_knsButton;
void fillList();
Private(PlayerSettings* playerSettings, Options options, PlayerSelector* q) : q(q), m_playerSettings(playerSettings), m_options(options), m_knsButton(nullptr) {}
void _k_showNewStuffDialog();
Private(PlayerSettings* playerSettings, Options options, PlayerSelector* q) : q(q), m_playerSettings(playerSettings), m_options(options) {}
};
PlayerSelector::PlayerSelector(PlayerSettings* playerSettings, Options options, QWidget* parent)
......@@ -71,14 +66,6 @@ PlayerSelector::PlayerSelector(PlayerSettings* playerSettings, Options options,
QVBoxLayout* layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(d->m_list);
//setup KNS button
if (options & EnableNewStuffDownload)
{
d->m_knsButton = new QPushButton(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff")),
i18n("Get New Players..."), this);
layout->addWidget(d->m_knsButton);
connect(d->m_knsButton, SIGNAL(clicked()), SLOT(_k_showNewStuffDialog()));
}
}
PlayerSelector::~PlayerSelector()
......@@ -123,20 +110,6 @@ void PlayerSelector::Private::fillList()
}
}
void PlayerSelector::Private::_k_showNewStuffDialog()
{
QPointer<KNS3::DownloadDialog> dialog = new KNS3::DownloadDialog (q);
if(dialog->exec() == QDialog::Accepted)
{
if(!(dialog->changedEntries().isEmpty()))
{
//TODO: discover new arenas and add them to the list
fillList();
}
}
delete dialog;
}
//END PlayerSelector
//BEGIN PlayerSelectorDelegate
......
......@@ -31,8 +31,6 @@ public:
private:
struct Private;
Private* const d;
Q_PRIVATE_SLOT(d, void _k_showNewStuffDialog())
};
Q_DECLARE_OPERATORS_FOR_FLAGS(PlayerSelector::Options)
......
Markdown is supported
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