Bug 401661

Summary: Wrong download speed of large file if save dialog wasn't confirmed right away
Product: [Applications] Falkon Reporter: Alexander Mentyu <notuxius>
Component: generalAssignee: David Rosca <nowrep>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 3.1.0
Sentry Crash Report:

Description Alexander Mentyu 2018-12-02 17:07:48 UTC
STEPS TO REPRODUCE
1. Open Falkon.
2. Open any page to download large files - for example https://speed.hetzner.de/
3. Click on link to donwload large file.
4. Select 'Save File' in 'Opening.. ' dialog.
5. When 'Save file as..' dialog appears - wait for ~10 sec.
6. Press 'Save' button in 'Save file as..' dialog.
7. Press Ctrl+Y shortcut to invoke Download Manager.

OBSERVED RESULT
Displayed download speed is more than 12MB/s - i.e. 30-40MB/s - though my uplink speed is 100Mb/s (12MB/s)

EXPECTED RESULT
Download speed is always calculated correctly

SOFTWARE/OS VERSIONS
falkon 3.0.99
Operating System: KDE neon Developer Edition
KDE Plasma Version: 5.14.80
KDE Frameworks Version: 5.53.0
Qt Version: 5.11.2
Kernel Version: 4.15.0-39-generic
Comment 1 David Rosca 2018-12-24 14:20:06 UTC
Git commit 9e7011cbed503d41130fe702928e0ec4458c9982 by David Rosca.
Committed on 24/12/2018 at 12:55.
Pushed by drosca into branch 'master'.

DownloadManager: Start download timer when download is created

Since we block in download options / file dialogs and QtWebEngine
download is already running, it will report invalid (faster) download
speed.
FIXED-IN: 3.1.0

M  +3    -3    src/lib/downloads/downloaditem.cpp
M  +3    -3    src/lib/downloads/downloaditem.h
M  +5    -0    src/lib/downloads/downloadmanager.cpp

https://commits.kde.org/falkon/9e7011cbed503d41130fe702928e0ec4458c9982