Bug 407935 - Empty UI field when creating new Folder and adding feed to it
Summary: Empty UI field when creating new Folder and adding feed to it
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: 5.11.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-25 10:04 UTC by Jan Thomas
Modified: 2024-12-23 08:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Shows the unvisible UI element (14.21 KB, image/jpeg)
2019-05-25 10:04 UTC, Jan Thomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Thomas 2019-05-25 10:04:53 UTC
Created attachment 120301 [details]
Shows the unvisible UI element

SUMMARY
Empty UI field when creating new Folder and adding one feed to it

STEPS TO REPRODUCE
1. Create new Folder 
2. Add a feed to it
3. Open the folder

OBSERVED RESULT
An empty feed element is shown under the added feed

EXPECTED RESULT
everything looks as normal

Operating System: Manjaro Linux 
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3
Kernel Version: 5.0.15-1-MANJARO
OS Type: 64-bit
Processors: 4 × Intel® Core™ i3-4150 CPU @ 3.50GHz
Memory: 7,2 GiB of RAM

ADDITIONAL INFORMATION
Restarting Akregator makes this issue dissapear
I have tested this bug on another machine, it was reproducible there aswell.
Comment 1 Bug Janitor Service 2024-12-06 19:43:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/akregator/-/merge_requests/57
Comment 2 Carl Schwan 2024-12-23 08:58:54 UTC
Git commit 0c869e02caea41421d6a54feb2b03e3ec3aa9030 by Carl Schwan, on behalf of Wendi Gan.
Committed on 23/12/2024 at 08:54.
Pushed by carlschwan into branch 'master'.

Fix extra empty line when adding a new feed

When a new folder is created and a feed or folder is inserted into it, an extra empty line appears.
This happens because, in Folder::insertChild and Folder::prependChild, the node is added to m_children first. If the folder is newly created, during SubscriptionListModel::subscriptionAdded, QSortFilterProxyModelPrivate::create_mapping calls SubscriptionListModel::rowCount, which counts one extra row, leading to an extra empty line.
This commit modifies rowCount to decrement by 1 during insertion.
Related: bug 412215, bug 420797

M  +9    -2    src/subscription/subscriptionlistmodel.cpp
M  +1    -0    src/subscription/subscriptionlistmodel.h

https://invent.kde.org/pim/akregator/-/commit/0c869e02caea41421d6a54feb2b03e3ec3aa9030