The context property version is slower to access and won't be supported
in Qt6. Let's port away from it and use the singleton version instead.
Here was my full process for making this change:
1. Made the change with `find . -name '*.qml' | xargs perl -pi -e 's/units\./PlasmaCore\.Units\./g'`
2. Verified no more occurrences with `grep -r " units."`
3. Made sure this didn't change any comments in a silly way by inspecting the output of `git diff | grep "+ " | grep "//"`
4. Manually inspected the full git diff to make sure there were no other unintentional or silly changes (there were none)
5. verified that all changed files have the PlasmaCore import with the correct name with `for FILE in `git status | grep modified | cut -d ":" -f 3`; do grep -q "as PlasmaCore" $FILE || echo "$FILE needs the PlasmaCore import"; done`
it was technically possible for geometries to not be integer, but
a string to int parse was done, so teoretically string.toInt() can
fail and reset position/size of the plasmoid.
It may be the cause of some of the positions lost bugs.
This was particularly evident and triggerable in plasma mobile.
on palsma mobile side was also fixed by making suire the grid size is
always int, however technically the bug is here too as well
handles have to pop up on any background, as they will be on top of the wallpaper
adding a super light gradient which reminds breeze buttons, contrast pixel and
a shadow makes it easier for it to not get lost
When rotated most applets, especially text look garbage.
If we render into an offscreen buffer we can smooth things out and it
looks good again. There is a performance penalty to this, but most
people do no not rotate plasmoids.
We do this sometimes, but not consistenly.
The benefit is twofold.
First it improves the diff when adding new values since no existing line needs to be touched.
Second it prevents clang-format from collapsing the definition into a single line, which is undesired for large enums.
Summary:
Otherwise, setLayout function might be called for
already destructed instance of ItemContainer,
leading to double reference counter decrement of m_layout QPointer,
eventually invalidating such pointers prematurely.
BUG: 417603
Test Plan:
1) Unlock widgets via command: qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(false)"
2) On desktop push right mouse button and select menu item 'Add Widgets...'
3) Add various widgets to desktop using drag'n'drop on desktop.
I've added at least following widgets on same desktop screen:
Audio Volume, Battery and Brightness, Binary Clock, Clipboard, Color Picker, Grouping Plasmoid, Quick Chat
4) Remove just added widgets in random order
5) If necessary, repeat steps 3 and 4 a few times
If widgets aren't appearing on desktop despite adding them via drag'n'drop, it's bugged and ready to crash. But it's not a requirement for crash.
6) lock widgets via command: qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(true)"
7) repeat steps 1-6 multiple times
8) plasmashell shouldn't crash
Reviewers: ngraham, davidedmundson, mart
Reviewed By: davidedmundson
Subscribers: cfeck, anthonyfieroni, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27650
Summary: CCBUG: 412114
Test Plan:
{F8116018}
(The icon size is too large by default but that's not a bug in this patch)
Reviewers: #plasma, davidedmundson, meven, ndavis
Reviewed By: meven, ndavis
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27530
Summary:
Same idea as D25998, but for desktop widgets and done on the C++ side to avoid weird
interactions between a MouseArea and a MultiPointTouchArea on the QML side.
Test Plan: {F7819381}
Reviewers: #vdg, #plasma, mart, apol
Reviewed By: #vdg, #plasma, mart, apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26015
Summary:
support the automatic shadow hint
When the hint is shadowedBackground, do an automatic shadow with a shader, and
change applet's color to complementary
Test Plan:
Tested the functionality on various applets. To test, the digital clock is enabling explicitly background configurability
{F7788553}
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D25591
when items are moved around due to screen resolution change,
no cell should be considered as taken, because all items will be moved,
otherwise items will be moved and resized in unexpected ways to make
room for "ghost" items.
Clear the bookkeeping before doing the move
BUG:413019
Summary:
edit mode menu action
edit mode dbus property for systemsettings
containmentlayoutmanager goes out of edit mode only when the whole
plasma app loses focus, so the panel controlled doesn't make it go out
of it
Test Plan:
iaction shows in context menu, works
property exposed on dbus works
Reviewers: #plasma, #vdg, ngraham, GB_2, davidedmundson
Reviewed By: #plasma, #vdg, ngraham, GB_2, davidedmundson
Subscribers: GB_2, ngraham, davidedmundson, plasma-devel
Tags: #plasma
Maniphest Tasks: T10190, T11094, T10402
Differential Revision: https://phabricator.kde.org/D24264
When asking for a specific layout direction, try very hard at all the
cells that are available in that given direction instead of always
start to compute at a new row and wrong column
Summary:
This QML plugin offers a reusable, C++ based framework to manage layout
of items (mainly plasmoids but other stuff too) inside Plasma Containments
This will replace the Javascript based plasmoid layout manager inside the
FolderView and Desktop containments (is planned also forPlasma mobile homescreen)
This makes folderview code simpler and layouting more reliable.
Relayouting behavior after screen resolution change improved too, making easier to
keep a similar looking layout
Test Plan:
Tested on FolderView, a minimal containment using it may be shipped on the store
if we don't feel to ship the folderview port immediately
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22034