Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Granatier
Commits
ac3d3d7a
Commit
ac3d3d7a
authored
Apr 08, 2021
by
Laurent Montel
😁
Browse files
Newstuff was never implemented. Remove it => compile without deprecated
method
parent
fc223540
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/config/arenaselector.cpp
View file @
ac3d3d7a
...
...
@@ -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
)
...
...
src/config/arenaselector.h
View file @
ac3d3d7a
...
...
@@ -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
))
};
...
...
src/config/playerselector.cpp
View file @
ac3d3d7a
...
...
@@ -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
...
...
src/config/playerselector.h
View file @
ac3d3d7a
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment