Commit Graph

1134 Commits

Author SHA1 Message Date
l10n daemon script
d93ecddd14 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-30 05:21:16 +02:00
Jaime Torres
33ddaaa23f Reduce plasmashell frozen time
Summary:
Third part of https://phabricator.kde.org/D10627

According to the documentation at http://doc.qt.io/qt-5/qabstractnativeeventfilter.html

The type of event eventType is specific to the platform plugin chosen
at run-time, and can be used to cast message to the right type.

On X11, eventType is set to "xcb_generic_event_t", and the message can
be casted to a xcb_generic_event_t pointer.

The other eventType are "windows_generic_MSG" and "mac_generic_NSEvent".

No other eventType starts with an 'x'.

Reviewers: #frameworks, #plasma, mwolff, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: mwolff, plasma-devel, davidedmundson

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10670
2018-03-21 19:26:45 +01:00
l10n daemon script
f65393c68e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-03-13 05:18:02 +01:00
Friedrich W. H. Kossebau
9168e1c79f API dox: remove duplicated deprecated comment 2018-02-27 23:25:11 +01:00
Friedrich W. H. Kossebau
f82d764ad7 API dox: Use @deprecated tag for deprecation comment 2018-02-27 23:24:57 +01:00
l10n daemon script
e80ebab9db SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-02-25 05:27:39 +01:00
Marco Martin
6cbea20bf9 try to preload certain applets in a smart way
Summary:
preload popups of some applets after init in the background
based on a value of X-Plasma-PreloadWeight in the desktop file
if present, otherwise some default values based on the applet
type (Provides)

Save the weight in the config, if an applet is never opened,
slowly decrease the weight, when it reaches 0 don't preload it
next start, increase every time it gets opened, so at the moment
it's quite aggressive about preloading, in order to not do it
a lot of plasma startups without touching the applet are needed

Applet with a very big weigth will be preloaded immediately,
therefore having an impact on the time it will take to have
a panel visible and usable, while lesser weigths will preload
after a random number of seconds between 2 and 10, so will load
in the background after everything is started

Test Plan:
Plasma starts up correctly, applets load correctly and can be added
correctly both those expanded or collapsed.
plasmashell appears correctly usable without too big hiccups even
while it's loading things in the background

some numbers:
without preloading, plasma takes around 64 mb of memory after startup
when preloading everything about 94, so it's a cost of about 30 mb
which is not negligible.
don't have precise timing, but if everything gets preloaded immediately,
the time to get an usable desktop appears to be at least doubled,
while the delayed preloading (except just a couple of applets) doesn't
seem to have a big impact on the time needed to get an usable desktop

Reviewers: #plasma

Subscribers: davidedmundson, broulik, apol, ngraham, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10512
2018-02-19 18:34:24 +01:00
l10n daemon script
fde1a97636 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-02-04 05:15:50 +01:00
Kai Uwe Broulik
9870027494 [Plasma Theme] Guard against invalid KPluginInfo object
BUG: 389152

Differential Revision: https://phabricator.kde.org/D9961
2018-01-22 11:10:11 +01:00
Randy Kron
5eece6769f Fix one source of log spam referenced in Bug 388389 (Empty filename passed to function)
Summary:
I found two places in plasma-framework svg.cpp (Plasma::Svg) that were triggering this message.

path variable was not being checked for empty before passing to QFile::exists().

This seems to be one source of the issue reported in [[ https://bugs.kde.org/show_bug.cgi?id=388389 | Bug 388389 ]]

Test Plan: Found that kicker was triggering this message and also plasmashell tooltips.

Reviewers: #frameworks, davidedmundson

Reviewed By: davidedmundson

Subscribers: ngraham, alexeymin, aacid, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D9928
2018-01-20 22:26:16 +00:00
Friedrich W. H. Kossebau
85193f8c75 API dox: Use code markup for described dataUpdated slot signature 2018-01-16 11:42:20 +01:00
Laurent Montel
d1949d9149 Const'ify, use nullptr 2017-12-25 18:41:50 +01:00
Eike Hein
2956419c7e Revert "Don't tear down renderer and other busy work when Svg::setImagePath is invoked with the same arg"
This reverts commit 4ce50cc61f.

This caused a regression with toggling compositing, causing SVG reloads
with the same path to switch to opague elements. As this revision was
meant as a performance optimization, it can be reverted with no other
consequence for now.
2017-12-16 20:16:38 +09:00
Montel Laurent
d14d50a668 Add more explicit 2017-12-13 07:52:10 +01:00
Montel Laurent
7f0c023d3f Use nullptr + add explicit 2017-12-13 07:36:22 +01:00
l10n daemon script
6195342df2 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-12-13 06:58:55 +01:00
Marco Martin
604aba0e24 reuse KPackage instance between PluginLoader and Applet
Summary:
to minimize metadata lookups, pass the kpackage created in pluginloader
to the applet itself as args. the args structure will be used only by the
internal constructor and applet sublasses will get their args unaltered

Test Plan:
plasma loads correctly, from 3 kpackage instantiation per applet to 2
(last is in the access manager)

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9123
2017-12-09 10:37:08 +01:00
Eike Hein
f75816a33a Initialize scale factor to the last scale factor set on any instance
Summary:
Plasma::Svg initializes SvgPrivate::scaleFactor to 1.0. On systems with
a higher value for Units:devicePixelRatio, that means Svg::setScaleFactor
gets called with a different value right after instanciation and a fair
amount of work is done twice.

This patch introduces a static SvgPrivate::s_lastScaleFactor,
initialized to 1.0 but updated in Svg::setScaleFactor.
SvgPrivate::scaleFactor is then initialized to the static every time
its instanciated. That means after the first time Svg::setScaleFactor
is called with e.g. 2.0, subsequent Svg instances get initialized
with 2.0.

This ends up shaving a decent amount of time off of startup on scaled
systems.

Reviewers: #plasma, davidedmundson, broulik

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9119
2017-12-04 04:56:19 +09:00
Eike Hein
73b6d92258 Revert "Initialize scale factor to the last scale factor set on any instance"
This reverts commit 15f470fafc.
2017-12-04 03:00:53 +09:00
Eike Hein
15f470fafc Initialize scale factor to the last scale factor set on any instance
Summary:
Plasma::Svg initializes SvgPrivate::scaleFactor to 1.0. On systems with
a higher value for Units:devicePixelRatio, that means Svg::setScaleFactor
gets called with a different value right after instanciation and a fair
amount of work is done twice.

This patch introduces a static SvgPrivate::s_lastScaleFactor,
initialized to 1.0 but updated in Svg::setScaleFactor.
SvgPrivate::scaleFactor is then initialized to the static every time
its instanciated. That means after the first time Svg::setScaleFactor
is called with e.g. 2.0, subsequent Svg instances get initialized
with 2.0.

This ends up shaving a decent amount of time off of startup on scaled
systems.

Reviewers: #plasma, davidedmundson, broulik

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9119
2017-12-04 00:03:46 +09:00
Kai Uwe Broulik
fae6558dae Move if check inside #ifdef
This way we're not doing a contains() and then not do anything
2017-12-03 15:00:14 +01:00
Eike Hein
4ce50cc61f Don't tear down renderer and other busy work when Svg::setImagePath is invoked with the same arg
Summary:
During my plasmashell startup this saves time for 17 calls. Opening
something like Simple Menu saves another ~dozen.

It's worth investigating why Svg::setImagePath gets called repeatedly
with the same args to begin with, but this is worth doing anyway.

Reviewers: #plasma, davidedmundson, mart

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9115
2017-12-03 06:45:47 +09:00
Aleix Pol
1f9b5ed657 Performance
Summary:
Remove splitting + joining of a string just to remove the beginning of a
string.
Remove double look-up.
Solves Clazy warnings

Reviewers: #frameworks, #plasma, hein

Reviewed By: #plasma, hein

Subscribers: hein, plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9109
2017-12-02 16:22:03 +01:00
Aleix Pol
b8b8a69fd1 Remove implicit string casting
Summary: Follow the KF5 guidelines

Test Plan: Plasma shell starts

Reviewers: #plasma, #frameworks, sebas

Reviewed By: #plasma, sebas

Subscribers: plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9108
2017-12-02 15:44:14 +01:00
David Faure
d3ed3bcbbf GIT_SILENT remove confusing comment. There's no ref() happening here. 2017-11-25 23:19:42 +01:00
Aleix Pol
11c9206bf6 Reduce spurious signal emissions
Summary:
We were reporting that the margins were changing whenever anything changed
in a FrameSvg, this patch makes sure we are only reporting the changes
when it actually changes.
This also fixes a binding loop in Desktop.qml from plasma-desktop.

BUG: 382233

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: broulik, davidedmundson, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D8809
2017-11-16 16:18:04 +01:00
Andras Mantia
eab0378735 Add signals indicating if a screen was added or removed
Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D8566
2017-11-13 16:35:20 +02:00
Aleix Pol
ceca6ffa01 Don't rely in includes of includes
QFontMetrics is used by theme.cpp
2017-11-07 21:16:08 +01:00
l10n daemon script
ac3cbe0397 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-10-24 05:08:50 +02:00
Kai Uwe Broulik
dea8a1ed5f [FrameSvg] Optimize updateSizes
frame->fooHeight is the same as frame->fooFixedHeight if the border is enabled, we only meddle
with margins, not heights. Thus we can just do the lookup once and re-use the value.

Also store the hintFooMargin instead of doing the same exact lookup once for fixed
and once for non-fixed margins.

Differential Revision: https://phabricator.kde.org/D8135
2017-10-16 11:38:09 +02:00
l10n daemon script
07272a2b98 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-09-27 09:05:33 +02:00
Kai Uwe Broulik
46a8d86ee8 [FrameSvg] Use new-style connect
Reviwed-By: d_ed
2017-09-21 14:33:28 +02:00
Marco Martin
3942c5279e don't recreate a null pixmap
if we already have a null pixmap, don't recreate a new one

this saves some pixmap ceation on destructors
reviewed-by:davidedmundson
2017-09-19 13:57:12 +02:00
Kai Uwe Broulik
5921b2a70c [FrameSvg] Use QPixmap::mask() instead of deprecated convoluted way via alphaChannel()
QPixmap::alphaChannel() is deprecated.

Differential Revision: https://phabricator.kde.org/D7614
2017-08-30 12:05:59 +02:00
Kai Uwe Broulik
3e284c2404 HTML-escape applet name in undo notification 2017-08-28 16:51:48 +02:00
Kai Uwe Broulik
2236c19584 [Service] Restore /dev/null usage
Accidentally removed it for testing but since I don't know why this is for,
better restore it :)
2017-08-25 11:25:20 +02:00
Kai Uwe Broulik
5137a988b1 [Service] Use KConfig::SimpleConfig
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
2017-08-25 11:24:03 +02:00
Kai Uwe Broulik
b4c1c9cdfa Drop remains of "locolor" themes
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
2017-08-25 10:37:35 +02:00
Kai Uwe Broulik
cf8ae465e4 [Theme] Use KConfig SimpleConfig
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
2017-08-17 12:17:15 +02:00
Fabian Vogt
883a0488f1 Avoid some unnecessary theme content lookups
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
2017-08-11 14:35:52 +02:00
l10n daemon script
24193527bf SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-08-11 04:56:36 +02:00
l10n daemon script
7b394146e5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-07-25 04:47:04 +02:00
David Edmundson
3a0f61b559 Load translations from KPackage files if bundled
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
2017-07-11 13:19:10 +01:00
Friedrich W. H. Kossebau
0e1219d03b API dox: use @param for normal parameter listing, not @arg 2017-07-03 16:24:20 +02:00
l10n daemon script
2d4548e4d0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-06-11 04:33:38 +02:00
Marco Martin
6ffe068b80 generate the old key before updating enabledborders
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
2017-06-09 16:16:16 +02:00
Aleix Pol
563011436d Port a bunch of classes away from Plasma::Package
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
2017-06-06 15:11:25 +02:00
Friedrich W. H. Kossebau
0fb9732866 [FEATURE] Option to build & install QCH file with the public API dox
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.
2017-06-05 04:25:55 +02:00
Aleix Pol
3b303d7363 Small improvements in IconItem
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
2017-05-29 19:10:37 +02:00
Friedrich W. H. Kossebau
fcee026657 API dox: note CamelCase includes by @class tag with more classes 2017-05-26 19:55:09 +02:00
Friedrich W. H. Kossebau
8749591922 API dox: fix doxygen notation with some post-position comments 2017-05-26 19:54:11 +02:00
l10n daemon script
6622a8c713 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-05-24 08:46:29 +02:00
l10n daemon script
bef0612029 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-09 04:01:12 +02:00
l10n daemon script
f7e83b4bcf SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-01 04:05:09 +02:00
Marco Martin
088a79d131 correct maskRequestedPrefix when no prefix is used
requestedprefix requires to not have the "-", don't fail anymore in
q->hasElementPrefix(frame->requestedPrefix) in
FrameSvgPrivate::generateBackground

BUG:377893
2017-03-22 14:11:37 +01:00
Marco Martin
bbcb217b48 actually delete old theme caches
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
2017-03-07 14:13:57 +01:00
David Edmundson
586ed85561 Ref/deref DataEngines even if the metadata is invalid
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
2017-03-06 00:12:27 +00:00
Roman Gilg
daee27f096 [Menu] Improve available space correction for openRelative
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
2017-03-02 21:02:32 +01:00
Marco Martin
2b3e8dfe86 move setImagePath logic into updateFrameData()
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
2017-02-28 13:35:09 +01:00
Martin Klapetek
2fea7077c8 Make the dataengine alignment timer more precise
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
2017-02-26 00:58:55 +01:00
David Edmundson
e301b63685 Fix binding loop regression in FrameSVGItem
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
2017-02-22 12:31:44 +00:00
Marco Martin
d8a1a9eb08 don't regenerate frames when setting every property
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
2017-02-07 13:08:27 +01:00
l10n daemon script
bba40b9b9d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-02-05 06:07:10 +01:00
Aleix Pol
6659517bce Specify NoDisplay type
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
2017-02-02 17:26:18 +01:00
Kai Uwe Broulik
d38be811e8 [FrameData] Avoid iterating keys()
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
2017-01-30 15:08:09 +01:00
Marco Martin
46c87d5ac3 it must also be possible for the status to be decreased again
this fixes the autohide panel being broken the first time an applet
like kickoff opens. when it closes again, the status has to be
decreased again
2017-01-19 14:30:13 +01:00
Eike Hein
2c69d22546 Add missing screenGeometryChanged signal; use in AppletInterface; fix typos.
Reviewed-by: Marco Martin

BUG:373075
2017-01-19 03:43:49 +09:00
Marco Martin
47ec9b84db correctly forward status from applets to containment
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
2017-01-17 18:07:10 +01:00
Kevin Funk
f8a7b418d5 Prefer nullptr over Q_NULLPTR 2017-01-16 18:17:34 +01:00
Albert Astals Cid
5c46e32993 Q_ENUMS -> Q_ENUM and Q_FLAGS -> Q_FLAG
REVIEW: 129826
2017-01-14 01:06:28 +01:00
Marco Martin
94edfa149f use KPluginMetaData::readStringList()
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
2017-01-03 17:19:10 +01:00
Marco Martin
642db25fb9 search/replace old hardcoded types from plasmapkg2
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
2017-01-03 13:25:02 +01:00
Kai Uwe Broulik
a0f3d2429d Fix X-Plasma-Drop* types
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
2017-01-03 09:31:21 +01:00
Martin Gräßlin
4798310ed7 Deprecate Plasma::Package API in PluginLoader
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
2016-12-27 18:20:35 +01:00
l10n daemon script
9581ada651 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-23 05:42:04 +01:00
l10n daemon script
2f4e59e902 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-22 05:52:51 +01:00
Marco Martin
6ae3a073db consider an empty panel always "applets loaded"
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
2016-12-21 18:11:51 +01:00
l10n daemon script
8431ef6e03 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-21 05:49:49 +01:00
l10n daemon script
793441b77b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-20 12:53:44 +01:00
l10n daemon script
4a97989f0f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-16 05:40:59 +01:00
Aleix Pol
7b5f5b57b0 Introduce undefined fields
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
2016-12-14 15:50:33 +01:00
Marco Martin
862a19b758 make X-Plasma-NotificationArea a string
due to wrong checking in systray client code, which checks the string "true"

reviewed-by:apol
2016-12-14 15:43:42 +01:00
l10n daemon script
86569bcdcd SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-13 04:07:30 +01:00
l10n daemon script
a92fa79cc0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-02 04:31:48 +01:00
l10n daemon script
3962e29b61 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-11-30 04:25:52 +01:00
l10n daemon script
711e7b4a94 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-11-25 04:59:58 +01:00
l10n daemon script
0bcaf4f529 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-11-23 04:19:18 +01:00
David Edmundson
760fb53e7d Check for metadata validty in settingsFileChanged
settingsFileChanged is called if the plugin metadata file changes, and
reloads the theme if the version changes.

However, if the metadata file now doesn't exist we need to check before
calling .version() otherwise it will assert.

If it doesn't exist, we want to reload the theme so that it will load
the correct thing.

BUG: 372651
REVIEW: 129436
2016-11-22 10:44:07 +00:00
Aleix Pol
edbccc5fca Dependency resolution code was moved to KPackage
Summary: Depends on D3299.

Test Plan: plasma still starts with all plasmoids

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3311
2016-11-08 16:50:18 +01:00
Aleix Pol
6d47160367 Don't reparse the metadata file if it's already loaded
By doing so, we don't tie ourselves to the desktop format as well as we
leverage cached data.
Expose Plasma::Package::kPackage

REVIEW: 129278
2016-10-31 12:04:06 +01:00
David Edmundson
c246588999 Don't show "Alternatives" menu by default
And only enable it in the contextMenuAboutToShow connection.

We currently enable/disable the menu in this slot, but we default to it
on. This meant other users of actions() that can't correctly emit
contextMenuAboutToShow gain an extra entry which might not be relevant.

REVIEW: 129263
2016-10-26 12:36:59 +01:00
l10n daemon script
96bb3e7645 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-10-21 09:28:41 +00:00
David Edmundson
07c978f619 Remove unused member var
REVIEW: 129104
2016-10-17 16:44:54 +01:00
Aleix Pol Gonzalez
9e54853ac8 Use less deprecated API
Makes it easier to look at the compilation output.

REVIEW: 129150
2016-10-17 13:36:51 +02:00
l10n daemon script
05e86467c4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-10-17 09:30:20 +00:00
l10n daemon script
8cc8753692 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-10-16 09:33:58 +00:00
Kai Uwe Broulik
e7e0344d35 [PluginLoader] Use operator<< for finalArgs instead of initializer list
When appending a list to an existing list using append or operator<< each item in the list
is added individually whereas with initializer list it just adds the entire list as one entry.

This caused the applet args to never be empty usually and resulted in externalData being
emitted in init() with a QVariantList as argument.

While this didn't do much for most applets it did break FolderView (and potentially others)
which updates its URL in response to this signal and stored the "data" it got in
plasmoid.configuration.url. FolderView's model did not accept this broken data [1] so the
folder would still work initially. On next startup, however, it loaded said value from
config and just went blank.

[1] "file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderViewLayer.qml:202:14: Unable to assign QJSValue to QString"

REVIEW: 129158
2016-10-13 10:18:06 +02:00
Marco Martin
b0a5bc09ef use kwayland for shadows and dialog positioning
use plasmashell interface for moving the dialog,
use kwayland as well for shadows.

this is supposed to replace the waylanddialogfilter
hack in plasmashell.

REVIEW:129148
2016-10-11 17:21:57 +02:00
Aleix Pol
ba9a8a16ab Fix loading plasmoids by absolute path
We were not looking into the plugin directory when figuring out the applet
path.
Fixes configmodeltest

REVIEW: 129143
2016-10-11 15:22:41 +02:00
l10n daemon script
98b7f48a89 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-10-11 10:31:56 +00:00
Marco Martin
014979d8bf Revert "Fix loading plasmoids by absolute path"
This reverts commit 2ed819f37d.

panel loading was completely broken, the patch idea was fine,
but has to be redone and tested better.

CCMAIL:aleixpol@kde.org
2016-10-10 23:31:37 +02:00
Aleix Pol
2ed819f37d Fix loading plasmoids by absolute path
We were not looking into the plugin directory when figuring out the applet
path when it's load from an absolute path.
Fixes configmodeltest

REVIEW: 129101
2016-10-10 21:30:02 +02:00
Aleix Pol Gonzalez
4a9d5cff2a Port some few remaining uses of pluginInfo to pluginMetaData
I forgot to do it in the previous RR.

REVIEW: 129100
2016-10-10 18:02:20 +02:00
Aleix Pol
0ebe2ca1fa Don't enforce metadata.desktop, cleanup constructor
Makes it possible to use plugins that offer a metadata.json file.
Define the service type when falling back to the desktop file parser, so
the type system is proper.
Don't destroy a KPluginMetadata tuple to instanciate it right away.

REVIEW: 129102
2016-10-10 16:28:13 +02:00
Aleix Pol
bd970141ce Simplify plugin construction by relying exclusively on KPluginMetaData
REVIEW: 129057
2016-10-04 23:56:17 +02:00
David Edmundson
0f2bc677b9 Check defaultActionsCfg is valid
Commit 752626ad55 left a code path through
the switch statement where defaultActionsCfg would be an invalid group.

This is semantically correct as there is no relevant actions config for
this type of containment, however we then call methods on it which leads
to an assert in kconfig - and a failing unit test.

REVIEW: 129096
2016-10-04 22:08:58 +01:00
David Edmundson
752626ad55 Don't load containment actions for embedded containments (system trays)
Also load the correct default actions for custom panels.

REVIEW: 129078
2016-10-03 11:45:32 +01:00
David Edmundson
048d5243f0 Update applet alternatives menu entry visibility on demand
It's reasnoble to expect people to download an applet just before trying
to change an existing applet using the alternatives system.

Therefore doing the check at applet initialisation time is semantically
wrong. Especially as it doesn't just disable the action but also skips
creating it.

Finally this gives a startup performance boost; loading all the applets
metadata takes a small amount of time (~20 milliseconds) not really
noticable when you're doing it once, but it adds up if you're doing it
over multiple applets sequentially.
2016-10-03 01:46:33 +01:00
Aleix Pol
7429791309 Improve timetracker output
Show times where 0 is the beginning of the process
Use QDebug to get QVariant's values
Delay constructor print so that we know which class is being constructed
Use QJsonObject instead of going back and forth with QVariantMap

Reviewed by David Edmundson
2016-09-29 12:32:11 +02:00
l10n daemon script
732b7d82a4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-09-29 09:53:12 +00:00
l10n daemon script
19c89d0b0c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-09-23 09:35:12 +00:00
David Edmundson
494c690b18 Don't include kdeglobals when dealing with a cache config
The svg elements cache isn't really a "configuration" and it's not
something that should be overridden by global config settings.

Loading it as a simple config skips the cascading and saves reparsing
kdeglobals.

REVIEW: 128966
2016-09-21 11:43:50 +01:00
David Edmundson
16b478a827 Fix Plasma::knownLanguages
There was a logic error meaning this did the exact opposite of what
it should have been doing.

Fortunately no-one calls it anywhere.

REVIEW: 128959
2016-09-20 14:31:29 +01:00
David Edmundson
580af56fe5 Minor optimisation/cleanup in scripengine loading
Avoid creating a KPLuginInfo list from KPluginMetaData

REVIEW: 128955
2016-09-20 14:30:30 +01:00
l10n daemon script
6837a1c855 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-09-15 09:46:00 +00:00
David Edmundson
820baec72e Avoid creating a KPluginInfo from a KPluginMetaData instance
It's not needed, gives a (very) tiny performance boost and is a bit
cleaner.

REVIEW: 128904
2016-09-14 13:39:10 +01:00
l10n daemon script
861f1c982a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-09-14 09:18:35 +00:00
l10n daemon script
71b8f9b22d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-09-09 09:25:38 +00:00
David Edmundson
81a314c7a9 Extra guard in Containment::corona in the special system tray case
REVIEW: 128754
2016-08-25 17:48:56 +01:00
David Edmundson
22ba8186f0 When marking a containment as deleted, also mark all sub-applets as deleted - fixes system tray container configs not being deleted
This allows a custom applet to do cleanup (like the system tray, to
delete the inner containment)

REVIEW: 128754
2016-08-25 17:48:23 +01:00
l10n daemon script
888dca5501 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-08-21 09:22:10 +00:00
Friedrich W. H. Kossebau
6521c72f75 Fix wrong or missing "X-KDE-ParentApp" in desktop file definitions
"X-Plasma-ParentApp" would be nicer, but existing code and desktop files
use "X-KDE-ParentApp" as name for that property

REVIEW: 128616
2016-08-20 17:26:05 +02:00
Friedrich W. H. Kossebau
4bf1ef7ea6 Fix API dox of Plasma::PluginLoader: mixup of applets/dataengine/services/...
REVIEW: 128616
2016-08-20 17:19:14 +02:00
David Edmundson
b07904b901 Remove code that can never be executed.
We know d->uiReady is false, otherwise we wouldn't be in this code
block. Modifying d->loadingApplets won't change that.

REVIEW: 128709
2016-08-18 13:21:08 +01:00
Marco Martin
e1a0299a46 don't manually delete applets
applets will be deleted by the parent, as they are
acontainment's children. by not deleting them by hand
also every signal will be disconnected, not causing appletRemoved
to be emitted, so not causing removal of config
pieces at shutdown, this removes the need of the
explicit disconnect in aboutToQuit from contaiment interface

Change-Id: Iddf6ded60ae849ca03c363be6e736da496310b82
reviewed-by: David Edmundson
2016-08-08 15:07:10 +02:00
Aleix Pol
de1a45764a Define what Plasma packagestructures extend plasmashell
It specifies org.kde.plasmashell as the structures' target

REVIEW: 128604
2016-08-05 15:24:23 +02:00
Aleix Pol
67d882037c Define Plasma PackageStructure as regular KPackage PackageStructure plugins
This way we can use kpackagetool5 against them (see RR 128590).

REVIEW: 128596
2016-08-04 19:23:59 +02:00
Kai Uwe Broulik
d91127ca58 [Containment] Treat HiddenStatus as low status
The containment's status is the max of all applets.

Unfortunately, HiddenStatus, while semantically lower, has the highest value,
so as soon as there's a hidden applet (eg. pager with just one virtual desktop),
the panel will always auto-hide even when popups are open as its status will be HiddenStatus.

REVIEW: 128301
2016-07-22 08:32:52 +02:00
Marco Martin
301193cb96 don't assume last is is numScreens()-1
screen ids are going to not be continuous anymore
as screen id is going to correspond 1:1 to connectors,
it will be possible to have "holes", therefore valid ids
that are bigger than screenNum()

REVIEWED-BY:sebas@kde.org
Change-Id: I1c0b1fb827dba4d95f228d32209403150c089c77
2016-07-18 14:47:53 +02:00
R. Harish Navnit
eef8c29b7a Plasma::Service::operationDescription() should return a QVariantMap
REVIEW: 127812
2016-06-27 12:11:25 +05:30
Allen Winter
a07c88cf77 plasma/scripting/scriptengine.cpp - -Wunused-parameter 2016-06-15 13:08:39 -04:00
Allen Winter
a04f0c3f8f plasma/private/timetracker.cpp - -Wpedantic 2016-06-15 13:08:39 -04:00
Marco Martin
6f5816fc57 ensure the scriptengine is here
ensure the scriptengine gets created also for c++ applets
that have a valid scriptengine, move the script init
out of applet::init that can be reimplemented.
remove the second appletscript constructor that is
not necessary anymore

REVIEWED-BY: Kai Uwe Broulik
2016-06-15 11:04:21 +02:00
David Faure
967e81611f PluginLoader::loadApplet: restore compatibility for misinstalled applets.
Summary:
The notifications applet installs the .so into the toplevel plugins dir,
and my earlier code removal broke the loading of that applet.

Reviewers: lbeltrame, mart

Reviewed By: mart

Differential Revision: https://phabricator.kde.org/D1851
2016-06-13 22:47:01 +02:00
David Faure
107c28d361 PluginLoader: improve error message about plugin version compatibility
Summary:
The name of the actual plugin was missing, making the warning rather useless.
Since this is only used within PluginLoader, I added a private function
isPluginVersionCompatible(KPluginLoader), taking code from
Plasma::isPluginVersionCompatible(uint). That one could probably be deprecated,
although no public replacement would be available, just "use PluginLoader".

Test Plan: plasmoidviewer -a org.kde.plasma.digitalclock

Reviewers: mart

Reviewed By: mart

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D1825
2016-06-12 18:13:12 +02:00
David Faure
181869e636 Remove erroneous plugin-loading compat code.
Summary:
This code was passing PREFIX/share/plasma/plasmoids/org.kde.desktopcontainment/metadata.desktop
to KPluginLoader (which expects a .so!), which led to warning noise
"Plasma::isPluginVersionCompatible: unversioned plugin detected, may result in instability"
(since that code tries to find a version symbol in the .so).

The reason why KPluginInfo::libraryPath() returns the .desktop file seems
to be a KPluginMetaData misuse, but this is compat code marked as "to be removed"
so I didn't fully debug the KPluginMetaData misuse.

Test Plan: plasmoidviewer -a org.kde.plasma.digitalclock

Reviewers: mart

Reviewed By: mart

Differential Revision: https://phabricator.kde.org/D1827
2016-06-12 18:12:02 +02:00
Marco Martin
84c29fa3d0 new containment type for the systray
add a new containment type for use in the systray:
this way it will be able to have a screen number without
actually creating a panel from its own

REVIEW:128118
2016-06-07 20:18:06 +02:00
Aleix Pol
9575b8c009 Let Plasma::Corona load the layout on all cases
We either load the existing layout or we load a default one.
With this, it could be removed from ShellCorona.

REVIEW: 127850
2016-06-07 15:23:13 +02:00
Marco Martin
4de0dd2e90 rename state property in status
emergency change: in Qml the name "state" for a property
is reserved for the internal state machine, so any object that
exposes a "state" property on its own would automatically
break the state machine
2016-06-01 14:47:56 +02:00
Marco Martin
f3c05034d9 Selected state for Plasma::Svg and IconItem
Like KIconloader, support a Selected state, in IconItem,
as in all generic svgs/framesvg
it replaces the text color with HighlightedText and the
background color with HighlightColor

Change-Id: Id97a527405d2c3feed75a172f05547defdbf440c
REVIEW:127975
2016-05-31 11:10:47 +02:00
Anthony Fieroni
2275db4b39 [dataengine]If the DataEngine constructor is called with an invalid KPluginInfo object, make sure valid is set to false.
+ test case

REVIEW: 127795

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2016-05-19 22:45:29 +03:00
Marco Martin
3bffad8c42 relicense few files
license to LGPL2+ as in frameworks licensing policy
The old license in the files was actually wrong, because:
servicejob_p.h : splitted from servicejob.cpp (already 2+)
in 89b71cd9f195da51993533f7fc2329ddc08a7de4

package_p.h: splitted from package.cpp (already 2+)
in 9cb9cfe65e

packagestructure_p.h: created by me in a629fe4d8f
(by copy/paste of the header)
2016-05-19 17:44:43 +02:00
Marco Martin
f98cae5dd0 Use SAX for Plasma::Svg stylesheet replacement
following KIconLoader, use QXmlStreamReader/Writer
here too to replace the svg stylesheet to color
the svg with system colors.
it should be hopefully slightly more efficient

REVIEW:127937
2016-05-17 14:45:54 +02:00
Marco Martin
2b7543c343 reload selected color scheme on colors changed 2016-05-10 17:18:48 +02:00
Marco Martin
f0c119696d highlight/highlightedText from proper color group
lately the highlight color of plasma became a very
washed-out blue, (since it switched to use the
global system colors) that was because it actually
taken the highlight color (and highlightedText)
from the wrong source.
there is a correct color group in kcolorscheme for
that, that is Selection, take those two colors
from that (also means highlight and highlightedtext
always be the same in all plasma::theme::colorgroups
but that's not a problem)

update test to reflect that

REVIEW:127842
2016-05-05 12:22:44 +02:00
Wolfgang Bauer
d884119f5a Always write the theme name to plasmarc, also if the default theme is chosen
Currently, the "name" key is deleted from plasmarc when you select the
default theme (breeze) in the desktop theme KCM.
This leads to unexpected behaviour: If you set e.g. oxygen as look&feel,
and then set breeze as desktop theme, Plasma actually uses Air (the
default desktop theme in the oxygen l&f) on next login instead of
breeze. In other words, it is impossible to configure breeze as desktop
theme when using a different look&feel as breeze.

This fixes the problem by removing the check whether the default theme
is selected and always writes the "name" config key to plasmarc.

REVIEW: 127698
2016-04-22 19:23:35 +02:00
Marco Martin
1cf145861b add Positive, Neutral, Negative text colors
add named colors for positive (usually green)
neutral(usually yellow) negative(usually red)
foreground objects, such as text or parts of
svg icons/themes

REVIEW:127696
Change-Id: I646306339f1684cdc062da3d3af1489af6092372
2016-04-20 18:25:50 +02:00
Marco Martin
553a9bfe53 bind highlightedText color in Plasma::Theme
we have a color in the Plasma theme "highlight" that is basically
an accent color used around.. but one of the uses is to use it as
a background, such as highlighted text. in that case we don't know
what color would be safe for contrasting on top of it for things
like the highlighted text color (plasma style used the background
color for that, which is incorrect)

REVIEW:127637
2016-04-13 12:28:53 +02:00
Friedrich W. H. Kossebau
9f48b41507 Fix unsetting associated application/urls for Plasma::Applets
Summary:
Avoids a crash and a bogus menu entry.

Current code does not properly handle any resetting, which results
in Applet::hasValidAssociatedApplication() still returning true
when urls have been set to an empty list and the application name
to an empty string.
Also are connections to the "destroyed" signal collected on
repeated set calls.
This patch fixes that.

This fixes "Run the Associated Application" menu entry showing up with widgets.

It also prevents the crash in associatedapplicationmanager.cpp:76, which assumes
url lists to be non-empty:
const QString mimeType = mimeDb.mimeTypeForUrl(i.value().first()).name();

Not happy yet with the signal/slot connection management,
improvement proposals welcome.

Reviewers: mart

Reviewed By: mart

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1372
2016-04-12 01:09:44 +02:00
Friedrich W. H. Kossebau
d2fdde4002 Don't expose symbols of private class DataEngineManager
Internal class since first release of plasma-frameworks
2016-04-11 14:19:57 +02:00