OSDN Git Service

QmlProfilerTool: Print warning about failing connect ervery 5 seconds
authorKai Koehne <kai.koehne@nokia.com>
Wed, 24 Aug 2011 12:37:25 +0000 (14:37 +0200)
committerKai Koehne <kai.koehne@nokia.com>
Wed, 24 Aug 2011 14:10:09 +0000 (16:10 +0200)
Before it was every second after 10 seconds.

Change-Id: Ied0a19ab620fdfd42ab565bbb49da685f862b079
Reviewed-on: http://codereview.qt.nokia.com/3498
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
src/tools/qmlprofiler/qmlprofilerapplication.cpp

index ab1e035..75ee0da 100644 (file)
@@ -248,7 +248,7 @@ void QmlProfilerApplication::tryToConnect()
     Q_ASSERT(!m_connection.isConnected());
     ++ m_connectionAttempts;
 
-    if (m_connectionAttempts > 10) {// 10 seconds
+    if (!m_verbose && !(m_connectionAttempts % 5)) {// print every 5 seconds
         if (!m_verbose)
             logError(QString("Could not connect to %1:%2 for %3 seconds ...").arg(
                          m_hostName, QString::number(m_port), QString::number(m_connectionAttempts)));