diff options
author | Axel Waggershauser <awagger@gmail.com> | 2013-03-15 00:42:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-16 20:22:50 +0100 |
commit | b11317a64339f5a4bcffc8234ecaf15c7fb416f2 (patch) | |
tree | f81e40ee49f5109b4100048d131d5bb922b448aa /tests/auto/network/bearer | |
parent | 72367a94a750355eb748793ce8c365373a332c9c (diff) |
Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.
Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp
Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.
Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tests/auto/network/bearer')
3 files changed, 36 insertions, 36 deletions
diff --git a/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp b/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp index a38b5f5338..f4cbfbe8f2 100644 --- a/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp +++ b/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp @@ -96,7 +96,7 @@ void tst_QNetworkConfiguration::invalidPoint() void tst_QNetworkConfiguration::comparison() { //test copy constructor and assignment operator - //compare invalid connection points + //compare invalid connection points QNetworkConfiguration pt1; QVERIFY(!pt1.isValid()); QVERIFY(pt1.type() == QNetworkConfiguration::Invalid); @@ -110,7 +110,7 @@ void tst_QNetworkConfiguration::comparison() QVERIFY(pt1.state() == pt2.state()); QVERIFY(pt1.purpose() == pt2.purpose()); - + QNetworkConfiguration pt3; pt3 = pt1; QVERIFY(pt1==pt3); @@ -170,12 +170,12 @@ void tst_QNetworkConfiguration::isRoamingAvailable() { QNetworkConfigurationManager manager; QList<QNetworkConfiguration> configs = manager.allConfigurations(); - + //force update to get maximum list QSignalSpy spy(&manager, SIGNAL(updateCompleted())); manager.updateConfigurations(); //initiate scans QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete - + foreach(QNetworkConfiguration c, configs) { QVERIFY(QNetworkConfiguration::UserChoice != c.type()); diff --git a/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp b/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp index 835b9aecfb..18aba51fe6 100644 --- a/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp +++ b/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp @@ -64,7 +64,7 @@ private slots: #ifndef QT_NO_BEARERMANAGEMENT void printConfigurationDetails(const QNetworkConfiguration& p) { - qDebug() << p.name() <<": isvalid->" <<p.isValid() << " type->"<< p.type() << + qDebug() << p.name() <<": isvalid->" <<p.isValid() << " type->"<< p.type() << " roaming->" << p.isRoamingAvailable() << "identifier->" << p.identifier() << " purpose->" << p.purpose() << " state->" << p.state(); } @@ -189,7 +189,7 @@ void tst_QNetworkConfigurationManager::configurationFromIdentifier() QSignalSpy spy(&manager, SIGNAL(updateCompleted())); manager.updateConfigurations(); //initiate scans QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut); //wait for scan to complete - + QList<QNetworkConfiguration> configs = manager.allConfigurations(); foreach(QNetworkConfiguration c, configs) { diff --git a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp index 529f45f001..5dede11e5b 100644 --- a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp +++ b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp @@ -139,7 +139,7 @@ void tst_QNetworkSession::cleanupTestCase() } // Robustness test for calling interfaces in nonsense order / with nonsense parameters -void tst_QNetworkSession::robustnessBombing() +void tst_QNetworkSession::robustnessBombing() { QNetworkConfigurationManager mgr; QNetworkSession testSession(mgr.defaultConfiguration()); @@ -199,18 +199,18 @@ void tst_QNetworkSession::invalidSession() QVERIFY(!session.isOpen()); QVERIFY(session.state() == QNetworkSession::Invalid); QVERIFY(session.error() == QNetworkSession::InvalidConfigurationError); - + // 2. Verify that opening session with invalid configuration both 1) emits invalidconfigurationerror and 2) sets session's state as invalid. QSignalSpy errorSpy(&session, SIGNAL(error(QNetworkSession::SessionError))); session.open(); session.waitForOpened(1000); // Should bail out right away - QVERIFY(errorSpy.count() == 1); + QVERIFY(errorSpy.count() == 1); QNetworkSession::SessionError error = qvariant_cast<QNetworkSession::SessionError> (errorSpy.first().at(0)); QVERIFY(error == QNetworkSession::InvalidConfigurationError); QVERIFY(session.error() == QNetworkSession::InvalidConfigurationError); QVERIFY(session.state() == QNetworkSession::Invalid); - + #ifdef QNETWORKSESSION_MANUAL_TESTS QNetworkConfiguration invalidatedConfig = suitableConfiguration("WLAN",QNetworkConfiguration::InternetAccessPoint); @@ -354,7 +354,7 @@ void tst_QNetworkSession::repeatedOpenClose() QNetworkSession permanentSession(config); if (!openSession(&permanentSession) || !closeSession(&permanentSession)) QSKIP("Unable to open/close session, skipping this round of repeated open-close test."); - for (int i = 0; i < repeatTimes; i++) { + for (int i = 0; i < repeatTimes; i++) { qDebug() << "Opening, loop number " << i; QVERIFY(openSession(&permanentSession)); qDebug() << "Closing, loop number, then waiting 5 seconds: " << i; @@ -469,7 +469,7 @@ void tst_QNetworkSession::userChoiceSession() QVERIFY(activeConfiguration.isValid()); QVERIFY(activeConfiguration.type() == QNetworkConfiguration::InternetAccessPoint); - + //resetting ActiveConfiguration is ignored (read only property) session.setSessionProperty("ActiveConfiguration", testIdentifier); QVERIFY(session.sessionProperty("ActiveConfiguration").toString() != testIdentifier); @@ -612,7 +612,7 @@ void tst_QNetworkSession::sessionOpenCloseStop() QVERIFY(session.error() == QNetworkSession::UnknownSessionError); session2.open(); - + QTRY_VERIFY_WITH_TIMEOUT(!sessionOpenedSpy2.isEmpty() || !errorSpy2.isEmpty(), TestTimeOut); if (errorSpy2.isEmpty()) { @@ -666,10 +666,10 @@ void tst_QNetworkSession::sessionOpenCloseStop() QVERIFY(errorSpy.isEmpty()); QVERIFY(errorSpy2.isEmpty()); - - // Wait for Disconnected state + + // Wait for Disconnected state QTRY_NOOP(session2.state() == QNetworkSession::Disconnected); - + if (expectStateChange) QTRY_VERIFY_WITH_TIMEOUT(stateChangedSpy2.count() >= 1 || !errorSpy2.isEmpty(), TestTimeOut); @@ -722,14 +722,14 @@ void tst_QNetworkSession::sessionOpenCloseStop() } else { QFAIL("Unexpected amount of state changes when roaming."); } - + QTRY_VERIFY_WITH_TIMEOUT(session.state() == QNetworkSession::Roaming || session.state() == QNetworkSession::Connected || session.state() == QNetworkSession::Disconnected, TestTimeOut); - + QTRY_VERIFY_WITH_TIMEOUT(stateChangedSpy.count() > 0, TestTimeOut); - state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 1).at(0)); - + state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 1).at(0)); + for (int i = 0; i < stateChangedSpy.count(); i++) { QNetworkSession::State state_temp = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(i).at(0)); @@ -753,7 +753,7 @@ void tst_QNetworkSession::sessionOpenCloseStop() QTRY_VERIFY_WITH_TIMEOUT(errorSpy.isEmpty(),TestTimeOut); if (stateChangedSpy.count() > 1) { - state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 2).at(0)); + state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 2).at(0)); QVERIFY(state == QNetworkSession::Roaming); } roamedSuccessfully = true; @@ -778,7 +778,7 @@ void tst_QNetworkSession::sessionOpenCloseStop() QVERIFY(!errorSpy.isEmpty()); } else { QTest::qWait(2000); // Wait awhile to get all signals from platform - + if (stateChangedSpy2.count() == 2) { QNetworkSession::State state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(0).at(0)); @@ -797,7 +797,7 @@ void tst_QNetworkSession::sessionOpenCloseStop() QNetworkSession::State state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(stateChangedSpy2.count() - 1).at(0)); - QVERIFY(state == QNetworkSession::Disconnected); + QVERIFY(state == QNetworkSession::Disconnected); } } @@ -920,7 +920,7 @@ void tst_QNetworkSession::outOfProcessSession() // Cannot read/write to processes on WinCE. // Easiest alternative is to use sockets for IPC. QLocalServer oopServer; - // First remove possible earlier listening address which would cause listen to fail + // First remove possible earlier listening address which would cause listen to fail // (e.g. previously abruptly ended unit test might cause this) QLocalServer::removeServer("tst_qnetworksession"); oopServer.listen("tst_qnetworksession"); @@ -1034,7 +1034,7 @@ QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfigur // qDebug() << "Dumping config because bearer mismatches (cellular): " << config.name(); discoveredConfigs.removeOne(config); } - } else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) && + } else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) && bearerType != config.bearerTypeName()) { // qDebug() << "Dumping config because bearer mismatches (WLAN): " << config.name(); discoveredConfigs.removeOne(config); @@ -1109,12 +1109,12 @@ bool openSession(QNetworkSession *session) { qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::error() - signal was detected."); result = false; } - if (sessionInitState != QNetworkSession::Connected && + if (sessionInitState != QNetworkSession::Connected && stateChangeSpy.isEmpty()) { qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::stateChanged() - signals not detected."); result = false; } - if (configInitState != QNetworkConfiguration::Active && + if (configInitState != QNetworkConfiguration::Active && configChangeSpy.isEmpty()) { qDebug("tst_QNetworkSession::openSession() failure: QNetworkConfigurationManager::configurationChanged() - signals not detected."); result = false; @@ -1132,7 +1132,7 @@ bool openSession(QNetworkSession *session) { qDebug() << "tst_QNetworkSession::openSession() name of the configuration is: " << session->configuration().name(); qDebug() << "tst_QNetworkSession::openSession() configuration state is: " << session->configuration().state(); qDebug() << "tst_QNetworkSession::openSession() session state is: " << session->state(); - + return result; } @@ -1146,26 +1146,26 @@ bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) { qDebug("tst_QNetworkSession::closeSession() failure: NULL session given"); return false; } - + qDebug() << "tst_QNetworkSession::closeSession() name of the configuration to be closed: " << session->configuration().name(); qDebug() << "tst_QNetworkSession::closeSession() state of the configuration to be closed: " << session->configuration().state(); qDebug() << "tst_QNetworkSession::closeSession() state of the session to be closed: " << session->state(); - - if (session->state() != QNetworkSession::Connected || + + if (session->state() != QNetworkSession::Connected || !session->isOpen()) { qDebug("tst_QNetworkSession::closeSession() failure: session is not opened."); return false; - } + } QNetworkConfigurationManager mgr; QSignalSpy sessionClosedSpy(session, SIGNAL(closed())); QSignalSpy sessionStateChangedSpy(session, SIGNAL(stateChanged(QNetworkSession::State))); QSignalSpy sessionErrorSpy(session, SIGNAL(error(QNetworkSession::SessionError))); QSignalSpy configChangeSpy(&mgr, SIGNAL(configurationChanged(QNetworkConfiguration))); - + bool result = true; session->close(); QTest::qWait(5000); // Wait a moment so that all signals are propagated - + if (!sessionErrorSpy.isEmpty()) { qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::error() received."); result = false; @@ -1174,7 +1174,7 @@ bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) { qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::closed() signal not received."); result = false; } - if (lastSessionOnConfiguration && + if (lastSessionOnConfiguration && sessionStateChangedSpy.isEmpty()) { qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::stateChanged() signals not received."); result = false; @@ -1199,7 +1199,7 @@ bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) { qDebug() << "tst_QNetworkSession::closeSession() closing session failed."; } else { qDebug() << "tst_QNetworkSession::closeSession() closing session succeeded."; - } + } qDebug() << "tst_QNetworkSession::closeSession() name of the configuration is: " << session->configuration().name(); qDebug() << "tst_QNetworkSession::closeSession() configuration state is: " << session->configuration().state(); qDebug() << "tst_QNetworkSession::closeSession() session state is: " << session->state(); |