[Pkg-owncloud-commits] [owncloud-client] 215/332: SocketAPI: Some cleaning up
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 0e5d0c117065547a9f612f66900b9634adf3aa75
Author: Daniel Molkentin <danimo at owncloud.com>
Date: Thu Jul 17 15:00:21 2014 +0200
SocketAPI: Some cleaning up
---
src/mirall/application.h | 1 -
src/mirall/folderman.cpp | 4 +---
src/mirall/socketapi.cpp | 8 +++-----
src/mirall/socketapi.h | 2 +-
4 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/src/mirall/application.h b/src/mirall/application.h
index 19c8800..02690cc 100644
--- a/src/mirall/application.h
+++ b/src/mirall/application.h
@@ -38,7 +38,6 @@ namespace Mirall {
class Theme;
class Folder;
class SslErrorDialog;
-class SocketApi;
class Application : public SharedTools::QtSingleApplication
{
diff --git a/src/mirall/folderman.cpp b/src/mirall/folderman.cpp
index ee8aced..3cbaa83 100644
--- a/src/mirall/folderman.cpp
+++ b/src/mirall/folderman.cpp
@@ -48,13 +48,11 @@ FolderMan::FolderMan(QObject *parent) :
connect(_folderWatcherSignalMapper, SIGNAL(mapped(const QString&)),
this, SLOT(slotScheduleSync(const QString&)));
- MirallConfigFile cfg;
-
ne_sock_init();
Q_ASSERT(!_instance);
_instance = this;
- _socketApi = new SocketApi(this, QUrl::fromLocalFile(cfg.configPathWithAppName().append(QLatin1String("socket"))));
+ _socketApi = new SocketApi(this);
}
FolderMan *FolderMan::instance()
diff --git a/src/mirall/socketapi.cpp b/src/mirall/socketapi.cpp
index 2211d1a..af5d6a4 100644
--- a/src/mirall/socketapi.cpp
+++ b/src/mirall/socketapi.cpp
@@ -155,13 +155,11 @@ SyncFileStatus fileStatus(Folder *folder, const QString& fileName )
}
-SocketApi::SocketApi(QObject* parent, const QUrl& localFile)
+SocketApi::SocketApi(QObject* parent)
: QObject(parent)
- , _localServer(0)
+ , _localServer(new QTcpServer(this))
{
// setup socket
- _localServer = new QTcpServer(this);
- _localServer->listen( QHostAddress::LocalHost, 33001);
connect(_localServer, SIGNAL(newConnection()), this, SLOT(slotNewConnection()));
// folder watcher
@@ -183,7 +181,7 @@ void SocketApi::slotNewConnection()
if( ! socket ) {
return;
}
- DEBUG << "New connection " << socket;
+ DEBUG << "New connection" << socket;
connect(socket, SIGNAL(readyRead()), this, SLOT(slotReadSocket()));
connect(socket, SIGNAL(disconnected()), this, SLOT(onLostConnection()));
Q_ASSERT(socket->readAll().isEmpty());
diff --git a/src/mirall/socketapi.h b/src/mirall/socketapi.h
index 9bf2c01..52a07c4 100644
--- a/src/mirall/socketapi.h
+++ b/src/mirall/socketapi.h
@@ -33,7 +33,7 @@ class SocketApi : public QObject
Q_OBJECT
public:
- SocketApi(QObject* parent, const QUrl& localFile);
+ SocketApi(QObject* parent);
virtual ~SocketApi();
public slots:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list