From b723c98d18c4fdec1654ea283e5bfd9ea44dc701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6fman?= Date: Fri, 26 Nov 2010 15:26:32 +0200 Subject: Added connectedToManager() signal --- resourceqt-client/client.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'resourceqt-client/client.cpp') 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 &resList) } } +void Client::stopConnectTimerHandler() +{ + long int ms = stop_timer(); + if (ms > 0) { + outputln << "Register took " << ms << "ms" << endl; + } + +} + void Client::resourceAcquiredHandler(const QList&) { long int ms = stop_timer(); -- cgit v1.2.3