Commit Graph

1134 Commits

Author SHA1 Message Date
Laurent Montel
b387faa935 Port qrand to QRandomGenerator (qrand is deprecated in qt5.15)
Summary: Port to QRandomGenerator

Reviewers: apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26464
2020-01-07 06:47:10 +01:00
Laurent Montel
3f30f91fb0 Port endl to \n Not necessary to flush as QTextStream uses QFile which flush when it's deleted
Summary: Port endl to \n

Reviewers: dfaure, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26465
2020-01-07 06:46:45 +01:00
Laurent Montel
d345bdd87f Port deprecated QSet::toList method 2019-12-19 13:55:07 +01:00
David Faure
00ddc6c1f0 [plasma-framework] port away from deprecated KF5 APIs
Summary:
KDeclarative::setupBindings() is deprecated, replaced calls with its
implementation (setupContext + static setupEngine call), but see comment
about whether we can be sure this is done only once per engine, as
requested by the setupEngine API. It's 100% equivalent to the old code
though, can't be worse.

KPackage::contentsHash is deprecated, replaced call with implementation.

Depends on D25433 for the KActionCollection::changed signal.

Test Plan: Builds

Reviewers: mart, davidedmundson, broulik, apol

Reviewed By: apol

Subscribers: apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25434
2019-12-15 00:01:39 +01:00
l10n daemon script
d2fba8a760 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"
2019-12-09 05:18:11 +01:00
Marco Martin
af861eb2a4 move backgroundhints managment in Applet
Summary:
Applet is the more proper way to do it (and will make easier porting
to KF6) this also make it possible for the scripting interface to
access userBackgroundHints

Test Plan: everything behaves the same in plasmashell, the background button in the handle works

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25742
2019-12-05 10:41:57 +01:00
Marco Martin
57fdb56790 support for user removing background and automatic shadow
Summary:
add the ability for the user to override the background hints anddecide
about applets having background or a shadow
A new handle button will be added to manually enable/disable background for
plasmoids that support it
if they don't, the ImmutableBackground flag is set in the hints.

PlasmaCore.ColorScope has been expanded to work more like Kirigami.Theme (which will be replaced by) even if it's oòld behavior still works. This makes the complementary colorscope in applets with shadow actually work (and at the same time gives a clearer porting path for kf6)

Test Plan: Tested the functionality and correct save/restore

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, ndavis, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25590
2019-11-29 10:45:08 +01:00
Yuri Chornoivan
052a81f755 Fix minor issues found by EBN and typos 2019-11-10 12:06:10 +02:00
l10n daemon script
876dafaedb 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"
2019-11-06 05:33:56 +01:00
Marco Martin
5f46dd6bd5 add DisabledTextColor to Theme 2019-10-29 11:29:12 +01:00
Friedrich W. H. Kossebau
d70eadb977 API dox: adapt kapidox & ecm_add_qch settings to new deprecation macros
GIT_SILENT
2019-10-22 19:41:15 +02:00
Björn Feber
bbe0148db5 Improve panel options menu entries
Summary:
- Move "Panel Options" context menu items out of submenu
- Rename "Configure Panel..." option

See M144, T10047, T10190. This makes the panel customization options much more discoverable.

Test Plan: Open the panel context menu.

Reviewers: #plasma, #vdg, mart

Reviewed By: #plasma, #vdg, mart

Subscribers: davidedmundson, ngraham, #vdg, kde-frameworks-devel, #plasma

Tags: #frameworks

Maniphest Tasks: T10190, T11094, T10402

Differential Revision: https://phabricator.kde.org/D23951
2019-10-21 19:53:46 +02:00
Marco Martin
acbb200ac2 edit mode action
Summary: needed for the context menu entry

Test Plan: with the p-w- portion the action shows in the context menu

Reviewers: #plasma, #vdg, GB_2, ngraham, davidedmundson

Reviewed By: #plasma, #vdg, ngraham, davidedmundson

Subscribers: davidedmundson, broulik, GB_2, ngraham, kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T10190, T11094, T10402

Differential Revision: https://phabricator.kde.org/D24263
2019-10-21 13:06:01 +02:00
Friedrich W. H. Kossebau
573b9a439f Enable KF_* group deprecation macros
GIT_SILENT
2019-10-20 03:46:32 +02:00
Friedrich W. H. Kossebau
df7f981890 Use ECMGenerateExportHeader to manage deprecated API better
Summary:
Allows
* projects linking to Plasma to hide deprecated API up to a
  given version or silence deprecation warnings after a given version,
  using
  * -DPLASMA_DISABLE_DEPRECATED_BEFORE_AND_AT
  * -DPLASMA_NO_DEPRECATED
  * -DPLASMA_DEPRECATED_WARNINGS_SINCE
  * -DPLASMA_NO_DEPRECATED_WARNINGS
  * -DPLASMAQUICK_DISABLE_DEPRECATED_BEFORE_AND_AT
  * -DPLASMAQUICK_NO_DEPRECATED
  * -DPLASMAQUICK_DEPRECATED_WARNINGS_SINCE
  * -DPLASMAQUICK_NO_DEPRECATED_WARNINGS

  or
  * -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT
  * -DKF_NO_DEPRECATED
  * -DKF_DEPRECATED_WARNINGS_SINCE
  * -DKF_NO_DEPRECATED_WARNINGS

Reviewers: #plasma, mart, davidedmundson, apol, mlaurent

Reviewed By: #plasma, mart, mlaurent

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D24678
2019-10-19 00:42:13 +02:00
Friedrich W. H. Kossebau
ab8e63a5a5 Use new INCLUDE_DIRS with ecm_add_qch, to have doxygen see more includes
GIT_SILENT
2019-10-19 00:39:53 +02:00
David Edmundson
982c052025 [pluginloader] Use categorized logging 2019-09-30 09:29:40 +01:00
Marco Martin
c621ebe572 make editMode a corona global property
Summary:
The plans are to switch on/off the whole plasma shell into edit mode.
For this it needs to be a global corona property, rather then just
containmentInterface.
Plasmashell would expose a dbus call to set it from systemsettings

Test Plan: plasmoid.editMode=true still works

Reviewers: #plasma, #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ngraham, GB_2, broulik, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D24239
2019-09-26 19:53:41 +02:00
David Faure
b466a2a211 Port away from deprecated methods in Qt 5.14
Test Plan: Builds with -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 (as of today)

Reviewers: davidedmundson, broulik, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23970
2019-09-16 05:40:34 +02:00
Friedrich W. H. Kossebau
c88354e0ed API dox: add missing @since
GIT_SILENT
2019-09-08 23:51:04 +02:00
Friedrich W. H. Kossebau
295059675c API dox: use full signatures for autolink on overloaded methods
GIT_SILENT
2019-09-08 23:50:40 +02:00
David Edmundson
5f746ce1c2 Fix crash on teardown with Applet's ConfigLoader
Summary:
Deleting AppletPrivate will delete the ConfigLoader which will cause a
save, which can trigger a configSaved signal.

I think it is correct that the config might emit a signal just before
closing, and not at fault.

AppletPrivate is deleted by this point, but Applet is not so the
connection is still alive.

When we handle the signal, it goes into a Q_PRIVATE_SLOT that crashes.

This disconnect pattern is already used for guarding self config
changes.

BUG: 411221

Test Plan: kquitapp5 plasmashell, no longer crashes

Reviewers: #plasma, alexeymin

Reviewed By: alexeymin

Subscribers: alexeymin, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23707
2019-09-07 23:19:03 +02:00
Aleix Pol
d3b22f8828 Port trivial connects to the new style 2019-08-30 17:26:54 +02:00
Laurent Montel
f53365633c GIT_SILENT: Use QLatin1String in QString::contains etc. Fix replace
usage
2019-08-29 07:25:48 +02:00
l10n daemon script
9a3351fae5 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"
2019-08-20 04:58:25 +02:00
l10n daemon script
56aa6dee3a 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"
2019-08-17 05:07:40 +02:00
David Edmundson
af2a7fbf69 Compile package structure plugins into expected subdirectory
Summary: This means they're found by unit tests pre-installation

Test Plan:
Removed installed files
Ran make (but not make install)
ConfigModelTest now passes

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22682
2019-07-24 17:07:29 +01:00
Aleix Pol
04c0ff5cd7 Make sure we compare paths properly 2019-07-23 19:41:05 +02:00
Marco Martin
0e859870a9 Search for the plugin of the other plasmoid
Summary:
Some applets use completely the code of another one with the key
X-Plasma-RootPath.
At the moment it doesn't work on applets that have a binary plugin portion
This makes pluginloader load the plugin of the original applet we're using

Test Plan:
an applet that falls back to one that has a binary plugin now works.
ones that fall back to applets without binary plugin still work
normal applets as well

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22675
2019-07-23 11:13:13 +02:00
Harald Sitter
a965fa4cb8 remove dangling remote widgets code
Summary:
can't be enabled anywhere + not actually doing anything as there is no
backing for it in the cpp + qca isn't even looked for by cmake

Test Plan: none

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22618
2019-07-22 10:02:03 +02:00
Marco Martin
ccceb83b10 use clearItems when an applet gets deleted
back when this was written KConfigSkeleton didn't have clearItems
and setDefaults can still leave some cruft behind
this ensures all is gone
2019-07-18 17:44:15 +02:00
Aleix Pol
e6cbea39ff Remove unused bits in ContainmentAction 2019-07-10 19:26:50 +02:00
Aleix Pol
21227e0f98 Improve plugin caching
Summary:
Extend the plasmoid startup cache to DataEngines and ContaimentActions.
Include a cache for script engines. In practice it's always the same, we don't
need to check the file system every time.

Reviewers: #plasma, davidedmundson, mart

Reviewed By: #plasma, davidedmundson, mart

Subscribers: davidedmundson, mart, broulik, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22258
2019-07-08 13:48:05 +02:00
Kai Uwe Broulik
214838313d [Svg] Fix porting error from QRegExp::exactMatch
The CACHE_ID_NATURAL_SIZE adds stuff around the argument string, so explicitly move the ^ and $ outside.

Differential Revision: https://phabricator.kde.org/D22275
2019-07-05 08:56:38 +02:00
Aleix Pol
46f0da45c6 ContainmentAction: Fix loading from KPlugin
Summary: At the moment it was enabled in the PluginLoader but we were not using it anywhere.

Test Plan: See patch in plasma-workspace.

Reviewers: #plasma, #frameworks, mart

Reviewed By: #plasma, mart

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22267
2019-07-05 01:04:07 +02:00
Aleix Pol
e3c6c2731e regular expression shouldn't be static 2019-07-04 12:20:42 +02:00
Aleix Pol
6c692309ed Better use of Qt APIs in Plasma::Theme
Summary:
Try not to access hashes repeatedly.
QRegExp -> QRegularExpression.

Reviewers: #plasma, #frameworks, fvogt, mart

Reviewed By: #plasma, mart

Subscribers: bruns, tcanabrava, fvogt, broulik, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22147
2019-07-02 16:46:53 +02:00
Bhushan Shah
7ae271987c pluginloader: Change behavior of X-KDE-ParentApp
Summary:
X-KDE-ParentApp is the key in desktop file to display that given service
or application is part of the another application or extension of other
application. In KDE4 this key was used to mark applets to be used in the
specific application like plasma-desktop, kdevelop, amarok etc.

In KF5 world, none of this applications have applet loading mechanism
apart from plasma*, and there are likely only Plasma applet, containment
or dataengines.

Previous API, when no/empty parentApp was passed would filter out every
application which had something as parentApp. This was to ensure only
compatible plugins are loaded in Plasma. This resulted in applets
getting excluded if they suggested that org.kde.plasmashell is their
parent application. Refine this API to,

- If no/empty parentApp is provided, provide all applets
- If parentApp is provided, filter by applet

This behavior is more filter like instead of other way around.

CHANGELOG: Applet, DataEngine and containment listing methods in
Plasma::PluginLoader no longer filters the plugins with X-KDE-ParentApp
provided when empty string is passed.

Test Plan:
tested that plasma loads properly, plasmaengineexplorer lists
all engines and plasmawindowed works fine. Neverthless requires more testing

Reviewers: mart, apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22049
2019-06-23 20:39:41 +05:30
Aleix Pol
097f0e83e7 Make Plasma::Svg::elementRect a bit leaner
Summary:
Don't double-access maps
Don't construct ids more times than necessary.
Make regular expression static so it's not compiled on every run.
Remove unused code.

Reviewers: #plasma, #frameworks, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: bruns, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D21788
2019-06-21 15:25:42 +02:00
Aleix Pol
52124c663e Don't notify about changing to the same state it was at
Summary:
The object tracker was telling me it's notifying the same value it
already got, and reading the code it seems to be already notifying when it
actually changes.

Test Plan: tests pass, plasma runs fine.

Reviewers: #plasma

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D21481
2019-06-13 01:04:53 +02:00
Aleix Pol
09fa87a7b7 Revert "Pass fully-qualified arguments and return values to moc"
This could break old-style connects. Let's keep it as it was until KF6
as discussed in the channel. Thanks frinring for pointing it out.

This reverts commit f631aec33f.
2019-05-30 16:05:36 +02:00
Aleix Pol
0b18d4f0b3 Don't modify a temporary object
Summary: Instead copy the object, operate it and update it into the object.

Test Plan:
just used plasma shell and ran the tests. I'm not sure who uses this.
Issue found with clazy.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D21483
2019-05-30 15:38:35 +02:00
Aleix Pol
f631aec33f Pass fully-qualified arguments and return values to moc
Summary: Otherwise it thinks it's different types.

Test Plan: tests pass, plasmashell works

Reviewers: #plasma, #frameworks, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D21480
2019-05-30 15:38:09 +02:00
Aleix Pol
756a21a6ff Fix warnings
Don't pass objects to lambdas that get unused.
Don't connect to lambdas without specifying the target object, if an object
reference is passed to the lambda.
2019-05-29 16:23:29 +02:00
Friedrich W. H. Kossebau
f008615e37 FrameSvg: also clear mask cache on clearCache()
Summary:
It can be unexpected that those are not reset when clearCache() was called.

With the current logic when a theme changes the mask cache not reset also
results in wrong lookups, as the cacheid used as key does not include the
theme name.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D21172
2019-05-14 17:08:29 +02:00
Friedrich W. H. Kossebau
8899389c9f FrameSvg: make hasElementPrefix() also handle prefix with trailing -
Summary:
there are a few places which potentially pass a prefix with a trailing -,
e.g. if using directly the value of FrameSvg::prefix() or
FrameSvg::actualPrefix(). Support the assumption in such code, unbreaking
its currently not working behaviour.

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D21174
2019-05-14 17:08:00 +02:00
Friedrich W. H. Kossebau
6af447a848 FrameSvgPrivate::generateBackground: generate background also if reqp != p
Summary:
d8a1a9eb08 changed the condition from
hasElementPrefix(q->prefix()) to hasElementPrefix(frame->requestedPrefix)
but it is not clear why, as the background is generated from the prefix
data & the requestedPrefix is no-where in effect.
As a result sometimes the background is not rendered for a given
not-existing requestedPrefix which was mapped to an empty prefix instead.

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D21175
2019-05-14 17:07:24 +02:00
Friedrich W. H. Kossebau
193775def6 FrameSvg: prevent crash when calling mask() with no frame yet created
Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D21200
2019-05-14 15:10:07 +02:00
Friedrich W. H. Kossebau
9142155b5a API dox: note for FrameSvg::prefix()/actualPrefix() the trailing '-'
Reviewers: #plasma, dhaumann

Reviewed By: dhaumann

Subscribers: apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D21173
2019-05-13 23:44:58 +02:00
Friedrich W. H. Kossebau
0f65c95771 API dox: point to Plasma5 versions on techbase if avail 2019-05-13 01:09:26 +02:00