diff options
| author | Christoph Berg <myon@debian.org> | 2021-03-27 10:24:15 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2021-03-27 10:24:15 +0100 |
| commit | 9655b6f589e8e5fa83d21827884d9488ebff63f4 (patch) | |
| tree | 9ae726f568c60d008f44f472cdff4983cf75a995 /SampleDownloader/Directory.cpp | |
| parent | 624f3a92bc09c65c75dda356f6a9af22feea0b5c (diff) | |
| parent | 5c88480ddc5c5dab1f3444a8b8de9303fd6140da (diff) | |
Update upstream source from tag 'upstream/2.4.0_rc4+repack'
Update to upstream version '2.4.0~rc4+repack'
with Debian dir 74c7d76ab37efed76838cc21b978156acf14f428
Diffstat (limited to 'SampleDownloader/Directory.cpp')
| -rw-r--r-- | SampleDownloader/Directory.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/SampleDownloader/Directory.cpp b/SampleDownloader/Directory.cpp index 19169e11..45ebe6b5 100644 --- a/SampleDownloader/Directory.cpp +++ b/SampleDownloader/Directory.cpp @@ -49,6 +49,8 @@ Directory::Directory (Configuration const * configuration setColumnCount (2); setHeaderLabels ({tr ("File"), tr ("Progress")}); + headerItem ()->setTextAlignment (0, Qt::AlignHCenter); + headerItem ()->setTextAlignment (1, Qt::AlignHCenter); header ()->setSectionResizeMode (QHeaderView::ResizeToContents); setItemDelegate (&item_delegate_); @@ -294,14 +296,15 @@ void Directory::update (QTreeWidgetItem * item) int counted {0}; // get the count, progress and size of children - int items {recurse_children (item, &counted, &bytes, &max)}; + // int items {recurse_children (item, &counted, &bytes, &max)}; + recurse_children (item, &counted, &bytes, &max); // estimate size of items not yet downloaded as average of // those actually present - if (counted) - { - max += (items - counted) * max / counted; - } + // if (counted) + // { + // max += (items - counted) * max / counted; + // } // save as our progress item->setData (1, Qt::UserRole, max); |
