Showstopper bug in KGet?

Tobias Koenig tokoe at kde.org
Mon Aug 9 17:37:06 BST 2004


On Mon, Aug 09, 2004 at 06:23:20PM +0200, Tobias König wrote:
> ... and here is the patch ;)
and the following patch fixes the crash and should load/store the values
correctly.

Ok for commit?

Ciao,
Tobias
-- 
Separate politics from religion and economy!
-------------- next part --------------
Index: transfer.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kget/transfer.cpp,v
retrieving revision 1.57
diff -p -u -b -r1.57 transfer.cpp
--- transfer.cpp	28 Apr 2004 19:23:13 -0000	1.57
+++ transfer.cpp	9 Aug 2004 16:35:22 -0000
@@ -754,8 +754,8 @@ bool Transfer::read(KSimpleConfig * conf
     status = (TransferStatus) config->readNumEntry("Status", ST_RUNNING);
     startTime = config->readDateTimeEntry("ScheduledTime");
     canResume = config->readBoolEntry("CanResume", true);
-    totalSize = config->readNumEntry("TotalSize", 0);
-    processedSize = config->readNumEntry("ProcessedSize", 0);
+    totalSize = config->readUnsignedNum64Entry("TotalSize", 0);
+    processedSize = config->readUnsignedNum64Entry("ProcessedSize", 0);
 
     if (status != ST_FINISHED && totalSize != 0) {
         //TODO insert additional check
@@ -781,8 +781,8 @@ void Transfer::write(KSimpleConfig * con
     config->writeEntry("Mode", mode);
     config->writeEntry("Status", status);
     config->writeEntry("CanResume", canResume);
-    config->writeEntry("TotalSize", ( QVariant & )totalSize);
-    config->writeEntry("ProcessedSize", processedSize);
+    config->writeEntry("TotalSize", (Q_UINT64)totalSize );
+    config->writeEntry("ProcessedSize", (Q_UINT64)processedSize );
     config->writeEntry("ScheduledTime", startTime);
     sDebugOut << endl;
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040809/e9e3c913/attachment.sig>


More information about the kde-core-devel mailing list