Commit a722ba6c authored by Andrius Štikonas's avatar Andrius Štikonas

Port to new Qt5 connect syntax.

Do not link to KF5::Completion.
parent 20a7de3d
......@@ -8,7 +8,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_D
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Completion
Config
ConfigWidgets
CoreAddons
......
......@@ -174,14 +174,14 @@ ConfigSetup::ConfigSetup(SConfig *custom,QWidget *parent)
slider[i]->setRange((int)(EditVal[i][0]*EditDiv[i]), (int)(EditVal[i][1]*EditDiv[i]));
slider[i]->setPageStep((int)((EditVal[i][1]-EditVal[i][0])/10));
slider[i]->setValue((int)(EditVal[i][2]*EditDiv[i]));
connect(slider[i],SIGNAL(valueChanged(int)),SLOT(sliderChanged(int)));
connect(slider[i],&QSlider::valueChanged, this, &ConfigSetup::sliderChanged);
value[i]=new QLCDNumber(LCDLen,configWidgets[Parent[i]]);
value[i]->setFrameStyle(QFrame::NoFrame);
}
configCombo=new KComboBox(this);
configCombo=new QComboBox(this);
configCombo->setEditable(false);
connect(configCombo,SIGNAL(activated(int)),SLOT(configSelected(int)));
connect(configCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), this, &ConfigSetup::configSelected);
for(i=0;i<predefinedConfigNum;i++)
configCombo->addItem(i18n(predefinedConfigName[i]));
configCombo->addItem(i18nc("custom values","Custom"));
......@@ -425,7 +425,7 @@ SettingsDialog::SettingsDialog(SConfig *customConfig, QWidget *parent, const cha
cs = new ConfigSetup(customConfig);
addPage(cs, i18nc("game settings","Game"),QLatin1String( "games-config-custom" ), i18n("Game Settings"));
connect(cs, SIGNAL(changed()), this, SLOT(updateButtons()));
connect(cs, &ConfigSetup::changed, this, &SettingsDialog::updateButtons);
setHelp(QString(),QLatin1String( "kspaceduel" ));
// resize(600,400);
}
......
......@@ -1068,7 +1068,7 @@ void MyMainView::gameSetup()
return;
SettingsDialog *settings=new SettingsDialog(&customConfig,this,"settings");
connect(settings, SIGNAL(settingsUpdated()),this,SLOT(closeSettings()));
connect(settings, &SettingsDialog::settingsUpdated, this, &MyMainView::closeSettings);
settings->show();
}
......
......@@ -59,13 +59,10 @@ void MyTopLevelWidget::initGameWidgets( ){
playfield->setFocusPolicy(Qt::StrongFocus);
playfield->setFocus();
QObject::connect(playfield,SIGNAL(energy(int,int)),
SLOT(energy(int,int)));
QObject::connect(playfield,SIGNAL(hitPoints(int,int)),
SLOT(hitPoints(int,int)));
QObject::connect(playfield,SIGNAL(wins(int,int)),SLOT(wins(int,int)));
QObject::connect(playfield,SIGNAL(setStatusText(QString,int)),
SLOT(setStatusText(QString,int)));
QObject::connect(playfield, &MyMainView::energy, this, &MyTopLevelWidget::energy);
QObject::connect(playfield, &MyMainView::hitPoints, this, &MyTopLevelWidget::hitPoints);
QObject::connect(playfield, &MyMainView::wins, this, &MyTopLevelWidget::wins);
QObject::connect(playfield, &MyMainView::setStatusText, this, &MyTopLevelWidget::setStatusText);
setCentralWidget(w);
}
......@@ -97,14 +94,14 @@ void MyTopLevelWidget::setupActions()
newRoundAct->setIcon( QIcon::fromTheme( QLatin1String( "preferences-desktop-notification-bell" )) );
newRoundAct->setText( i18n( "&New Round" ) );
actionCollection()->setDefaultShortcut(newRoundAct, Qt::CTRL + Qt::Key_R);
connect( newRoundAct, SIGNAL(triggered(bool)), playfield, SLOT(newRound()) );
connect( newRoundAct, &QAction::triggered, playfield, &MyMainView::newRound );
MyMainView::pauseAction =
KStandardGameAction::pause(playfield, SLOT(togglePause()), actionCollection());
MyMainView::pauseAction->setChecked( false );
QAction *gameStart = actionCollection()->addAction( QLatin1String( "game_start" ) );
gameStart->setText( i18nc( "start game","Start" ) );
connect(gameStart, SIGNAL(triggered(bool)), playfield, SLOT(start()));
connect(gameStart, &QAction::triggered, playfield, &MyMainView::start);
actionCollection()->setDefaultShortcut(gameStart, Qt::Key_Space);
playfield->addAction(gameStart);
......
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