X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fnetsplit.cpp;h=f71a29c0b7e91e6487cd0068d927acaadada6fce;hp=ce2eef86f876018c82816177451f977bb2d67c01;hb=900cce213a6ed000b7131a05a0dec7d04b35b023;hpb=76db8cdfbeffaaba359c8e80cf2146da9e9e7f8a diff --git a/src/core/netsplit.cpp b/src/core/netsplit.cpp index ce2eef86..f71a29c0 100644 --- a/src/core/netsplit.cpp +++ b/src/core/netsplit.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -32,10 +32,10 @@ Netsplit::Netsplit(Network *network, QObject *parent) _joinTimer.setSingleShot(true); _quitTimer.setSingleShot(true); - connect(&_discardTimer, SIGNAL(timeout()), this, SIGNAL(finished())); + connect(&_discardTimer, &QTimer::timeout, this, &Netsplit::finished); - connect(&_joinTimer, SIGNAL(timeout()), this, SLOT(joinTimeout())); - connect(&_quitTimer, SIGNAL(timeout()), this, SLOT(quitTimeout())); + connect(&_joinTimer, &QTimer::timeout, this, &Netsplit::joinTimeout); + connect(&_quitTimer, &QTimer::timeout, this, &Netsplit::quitTimeout); // wait for a maximum of 1 hour until we discard the netsplit _discardTimer.start(3600000); @@ -117,7 +117,7 @@ bool Netsplit::isNetsplit(const QString &quitMessage) // now test if message consists only of two dns names as the RFC requests // but also allow the commonly used "*.net *.split" - QRegExp hostRx("^(?:[\\w\\d-.]+|\\*)\\.[\\w\\d-]+\\s(?:[\\w\\d-.]+|\\*)\\.[\\w\\d-]+$"); + QRegExp hostRx(R"(^(?:[\w\d-.]+|\*)\.[\w\d-]+\s(?:[\w\d-.]+|\*)\.[\w\d-]+$)"); if (hostRx.exactMatch(quitMessage)) return true;