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

Modernize code

parent ea7df1fa
Pipeline #138507 passed with stage
in 1 minute and 8 seconds
......@@ -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());
}
......@@ -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();
}
......
......@@ -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" ));
......
......@@ -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.
......
......@@ -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;
......
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