Signal / slot fixes

This commit is contained in:
Christophe Dumez
2010-11-24 20:31:14 +00:00
parent 2f337f9191
commit 19db0d471f
14 changed files with 71 additions and 70 deletions

View File

@@ -365,7 +365,7 @@ QVariantMap EventManager::getPropGeneralInfo(QString hash) const {
return data;
}
void EventManager::addedTorrent(QTorrentHandle& h)
void EventManager::addedTorrent(const QTorrentHandle& h)
{
modifiedTorrent(h);
}
@@ -375,7 +375,7 @@ void EventManager::deletedTorrent(QString hash)
event_list.remove(hash);
}
void EventManager::modifiedTorrent(QTorrentHandle h)
void EventManager::modifiedTorrent(const QTorrentHandle& h)
{
QString hash = h.hash();
QVariantMap event;

View File

@@ -57,9 +57,9 @@ public:
void setGlobalPreferences(QVariantMap m) const;
public slots:
void addedTorrent(QTorrentHandle& h);
void addedTorrent(const QTorrentHandle& h);
void deletedTorrent(QString hash);
void modifiedTorrent(QTorrentHandle h);
void modifiedTorrent(const QTorrentHandle& h);
};
#endif

View File

@@ -97,7 +97,7 @@ HttpServer::HttpServer(int msec, QObject* parent) : QTcpServer(parent) {
manager->addedTorrent(h);
}
//connect QBtSession::instance() to manager
connect(QBtSession::instance(), SIGNAL(addedTorrent(QTorrentHandle&)), manager, SLOT(addedTorrent(QTorrentHandle&)));
connect(QBtSession::instance(), SIGNAL(addedTorrent(QTorrentHandle)), manager, SLOT(addedTorrent(QTorrentHandle)));
connect(QBtSession::instance(), SIGNAL(deletedTorrent(QString)), manager, SLOT(deletedTorrent(QString)));
//set timer
timer = new QTimer(this);