diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp index c59cba242..aa8350ab3 100644 --- a/core/backends/lan/lanlinkprovider.cpp +++ b/core/backends/lan/lanlinkprovider.cpp @@ -98,6 +98,8 @@ void LanLinkProvider::onNetworkChange(QNetworkSession::State state) NetworkPackage::createIdentityPackage(&np); np.set("tcpPort", mTcpPort); mUdpSocket.writeDatagram(np.serialize(), QHostAddress("255.255.255.255"), port); + + //TODO: Ping active connections to see if they are still reachable } //I'm the existing device, a new device is kindly introducing itself (I will create a TcpSocket) @@ -127,13 +129,13 @@ void LanLinkProvider::newUdpConnection() NetworkPackage::createIdentityPackage(&np2); if (receivedPackage->get("deviceId") == np2.get("deviceId")) { - //kDebug(kdeconnect_kded()) << "Ignoring my own broadcast"; + //kDebug(debugArea()) << "Ignoring my own broadcast"; return; } int tcpPort = receivedPackage->get("tcpPort", port); - //kDebug(kdeconnect_kded()) << "Received Udp presentation from" << sender << "asking for a tcp connection on port " << tcpPort; + //kDebug(debugArea()) << "Received Udp presentation from" << sender << "asking for a tcp connection on port " << tcpPort; QTcpSocket* socket = new QTcpSocket(this); receivedIdentityPackages[socket].np = receivedPackage; diff --git a/core/daemon.cpp b/core/daemon.cpp index 38ad08d15..ac8901b84 100644 --- a/core/daemon.cpp +++ b/core/daemon.cpp @@ -61,6 +61,8 @@ Daemon::Daemon(QObject *parent) : QObject(parent) , d(new DaemonPrivate) { + kDebug(debugArea()) << "KdeConnect daemon starting"; + KSharedConfigPtr config = KSharedConfig::openConfig("kdeconnectrc"); if (!config->group("myself").hasKey("id")) { @@ -76,7 +78,7 @@ Daemon::Daemon(QObject *parent) if(!QCA::isSupported("rsa")) { //TODO: Maybe display this in a more visible way? kWarning(debugArea()) << "Error: KDE Connect could not find support for RSA in your QCA installation, if your distribution provides" - << "separate packages for QCA-ossl and QCA-gnupg plugins, make sure you have them installed and try again"; + << "separate packages for QCA-ossl and QCA-gnupg plugins, make sure you have them installed and try again."; return; } @@ -110,14 +112,11 @@ Daemon::Daemon(QObject *parent) config->group("myself").writeEntry("privateKeyPath", privateKeyPath); config->sync(); } - if (QFile::permissions(config->group("myself").readEntry("privateKeyPath")) != strict) { kWarning(debugArea()) << "Error: KDE Connect detects wrong permissions for private file " << config->group("myself").readEntry("privateKeyPath"); } - //Debugging - kDebug(debugArea()) << "Starting KdeConnect daemon"; //Load backends (hardcoded by now, should be plugins in a future) d->mLinkProviders.insert(new LanLinkProvider()); @@ -148,11 +147,11 @@ Daemon::Daemon(QObject *parent) setDiscoveryEnabled(true); + kDebug(debugArea()) << "KdeConnect daemon started"; } void Daemon::setDiscoveryEnabled(bool b) { - //Listen to incomming connections Q_FOREACH (LinkProvider* a, d->mLinkProviders) { if (b) a->onStart(); diff --git a/kcm/devicessortproxymodel.h b/kcm/devicessortproxymodel.h index 3862eeba5..1b6249b3a 100644 --- a/kcm/devicessortproxymodel.h +++ b/kcm/devicessortproxymodel.h @@ -33,7 +33,7 @@ public: virtual bool lessThan(const QModelIndex& left, const QModelIndex& right) const; virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const; -public slots: +public Q_SLOTS: void sourceDataChanged(QModelIndex,QModelIndex); };