[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KGet Patch
From: Tim Edwards <tkedwards () optusnet ! com ! au>
Date: 2004-04-27 13:23:01
Message-ID: 1083072181.6573.138.camel () coolserver
[Download RAW message or body]
(It would help if I attached the patch file this time :))
Using gcc 3.3 and the KDE 3.1 Branch (on a KDE 3.1 system) I get an
error message "transfer.cpp:760: error: call of overloaded
`writeEntry(const char[10], filesize_t&)' is ambiguous" followed by a
list of KConfigBase::writeEntry prototypes. Casting to QVariant seems to
prevent this.
I've removed the cast to double, I don't know why it was in there :)
I've remade the patch file with -bup. I'll make a 3.2 and HEAD patch
once I install Mandrake 10.0 so I have a KDE 3.2 to test it on.
How's the best way of going about getting this committed? Should I try
asking the authors again or should I just ask for CVS access so I can do
it myself?
On Tue, 2004-04-27 at 05:25, Alexander Neundorf wrote:
> On Monday 26 April 2004 12:00, kde-devel-request@mail.kde.org wrote:
> > I originally sent this message to the authors:
>
> .. and you didn't get response ?
>
>
> Patch looks good, some small questions:
>
> > Hi,
> >
> > While using KGet I've noticed that when the total size of all the files
> > being downloaded is over ~2gb (i.e the highest number in bytes that a
> > 32-bit signed int can represent) it doesn't display the total size
> > correctly in the task bar.
> >
> > I've created a patch to solve this problem (see attachment). If you
> > agree with it I hope you can integrate it into the KDE CVS module for
> > KGet.
>
> What is the QVariant cast needed for ?
> Why do you convert the file size to double ?
>
> > Note: This patch was created on the KDE_3_1_BRANCH of kdenetwork/kget
> > from the KDE.org CVS.
> >
> > Thanks
> > Feel free to contact me
>
> Can you please use the options "-bup" when creating the patch ?
>
> Bye
> Alex
["kget_kde31_patch20040427" (kget_kde31_patch20040427)]
--- ../../kget/kget/transfer.cpp 2004-04-17 16:56:29.000000000 +1000
+++ transfer.cpp 2004-04-27 23:05:41.000000000 +1000
@@ -605,7 +605,7 @@ void Transfer::slotSpeed(unsigned long b
-void Transfer::slotTotalSize(unsigned long bytes)
+void Transfer::slotTotalSize(KIO::filesize_t bytes)
{
#ifdef _DEBUG
sDebugIn<<" totalSize is = "<<totalSize << endl;
@@ -614,7 +614,7 @@ void Transfer::slotTotalSize(unsigned lo
if (totalSize == 0) {
totalSize = bytes;
if (totalSize != 0) {
- logMessage(i18n("Total size is %1 bytes").arg(totalSize));
+ logMessage(i18n("Total size is %1 bytes").arg(totalSize,0,'f'));
setText(view->lv_total, KIO::convertSize(totalSize));
dlgIndividual->setTotalSize(totalSize);
dlgIndividual->setPercent(0);
@@ -639,7 +639,7 @@ void Transfer::slotTotalSize(unsigned lo
-void Transfer::slotProcessedSize(unsigned long bytes)
+void Transfer::slotProcessedSize(KIO::filesize_t bytes)
{
//sDebug<< ">>>>Entering"<<endl;
@@ -757,8 +757,8 @@ void Transfer::write(KSimpleConfig * con
config->writeEntry("Mode", mode);
config->writeEntry("Status", status);
config->writeEntry("CanResume", canResume);
- config->writeEntry("TotalSize", totalSize);
- config->writeEntry("ProcessedSize", processedSize);
+ config->writeEntry("TotalSize", (QVariant &)totalSize);
+ config->writeEntry("ProcessedSize", (QVariant &)processedSize);
config->writeEntry("ScheduledTime", startTime);
sDebugOut << endl;
}
--- ../../kget/kget/transfer.cpp 2004-04-17 16:56:29.000000000 +1000
+++ transfer.cpp 2004-04-27 23:05:41.000000000 +1000
@@ -605,7 +605,7 @@ void Transfer::slotSpeed(unsigned long b
-void Transfer::slotTotalSize(unsigned long bytes)
+void Transfer::slotTotalSize(KIO::filesize_t bytes)
{
#ifdef _DEBUG
sDebugIn<<" totalSize is = "<<totalSize << endl;
@@ -614,7 +614,7 @@ void Transfer::slotTotalSize(unsigned lo
if (totalSize == 0) {
totalSize = bytes;
if (totalSize != 0) {
- logMessage(i18n("Total size is %1 bytes").arg(totalSize));
+ logMessage(i18n("Total size is %1 bytes").arg(totalSize,0,'f'));
setText(view->lv_total, KIO::convertSize(totalSize));
dlgIndividual->setTotalSize(totalSize);
dlgIndividual->setPercent(0);
@@ -639,7 +639,7 @@ void Transfer::slotTotalSize(unsigned lo
-void Transfer::slotProcessedSize(unsigned long bytes)
+void Transfer::slotProcessedSize(KIO::filesize_t bytes)
{
//sDebug<< ">>>>Entering"<<endl;
@@ -757,8 +757,8 @@ void Transfer::write(KSimpleConfig * con
config->writeEntry("Mode", mode);
config->writeEntry("Status", status);
config->writeEntry("CanResume", canResume);
- config->writeEntry("TotalSize", totalSize);
- config->writeEntry("ProcessedSize", processedSize);
+ config->writeEntry("TotalSize", (QVariant &)totalSize);
+ config->writeEntry("ProcessedSize", (QVariant &)processedSize);
config->writeEntry("ScheduledTime", startTime);
sDebugOut << endl;
}
--- ../../kget/kget/kmainwidget.cpp 2004-04-17 16:56:27.000000000 +1000
+++ kmainwidget.cpp 2004-04-18 15:33:19.000000000 +1000
@@ -2041,7 +2041,7 @@ void KMainWidget::updateStatusBar()
QString tmpstr;
int totalFiles = 0;
- int totalSize = 0;
+ KIO::filesize_t totalSize = 0;
int totalSpeed = 0;
QTime remTime;
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic