]> cloud.milkyroute.net Git - dolphin.git/commit
Avoid flickering of space info on startup
authorFelix Ernst <felixernst@zohomail.eu>
Sun, 10 Nov 2024 15:47:19 +0000 (16:47 +0100)
committerFelix Ernst <felixernst@kde.org>
Tue, 12 Nov 2024 10:54:25 +0000 (10:54 +0000)
commit6c73f7912b6fb0327b9fd0ca7a3fff3b2fb4d5e9
tree7f3cba330209c4e379d0e688cf46573a2b6c2282
parented870aa7ed971af4e5b34bd653fb96998e8dd4f3
Avoid flickering of space info on startup

Prior to this commit, when Dolphin was opening in a directory for
which the free space information cannot be retrieved, the free
space info in the status bar would still briefly be visible before
hiding for good.

This commit avoids this flickering by keeping the space info hidden
until space info has been successfully retrieved. There is no use
showing an empty/wrong space info before that anyway.

I assume the error in the previous code was that it assumed that
one could prevent a widget from being shown by overriding
QWidget::showEvent(). This does not work because this method is
only called to notify QWidgets of their state change.

This commit was primarily written because the brief showing of an
empty space info was messing with automatic tests.
src/statusbar/dolphinstatusbar.cpp
src/statusbar/statusbarspaceinfo.cpp
src/statusbar/statusbarspaceinfo.h