summaryrefslogtreecommitdiffstats
path: root/src/crsm.cpp
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2019-05-23 13:55:24 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2019-05-23 13:55:24 +0200
commit3b6e0696b58f14b8082f06577896fed9c21ea606 (patch)
tree16ea5f71ddd22a64102054bbb3a5723bc54deb0f /src/crsm.cpp
parent579e8b1fabbf30ef24178f979b671bc221c0bee1 (diff)
downloadmanager-3b6e0696b58f14b8082f06577896fed9c21ea606.tar.gz
manager-3b6e0696b58f14b8082f06577896fed9c21ea606.zip
Replace deprecated QSignalMapper with lambda
Diffstat (limited to 'src/crsm.cpp')
-rw-r--r--src/crsm.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/crsm.cpp b/src/crsm.cpp
index 902e813..3aeb6c4 100644
--- a/src/crsm.cpp
+++ b/src/crsm.cpp
@@ -75,8 +75,6 @@ CRSM::CRSM(QObject *parent) :
QFile sessionFile(Config.CRSM.SessionFile);
if(sessionFile.exists()) sessionFile.remove();
- connect(&greetMapper, SIGNAL(mapped(QString)), this, SLOT(greet(QString)));
-
autoHost = Config.Hosting.Auto;
connect(processManager, SIGNAL(readyRead()), this, SLOT(readServerOutput()));
@@ -317,9 +315,8 @@ bool CRSM::clientMessage(ClientInfo& client, const QString& message, ClonkOutput
bool CRSM::clientConnected(const ClientInfo& client)
{
QTimer *timer = new QTimer;
- connect(timer, SIGNAL(timeout()), &greetMapper, SLOT(map()));
+ connect(timer, &QTimer::timeout, [this, pcName = client.pcName]{ greet(pcName); });
connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater()));
- greetMapper.setMapping(timer, client.pcName);
timer->start(1000);
if(Session.CountDown != -1 && Session.CountDown <= Config.Clonk.Server.JoinStopCountDown)
{