generic: prepare for Katie changes

note that kDebug(), kWarning(), etc. automatically add end of line

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-11-13 00:46:32 +02:00
parent 9b41127ecb
commit 3339338121
7 changed files with 34 additions and 35 deletions

View file

@ -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());

View file

@ -147,7 +147,7 @@ BackgroundTest::BackgroundTest()
void BackgroundTest::slotDone()
{
kDebug()<<"Text of length "<<m_len<<" checked in "
<< m_timer.elapsed() << " msec."<<endl;
<< m_timer.elapsed() << " msec.";
QApplication::exit();
}

View file

@ -85,41 +85,41 @@ KColorComboTest::KColorComboTest(QWidget* widget)
<< QColor(0,0,255) << QColor(0,0,192) << QColor(0,0,128) << QColor(0,0,64);
mCustom->setColors(list);
if (mCustom->colors() != list)
kError() << "Custom combo: setColors() != colors()" << endl;
kError() << "Custom combo: setColors() != colors()";
mCustom->setColors(QList<QColor>());
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";
}

View file

@ -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);
}
}

View file

@ -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<QString,QStringList>::ConstIterator it = l.macdef.constBegin();
for ( ; it != l.macdef.constEnd(); ++it )
{
kDebug() << "Macro: " << it.key() << "= "
<< it.value().join(" ") << endl;
<< it.value().join(" ");
}
}

View file

@ -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();

View file

@ -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))