]> cloud.milkyroute.net Git - dolphin.git/commit
Improve selection action toggle code
authorFelix Ernst <felixernst@kde.org>
Thu, 15 Sep 2022 13:36:05 +0000 (13:36 +0000)
committerFelix Ernst <felixernst@kde.org>
Thu, 15 Sep 2022 13:36:05 +0000 (13:36 +0000)
commit11ada1515d7a2b5f09d25d2df1ce0f6d37887794
treeedada0cb3ce13c493d76a58a8151761c21ad1dda
parent3dd49a85396a47f943c722047d44212b8d1600ee
Improve selection action toggle code

@broulik noticed an issue in the code. This commit fixes it.

-------------------

Before this commit there was a `QObject::disconnect` call that did
nothing (because it had `nullptr` as the first parameter) and there was a `QObject::connect` call that created
the same connections multiple times because of this.

This had no effect on end users. However such code can lead to
issues in the future e.g. if we ever had a situation in which the selection mode could be toggled for an inactive view container.

This commit solves this by replacing the `QObject::disconnect` call
with one that works. The `QObject::connect` call is moved so
there won't be multiple connections of the same type.
src/dolphinmainwindow.cpp