projects
/
qtrapids
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Added daemon start functionality
[qtrapids]
/
src
/
server
/
TorrentSession.cpp
diff --git
a/src/server/TorrentSession.cpp
b/src/server/TorrentSession.cpp
index
b877470
..
1065a6e
100644
(file)
--- a/
src/server/TorrentSession.cpp
+++ b/
src/server/TorrentSession.cpp
@@
-38,6
+38,15
@@
TorrentSession::TorrentSession(QObject *parent, QSettings *settings)
}
}
+
+TorrentSession::~TorrentSession()
+{
+ alertWaiter_->stop();
+ alertWaiter_->wait();
+ emit sessionTerminated();
+}
+
+
void TorrentSession::loadState()
{
TorrentDownloadInfo info;
void TorrentSession::loadState()
{
TorrentDownloadInfo info;
@@
-251,6
+260,7
@@
qtrapids::ParamsMap_t TorrentSession::getOptions()
void TorrentSession::terminateSession()
{
qDebug() << "Terminate called";
void TorrentSession::terminateSession()
{
qDebug() << "Terminate called";
+ // Emiting terminate() here causes the server application to quit in main()
emit terminate();
}
emit terminate();
}