Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 898824 Details for
Bug 937158
media-video/kaffeine-2.0.18-r2 dvb "Update Scan Data over Internet" fails (patch)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
kaffeine-2.0.18-allow-scantable-download-larger-than-64KiB
kaffeine-2.0.18-allow-scantable-download-larger-than-64KiB.patch (text/plain), 3.43 KB, created by
David Duchesne
on 2024-08-02 21:24:03 UTC
(
hide
)
Description:
kaffeine-2.0.18-allow-scantable-download-larger-than-64KiB
Filename:
MIME Type:
Creator:
David Duchesne
Created:
2024-08-02 21:24:03 UTC
Size:
3.43 KB
patch
obsolete
>commit 209a263ab2191f0b1d13f48a0a2fa67794357ad0 >Author: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> >Date: Fri Apr 30 08:35:31 2021 +0200 > > dvbconfigdialog: increase max download size for scandata > > By the time Kaffeine was written, a 64KB max limit were > enough, but nowadays, the scandata file has already 104KB. > > Increase the limit up to 1MB, in order to fix download > issues with valid files. > > While here, also improve the download messages to show > how much data was downloaded and to report the reason > why a download was aborted. > > BUG: 436371 > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> > >Origin: upstream, https://github.com/KDE/kaffeine/commit/209a263ab2191f0b1d13f48a0a2fa67794357ad0 >Bug: https://bugs.kde.org/show_bug.cgi?id=436371 >Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/kaffeine/+bug/1879923 > >diff --git a/src/dvb/dvbconfigdialog.cpp b/src/dvb/dvbconfigdialog.cpp >index 7b45777..2abc606 100644 >--- a/src/dvb/dvbconfigdialog.cpp >+++ b/src/dvb/dvbconfigdialog.cpp >@@ -614,6 +614,8 @@ DvbScanFileDownloadDialog::DvbScanFileDownloadDialog(DvbManager *manager_, QWidg > setLayout(mainLayout); > mainLayout->addWidget(mainWidget); > >+ errorMsg = "Scan data update aborted."; >+ > buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); > buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); > connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); >@@ -655,10 +657,20 @@ void DvbScanFileDownloadDialog::progressChanged(KJob *, unsigned long percent) > > void DvbScanFileDownloadDialog::dataArrived(KIO::Job *, const QByteArray &data) > { >- if ((scanData.size() + data.size()) <= (64 * 1024)) { >- scanData.append(data); >- } else { >- job->kill(KJob::EmitResult); >+ scanData.append(data); >+ >+ /* >+ * Current size in April, 2021 is 104KB. >+ * Add an upper size limit here (1 MB), just in case, in order to >+ * prevent potential issues. >+ */ >+ int maxLimit = 1024 * 1024; >+ >+ if (scanData.size() > maxLimit) { >+ errorMsg = i18n("Scan file is becoming bigger than %1 KB.\n" >+ "Aborting, as something might be wrong...\n", >+ QString::number(maxLimit / 1024., 'f', 2)); >+ job->kill(KJob::EmitResult); > } > } > >@@ -668,7 +680,7 @@ void DvbScanFileDownloadDialog::jobFinished() > > if (job->error() != 0) { > if (job->error() == KJob::KilledJobError) { >- label->setText(i18n("Scan data update failed.")); >+ label->setText(errorMsg); > } else { > label->setText(job->errorString()); > } >@@ -678,8 +690,10 @@ void DvbScanFileDownloadDialog::jobFinished() > > if (manager->updateScanData(scanData)) { > buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); >- label->setText(i18n("Scan data successfully updated. Changes take\n" >- "effect after you have closed the configuration dialog.")); >+ label->setText(i18n("Scan data successfully updated. %1 KB received.\n" >+ "Changes take effect after you have closed\n" >+ "the configuration dialog.", >+ QString::number(scanData.size() / 1024., 'f', 2))); > } else { > label->setText(i18n("Scan data update failed.")); > } >diff --git a/src/dvb/dvbconfigdialog.h b/src/dvb/dvbconfigdialog.h >index 476afec..21994ea 100644 >--- a/src/dvb/dvbconfigdialog.h >+++ b/src/dvb/dvbconfigdialog.h >@@ -138,6 +138,7 @@ private: > QByteArray scanData; > QVBoxLayout *mainLayout; > QDialogButtonBox *buttonBox; >+ QString errorMsg; > }; > > class DvbConfigPage : public QWidget
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 937158
: 898824