Commit Graph

62 Commits

Author SHA1 Message Date
Aleix Pol
9f62532674 Fix most of Clazy warnings in plasma-framework
REVIEW: 126672
2016-02-29 00:13:41 +01:00
David Edmundson
01cd374c8e Don't emit statusChanged if it hasn't changed
For some applets the status is bound to a complex expression that can be
re-evaluated a lot. This ends up causing a lot of unnecassary updates.

REVIEW: 126471
2015-12-22 17:32:28 +00:00
Martin Klapetek
76186339f6 [libplasma] Add categorized debug output 2015-12-15 16:56:40 -05:00
Nick Shaforostoff
c7c2980f14 qstring optimizations
REVIEW: 126148
2015-11-27 20:03:48 +00:00
Marco Martin
64fdce2086 Revert "plasma: Fix applet actions might be nullptr"
This reverts commit 4e9b32d80d.

doesn't fix the problem and just introduces a memleak
(the crash is actually about a deleted containment,
so the problem is somewhere else)
CCMAIL:xiangzhai83@gmail.com
2015-10-07 17:19:13 +02:00
Leslie Zhai
4e9b32d80d plasma: Fix applet actions might be nullptr
BUG:351777
2015-08-26 17:24:29 +08:00
Marco Martin
ea924b1469 port libplasma away from sycoca as much as possible
this ports most of libplasma away from sycoca, using instead
a combination of KPluginLoader and KPackage::PackageLoader instead
(so eventually using their own little caches instead of the
global sycoca cache)
a kservicetypetrader call is left in the loading of
containmentactions since is the only way to make an older
workspace still work, but is only a fallback, so containmentactions
in plasma-workspace can be ported eventually as well

Change-Id: Ie9579c3e01284f6d97043e22d01bbe63d3c3f45a
REVIEW:123626
2015-05-07 16:26:37 +02:00
Marco Martin
fac1100fff make sure to not emit immutabilityChanged at startup
if the immutability doesn't actuall change at startup,
don't emit immutabilityChanged even tough each applet needs
one ImmutableConstraint at start to correctly initialize
stuff

Change-Id: Id1fd40ffd62c09a2b092d13d7fb4c556cfb34994
2015-03-17 19:13:28 +01:00
David Edmundson
e0f6b76f4b Port from deprecated KConfigLoader API
Change-Id: I9fe88d2b0b16dab02e4e35af3d0e992cec0edb91
2015-02-11 14:52:41 +01:00
Marco Martin
a629fe4d8f migrate to KPackage
Plasma::Package internally uses KPackage, being a pure wrapper.
old client code and old packagestructures still work using the wrapper.
old workspace code that is not directly using kpackage continues to work correctly

Change-Id: I05f95e8d05e3b67759973c4009e3753c61b1dcce
2014-12-29 13:56:52 +01:00
Marco Martin
73500516ff track changes in destroyed()
Change-Id: Ibc4dcc64028e1127dd55e7c7d4d73000d2964dab
2014-10-30 18:06:50 +01:00
Marco Martin
f870ea1a11 drop QwaitingDeletionStatus
emit appletRemoved and appletAdded instead, making the graphics representation
(almost) just work

Change-Id: I481dbbb4dbf7d01a121b92511410dfee79b16469
2014-10-30 18:06:50 +01:00
Marco Martin
2475a2560e really delete awaiting applets on quit
Change-Id: I3b9107f988bde75262f27c1fd7e851b868140ccf
2014-10-28 19:07:09 +01:00
Nicolás Alvarez
8515d0ef09 Fix reference to Types::ImmutabilityType.
I don't know how Types::Types::ImmutabilityType even worked in gcc...
2014-08-30 14:45:50 -03:00
Marco Martin
80516dbef0 framework part of the applet alternatives chooser
this is the little part in plasma-framework for the applet alternatives chooser.
works together the branch mart/alternativesConfig of plasma-workspace and plsma-desktop.
for how it looks and why, see the vdg forum thread:
https://forum.kde.org/viewtopic.php?f=285&t=122067&p=315919#p315919

still possible problems:

I'm not sure about using a new desktop file entry X-Plasma-Provides, maybe Categories could be enough, but it may produce many false positives as well

REVIEW:119409
2014-07-23 12:25:32 +02:00
Marco Martin
2d29445164 set the shortcut to the action
BUG:334855
2014-05-16 10:03:45 +02:00
Eike Hein
1805bb7496 Make sure the args part of Containment::createApplet(..., args) ends up in the applet. 2014-05-06 20:52:42 +02:00
David Edmundson
4ce14a1654 Remove duplicated ConfigLoader
This moved to KConfigGui as KConfigLoader.

Use of private KConfig API in Service had to be ported to use only
public method.

REVIEW: 117784
2014-04-26 17:10:13 +02:00
Kevin Ottens
72ba7b4146 Apply the astyle-kdelibs script 2014-04-26 01:48:37 +02:00
Marco Martin
18f54dff73 make possible for containments to run as applets
take into account the slightly different behaviour needed when containments such as folderview act as a normal plasmoid
BUG:333320
2014-04-14 14:03:49 +02:00
Aleix Pol
9a305de76d Fix activationAction connection
It was connecting to a deprecated signal, use QAction::changed instead.
Since QAction::changed is more generic and modifying the shortcut seems
expensive, actually check that the property is different from the previous
value.

Reviewed by Vishesh Handa.
2014-04-12 20:09:08 +02:00
Marco Martin
767336e87e isContainment() only true for proper containments 2014-04-10 20:53:19 +02:00
Marco Martin
614af69f02 never show the dialog on destroy()
the remove action is now hooked to another slot, askDestroy()
it *MAY* solve the "Do you wish to remove this default desktop" bug, or may get it worse
CCBUG:332137
2014-03-20 19:22:27 +01:00
Marco Martin
cc8de5a789 remove unused variable 2014-03-11 17:07:15 +01:00
Marco Martin
d397358346 Make the delete containment dialog async
a syncronous dialog brings crashes if something gets deleted while the dialog's event loop is in execution
BUG:332027
2014-03-11 17:04:31 +01:00
David Edmundson
fb7451051e Expose globalShortcut in AppletInterface so it can be set from the config 2014-03-05 17:28:50 +01:00
Marco Martin
a0aa88f00d formFactorChanged, locationchanged signals 2014-03-04 18:13:19 +01:00
Marco Martin
12a766795e return the correct immutability 2014-02-17 12:00:24 +01:00
Marco Martin
50a584d0bc rename Applet::activate() with Applet::activated()
activate() is a name that suggests a slot more than a signal
2014-02-14 14:40:53 +01:00
Marco Martin
59dbfeeab6 ask confirmation to delete containments 2014-02-13 15:30:07 +01:00
David Edmundson
ef58fdbf6f Remove Applet::Private::isContainment
Instead determine by introspecting if this inherits from Containment

REVIEW: 114405
2013-12-11 15:50:48 +01:00
Aleix Pol
2cb4ebd6f5 Code cleanup
Remove unused includes
Remove void code logic (KCMUTILS_LIBS was always empty anyway)
2013-11-15 16:56:17 +01:00
Marco Martin
fab4818c92 allow plasmoids to change icon
changing icon will change the icon of the default compact representation
2013-09-23 16:44:31 +02:00
Sebastian Kügler
2817591bee kcoreauthorized.h -> kauthorized.h 2013-09-16 16:16:52 +02:00
Marco Martin
590cb7baa7 a property in Applet to tell if the user is configuring
pure model, doesn't actually carry the config dialog, but serves as bookkeeping
2013-08-20 18:17:20 +02:00
Marco Martin
8750d01f40 move the tracking of uiReady into libplasma
doesn't still have nothing about ui, is completely bookkeeping, but is
easier to have it correct there
2013-08-09 21:51:13 +02:00
Sebastian Kügler
f034b84daf add ctor back in that got lost during the merge 2013-07-30 21:31:12 +02:00
Sebastian Kügler
b9dec2cd99 Use kservice test as well 2013-07-30 21:26:47 +02:00
Kevin Ottens
0e590217f8 Port away from kdebug 2013-07-30 08:05:09 +02:00
Sebastian Kügler
0822e4cb9e Applet::globalShortcut becomes QKeySequence
- Port away from KShortcut
- Use QKeySequence instead of QShortcut (which might be the obvious
  choice, for two reasons:
	- QKeySequence doesn't require QWidgets
	- It's really all we need

This reduces KShortcut and QShortcut usage in plasma-framework to zarro.
2013-07-10 02:33:28 +02:00
Sebastian Kügler
946a800a7a Replace QAction with KAction in containment
With this commit, plasma-framework is free from (direct) usage of
KAction. \o/

Removes any left-over KAction includes and fw-declarations.
2013-07-10 01:59:39 +02:00
Sebastian Kügler
fc2afcb9a1 Port global applet shortcut from KAction to QAction
- use QAction instead of KAction
- use KGlobalAccel for global shortcut registration and query
2013-07-10 01:45:41 +02:00
Marco Martin
13045faffa rename ItemStatus 2013-05-14 20:49:50 +02:00
Marco Martin
7761a995f2 rename ImmutabilityType 2013-05-14 20:27:32 +02:00
Marco Martin
812b9a06ab get rid of Plasma::Location 2013-05-14 18:27:27 +02:00
Marco Martin
9b9fbf6eb9 get rid of Plasma::FormFactor 2013-05-14 18:19:33 +02:00
Marco Martin
ad2fe77745 get rid of Plasma::Constraint 2013-05-14 18:08:58 +02:00
Marco Martin
e07600a83f Put all Plasma emums in a Types class
This makes possible to use them directly frmo QML
as a minus, is not pretty and requires tons of search and replace in old
c++ code
2013-05-10 19:29:13 +02:00
Marco Martin
fd97160327 remove the singleton usage from everywhere 2013-03-12 16:29:04 +01:00
Aaron Seigo
224946e394 less jumping around and desktop assumptions 2013-03-11 12:49:59 +01:00