LanLinkProvider's onNetworkChange has no effect if onStop was called first

This commit is contained in:
Albert Vaca 2013-10-03 17:25:17 +02:00
parent b56d14d3a1
commit 5cac14bc96
2 changed files with 4 additions and 2 deletions

View file

@ -57,7 +57,9 @@ void LanLinkProvider::onStop()
void LanLinkProvider::onNetworkChange(QNetworkSession::State state) void LanLinkProvider::onNetworkChange(QNetworkSession::State state)
{ {
Q_UNUSED(state); Q_UNUSED(state);
//qDebug() << "onNetworkChange" << state;
if (!mTcpServer->isListening()) return;
NetworkPackage np(""); NetworkPackage np("");
NetworkPackage::createIdentityPackage(&np); NetworkPackage::createIdentityPackage(&np);
np.set("tcpPort",tcpPort); np.set("tcpPort",tcpPort);

View file

@ -38,7 +38,7 @@ public:
~LanLinkProvider(); ~LanLinkProvider();
QString name() { return "LanLinkProvider"; } QString name() { return "LanLinkProvider"; }
int priority() { return PRIORITY_HIGH + 10; } int priority() { return PRIORITY_HIGH; }
public Q_SLOTS: public Q_SLOTS:
virtual void onNetworkChange(QNetworkSession::State state); virtual void onNetworkChange(QNetworkSession::State state);