This patch fixes an issue where actions remain disabled after changing
its visibility off/on by filtering actions and creating menu items for
visible actions only. It also slightly improves the code.
PlasmoidHeader was probably based on T.Frame because of a mistake. T.Frame doesn't do anything different from T.Pane and PlasmoidHeader was duplicating the function of T.ToolBar's position property with the location property.
Instead of checking for existance and then getting the value. Look it up
once and use the value if avaliable.
This saves us one hash look-up per execution which can be considerable,
especially in the case of findElementRect.
CMake's FindOpenGL internally handles EGL only correctly when GLVND is
available. This might not the case on embedded systems and actually it
is not necessary when EGL::EGL is found.
BUG: 438444
The intent behind this code seemingly was that KGlobalAccel would
update the shortcut of the QAction but that is not the case. This
leads to our config going out of sync when global shortcuts are
changed from the oustide (the kcm) and resetting on next start
since we set shortcuts with NoAutoLoading.
BUG:438662
FIXED-IN:5.84
I was looking into why there is so much time spent here for the logout
greeter that only has buttons. It seems like we were querying the cache
file every time even though we already have separate code that checks
whether our information is valid.
As I started looking into it, ::loadImageFromCache was %25 of the CPU
time. After this patch it's short of 1%.
Task: https://phabricator.kde.org/T14302
The explicit version checks are not needed anymore, the plugins are
installed into a specific namespace for each major version. Also the
plasma-frameworks API is stable during the lifetime of a major version.
In **general**, variables in `if()` commands should not be expanded
"by hand" before use, because substitution occurs before the `if()`
command is parsed: in practice that means that a command like
if(${A} STREQUAL "A")
can expand to (depending on the value of A being empty, "B" or "A")
if( STREQUAL "A")
if(B STREQUAL "A")
if(A STREQUAL "A")
Then the `if()` command is processed, leading to:
- a syntax error
- comparing the value of variable B against string "A"
- comparing the value of variable A (it's "A" because that
is what `${A}` expanded to) against string "A"
This is explained in section *Variable Expansion* of the documentation
of the `if()` command, but keeps tripping people up.
The K_EXPORT_PLASMA_DATAENGINE_WITH_JSON expects a JSON file. But
considering that nobody complained about this and it has been broken for
years we can get rid of it.