When not doing that, drag'n'drop-ing an article from the article list
to the browser opened the article twice.
Details
- Reviewers
mlaurent - Group Reviewers
KDE PIM - Commits
- R201:9c300d36ec8c: Prevent duplicates in url list.
Tested with various RSS feeds dropping to Firefox, no more duplicated tabs
Diff Detail
- Repository
- R201 Akregator
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
You select one article and it opens 2 articles ?
Perhaps we need to understand why before to create a workaround no ?
I select one article and it opens it twice, sometimes even worse. But sure it's better with an explanation of what I saw.
And thanks for asking. I don't know what I was thinking when I wrote this one.
The issue is that mimeData is called with a list of Index, one per column per row. So if you have three columns, there are three similar urls in the mime data, thus 3 new tabs in your browser or 3 lines in your text editor…
I'm sending a much better fix right now.
While writing the explanation for Laurent, I felt stupid for not writing
this patch that way the first time.
Hum, sure it is an optimization on a non-optimizing compiler, but since QModelIndex::row() is const and declared in the headers, thus inlined when called, we don't really get anything here (on the contrary, on a -O3 code with GCC 9.2 on amd64 we get two extra instructions and allocate more stack because the variable is kept).
Are you sure it is worth it?