Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
KMines
Commits
c454c537
Commit
c454c537
authored
Feb 16, 2022
by
Laurent Montel
Browse files
Modernize code
parent
ea7df1fa
Pipeline
#138507
passed with stage
in 1 minute and 8 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/cellitem.cpp
View file @
c454c537
...
...
@@ -222,6 +222,6 @@ void CellItem::fillNameHashes()
void
CellItem
::
addOverlay
(
const
QString
&
spriteKey
)
{
KGameRenderedItem
*
overlay
=
new
KGameRenderedItem
(
renderer
(),
spriteKey
,
this
);
auto
*
overlay
=
new
KGameRenderedItem
(
renderer
(),
spriteKey
,
this
);
overlay
->
setRenderSize
(
renderSize
());
}
src/main.cpp
View file @
c454c537
...
...
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
if
(
app
.
isSessionRestored
()
)
kRestoreMainWindows
<
KMinesMainWindow
>
();
else
{
KMinesMainWindow
*
mw
=
new
KMinesMainWindow
;
auto
*
mw
=
new
KMinesMainWindow
;
mw
->
show
();
}
...
...
src/mainwindow.cpp
View file @
c454c537
...
...
@@ -234,7 +234,7 @@ void KMinesMainWindow::configureSettings()
{
if
(
KConfigDialog
::
showDialog
(
QStringLiteral
(
"settings"
)
)
)
return
;
KConfigDialog
*
dialog
=
new
KConfigDialog
(
this
,
QStringLiteral
(
"settings"
),
Settings
::
self
()
);
auto
*
dialog
=
new
KConfigDialog
(
this
,
QStringLiteral
(
"settings"
),
Settings
::
self
()
);
dialog
->
addPage
(
new
GeneralOptsConfig
(
dialog
),
i18n
(
"General"
),
QStringLiteral
(
"games-config-options"
));
dialog
->
addPage
(
new
KgThemeSelector
(
m_scene
->
renderer
().
themeProvider
()
),
i18n
(
"Theme"
),
QStringLiteral
(
"games-config-theme"
));
dialog
->
addPage
(
new
CustomGameConfig
(
dialog
),
i18n
(
"Custom Game"
),
QStringLiteral
(
"games-config-custom"
));
...
...
src/minefielditem.h
View file @
c454c537
...
...
@@ -17,7 +17,7 @@ class KGameRenderer;
class
CellItem
;
class
BorderItem
;
typedef
QPair
<
int
,
int
>
FieldPos
;
using
FieldPos
=
QPair
<
int
,
int
>
;
/**
* Graphics item that represents MineField.
...
...
src/scene.cpp
View file @
c454c537
...
...
@@ -34,7 +34,7 @@ void KMinesView::resizeEvent( QResizeEvent *ev )
static
KgThemeProvider
*
provider
()
{
KgThemeProvider
*
prov
=
new
KgThemeProvider
;
auto
*
prov
=
new
KgThemeProvider
;
prov
->
discoverThemes
(
"appdata"
,
QStringLiteral
(
"themes"
));
return
prov
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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