summaryrefslogtreecommitdiffstats
path: root/kmail/tests
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kmail/tests
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/tests')
-rw-r--r--kmail/tests/messagedicttests.cpp6
-rw-r--r--kmail/tests/messagedicttests.h1
-rw-r--r--kmail/tests/mimelibtests.h1
-rw-r--r--kmail/tests/signedmail.mbox6
-rw-r--r--kmail/tests/utiltests.cpp24
-rw-r--r--kmail/tests/utiltests.h3
6 files changed, 22 insertions, 19 deletions
diff --git a/kmail/tests/messagedicttests.cpp b/kmail/tests/messagedicttests.cpp
index e6b4b899b..e11bc3915 100644
--- a/kmail/tests/messagedicttests.cpp
+++ b/kmail/tests/messagedicttests.cpp
@@ -42,7 +42,7 @@ void MessageDictTester::testKMDictInsert()
p("Insert: ");
KMDictItem *item = new KMDictItem();
m_dict->insert( 12345, item );
- KMDictItem *found = m_dict->find( 12345 );
+ KMDictItem *found = m_dict->tqfind( 12345 );
CHECK( item, found);
}
@@ -50,7 +50,7 @@ void MessageDictTester::testKMDictRemove()
{
p("Remove: ");
m_dict->remove( 12345 );
- KMDictItem *item = m_dict->find( 12345 );
+ KMDictItem *item = m_dict->tqfind( 12345 );
CHECK( item, (KMDictItem*)0 );
}
@@ -71,7 +71,7 @@ void MessageDictTester::testKMDictReplace()
KMDictItem *newItem = new KMDictItem();
m_dict->insert( 12345, oldItem );
m_dict->tqreplace( 12345, newItem );
- KMDictItem *found = m_dict->find( 12345 );
+ KMDictItem *found = m_dict->tqfind( 12345 );
CHECK( found, newItem );
}
diff --git a/kmail/tests/messagedicttests.h b/kmail/tests/messagedicttests.h
index 81385efff..52a09cc62 100644
--- a/kmail/tests/messagedicttests.h
+++ b/kmail/tests/messagedicttests.h
@@ -14,6 +14,7 @@ class KMDict;
class MessageDictTester : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public slots:
void setUp();
diff --git a/kmail/tests/mimelibtests.h b/kmail/tests/mimelibtests.h
index e12bc15f6..ef9a4b966 100644
--- a/kmail/tests/mimelibtests.h
+++ b/kmail/tests/mimelibtests.h
@@ -26,6 +26,7 @@ class DwString;
class MimeLibTester : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public slots:
void setUp();
diff --git a/kmail/tests/signedmail.mbox b/kmail/tests/signedmail.mbox
index 1df5f3eed..5d1a286ab 100644
--- a/kmail/tests/signedmail.mbox
+++ b/kmail/tests/signedmail.mbox
@@ -31,7 +31,7 @@ Content-Type: multipart/signed;
Message-Id: <20070403084156.C961269606@smtp4-g19.free.fr>
To: undisclosed-recipients:;
X-Virus-Scanned: by amavisd-new at kdab.net
-X-Spam-Status: Yes, score=7.598 tagged_above=3 required=6.3
+X-Spam-tqStatus: Yes, score=7.598 tagged_above=3 required=6.3
tests=[BAYES_50=0.001, DATE_IN_PAST_96_XX=2.02, DNS_FROM_AHBL_RHSBL=0.231,
DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_DSN=2.597, DNS_FROM_RFC_POST=1.708,
UNDISC_RECIPS=0.841]
@@ -41,8 +41,8 @@ X-Spam-Flag: YES
X-Kolab-Scheduling-Message: FALSE
X-UID: 68768
X-Length: 3235
-Status: RO
-X-Status: RPT
+tqStatus: RO
+X-tqStatus: RPT
X-KMail-EncryptionState:
X-KMail-SignatureState:
X-KMail-MDN-Sent:
diff --git a/kmail/tests/utiltests.cpp b/kmail/tests/utiltests.cpp
index 195758b87..ec6c13543 100644
--- a/kmail/tests/utiltests.cpp
+++ b/kmail/tests/utiltests.cpp
@@ -49,7 +49,7 @@ void UtilTester::test_lf2crlf()
COMPARE( KMail::Util::lf2crlf( TQCString("") ), TQCString("") );
// TQByteArray version
- TQByteArray arr; KMail::Util::setFromQCString( arr, src );
+ TQByteArray arr; KMail::Util::setFromTQCString( arr, src );
COMPARE( arr[arr.size()-1], '\r' );
TQByteArray arrConv = KMail::Util::lf2crlf( arr );
COMPARE( arrConv[arrConv.size()-1], '\r' );
@@ -81,14 +81,14 @@ void UtilTester::test_append()
TQCString test;
TQCString str = "foo";
COMPARE( (int)str.size(), 4 ); // trailing nul included
- TQByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str );
+ TQByteArray s1 = KMail::Util::byteArrayFromTQCStringNoDetach( str );
COMPARE( (int)s1.size(), 3 );
COMPARE( (int)str.size(), 3 ); // trailing nul got removed
COMPARE( s1.data(), str.data() ); // yes, no detach
COMPARE( s1[2], 'o' );
TQCString bar( "bar" );
- TQByteArray s2 = KMail::Util::byteArrayFromQCStringNoDetach( bar );
+ TQByteArray s2 = KMail::Util::byteArrayFromTQCStringNoDetach( bar );
COMPARE( (int)s2.size(), 3 );
KMail::Util::append( s1, s2 );
@@ -123,7 +123,7 @@ void UtilTester::test_insert()
TQCString str = "foo";
COMPARE( (int)str.size(), 4 ); // trailing nul included
TQByteArray s1;
- KMail::Util::setFromQCString( s1, str );
+ KMail::Util::setFromTQCString( s1, str );
KMail::Util::insert( s1, 1, "bar" );
COMPARE( (int)s1.size(), 6 );
@@ -140,7 +140,7 @@ void UtilTester::test_insert()
void UtilTester::test_DwStringConversions( const TQCString& cstr )
{
- // QCString->DwString->QCString
+ // TQCString->DwString->TQCString
COMPARE( (int)cstr.size(), 8 );
DwString dwstr = KMail::Util::dwString( cstr );
COMPARE( (int)dwstr.size(), 7 );
@@ -150,16 +150,16 @@ void UtilTester::test_DwStringConversions( const TQCString& cstr )
COMPARE( cstr2, cstr );
COMPARE( cstr2[6], 'r' );
- // And also QCString->QByteArray
+ // And also TQCString->TQByteArray
TQByteArray arr;
- KMail::Util::setFromQCString( arr, cstr );
+ KMail::Util::setFromTQCString( arr, cstr );
COMPARE( (int)arr.size(), 7 );
COMPARE( arr[6], 'r' );
- KMail::Util::setFromQCString( arr, TQCString() );
+ KMail::Util::setFromTQCString( arr, TQCString() );
COMPARE( (int)arr.size(), 0 );
- // DwString->QByteArray
+ // DwString->TQByteArray
TQByteArray ba = KMail::Util::ByteArray( dwstr );
COMPARE( (int)ba.size(), 7 );
COMPARE( ba[6], 'r' );
@@ -186,17 +186,17 @@ void UtilTester::test_DwStringConversions()
VERIFY( dwstr.empty() );
}
-void UtilTester::test_QByteArrayQCString()
+void UtilTester::test_TQByteArrayTQCString()
{
TQCString str = "foobar";
COMPARE( (int)str.size(), 7 ); // trailing nul included
- TQByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str );
+ TQByteArray s1 = KMail::Util::byteArrayFromTQCStringNoDetach( str );
COMPARE( (int)str.size(), 6 ); // trailing nul got removed
COMPARE( s1.data(), str.data() ); // yes, no detach
COMPARE( s1[5], 'r' );
COMPARE( str[5], 'r' );
- KMail::Util::restoreQCString( str );
+ KMail::Util::restoreTQCString( str );
COMPARE( (int)str.size(), 7 ); // trailing nul included
COMPARE( str[5], 'r' );
COMPARE( str[6], '\0' );
diff --git a/kmail/tests/utiltests.h b/kmail/tests/utiltests.h
index 2270cbcfd..cb6c225a9 100644
--- a/kmail/tests/utiltests.h
+++ b/kmail/tests/utiltests.h
@@ -12,6 +12,7 @@
class UtilTester : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public slots:
void setUp();
@@ -22,7 +23,7 @@ public slots:
void test_append();
void test_insert();
void test_DwStringConversions();
- void test_QByteArrayQCString();
+ void test_TQByteArrayTQCString();
private:
void test_DwStringConversions( const TQCString& cstr );
};