I don't get the comment on why it is /dev/null instead of QString() but using SimpleConfig at least saves 0.3ms per call for me.
Differential Revision: https://phabricator.kde.org/D7510
It's not being set to anything anymore and people typically don't have 256 color displays these days.
Differential Revision: https://phabricator.kde.org/D7516
We're passing it an absolute path to a file in our install directory anyway,
so we probably don't want inheritance.
Differential Revision: https://phabricator.kde.org/D7362
Summary:
imagePath can be an absolute path into an iconTheme
-> Do not try to find it in the Plasma theme
imagePath can be empty
-> Do not try to look it up at all
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: #frameworks
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D7250
Test Plan:
Installed battery monitor locally with kpackagetool5 -i
moved x-test .po file from being installed systemwide to only being
inside the bundle
still get xx everywhere
BUG: 374825
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5209
Summary:
sometimes a frame changed enabled borders causing a dangling
pointer in s_sharedFrames, since oldkey was generated
with the new enabled borders, it generated a key not present
in the hash, tryed to remove it and left the one associated
with the old key in the hash.
if the need to reuse a frame with that key ever arised again,
we had a crash
BUG:378508
Test Plan:
couldn't reproduce the crash neither with or without patch,
with the patch, if i put debug in every place a framedata is removed,
searching if the key is in the hash before removing it, now
it's always true, before sometimes it was false
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D6162
Summary: Ported away some classes, removes many unneeded casts that happen when starting.
Test Plan: Tests still pass, plasma starts properly
Reviewers: #frameworks, #plasma, mart
Reviewed By: #plasma, mart
Subscribers: davidedmundson, mart, plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D6041
Using the new extra-cmake-modules module ECMAddQch (since 5.36.0)
this adds the option to automatically build and install a file
in QCH format with the docs about the public API, which then can be
used e.g. in Qt Assistant, Qt Creator or KDevelop.
Additionally the installed cmake config files will be extended
with a target KF5Plasma_QCH containing information about how to "link"
into the generated QCH file, which then can be used in the cmake build
system of other libraries building on this library, by
simply listing this target in "LINK_QCHS" of their ecm_add_qch() usage.
And a respective doxygen tag file with all the metadata about the
generated QCH file and used for the "linking" will be created and
installed.
Pass -DBUILD_QCH=ON to cmake to enable this.
Summary:
Don't construct a QUrl for every source strings. Check it's a file url
first (which is the only kind of url we support at the moment)
When extracting the path, use toLocalFile, so it works on platforms where
path!=toLocalPath (e.g. windows)
Don't split a string and get a chunk, but just extract the chunk we need
with section. Reduces allocations that are automatically discarded.
Narrow iconPath scope
Test Plan: Tests still pass, plasmashell still works
Reviewers: #frameworks, #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D6014
requestedprefix requires to not have the "-", don't fail anymore in
q->hasElementPrefix(frame->requestedPrefix) in
FrameSvgPrivate::generateBackground
BUG:377893
Summary:
QStandardPaths doesn't do file search by wildcards,
that code was never actually functional
Test Plan: old kcache and rects cache files get correctly removed
Reviewers: #plasma, sitter
Reviewed By: sitter
Subscribers: davidedmundson, sitter, apol, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4925
Summary:
Just because the metadata is invalid doesn't mean the DataEngine
actually failed to load, we're still returning a valid object, and as
seen with the MPris DataEngine bug. It's important that we still release
it properly.
It looks like this was designed to make sure you don't delete the null
data engine multiple times, but that shouldn't cause an issue here.
Test Plan: #plasma
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4556
There was already some kind of detection and adjustment if there is not enough
space for the popup available. Do some more work by placing the popup according
to its PopupPlacement enum. Do this also if the popup breaks the top or left
boundary of the screen.
Also fixes some minor problems:
* TopPosedRightAlignedPopup was the same as RightPosedTopAlignedPopup, but in
the first case the menu should be on top of parentItem
* LeftPosedTopAlignedPopup was above parentItem and not left of it
* Small documentation error
Reviewers: #plasma, hein
Subscribers: plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D4867
Summary:
make sure the framedata creation/destruction is
completely in updateFrameData, makes easier to track
and possible to use the repaintsblocked logic.
now only one framedata instance should be created at startup.
CCBUG:376754
Test Plan:
* autotests pass, plasma runs ok, crash on 376754 not reproducible anymore
* possible to have a plasmashell session start without the creation of a single svg renderer (startups after the first when the cache is generated)
* on qml profiler, framesvgitem creation is ~12 msecs the first one created, ~2-300 musecs the subsequent ones, seems to be a bit better than before the whole refactor started
* tried against the latest patches that remove the binding loops, still correct rendering and no binding loop
* tried with both empty and existing cache in place
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D4707
It can and does happen that in case of two clocks, one with seconds and one without, the one without gets 1s behind. That's because the alignment is not corrected when the difference is 1s, however in case of the clock this 1s is cruicial.
REVIEW: 123300
Summary:
d8a1a9eb08 introduces an unintended code
change, resizeFrame() updates the margins and in turns calls
repaintNeeded. This isn't needed and is a binding loop if we ever have a
frameSVGItem whose size depends on it's own margins.
resizeFrame is different from setEnabledBorders / setElementPrefix /
theme changes because even though we need to create a new FrameData we
know any hints and margins won't change. FrameSvgItem::updateSizes
doesn't depend on the size in any way, so always gives the same result
as before. We still, however, need to call updateSizes to populate our
FrameData structure even if the results will be the same as the previous
FrameData.
This patch that introduces a flag to updateFrameData to determine if we
should emit that size hints may have changed or not.
Test Plan:
GDB showed where the loop was.
Read the old code, and looked for differences
Ran plasmashell, checked I had no binding loop, frames including button
which have
composeOverBorder which need the new FrameData all rendered correctly.
Reviewers: #plasma, #frameworks, mart
Subscribers: mart, broulik, plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4713
Summary:
give frameSvg the concept of repaintBlocked(), that enables and
disables the regeneration of the frame data when a property is set.
the use case is when often, a lot of properties are set one after
the other (such as prefix, enabled borders, size)
collapse the formely similar, but a bit different logic of frame
regeneration is a single function for better maintanability.
QML FrameSvgItem sets repaintblocked when it starts and releases it just on oncomponentCompleted
Test Plan:
plasmashell still starts, autotests still work, all frames are rendered correctly
the destruction of old frames is cutted by 50%. in the qml profiler
the creation time of a framesvgitem slightly improved, on this machine from around 26 msecs to around 21, can still be improved, but at least the code is a bit simpler
Reviewers: #plasma
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4414
Summary:
Otherwise toBool doesn't work.
I didn't see it called anywhere as property("NoDisplay") == "true", so it
shouldn't be a problem like similar cases before
Test Plan: See upcoming patches
Reviewers: #plasma, #frameworks, davidedmundson, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4396
Instead use iterators. Could be changed to using keyBegin or something like that potentially.
The destructor is called 400 times on plasmashell startup for me.
Before: 250,000ns
After: 110,000ns
Differential Revision: https://phabricator.kde.org/D4350
Summary:
unfortunately hiddenvisibility is the "biggest" status
that makes computing the proper status tricky.
if an applet in the containment is hidden, we must not mark as
hidden the whole containment, because it's as if hidden was
(as it should be) the smallest in the enum
BUG:372062
Test Plan: touchpad plasmoid no longer hides the systray
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4174
Summary:
replace the last remaining place in pluginloader
where a string list was read as a normal string
Change-Id: I66e7f563745466e31cfb23492fdb081806b1e406
Test Plan:
related to D3902
dropping of files on containment still works
Reviewers: broulik, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D3936
there is a single difference between command line
parameters of plasmapkg2 and kpackagetool5: plasmapkg2
had some hardcoded names like "theme", "plasmoid" etc.
kpackagetool5 requires the servicetype name to be
passed instead. in order to stay compatible convert
those parameter with the proper servicetype name.
it's parsing parameters by hand in order to just
pass anything else without further parsing
BUG:374463
REVIEW:129753
Change-Id: I6adece9b3dd351331d747505c455e0f79cd0ecf7
They are supposed to be lists. This fixes dropping folders on desktops to create a FolderView.
Dropping trash:/ also offers to create a trash applet again.
BUG: 374418
Differential Revision: https://phabricator.kde.org/D3902
Summary:
As Plasma::Package is deprecated API using Plasma::Package should also
be deprecated.
Reviewers: #plasma, #frameworks
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3812
if a panel doesn't ahve applets, it can't have a "currently
loading" as the status of its applets.
this fixes panels sometimes not showing up when reconnecting screens
CCBUG:373836
Test Plan: less warnings when compiling plasma-workspace
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3679