mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
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:
parent
9b41127ecb
commit
3339338121
7 changed files with 34 additions and 35 deletions
|
@ -43,7 +43,7 @@ void KMountPointTest::testCurrentMountPoints()
|
||||||
foreach(KMountPoint::Ptr mountPoint, mountPoints) {
|
foreach(KMountPoint::Ptr mountPoint, mountPoints) {
|
||||||
kDebug() << "Mount: " << mountPoint->mountedFrom()
|
kDebug() << "Mount: " << mountPoint->mountedFrom()
|
||||||
<< " (" << mountPoint->realDeviceName() << ") "
|
<< " (" << mountPoint->realDeviceName() << ") "
|
||||||
<< mountPoint->mountPoint() << " " << mountPoint->mountType() << endl;
|
<< mountPoint->mountPoint() << " " << mountPoint->mountType();
|
||||||
QVERIFY(!mountPoint->mountedFrom().isEmpty());
|
QVERIFY(!mountPoint->mountedFrom().isEmpty());
|
||||||
QVERIFY(!mountPoint->mountPoint().isEmpty());
|
QVERIFY(!mountPoint->mountPoint().isEmpty());
|
||||||
QVERIFY(!mountPoint->mountType().isEmpty());
|
QVERIFY(!mountPoint->mountType().isEmpty());
|
||||||
|
@ -104,7 +104,7 @@ void KMountPointTest::testPossibleMountPoints()
|
||||||
kDebug() << "Possible mount: " << mountPoint->mountedFrom()
|
kDebug() << "Possible mount: " << mountPoint->mountedFrom()
|
||||||
<< " (" << mountPoint->realDeviceName() << ") "
|
<< " (" << mountPoint->realDeviceName() << ") "
|
||||||
<< mountPoint->mountPoint() << " " << mountPoint->mountType()
|
<< mountPoint->mountPoint() << " " << mountPoint->mountType()
|
||||||
<< " options:" << mountPoint->mountOptions() << endl;
|
<< " options:" << mountPoint->mountOptions();
|
||||||
QVERIFY(!mountPoint->mountedFrom().isEmpty());
|
QVERIFY(!mountPoint->mountedFrom().isEmpty());
|
||||||
QVERIFY(!mountPoint->mountPoint().isEmpty());
|
QVERIFY(!mountPoint->mountPoint().isEmpty());
|
||||||
QVERIFY(!mountPoint->mountType().isEmpty());
|
QVERIFY(!mountPoint->mountType().isEmpty());
|
||||||
|
|
|
@ -147,7 +147,7 @@ BackgroundTest::BackgroundTest()
|
||||||
void BackgroundTest::slotDone()
|
void BackgroundTest::slotDone()
|
||||||
{
|
{
|
||||||
kDebug()<<"Text of length "<<m_len<<" checked in "
|
kDebug()<<"Text of length "<<m_len<<" checked in "
|
||||||
<< m_timer.elapsed() << " msec."<<endl;
|
<< m_timer.elapsed() << " msec.";
|
||||||
QApplication::exit();
|
QApplication::exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,41 +85,41 @@ KColorComboTest::KColorComboTest(QWidget* widget)
|
||||||
<< QColor(0,0,255) << QColor(0,0,192) << QColor(0,0,128) << QColor(0,0,64);
|
<< QColor(0,0,255) << QColor(0,0,192) << QColor(0,0,128) << QColor(0,0,64);
|
||||||
mCustom->setColors(list);
|
mCustom->setColors(list);
|
||||||
if (mCustom->colors() != list)
|
if (mCustom->colors() != list)
|
||||||
kError() << "Custom combo: setColors() != colors()" << endl;
|
kError() << "Custom combo: setColors() != colors()";
|
||||||
mCustom->setColors(QList<QColor>());
|
mCustom->setColors(QList<QColor>());
|
||||||
if (mCustom->colors() != standardList)
|
if (mCustom->colors() != standardList)
|
||||||
kError() << "Custom combo: setColors(empty) != standard colors" << endl;
|
kError() << "Custom combo: setColors(empty) != standard colors";
|
||||||
mCustom->setColors(list);
|
mCustom->setColors(list);
|
||||||
if (mCustom->colors() != list)
|
if (mCustom->colors() != list)
|
||||||
kError() << "Custom combo: setColors() != colors()" << endl;
|
kError() << "Custom combo: setColors() != colors()";
|
||||||
|
|
||||||
if (mStandard->colors() != standardList)
|
if (mStandard->colors() != standardList)
|
||||||
kError() << "Standard combo: colors()" << endl;
|
kError() << "Standard combo: colors()";
|
||||||
|
|
||||||
QColor col = QColor(1,2,3);
|
QColor col = QColor(1,2,3);
|
||||||
mStandard->setColor(col);
|
mStandard->setColor(col);
|
||||||
if (mStandard->color() != 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())
|
if (!mStandard->isCustomColor())
|
||||||
kError() << "Standard combo: custom color: isCustomColor() -> false" << endl;
|
kError() << "Standard combo: custom color: isCustomColor() -> false";
|
||||||
mStandard->setColor(Qt::green);
|
mStandard->setColor(Qt::green);
|
||||||
if (mStandard->color() != 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())
|
if (mStandard->isCustomColor())
|
||||||
kError() << "Standard combo: standard color: isCustomColor() -> true" << endl;
|
kError() << "Standard combo: standard color: isCustomColor() -> true";
|
||||||
|
|
||||||
col = QColor(1,2,3);
|
col = QColor(1,2,3);
|
||||||
mCustom->setColor(col);
|
mCustom->setColor(col);
|
||||||
if (mCustom->color() != 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())
|
if (!mCustom->isCustomColor())
|
||||||
kError() << "Custom combo: custom color: isCustomColor() -> false" << endl;
|
kError() << "Custom combo: custom color: isCustomColor() -> false";
|
||||||
col = QColor(0,192,0);
|
col = QColor(0,192,0);
|
||||||
mCustom->setColor(col);
|
mCustom->setColor(col);
|
||||||
if (mCustom->color() != 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())
|
if (mCustom->isCustomColor())
|
||||||
kError() << "Custom combo: standard color: isCustomColor() -> true" << endl;
|
kError() << "Custom combo: standard color: isCustomColor() -> true";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,8 +79,7 @@ void KReplaceTest::replace( const QString &pattern, const QString &replacement,
|
||||||
void KReplaceTest::slotHighlight( const QString &str, int matchingIndex, int matchedLength )
|
void KReplaceTest::slotHighlight( const QString &str, int matchingIndex, int matchedLength )
|
||||||
{
|
{
|
||||||
kDebug() << "slotHighlight Index:" << matchingIndex << " Length:" << matchedLength
|
kDebug() << "slotHighlight Index:" << matchingIndex << " Length:" << matchedLength
|
||||||
<< " Substr:" << str.mid(matchingIndex, matchedLength)
|
<< " Substr:" << str.mid(matchingIndex, matchedLength);
|
||||||
<< endl;
|
|
||||||
// Emulate the user saying yes
|
// Emulate the user saying yes
|
||||||
// We need Qt::QueuedConnection (and the enterloop/exitloop)
|
// We need Qt::QueuedConnection (and the enterloop/exitloop)
|
||||||
// otherwise we get an infinite loop (Match never returned,
|
// 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();
|
QStringList textLines = test.textLines();
|
||||||
assert( textLines.count() == 1 );
|
assert( textLines.count() == 1 );
|
||||||
if ( textLines[ 0 ] != "HELLOHELLO" ) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -175,7 +174,7 @@ static void testReplaceBlank( int options, int button = 0 )
|
||||||
QStringList textLines = test.textLines();
|
QStringList textLines = test.textLines();
|
||||||
assert( textLines.count() == 1 );
|
assert( textLines.count() == 1 );
|
||||||
if ( !textLines[ 0 ].isEmpty() ) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,7 +189,7 @@ static void testReplaceBlankSearch( int options, int button = 0 )
|
||||||
QStringList textLines = test.textLines();
|
QStringList textLines = test.textLines();
|
||||||
assert( textLines.count() == 1 );
|
assert( textLines.count() == 1 );
|
||||||
if ( textLines[ 0 ] != "foobfoobfoobfoobfoo" ) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +203,7 @@ static void testReplaceLonger( int options, int button = 0 )
|
||||||
QStringList textLines = test.textLines();
|
QStringList textLines = test.textLines();
|
||||||
assert( textLines.count() == 1 );
|
assert( textLines.count() == 1 );
|
||||||
if ( textLines[ 0 ] != "bbbbbbbb" ) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +217,7 @@ static void testReplaceLongerInclude( int options, int button = 0 )
|
||||||
QStringList textLines = test.textLines();
|
QStringList textLines = test.textLines();
|
||||||
assert( textLines.count() == 1 );
|
assert( textLines.count() == 1 );
|
||||||
if ( textLines[ 0 ] != "a foobar b" ) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -232,7 +231,7 @@ static void testReplaceLongerInclude2( int options, int button = 0 )
|
||||||
QStringList textLines = test.textLines();
|
QStringList textLines = test.textLines();
|
||||||
assert( textLines.count() == 1 );
|
assert( textLines.count() == 1 );
|
||||||
if ( textLines[ 0 ] != "aaaaaaaa" ) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,7 +245,7 @@ static void testReplaceBackRef( int options, int button = 0 )
|
||||||
assert( textLines.count() == 1 );
|
assert( textLines.count() == 1 );
|
||||||
QString expected = options & KReplaceDialog::BackReference ? "(abc) def" : "(\\0) def";
|
QString expected = options & KReplaceDialog::BackReference ? "(abc) def" : "(\\0) def";
|
||||||
if ( textLines[ 0 ] != expected ) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -260,7 +259,7 @@ static void testReplaceBackRef1( int options, int button = 0 )
|
||||||
assert( textLines.count() == 1 );
|
assert( textLines.count() == 1 );
|
||||||
QString expected = "a and 1 in (a1) b and 2 in (b2) a and 3 in (a3)";
|
QString expected = "a and 1 in (a1) b and 2 in (b2) a and 3 in (a3)";
|
||||||
if ( textLines[ 0 ] != expected ) {
|
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);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,20 +17,20 @@ void output( const KUrl& u )
|
||||||
"read from them! Please make sure either or both "
|
"read from them! Please make sure either or both "
|
||||||
"of the above files exist and have the correct "
|
"of the above files exist and have the correct "
|
||||||
"permission, i.e. a regular file owned by you with "
|
"permission, i.e. a regular file owned by you with "
|
||||||
"with a read/write permission (0600)" << endl;
|
"with a read/write permission (0600)";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kDebug() << "Type: " << l.type << endl
|
kDebug() << "Type: " << l.type << '\n'
|
||||||
<< "Machine: " << l.machine << endl
|
<< "Machine: " << l.machine << '\n'
|
||||||
<< "Login: " << l.login << endl
|
<< "Login: " << l.login << '\n'
|
||||||
<< "Password: " << l.password << endl;
|
<< "Password: " << l.password;
|
||||||
|
|
||||||
QMap<QString,QStringList>::ConstIterator it = l.macdef.constBegin();
|
QMap<QString,QStringList>::ConstIterator it = l.macdef.constBegin();
|
||||||
for ( ; it != l.macdef.constEnd(); ++it )
|
for ( ; it != l.macdef.constEnd(); ++it )
|
||||||
{
|
{
|
||||||
kDebug() << "Macro: " << it.key() << "= "
|
kDebug() << "Macro: " << it.key() << "= "
|
||||||
<< it.value().join(" ") << endl;
|
<< it.value().join(" ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ void KUrlCompletionTest::testLocalRelativePath()
|
||||||
assert( comp1 == "file1" );
|
assert( comp1 == "file1" );
|
||||||
|
|
||||||
// Completion from relative path
|
// Completion from relative path
|
||||||
kDebug() << endl << "now completing on 'file#'";
|
kDebug() << "now completing on 'file#'";
|
||||||
m_completion->makeCompletion( "file#" );
|
m_completion->makeCompletion( "file#" );
|
||||||
waitForCompletion();
|
waitForCompletion();
|
||||||
QStringList compall = m_completion->allMatches();
|
QStringList compall = m_completion->allMatches();
|
||||||
|
@ -126,7 +126,7 @@ void KUrlCompletionTest::testLocalRelativePath()
|
||||||
assert( comp2 == "file#a" );
|
assert( comp2 == "file#a" );
|
||||||
|
|
||||||
// Completion with empty string
|
// Completion with empty string
|
||||||
kDebug () << endl << "now completing on ''";
|
kDebug () << "now completing on ''";
|
||||||
m_completion->makeCompletion( "" );
|
m_completion->makeCompletion( "" );
|
||||||
waitForCompletion();
|
waitForCompletion();
|
||||||
QStringList compEmpty = m_completion->allMatches();
|
QStringList compEmpty = m_completion->allMatches();
|
||||||
|
@ -188,7 +188,7 @@ void KUrlCompletionTest::testEmptyCwd()
|
||||||
{
|
{
|
||||||
kDebug() ;
|
kDebug() ;
|
||||||
// Completion with empty string (with a KUrlCompletion whose cwd is "")
|
// 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( "" );
|
m_completionEmptyCwd->makeCompletion( "" );
|
||||||
waitForCompletion();
|
waitForCompletion();
|
||||||
QStringList compEmpty = m_completionEmptyCwd->allMatches();
|
QStringList compEmpty = m_completionEmptyCwd->allMatches();
|
||||||
|
|
|
@ -35,7 +35,7 @@ int main(int argc, char **argv)
|
||||||
kDebug() << "file_copy";
|
kDebug() << "file_copy";
|
||||||
KIO::Job* job = KIO::file_copy(srcURL, tmpURL, -1, KIO::Overwrite);
|
KIO::Job* job = KIO::file_copy(srcURL, tmpURL, -1, KIO::Overwrite);
|
||||||
if ( !KIO::NetAccess::synchronousRun(job, 0) )
|
if ( !KIO::NetAccess::synchronousRun(job, 0) )
|
||||||
kError() << "file_copy failed: " << KIO::NetAccess::lastErrorString() << endl;
|
kError() << "file_copy failed: " << KIO::NetAccess::lastErrorString();
|
||||||
else {
|
else {
|
||||||
QFile f( tmpURL.path() );
|
QFile f( tmpURL.path() );
|
||||||
if (!f.open(QIODevice::ReadOnly))
|
if (!f.open(QIODevice::ReadOnly))
|
||||||
|
|
Loading…
Add table
Reference in a new issue