[patch] KTimezone tests
Brad Hards
bradh at frogmouth.net
Sat Dec 24 10:42:24 GMT 2005
The KTimezone tests won't compile for me without the following patch. However
I confess to not understanding this code - can someone verify it is OK?
--- ktimezonestest.cpp (revision 491027)
+++ ktimezonestest.cpp (working copy)
@@ -44,8 +44,8 @@
QVERIFY((tz == zone1));
tz = timezones.zone("Zone99");
QVERIFY(!tz);
- zone1 = timezones.detach(zone1);
- QVERIFY((bool)zone1);
+ const KTimezone *zone3 = timezones.detach(zone1);
+ QVERIFY((bool)zone3);
QCOMPARE(timezones.zones().count(), 1);
QVERIFY(!timezones.detach(zone1));
QVERIFY(timezones.add(zone1));
@@ -53,7 +53,7 @@
QVERIFY(!timezones.detach("Zone1"));
QVERIFY((bool)timezones.detach("Zone2"));
zone1 = new KTimezone("Zone10");
- delete zone1;
+ delete zone3;
}
///////////////////
@@ -73,7 +73,7 @@
void KTimezonesTest::utc()
{
- KTimezone* utc = KTimezones::utc();
+ const KTimezone* utc = KTimezones::utc();
QVERIFY((bool)utc);
if (utc)
QCOMPARE(utc->name(), QString("UTC"));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051224/781f1278/attachment.sig>
More information about the kde-core-devel
mailing list