Code styling

This commit is contained in:
Albert Vaca 2015-03-21 23:12:04 -07:00
parent a649bb5668
commit a5e5b10d9a
3 changed files with 10 additions and 6 deletions

View file

@ -128,14 +128,14 @@ void LanLinkProvider::newUdpConnection()
}
if (receivedPackage->get<QString>("deviceId") == KdeConnectConfig::instance()->deviceId()) {
//kDebug(debugArea()) << "Ignoring my own broadcast";
//qCDebug(KDECONNECT_CORE) << "Ignoring my own broadcast";
delete receivedPackage;
return;
}
int tcpPort = receivedPackage->get<int>("tcpPort", port);
//kDebug(debugArea()) << "Received Udp identity package from" << sender << " asking for a tcp connection on port " << tcpPort;
//qCDebug(KDECONNECT_CORE) << "Received Udp identity package from" << sender << " asking for a tcp connection on port " << tcpPort;
QTcpSocket* socket = new QTcpSocket(this);
receivedIdentityPackages[socket].np = receivedPackage;
@ -223,7 +223,7 @@ void LanLinkProvider::newConnection()
{
//qCDebug(KDECONNECT_CORE) << "LanLinkProvider newConnection";
while(mTcpServer->hasPendingConnections()) {
while (mTcpServer->hasPendingConnections()) {
QTcpSocket* socket = mTcpServer->nextPendingConnection();
configureSocket(socket);
//This socket is still managed by us (and child of the QTcpServer), if
@ -249,7 +249,7 @@ void LanLinkProvider::dataReceived()
NetworkPackage np("");
bool success = NetworkPackage::unserialize(data, &np);
//kDebug(debugArea()) << "LanLinkProvider received reply:" << data;
//qCDebug(KDECONNECT_CORE) << "LanLinkProvider received reply:" << data;
if (!success || np.type() != PACKAGE_TYPE_IDENTITY) {
qCDebug(KDECONNECT_CORE) << "LanLinkProvider/newConnection: Not an identification package (wuh?)";

View file

@ -31,7 +31,7 @@ SocketLineReader::SocketLineReader(QTcpSocket* socket, QObject* parent)
void SocketLineReader::dataReceived()
{
while(mSocket->canReadLine()) {
while (mSocket->canReadLine()) {
const QByteArray line = mSocket->readLine();
if (line.length() > 1) {
mPackages.enqueue(line);//we don't want single \n

View file

@ -2,6 +2,10 @@ add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-fileitemaction")
include_directories(${CMAKE_SOURCE_DIR})
add_library(kdeconnectfiletiemaction MODULE sendfileitemaction.cpp)
target_link_libraries(kdeconnectfiletiemaction KF5::KIOWidgets KF5::I18n kdeconnectinterfaces)
target_link_libraries(kdeconnectfiletiemaction
KF5::KIOWidgets
KF5::I18n
kdeconnectinterfaces
)
install(TARGETS kdeconnectfiletiemaction DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES kdeconnectsendfile.desktop DESTINATION ${SERVICES_INSTALL_DIR})