summaryrefslogtreecommitdiff
path: root/resourceqt-client/client.cpp
diff options
context:
space:
mode:
authorRobert Löfman <ext-robert.lofman@nokia.com>2010-11-26 15:26:32 +0200
committerRobert Löfman <ext-robert.lofman@nokia.com>2010-11-26 15:26:32 +0200
commitb723c98d18c4fdec1654ea283e5bfd9ea44dc701 (patch)
tree8ca38ecf25311872ef1435a3ef7b325b188c468e /resourceqt-client/client.cpp
parent05f8fa1ebccab6eb55ccbd8a3921bc7016512749 (diff)
Added connectedToManager() signal
Diffstat (limited to 'resourceqt-client/client.cpp')
-rw-r--r--resourceqt-client/client.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/resourceqt-client/client.cpp b/resourceqt-client/client.cpp
index 804ac56..fe15586 100644
--- a/resourceqt-client/client.cpp
+++ b/resourceqt-client/client.cpp
@@ -129,11 +129,15 @@ bool Client::initialize(const CommandLineParser &parser)
if (!connect(&stdInNotifier, SIGNAL(activated(int)), this, SLOT(readLine(int)))) {
return false;
}
+ if (!connect(resourceSet , SIGNAL(connectedToManager()), this, SLOT(stopConnectTimerHandler()))) {
+ return false;
+ }
if (!connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()),
this, SLOT(doExit()))) {
return false;
}
+ start_timer();
resourceSet->initAndConnect();
output << "connecting...accepting input" << endl;
showPrompt();
@@ -146,6 +150,7 @@ void Client::doExit()
resourceSet->release();
}
+
const char * resourceTypeToString(ResourceType type)
{
switch (type) {
@@ -201,6 +206,15 @@ void Client::showResources(const QList<Resource*> &resList)
}
}
+void Client::stopConnectTimerHandler()
+{
+ long int ms = stop_timer();
+ if (ms > 0) {
+ outputln << "Register took " << ms << "ms" << endl;
+ }
+
+}
+
void Client::resourceAcquiredHandler(const QList<ResourceType>&)
{
long int ms = stop_timer();