diff --git a/kdecore/tests/kmountpointtest.cpp b/kdecore/tests/kmountpointtest.cpp index ac0d12fe..0d87b54b 100644 --- a/kdecore/tests/kmountpointtest.cpp +++ b/kdecore/tests/kmountpointtest.cpp @@ -43,7 +43,7 @@ void KMountPointTest::testCurrentMountPoints() foreach(KMountPoint::Ptr mountPoint, mountPoints) { kDebug() << "Mount: " << mountPoint->mountedFrom() << " (" << mountPoint->realDeviceName() << ") " - << mountPoint->mountPoint() << " " << mountPoint->mountType() << endl; + << mountPoint->mountPoint() << " " << mountPoint->mountType(); QVERIFY(!mountPoint->mountedFrom().isEmpty()); QVERIFY(!mountPoint->mountPoint().isEmpty()); QVERIFY(!mountPoint->mountType().isEmpty()); @@ -104,7 +104,7 @@ void KMountPointTest::testPossibleMountPoints() kDebug() << "Possible mount: " << mountPoint->mountedFrom() << " (" << mountPoint->realDeviceName() << ") " << mountPoint->mountPoint() << " " << mountPoint->mountType() - << " options:" << mountPoint->mountOptions() << endl; + << " options:" << mountPoint->mountOptions(); QVERIFY(!mountPoint->mountedFrom().isEmpty()); QVERIFY(!mountPoint->mountPoint().isEmpty()); QVERIFY(!mountPoint->mountType().isEmpty()); diff --git a/kdeui/sonnet/tests/backgroundtest.cpp b/kdeui/sonnet/tests/backgroundtest.cpp index ef4a49bf..7381a04e 100644 --- a/kdeui/sonnet/tests/backgroundtest.cpp +++ b/kdeui/sonnet/tests/backgroundtest.cpp @@ -147,7 +147,7 @@ BackgroundTest::BackgroundTest() void BackgroundTest::slotDone() { kDebug()<<"Text of length "<setColors(list); if (mCustom->colors() != list) - kError() << "Custom combo: setColors() != colors()" << endl; + kError() << "Custom combo: setColors() != colors()"; mCustom->setColors(QList()); if (mCustom->colors() != standardList) - kError() << "Custom combo: setColors(empty) != standard colors" << endl; + kError() << "Custom combo: setColors(empty) != standard colors"; mCustom->setColors(list); if (mCustom->colors() != list) - kError() << "Custom combo: setColors() != colors()" << endl; + kError() << "Custom combo: setColors() != colors()"; if (mStandard->colors() != standardList) - kError() << "Standard combo: colors()" << endl; + kError() << "Standard combo: colors()"; QColor col = QColor(1,2,3); mStandard->setColor(col); if (mStandard->color() != col) - kError() << "Standard combo: set custom color -> " << mStandard->color().red() << "," << mStandard->color().green() << "," << mStandard->color().blue() << endl; + kError() << "Standard combo: set custom color -> " << mStandard->color().red() << "," << mStandard->color().green() << "," << mStandard->color().blue(); if (!mStandard->isCustomColor()) - kError() << "Standard combo: custom color: isCustomColor() -> false" << endl; + kError() << "Standard combo: custom color: isCustomColor() -> false"; mStandard->setColor(Qt::green); if (mStandard->color() != Qt::green) - kError() << "Standard combo: color() -> " << mStandard->color().red() << "," << mStandard->color().green() << "," << mStandard->color().blue() << endl; + kError() << "Standard combo: color() -> " << mStandard->color().red() << "," << mStandard->color().green() << "," << mStandard->color().blue(); if (mStandard->isCustomColor()) - kError() << "Standard combo: standard color: isCustomColor() -> true" << endl; + kError() << "Standard combo: standard color: isCustomColor() -> true"; col = QColor(1,2,3); mCustom->setColor(col); if (mCustom->color() != col) - kError() << "Custom combo: set custom color -> " << mCustom->color().red() << "," << mCustom->color().green() << "," << mCustom->color().blue() << endl; + kError() << "Custom combo: set custom color -> " << mCustom->color().red() << "," << mCustom->color().green() << "," << mCustom->color().blue(); if (!mCustom->isCustomColor()) - kError() << "Custom combo: custom color: isCustomColor() -> false" << endl; + kError() << "Custom combo: custom color: isCustomColor() -> false"; col = QColor(0,192,0); mCustom->setColor(col); if (mCustom->color() != col) - kError() << "Custom combo: color() -> " << mCustom->color().red() << "," << mCustom->color().green() << "," << mCustom->color().blue() << endl; + kError() << "Custom combo: color() -> " << mCustom->color().red() << "," << mCustom->color().green() << "," << mCustom->color().blue(); if (mCustom->isCustomColor()) - kError() << "Custom combo: standard color: isCustomColor() -> true" << endl; + kError() << "Custom combo: standard color: isCustomColor() -> true"; } diff --git a/kdeui/tests/kreplacetest.cpp b/kdeui/tests/kreplacetest.cpp index 38dd6663..2de4f7c3 100644 --- a/kdeui/tests/kreplacetest.cpp +++ b/kdeui/tests/kreplacetest.cpp @@ -79,8 +79,7 @@ void KReplaceTest::replace( const QString &pattern, const QString &replacement, void KReplaceTest::slotHighlight( const QString &str, int matchingIndex, int matchedLength ) { kDebug() << "slotHighlight Index:" << matchingIndex << " Length:" << matchedLength - << " Substr:" << str.mid(matchingIndex, matchedLength) - << endl; + << " Substr:" << str.mid(matchingIndex, matchedLength); // Emulate the user saying yes // We need Qt::QueuedConnection (and the enterloop/exitloop) // otherwise we get an infinite loop (Match never returned, @@ -160,7 +159,7 @@ static void testReplaceSimple( int options, int button = 0 ) QStringList textLines = test.textLines(); assert( textLines.count() == 1 ); if ( textLines[ 0 ] != "HELLOHELLO" ) { - kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'HELLOHELLO'" << endl; + kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'HELLOHELLO'"; exit(1); } } @@ -175,7 +174,7 @@ static void testReplaceBlank( int options, int button = 0 ) QStringList textLines = test.textLines(); assert( textLines.count() == 1 ); if ( !textLines[ 0 ].isEmpty() ) { - kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of ''" << endl; + kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of ''"; exit(1); } } @@ -190,7 +189,7 @@ static void testReplaceBlankSearch( int options, int button = 0 ) QStringList textLines = test.textLines(); assert( textLines.count() == 1 ); if ( textLines[ 0 ] != "foobfoobfoobfoobfoo" ) { - kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'foobfoobfoobfoobfoo'" << endl; + kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'foobfoobfoobfoobfoo'"; exit(1); } } @@ -204,7 +203,7 @@ static void testReplaceLonger( int options, int button = 0 ) QStringList textLines = test.textLines(); assert( textLines.count() == 1 ); if ( textLines[ 0 ] != "bbbbbbbb" ) { - kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'bbbbbbbb'" << endl; + kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'bbbbbbbb'"; exit(1); } } @@ -218,7 +217,7 @@ static void testReplaceLongerInclude( int options, int button = 0 ) QStringList textLines = test.textLines(); assert( textLines.count() == 1 ); if ( textLines[ 0 ] != "a foobar b" ) { - kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'a foobar b'" << endl; + kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'a foobar b'"; exit(1); } } @@ -232,7 +231,7 @@ static void testReplaceLongerInclude2( int options, int button = 0 ) QStringList textLines = test.textLines(); assert( textLines.count() == 1 ); if ( textLines[ 0 ] != "aaaaaaaa" ) { - kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'aaaaaaaa'" << endl; + kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'aaaaaaaa'"; exit(1); } } @@ -246,7 +245,7 @@ static void testReplaceBackRef( int options, int button = 0 ) assert( textLines.count() == 1 ); QString expected = options & KReplaceDialog::BackReference ? "(abc) def" : "(\\0) def"; if ( textLines[ 0 ] != expected ) { - kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of '"<< expected << "'" << endl; + kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of '"<< expected << "'"; exit(1); } } @@ -260,7 +259,7 @@ static void testReplaceBackRef1( int options, int button = 0 ) assert( textLines.count() == 1 ); QString expected = "a and 1 in (a1) b and 2 in (b2) a and 3 in (a3)"; if ( textLines[ 0 ] != expected ) { - kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of '"<< expected << "'" << endl; + kError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of '"<< expected << "'"; exit(1); } } diff --git a/kio/tests/kionetrctest.cpp b/kio/tests/kionetrctest.cpp index 0703cdc7..01332973 100644 --- a/kio/tests/kionetrctest.cpp +++ b/kio/tests/kionetrctest.cpp @@ -17,20 +17,20 @@ void output( const KUrl& u ) "read from them! Please make sure either or both " "of the above files exist and have the correct " "permission, i.e. a regular file owned by you with " - "with a read/write permission (0600)" << endl; + "with a read/write permission (0600)"; return; } - kDebug() << "Type: " << l.type << endl - << "Machine: " << l.machine << endl - << "Login: " << l.login << endl - << "Password: " << l.password << endl; + kDebug() << "Type: " << l.type << '\n' + << "Machine: " << l.machine << '\n' + << "Login: " << l.login << '\n' + << "Password: " << l.password; QMap::ConstIterator it = l.macdef.constBegin(); for ( ; it != l.macdef.constEnd(); ++it ) { kDebug() << "Macro: " << it.key() << "= " - << it.value().join(" ") << endl; + << it.value().join(" "); } } diff --git a/kio/tests/kurlcompletiontest.cpp b/kio/tests/kurlcompletiontest.cpp index c732afcc..6085845c 100644 --- a/kio/tests/kurlcompletiontest.cpp +++ b/kio/tests/kurlcompletiontest.cpp @@ -115,7 +115,7 @@ void KUrlCompletionTest::testLocalRelativePath() assert( comp1 == "file1" ); // Completion from relative path - kDebug() << endl << "now completing on 'file#'"; + kDebug() << "now completing on 'file#'"; m_completion->makeCompletion( "file#" ); waitForCompletion(); QStringList compall = m_completion->allMatches(); @@ -126,7 +126,7 @@ void KUrlCompletionTest::testLocalRelativePath() assert( comp2 == "file#a" ); // Completion with empty string - kDebug () << endl << "now completing on ''"; + kDebug () << "now completing on ''"; m_completion->makeCompletion( "" ); waitForCompletion(); QStringList compEmpty = m_completion->allMatches(); @@ -188,7 +188,7 @@ void KUrlCompletionTest::testEmptyCwd() { kDebug() ; // Completion with empty string (with a KUrlCompletion whose cwd is "") - kDebug () << endl << "now completing on '' with empty cwd"; + kDebug () << "now completing on '' with empty cwd"; m_completionEmptyCwd->makeCompletion( "" ); waitForCompletion(); QStringList compEmpty = m_completionEmptyCwd->allMatches(); diff --git a/kio/tests/netaccesstest.cpp b/kio/tests/netaccesstest.cpp index 7839e33d..f7e98fcf 100644 --- a/kio/tests/netaccesstest.cpp +++ b/kio/tests/netaccesstest.cpp @@ -35,7 +35,7 @@ int main(int argc, char **argv) kDebug() << "file_copy"; KIO::Job* job = KIO::file_copy(srcURL, tmpURL, -1, KIO::Overwrite); if ( !KIO::NetAccess::synchronousRun(job, 0) ) - kError() << "file_copy failed: " << KIO::NetAccess::lastErrorString() << endl; + kError() << "file_copy failed: " << KIO::NetAccess::lastErrorString(); else { QFile f( tmpURL.path() ); if (!f.open(QIODevice::ReadOnly))