Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a8fedc25 authored by Laurent Montel's avatar Laurent Montel 😁

Fix some clazy warning

parent 2644eae2
......@@ -166,12 +166,12 @@ InvasionSlider::InvasionSlider(KGameWindow* game, GameLogic::Country * attack, G
right->addWidget(m_nbRArmies,Qt::AlignCenter);
//val->setText(QString::number(invadeSlide->value()));
connect(m_invadeSlide,SIGNAL(valueChanged(int)),this,SLOT(slideMove(int)));
connect(m_invadeSlide,SIGNAL(sliderReleased()),this,SLOT(slideReleased()));
connect(buttonBox,SIGNAL(accepted()),this,SLOT(slideClose()));
connect(m_invadeSlide,&QAbstractSlider::valueChanged,this,&InvasionSlider::slideMove);
connect(m_invadeSlide,&QAbstractSlider::sliderReleased,this,&InvasionSlider::slideReleased);
connect(buttonBox,&QDialogButtonBox::accepted,this,&InvasionSlider::slideClose);
if (invasionType == Moving)
{
connect(buttonBox,SIGNAL(rejected()),this,SLOT(slideCancel()));
connect(buttonBox,&QDialogButtonBox::rejected,this,&InvasionSlider::slideCancel);
}
widget->setLayout(wSlideLayout);
......
......@@ -66,11 +66,11 @@ KsirkJabberGameWidget::KsirkJabberGameWidget(QWidget* parent) :
jabberstateled->setState(KLed::Off);
chatroomstateled->setState(KLed::Off);
connect(connectbutton,SIGNAL(clicked()),this,SLOT(slotJabberConnectButtonClicked()));
connect(joingamebutton,SIGNAL(clicked()),this,SLOT(slotJoinJabberGame()));
QObject::connect ( joinroombutton, SIGNAL (clicked()), this, SLOT(slotJoinRoom()));
connect(connectbutton,&QAbstractButton::clicked,this,&KsirkJabberGameWidget::slotJabberConnectButtonClicked);
connect(joingamebutton,&QAbstractButton::clicked,this,&KsirkJabberGameWidget::slotJoinJabberGame);
QObject::connect ( joinroombutton, &QAbstractButton::clicked, this, &KsirkJabberGameWidget::slotJoinRoom);
QObject::connect(jabberTable, SIGNAL(cellClicked(int,int)), this, SLOT(slotCellClicked(int,int)));
QObject::connect(jabberTable, &QTableWidget::cellClicked, this, &KsirkJabberGameWidget::slotCellClicked);
QStringList headers;
headers.push_back(i18n("Nickname"));
......@@ -78,7 +78,7 @@ KsirkJabberGameWidget::KsirkJabberGameWidget(QWidget* parent) :
headers.push_back(i18n("Nb players"));
jabberTable->setHorizontalHeaderLabels(headers);
QObject::connect(cancelbutton, SIGNAL(clicked()),this,SLOT(slotCancel()));
QObject::connect(cancelbutton, &QAbstractButton::clicked,this,&KsirkJabberGameWidget::slotCancel);
}
void KsirkJabberGameWidget::init(GameAutomaton* automaton)
......@@ -89,19 +89,19 @@ void KsirkJabberGameWidget::init(GameAutomaton* automaton)
(m_automaton->game()->jabberClient()->isConnected())
? KLed::On : KLed::Off);
QObject::connect(startnewgamebutton,SIGNAL(clicked()),m_automaton->game(),SLOT(slotNewJabberGame()));
QObject::connect ( m_automaton->game()->jabberClient(), SIGNAL (csDisconnected()), this, SLOT (slotJabberDisconnected()) );
QObject::connect ( m_automaton->game()->jabberClient(), SIGNAL (csError(int)), this, SLOT (slotJabberError(int)) );
QObject::connect ( m_automaton->game()->jabberClient(), SIGNAL (tlsWarning(QCA::TLS::IdentityResult,QCA::Validity)), this, SLOT (slotHandleTLSWarning(QCA::TLS::IdentityResult,QCA::Validity)) );
QObject::connect ( m_automaton->game()->jabberClient(), SIGNAL (connected()), this, SLOT (slotJabberConnected()) );
QObject::connect ( m_automaton->game()->jabberClient(), SIGNAL (error(JabberClient::ErrorCode)), this, SLOT (slotJabberClientError(JabberClient::ErrorCode)) );
QObject::connect ( m_automaton->game()->jabberClient(), SIGNAL (rosterRequestFinished(bool)), this, SLOT (slotRosterRequestFinished(bool)) );
QObject::connect ( m_automaton->game()->jabberClient(), SIGNAL (groupChatJoined(XMPP::Jid)), this, SLOT(slotGroupChatJoined(XMPP::Jid)));
QObject::connect ( m_automaton->game()->jabberClient(), SIGNAL (groupChatLeft(XMPP::Jid)), this, SLOT(slotGroupChatLeft(XMPP::Jid)));
QObject::connect ( m_automaton->game()->jabberClient(), SIGNAL (groupChatPresence(XMPP::Jid,XMPP::Status)), this, SLOT(slotGroupChatPresence(XMPP::Jid,XMPP::Status)));
QObject::connect ( m_automaton->game()->jabberClient(), SIGNAL (groupChatError(XMPP::Jid,int,QString)), this, SLOT(slotGroupChatError(XMPP::Jid,int,QString)));
QObject::connect(automaton, SIGNAL(newJabberGame(QString,int,QString)), this, SLOT(slotNewJabberGame(QString,int,QString)) );
QObject::connect(this, SIGNAL(cancelled(int)), m_automaton->game(), SLOT(slotJabberGameCanceled(int)));
QObject::connect(startnewgamebutton,&QAbstractButton::clicked,m_automaton->game(),&KGameWindow::slotNewJabberGame);
QObject::connect ( m_automaton->game()->jabberClient(), &JabberClient::csDisconnected, this, &KsirkJabberGameWidget::slotJabberDisconnected );
QObject::connect ( m_automaton->game()->jabberClient(), &JabberClient::csError, this, &KsirkJabberGameWidget::slotJabberError );
QObject::connect ( m_automaton->game()->jabberClient(), &JabberClient::tlsWarning, this, &KsirkJabberGameWidget::slotHandleTLSWarning );
QObject::connect ( m_automaton->game()->jabberClient(), &JabberClient::connected, this, &KsirkJabberGameWidget::slotJabberConnected );
QObject::connect ( m_automaton->game()->jabberClient(), &JabberClient::error, this, &KsirkJabberGameWidget::slotJabberClientError );
QObject::connect ( m_automaton->game()->jabberClient(), &JabberClient::rosterRequestFinished, this, &KsirkJabberGameWidget::slotRosterRequestFinished );
QObject::connect ( m_automaton->game()->jabberClient(), &JabberClient::groupChatJoined, this, &KsirkJabberGameWidget::slotGroupChatJoined);
QObject::connect ( m_automaton->game()->jabberClient(), &JabberClient::groupChatLeft, this, &KsirkJabberGameWidget::slotGroupChatLeft);
QObject::connect ( m_automaton->game()->jabberClient(), &JabberClient::groupChatPresence, this, &KsirkJabberGameWidget::slotGroupChatPresence);
QObject::connect ( m_automaton->game()->jabberClient(), &JabberClient::groupChatError, this, &KsirkJabberGameWidget::slotGroupChatError);
QObject::connect(automaton, &GameAutomaton::newJabberGame, this, &KsirkJabberGameWidget::slotNewJabberGame );
QObject::connect(this, &KsirkJabberGameWidget::cancelled, m_automaton->game(), &KGameWindow::slotJabberGameCanceled);
}
void KsirkJabberGameWidget::slotJabberConnectButtonClicked()
......
......@@ -54,11 +54,11 @@ KPlayerSetupWidget::KPlayerSetupWidget(QWidget *parent) :
setupUi(this);
connect(nationCombo, SIGNAL(activated(int)), this, SLOT(slotNationChanged()));
connect(nameLineEdit, SIGNAL(textEdited(QString)), this, SLOT(slotNameEdited(QString)));
connect(nameLineEdit, &QLineEdit::textEdited, this, &KPlayerSetupWidget::slotNameEdited);
connect(nationCombo, SIGNAL(activated(int)), this, SLOT(slotNationChanged()));
connect(nextButton, SIGNAL(pressed()),this,SLOT(slotNext()));
connect(previousButton, SIGNAL(pressed()),this,SLOT(slotPrevious()));
connect(cancelButton, SIGNAL(pressed()),this,SLOT(slotCancel()));
connect(nextButton, &QAbstractButton::pressed,this,&KPlayerSetupWidget::slotNext);
connect(previousButton, &QAbstractButton::pressed,this,&KPlayerSetupWidget::slotPrevious);
connect(cancelButton, &QAbstractButton::pressed,this,&KPlayerSetupWidget::slotCancel);
messageLabel->hide();
}
......@@ -92,7 +92,7 @@ void KPlayerSetupWidget::init(GameLogic::GameAutomaton* automaton,
m_newGameSetup = newGameSetup;
qCDebug(KSIRK_LOG) << "connecting to playerJoinedGame";
connect(automaton,SIGNAL(signalPlayerJoinedGame(KPlayer*)), this, SLOT(slotPlayerJoinedGame(KPlayer*)));
connect(automaton,&KGame::signalPlayerJoinedGame, this, &KPlayerSetupWidget::slotPlayerJoinedGame);
init();
qCDebug(KSIRK_LOG) << "constructor done";
}
......
......@@ -47,10 +47,10 @@ NewGameWidget::NewGameWidget(NewGameSetup* newGameSetup, QWidget *parent) :
qCDebug(KSIRK_LOG);
setupUi(this);
QObject::connect(nextButton, SIGNAL(clicked()), this, SLOT(slotOK()) );
QObject::connect(cancelButton, SIGNAL(clicked()), this, SLOT(slotCancel()) );
QObject::connect(nextButton, &QAbstractButton::clicked, this, &NewGameWidget::slotOK );
QObject::connect(cancelButton, &QAbstractButton::clicked, this, &NewGameWidget::slotCancel );
QObject::connect(skinCombo, SIGNAL(activated(int)), this, SLOT(slotSkinChanged(int)) );
QObject::connect(ghnsbutton, SIGNAL(clicked()), this, SLOT(slotGHNS()) );
QObject::connect(ghnsbutton, &QAbstractButton::clicked, this, &NewGameWidget::slotGHNS );
QObject::connect(tcpPortEntry,SIGNAL(valueChanged(int)),this, SLOT(slotTcpPortEdited(int)));
}
......
......@@ -38,8 +38,8 @@ NewGameSummaryWidget::NewGameSummaryWidget(QWidget *parent) :
{
qCDebug(KSIRK_LOG);
setupUi(this);
connect(previousButton,SIGNAL(clicked()),this,SIGNAL(previous()));
connect(cancelButton,SIGNAL(clicked()),this,SIGNAL(cancel()));
connect(previousButton,&QAbstractButton::clicked,this,&NewGameSummaryWidget::previous);
connect(cancelButton,&QAbstractButton::clicked,this,&NewGameSummaryWidget::cancel);
playersTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
}
......
......@@ -35,9 +35,9 @@ TcpConnectWidget::TcpConnectWidget(QWidget *parent) : QWidget(parent), Ui::TcpCo
QRegExpValidator *v = new QRegExpValidator(rx, this);
hostEdit->setValidator(v);
connect(nextButton,SIGNAL(clicked(bool)),this,SIGNAL(next()));
connect(previousButton,SIGNAL(clicked(bool)),this,SIGNAL(previous()));
connect(cancelButton,SIGNAL(clicked(bool)),this,SIGNAL(cancel()));
connect(nextButton,&QAbstractButton::clicked,this,&TcpConnectWidget::next);
connect(previousButton,&QAbstractButton::clicked,this,&TcpConnectWidget::previous);
connect(cancelButton,&QAbstractButton::clicked,this,&TcpConnectWidget::cancel);
}
TcpConnectWidget::~TcpConnectWidget()
......
......@@ -172,23 +172,23 @@ GameAutomaton::GameAutomaton() :
// Connect the most important slot which tells us which properties are
// changed
connect(this,SIGNAL(signalPropertyChanged(KGamePropertyBase*,KGame*)),
this,SLOT(slotPropertyChanged(KGamePropertyBase*,KGame*)));
connect(this,&KGame::signalPropertyChanged,
this,&GameAutomaton::slotPropertyChanged);
connect(this,SIGNAL(signalPlayerJoinedGame(KPlayer*)),
this,SLOT(slotPlayerJoinedGame(KPlayer*)));
connect(this,&KGame::signalPlayerJoinedGame,
this,&GameAutomaton::slotPlayerJoinedGame);
connect(this,SIGNAL(signalNetworkData(int,QByteArray,quint32,quint32)),
this,SLOT(slotNetworkData(int,QByteArray,quint32,quint32)));
connect(this,&KGame::signalNetworkData,
this,&GameAutomaton::slotNetworkData);
connect(this,SIGNAL(signalClientJoinedGame(quint32,KGame*)),
this,SLOT(slotClientJoinedGame(quint32,KGame*)));
connect(this,&KGame::signalClientJoinedGame,
this,&GameAutomaton::slotClientJoinedGame);
connect(messageClient(),SIGNAL(connectionBroken()),
this,SLOT(slotConnectionToServerBroken()));
connect(messageClient(),&KMessageClient::connectionBroken,
this,&GameAutomaton::slotConnectionToServerBroken);
connect(messageServer(),SIGNAL(connectionLost(KMessageIO*)),
this,SLOT(slotConnectionToClientBroken(KMessageIO*)));
connect(messageServer(),&KMessageServer::connectionLost,
this,&GameAutomaton::slotConnectionToClientBroken);
setPolicy(KGame::PolicyDirty,true);
......@@ -242,7 +242,7 @@ GameAutomaton::GameState GameAutomaton::run()
// qCDebug(KSIRK_LOG) << "(KGame running=" << (gameStatus()==KGame::Run) << ")";
if (m_game == 0 || gameStatus() == KGame::Pause)
{
QTimer::singleShot(200, this, SLOT(run()));
QTimer::singleShot(200, this, &GameAutomaton::run);
return m_state;
}
......@@ -280,12 +280,12 @@ GameAutomaton::GameState GameAutomaton::run()
if (m_game->actionNewGame(GameAutomaton::None))
{
state(INIT);
QTimer::singleShot(200, this, SLOT(run()));
QTimer::singleShot(200, this, &GameAutomaton::run);
return INIT;
}
else
{
QTimer::singleShot(200, this, SLOT(run()));
QTimer::singleShot(200, this, &GameAutomaton::run);
return m_state;
}
}
......@@ -301,20 +301,20 @@ GameAutomaton::GameState GameAutomaton::run()
m_port, 0, 32000, 1, &ok);
offerConnections(m_port);
state(WAIT_PLAYERS);
QTimer::singleShot(200, this, SLOT(run()));
QTimer::singleShot(200, this, &GameAutomaton::run);
return WAIT_PLAYERS;
}
else
{
qCDebug(KSIRK_LOG) << "opened" << endl;
QTimer::singleShot(200, this, SLOT(run()));
QTimer::singleShot(200, this, &GameAutomaton::run);
return m_state;
}
}
if (event == "actionJoinNetworkGame")
{
joinNetworkGame();
QTimer::singleShot(200, this, SLOT(run()));
QTimer::singleShot(200, this, &GameAutomaton::run);
return m_state;
}
......@@ -864,7 +864,7 @@ GameAutomaton::GameState GameAutomaton::run()
exit(1); // @todo handle this error
}
QTimer::singleShot(200, this, SLOT(run()));
QTimer::singleShot(200, this, &GameAutomaton::run);
// m_game->initTimer();
return m_state;
......@@ -1040,9 +1040,9 @@ void GameAutomaton::createIO(KPlayer *player,KGameIO::IOMode io)
// Connect mouse input to a function to process the actual input
connect(
input,
SIGNAL(signalMouseEvent(KGameIO*,QDataStream&,QMouseEvent*,bool*)),
&KGameMouseIO::signalMouseEvent,
m_game->frame(),
SLOT(slotMouseInput(KGameIO*,QDataStream&,QMouseEvent*,bool*)));
&DecoratedGameFrame::slotMouseInput);
// Add the device to the player
player->addGameIO(input);
......@@ -1196,8 +1196,8 @@ bool GameAutomaton::connectToServ()
qCDebug(KSIRK_LOG);
if (messageServer() != 0)
{
QObject::disconnect(messageServer(),SIGNAL(connectionLost(KMessageIO*)),
this,SLOT(slotConnectionToClientBroken(KMessageIO*)));
QObject::disconnect(messageServer(),&KMessageServer::connectionLost,
this,&GameAutomaton::slotConnectionToClientBroken);
}
qCDebug(KSIRK_LOG) << "Before connectToServer" << endl;
QString host = m_game->newGameSetup()->host();
......@@ -1205,8 +1205,8 @@ bool GameAutomaton::connectToServ()
bool status = connectToServer(host, port);
qCDebug(KSIRK_LOG) << "After connectToServer" << status;
if (messageServer())
connect(messageServer(),SIGNAL(connectionLost(KMessageIO*)),
this,SLOT(slotConnectionToClientBroken(KMessageIO*)));
connect(messageServer(),&KMessageServer::connectionLost,
this,&GameAutomaton::slotConnectionToClientBroken);
return status;
}
......@@ -1221,8 +1221,8 @@ bool GameAutomaton::joinJabberGame(const QString& nick)
if (messageServer() != 0)
{
QObject::disconnect(messageServer(),SIGNAL(connectionLost(KMessageIO*)),
this,SLOT(slotConnectionToClientBroken(KMessageIO*)));
QObject::disconnect(messageServer(),&KMessageServer::connectionLost,
this,&GameAutomaton::slotConnectionToClientBroken);
}
qCDebug(KSIRK_LOG) << "Before connectToServer" << endl;
......@@ -2480,8 +2480,8 @@ void GameAutomaton::slotNetworkData(int msgid, const QByteArray &buffer, quint32
finalizePlayers();
break;
case Winner:
QObject::disconnect(messageServer(),SIGNAL(connectionLost(KMessageIO*)),
this,SLOT(slotConnectionToClientBroken(KMessageIO*)));
QObject::disconnect(messageServer(),&KMessageServer::connectionLost,
this,&GameAutomaton::slotConnectionToClientBroken);
stream >> playerId;
m_game->winner(dynamic_cast<Player*>(findPlayer(playerId)));
break;
......@@ -2499,7 +2499,7 @@ void GameAutomaton::slotNetworkData(int msgid, const QByteArray &buffer, quint32
break;
case DisplayGoals:
qCDebug(KSIRK_LOG) << "Got message DisplayGoals" << endl;
QTimer::singleShot(0,this,SLOT(displayGoals()));
QTimer::singleShot(0,this,&GameAutomaton::displayGoals);
break;
case DisplayFightResult:
qCDebug(KSIRK_LOG) << "Got message DisplayFightResult" << endl;
......
......@@ -78,7 +78,7 @@ ONU::ONU(GameAutomaton* automaton,
m_font.backgroundColor = "white";
m_timerFast=new QTimer(this); //instanciation of the timer
QObject::connect(m_timerFast,SIGNAL(timeout()), this, SLOT(changingZoom())); //connect the timer to the good slot
QObject::connect(m_timerFast,&QTimer::timeout, this, &ONU::changingZoom); //connect the timer to the good slot
Sprites::SkinSpritesData::changeable().init();
// unsigned int nationalityId = 0;
......
......@@ -44,10 +44,10 @@ void JabberByteStream::connect ( QString host, int port )
mSocket->connectToHost(host, port);
QObject::connect ( mSocket.get(), SIGNAL (error(QAbstractSocket::SocketError)), this, SLOT (slotError(QAbstractSocket::SocketError)) );
QObject::connect ( mSocket.get(), SIGNAL (connected()), this, SLOT (slotConnected()) );
QObject::connect ( mSocket.get(), SIGNAL (disconnected()), this, SLOT (slotConnectionClosed()) );
QObject::connect ( mSocket.get(), SIGNAL (readyRead()), this, SLOT (slotReadyRead()) );
QObject::connect ( mSocket.get(), SIGNAL (bytesWritten(qint64)), this, SLOT (slotBytesWritten(qint64)) );
QObject::connect ( mSocket.get(), &QAbstractSocket::connected, this, &JabberByteStream::slotConnected );
QObject::connect ( mSocket.get(), &QAbstractSocket::disconnected, this, &JabberByteStream::slotConnectionClosed );
QObject::connect ( mSocket.get(), &QIODevice::readyRead, this, &JabberByteStream::slotReadyRead );
QObject::connect ( mSocket.get(), &QIODevice::bytesWritten, this, &JabberByteStream::slotBytesWritten );
}
bool JabberByteStream::isOpen () const
......
......@@ -32,8 +32,8 @@ JabberConnector::JabberConnector ( QObject *parent )
mByteStream = new JabberByteStream ( this );
connect ( mByteStream, SIGNAL (connected()), this, SLOT (slotConnected()) );
connect ( mByteStream, SIGNAL (error(int)), this, SLOT (slotError(int)) );
connect ( mByteStream, &JabberByteStream::connected, this, &JabberConnector::slotConnected );
connect ( mByteStream, &ByteStream::error, this, &JabberConnector::slotError );
}
......
......@@ -36,13 +36,13 @@ KMessageJabber::KMessageJabber (const QString& peerJid, JabberClient* jabberClie
{
qCDebug(JABBER_PROTOCOL_LOG) << peerJid;
// initSocket ();
connect(jabberClient, SIGNAL(messageReceived(XMPP::Message)), this, SLOT(slotMessageReceived(XMPP::Message)));
connect(jabberClient, &JabberClient::messageReceived, this, &KMessageJabber::slotMessageReceived);
connect(jabberClient, SIGNAL(resourceUnavailable(Jid,Resource)), this, SLOT(slotResourceUnavailable(Jid,Resource)));
connect(jabberClient, &JabberClient::resourceUnavailable, this, &KMessageJabber::slotResourceUnavailable);
connect(jabberClient, SIGNAL(groupChatLeft(XMPP::Jid)), this, SLOT(slotGroupChatLeft(XMPP::Message)));
connect(jabberClient, SIGNAL(groupChatPresence(XMPP::Jid,XMPP::Status)), this, SLOT(slotGroupChatPresence(XMPP::Jid,XMPP::Status)));
connect(jabberClient, &JabberClient::groupChatPresence, this, &KMessageJabber::slotGroupChatPresence);
......
......@@ -241,14 +241,14 @@ PrivacyManager::~PrivacyManager()
void PrivacyManager::requestListNames()
{
GetPrivacyListsTask* t = new GetPrivacyListsTask ( rootTask_ );
connect ( t,SIGNAL (finished()),SLOT (receiveLists()) );
connect ( t,&Task::finished,this, &PrivacyManager::receiveLists );
t->go ( true );
}
void PrivacyManager::requestList ( const QString& name )
{
GetPrivacyListTask* t = new GetPrivacyListTask ( rootTask_, name );
connect ( t,SIGNAL (finished()),SLOT (receiveList()) );
connect ( t,&Task::finished,this, &PrivacyManager::receiveList );
t->go ( true );
}
......@@ -257,8 +257,8 @@ void PrivacyManager::block ( const QString& target )
block_targets_.push_back ( target );
if ( !block_waiting_ ) {
block_waiting_ = true;
connect ( this,SIGNAL (defaultListAvailable(PrivacyList)),SLOT (block_getDefaultList_success(PrivacyList)) );
connect ( this,SIGNAL (defaultListError()),SLOT (block_getDefaultList_error()) );
connect ( this,&PrivacyManager::defaultListAvailable,this, &PrivacyManager::block_getDefaultList_success );
connect ( this,&PrivacyManager::defaultListError,this, &PrivacyManager::block_getDefaultList_error );
getDefaultList();
}
}
......@@ -284,21 +284,21 @@ void PrivacyManager::block_getDefaultList_error()
void PrivacyManager::getDefaultList()
{
connect ( this,SIGNAL (listsReceived(QString,QString,QStringList)),SLOT (getDefault_listsReceived(QString,QString,QStringList)) );
connect ( this,SIGNAL (listsError()),SLOT (getDefault_listsError()) );
connect ( this,&PrivacyManager::listsReceived,this, &PrivacyManager::getDefault_listsReceived );
connect ( this,&PrivacyManager::listsError,this, &PrivacyManager::getDefault_listsError );
requestListNames();
}
void PrivacyManager::getDefault_listsReceived ( const QString& defaultList, const QString&, const QStringList& )
{
disconnect ( this,SIGNAL (listsReceived(QString,QString,QStringList)),this,SLOT (getDefault_listsReceived(QString,QString,QStringList)) );
disconnect ( this,SIGNAL (listsError()),this,SLOT (getDefault_listsError()) );
disconnect ( this,&PrivacyManager::listsReceived,this,&PrivacyManager::getDefault_listsReceived );
disconnect ( this,&PrivacyManager::listsError,this,&PrivacyManager::getDefault_listsError );
getDefault_default_ = defaultList;
if ( !defaultList.isEmpty() ) {
getDefault_waiting_ = true;
connect ( this,SIGNAL (listReceived(PrivacyList)),SLOT (getDefault_listReceived(PrivacyList)) );
connect ( this,SIGNAL (listError()),SLOT (getDefault_listError()) );
connect ( this,&PrivacyManager::listReceived,this, &PrivacyManager::getDefault_listReceived );
connect ( this,&PrivacyManager::listError,this, &PrivacyManager::getDefault_listError );
requestList ( defaultList );
}
else {
......@@ -308,16 +308,16 @@ void PrivacyManager::getDefault_listsReceived ( const QString& defaultList, cons
void PrivacyManager::getDefault_listsError()
{
disconnect ( this,SIGNAL (listsReceived(QString,QString,QStringList)),this,SLOT (getDefault_listsReceived(QString,QString,QStringList)) );
disconnect ( this,SIGNAL (listsError()),this,SLOT (getDefault_listsError()) );
disconnect ( this,&PrivacyManager::listsReceived,this,&PrivacyManager::getDefault_listsReceived );
disconnect ( this,&PrivacyManager::listsError,this,&PrivacyManager::getDefault_listsError );
emit defaultListError();
}
void PrivacyManager::getDefault_listReceived ( const PrivacyList& l )
{
if ( l.name() == getDefault_default_ && getDefault_waiting_ ) {
disconnect ( this,SIGNAL (listReceived(PrivacyList)),this,SLOT (getDefault_listReceived(PrivacyList)) );
disconnect ( this,SIGNAL (listError()),this,SLOT (getDefault_listError()) );
disconnect ( this,&PrivacyManager::listReceived,this,&PrivacyManager::getDefault_listReceived );
disconnect ( this,&PrivacyManager::listError,this,&PrivacyManager::getDefault_listError );
getDefault_waiting_ = false;
emit defaultListAvailable ( l );
}
......@@ -332,7 +332,7 @@ void PrivacyManager::changeDefaultList ( const QString& name )
{
SetPrivacyListsTask* t = new SetPrivacyListsTask ( rootTask_ );
t->setDefault ( name );
connect ( t,SIGNAL (finished()),SLOT (changeDefaultList_finished()) );
connect ( t,&Task::finished,this, &PrivacyManager::changeDefaultList_finished );
t->go ( true );
}
......@@ -356,7 +356,7 @@ void PrivacyManager::changeActiveList ( const QString& name )
{
SetPrivacyListsTask* t = new SetPrivacyListsTask ( rootTask_ );
t->setActive ( name );
connect ( t,SIGNAL (finished()),SLOT (changeActiveList_finished()) );
connect ( t,&Task::finished,this, &PrivacyManager::changeActiveList_finished );
t->go ( true );
}
......@@ -380,7 +380,7 @@ void PrivacyManager::changeList ( const PrivacyList& list )
{
SetPrivacyListsTask* t = new SetPrivacyListsTask ( rootTask_ );
t->setList ( list );
connect ( t,SIGNAL (finished()),SLOT (changeList_finished()) );
connect ( t,&Task::finished,this, &PrivacyManager::changeList_finished );
t->go ( true );
}
......
......@@ -75,7 +75,7 @@ AnimSprite::AnimSprite(const QString &svgid,
/// @note uncomment here if you want to try sprites animation by connection to a timer
// connect(GameAutomaton::changeable().game()->frame()->timer(),SIGNAL(timeout()),this,SLOT(animate()));
connect(&m_timer,SIGNAL(timeout()),this,SLOT(animate()));
connect(&m_timer,&QTimer::timeout,this,&AnimSprite::animate);
// m_timer.setSingleShot(true);
if (frames > 1)
{
......@@ -87,7 +87,7 @@ AnimSprite::~AnimSprite()
{
// qCDebug(KSIRK_LOG) << (void*)this << endl;
m_timer.stop();
disconnect(&m_timer,SIGNAL(timeout()),this,SLOT(animate()));
disconnect(&m_timer,&QTimer::timeout,this,&AnimSprite::animate);
setStatic();
}
......
......@@ -66,8 +66,8 @@ void AnimSpritesGroup::addSprite(AnimSprite* sprite)
{
push_back(sprite);
qCDebug(KSIRK_LOG) << "now" << size();
connect(sprite, SIGNAL(atDestination(AnimSprite*)),this,SLOT(oneArrived(AnimSprite*)));
connect(sprite, SIGNAL(animationFinished(AnimSprite*)),this,SLOT(oneArrived(AnimSprite*)));
connect(sprite, &AnimSprite::atDestination,this,&AnimSpritesGroup::oneArrived);
connect(sprite, &AnimSprite::animationFinished,this,&AnimSpritesGroup::oneArrived);
}
void AnimSpritesGroup::oneArrived(AnimSprite* sprite)
......
......@@ -32,7 +32,7 @@ AnimSpritePool* AnimSpritePool::m_pool = 0;
AnimSpritePool::AnimSpritePool()
{
connect(&m_timer,SIGNAL(timeout()),this,SLOT(update()));
connect(&m_timer,&QTimer::timeout,this,&AnimSpritePool::update);
m_timer.setSingleShot(true);
m_timer.start(200);
}
......
......@@ -99,14 +99,14 @@ void DecoratedGameFrame::initMenu ()
QAction* zoomOutAction = KStandardAction::zoomOut(m_automaton->game(), SLOT(slotZoomOut()), this);
nextPlayer = new QAction(i18n("Next Player"), this);
connect(nextPlayer, SIGNAL(triggered()), m_automaton->game(), SLOT(slotNextPlayer()));
connect(nextPlayer, &QAction::triggered, m_automaton->game(), &KGameWindow::slotNextPlayer);
detailsAction = new QAction(i18n("Details"), this);
connect(detailsAction, SIGNAL(triggered()), this, SLOT(slotDetails()));
connect(detailsAction, &QAction::triggered, this, &DecoratedGameFrame::slotDetails);
goalAction = new QAction(QIcon(), i18n("Goal"), this);
goalAction->setShortcut(Qt::CTRL+Qt::Key_G);
connect(goalAction,SIGNAL(triggered(bool)),m_automaton->game(),SLOT(slotShowGoal()));
connect(goalAction,&QAction::triggered,m_automaton->game(),&KGameWindow::slotShowGoal);
menu->addAction(newAction);
menu->addAction(openAction);
......@@ -137,20 +137,20 @@ void DecoratedGameFrame::initAttackMenu ()
attackMenu = new QMenu(this);
m_arenaAction = new ArenaAction(i18n("Enable Arena"), this);
connect(m_arenaAction, SIGNAL(triggered()), this, SLOT(arenaState()));
connect(this, SIGNAL(arenaStateSignal(bool)), m_automaton->game(), SLOT(slotArena(bool)));
connect(m_arenaAction, &QAction::triggered, this, &DecoratedGameFrame::arenaState);
connect(this, &DecoratedGameFrame::arenaStateSignal, m_automaton->game(), &KGameWindow::slotArena);
Attack1Action = new QAction(i18n("Attack 1"), this);
connect(Attack1Action, SIGNAL(triggered()), m_automaton->game(), SLOT(slotAttack1()));
connect(Attack1Action, &QAction::triggered, m_automaton->game(), &KGameWindow::slotAttack1);
Attack2Action = new QAction(i18n("Attack 2"), this);
connect(Attack2Action, SIGNAL(triggered()), m_automaton->game(), SLOT(slotAttack2()));
connect(Attack2Action, &QAction::triggered, m_automaton->game(), &KGameWindow::slotAttack2);
Attack3Action = new QAction(i18n("Attack 3"), this);
connect(Attack3Action, SIGNAL(triggered()), m_automaton->game(), SLOT(slotAttack3()));
connect(Attack3Action, &QAction::triggered, m_automaton->game(), &KGameWindow::slotAttack3);
AutoAction = new QAction(i18n("Auto attack"), this);
connect(AutoAction, SIGNAL(triggered()), this, SLOT(attackAuto()));
connect(AutoAction, &QAction::triggered, this, &DecoratedGameFrame::attackAuto);
attackMenu->addAction(AutoAction);
attackMenu->addSeparator();
......@@ -168,13 +168,13 @@ void DecoratedGameFrame::initMoveMenu ()
moveMenu = new QMenu(this);
Move1Action = new QAction(i18n("Move 1"), this);
connect(Move1Action, SIGNAL(triggered()),m_automaton->game(), SLOT(slotInvade1()));
connect(Move1Action, &QAction::triggered,m_automaton->game(), &KGameWindow::slotInvade1);
Move5Action = new QAction(i18n("Move 5"), this);
connect(Move5Action, SIGNAL(triggered()),m_automaton->game(), SLOT(slotInvade5()));
connect(Move5Action, &QAction::triggered,m_automaton->game(), &KGameWindow::slotInvade5);
Move10Action = new QAction(i18n("Move 10"), this);
connect(Move10Action, SIGNAL(triggered()),m_automaton->game(), SLOT(slotInvade10()));
connect(Move10Action, &QAction::triggered,m_automaton->game(), &KGameWindow::slotInvade10);
moveMenu->addAction(Move1Action);
moveMenu->addAction(Move5Action);
......
......@@ -111,7 +111,7 @@ bool KGameWindow::initArmiesMovement(unsigned int nbABouger, Country *firstCount
broadcastChangeItem(messageParts, ID_STATUS_MSG2, false);
return false;
}
connect(sprite,SIGNAL(atDestination(AnimSprite*)),this,SLOT(slotMovingArmyArrived(AnimSprite*)));
connect(sprite,&AnimSprite::atDestination,this,&KGameWindow::slotMovingArmyArrived);
sprite->setupTravel(firstCountry, secondCountry);
newGroup->addSprite(sprite);
firstCountry-> createArmiesSprites();
......@@ -1370,7 +1370,7 @@ void KGameWindow::initCombatBringBackForArena(Country *attackingCountry, Country
newSprite-> setPos((start)+QPointF(leftRelativePos, flagYDiff));
}
connect(newSprite,SIGNAL(atDestination(AnimSprite*)),this,SLOT(slotBring(AnimSprite*)));
connect(newSprite,&AnimSprite::atDestination,this,&KGameWindow::slotBring);
QPointF dest;
//int nbPos;
......@@ -1448,7 +1448,7 @@ void KGameWindow::initCombatBringBackForArena(Country *attackingCountry, Country
newSprite-> setPos((start)+QPointF(rightRelativePos,flagYDiff));