Commit Graph

141 Commits

Author SHA1 Message Date
Dawit Alemayehu
fb0b49af8c Normalize all signal/slot connections.
REVIEW: 103728
2012-02-13 14:27:21 -05:00
Aaron Seigo
3c401cd360 force of habit :) 2011-11-30 15:19:58 +01:00
Aaron Seigo
6cd33ae4a0 grab the source name before removing the iterator
the previous fix, which i accidentally reverted while cleaning up this code,
was actually wrong (so in a way i'm glad i caught it): the signal MUST be emitted
AFTER the item is removed from the collection otherwise any code that checks to
see if that source exists will see that it does still exist even though it was
just signaled as being removed. order sometimes really matters :)

CCMAIL:kde@rusu.info
BUG:287795
2011-11-30 09:23:03 +01:00
Marco Martin
58b6cc3e43 remove the iterator after accessing it 2011-11-29 15:53:17 +01:00
Aaron Seigo
e7ffcacf1f emit sourceRemoved when the container is deleted outside of removeSource 2011-11-28 10:42:40 +01:00
Aaron Seigo
e500cd4bd7 make removeAllSources match removeSource closer 2011-11-28 10:37:21 +01:00
Valentin Rusu
830026d068 Fix crash due to assertion in Qt when using Qt 4.8
=6  0x00007f34dd379ab5 in raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
=7  0x00007f34dd37afb6 in abort () at abort.c:92
=8  0x00007f34df37d208 in qt_message_output (msgType=QtFatalMsg,
buf=0x158b628 "ASSERT: \"item_exists()\" in file
/home/kde/include/QtCore/qhash.h, line 1037") at global/qglobal.cpp:2255
=9  0x00007f34df37d384 in qt_message(QtMsgType, const char *, typedef
__va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f34df542188
"ASSERT: \"%s\" in file %s, line %d", ap=0x7fff4835b7e0) at
global/qglobal.cpp:2301
=10 0x00007f34df37dbf2 in qFatal (msg=0x7f34df542188 "ASSERT: \"%s\" in
file %s, line %d") at global/qglobal.cpp:2484
=11 0x00007f34df37cdbb in qt_assert (assertion=0x7f34d5cc7311
"item_exists()", file=0x7f34d5cc72f0 "/home/kde/include/QtCore/qhash.h",
line=1037) at global/qglobal.cpp:1999
=12 0x00007f34d5b109ef in QMutableHashIterator<QString,
Plasma::DataContainer*>::key (this=0x7fff4835b920) at
/home/kde/include/QtCore/qhash.h:1037
=13 0x00007f34d5b0db4a in Plasma::DataEngine::removeAllSources
(this=0x1007a90) at /home/kde/work/kdelibs/plasma/dataengine.cpp:335
2011-10-05 23:03:37 +02:00
Aaron Seigo
28ab3be499 small performance improvement for the removeAllSources case 2011-10-03 14:07:19 +02:00
Aaron Seigo
423ce0c356 don't emit addSource for a source being added in a sourceRequest event until the event is over 2011-09-01 19:07:22 +02:00
Marco Martin
15ac609228 after applet's dataupdated is called, dirty=false
in DataEnginePrivate::connectSource, if it's an immediate call, and QMetaObject::invokeMethod(visualization, "dataUpdated" is called, means the datacontainers' dirty bit must be set to false, otherwise we will get two subsequent dataUpdated

can it have countereffects?

CCMAIL:plasma-devel@kde.org
2011-03-02 22:08:16 +01:00
Marco Martin
b0472dc212 port the kconfig based storage service to Sqlite
make save and restore methods of datasource private for now
pu this early so performance/disk usage etc can be tested

svn path=/trunk/KDE/kdelibs/; revision=1181650
2010-10-01 16:58:15 +00:00
Aaron J. Seigo
5c72c867eb values less than zero are completely valid
svn path=/trunk/KDE/kdelibs/; revision=1173983
2010-09-11 01:20:40 +00:00
Marco Martin
db7227e7f4 setStorageEnabled() is a way more sensible function name
svn path=/trunk/KDE/kdelibs/; revision=1168023
2010-08-25 21:35:40 +00:00
Aaron J. Seigo
3af1f71492 really don't store things that shouldn't be stored.
svn path=/trunk/KDE/kdelibs/; revision=1168012
2010-08-25 21:17:54 +00:00
Aaron J. Seigo
36c90e7137 prep DataEngine::Private for direct loading of packages, ala plasmoids
svn path=/trunk/KDE/kdelibs/; revision=1159707
2010-08-06 01:26:11 +00:00
Brian David Pritchett
1259ea24cd Redid much of the storage capability and implemented many suggestions.
svn path=/trunk/KDE/kdelibs/; revision=1156347
2010-07-28 23:28:31 +00:00
Aaron J. Seigo
451049664e * various FIXME notes in dataengine.cpp; Brian, if you could look through them and ask if you have any questions regarding them
* only check for stored data if the DataContainer is thusly marked; removes a huge bottleneck for non-storage-backed engines; currently this probably breaks storage support (since marking the source as storage related probably happens after it is created and so this doesn't get calle?) but there is a FIXME note there that states what the fix should be
* some code clean ups

CCMAIL:batenkaitos@gmail.com

svn path=/trunk/KDE/kdelibs/; revision=1150416
2010-07-15 21:58:58 +00:00
Aaron J. Seigo
4c4996ac3b this id should not be reset
svn path=/trunk/KDE/kdelibs/; revision=1149949
2010-07-14 17:15:20 +00:00
Brian David Pritchett
53a227a43f This adds the first iteration of data caching for dataengines.
svn path=/trunk/KDE/kdelibs/; revision=1149185
2010-07-12 20:51:12 +00:00
Aaron J. Seigo
0b877bdbb8 unused
svn path=/trunk/KDE/kdelibs/; revision=1137107
2010-06-11 17:18:06 +00:00
Sebastian Kügler
daf79ebe98 fix signal / slot
svn path=/trunk/KDE/kdelibs/; revision=1136817
2010-06-10 20:38:36 +00:00
Aaron J. Seigo
81ac415af6 don't pay the penalty of checking through the collection when we removed it ourselves; use the iterator we already have when erasing on container deletion instead of making the hash do another lookup based on key
svn path=/trunk/KDE/kdelibs/; revision=1136422
2010-06-09 19:09:13 +00:00
Laurent Montel
ec543102a2 Fix iterator
svn path=/trunk/KDE/kdelibs/; revision=1136417
2010-06-09 18:41:23 +00:00
Marco Martin
3e3fd09aab clean up from the sources if somebody deletes a DataContainer
BUG:235881

svn path=/trunk/KDE/kdelibs/; revision=1136398
2010-06-09 18:04:28 +00:00
Aaron J. Seigo
fe70333098 never has been needed
svn path=/trunk/KDE/kdelibs/; revision=1128636
2010-05-19 20:02:31 +00:00
Shaun Reich
a5da2705a9 introduce setDefaultService(serviceName) and createDefaultService(QObject*). allows the dataengine (inheritor) to specify which service should probably be used. so applet users don't have to know those things if it's just 1
svn path=/trunk/KDE/kdelibs/; revision=1126712
2010-05-14 17:41:40 +00:00
Aaron J. Seigo
e56ec546f3 SVN_SILENT: ooh, old. tidy up.
svn path=/trunk/KDE/kdelibs/; revision=1122858
2010-05-04 21:15:10 +00:00
Aaron J. Seigo
2213c2e77b a little more conservative
svn path=/trunk/KDE/kdelibs/; revision=1122507
2010-05-04 03:28:09 +00:00
Aaron J. Seigo
43240c4c19 if the source is new, but comes with data, we need to do an update immediately
svn path=/trunk/KDE/kdelibs/; revision=1116989
2010-04-20 19:50:41 +00:00
Aaron J. Seigo
645419f2f5 protect against stupid DataEngineScript implementations
BUG:230225

svn path=/trunk/KDE/kdelibs/; revision=1101773
2010-03-10 21:41:37 +00:00
Marco Martin
c1d8b6211c unfortunately at the moment a remote dataengine can only poll.
as the sourceadded poll, this will have to become a push from the remote end

svn path=/trunk/KDE/kdelibs/; revision=1092101
2010-02-18 10:05:31 +00:00
Aaron J. Seigo
65eda15e5d private headers
svn path=/trunk/KDE/kdelibs/; revision=1053920
2009-11-25 01:09:17 +00:00
Petri Damstén
5b2b221562 * Add translation support for runner and dataengine packages
* Use pladmoid package for runners too.

svn path=/trunk/KDE/kdelibs/; revision=1047782
2009-11-12 06:38:16 +00:00
Aaron J. Seigo
543f6fa81c SVN_SILENT: --warnings
svn path=/trunk/KDE/kdelibs/; revision=1026397
2009-09-21 18:15:42 +00:00
Aaron J. Seigo
1c265e78b3 we really don't need to see all this debug output
svn path=/trunk/KDE/kdelibs/; revision=1019518
2009-09-03 19:31:26 +00:00
Rob Scheepmaker
9cb9cfe65e Push in remote widgets
svn path=/trunk/KDE/kdelibs/; revision=1018655
2009-09-02 02:27:16 +00:00
Aaron J. Seigo
4d8abe97b0 don't do an immediate call if the data set is empty. this _shouldn't_ break anything (worst case is that a visualization would be expecting notification of an empty data set, and now it'll have to wait) and should line up with widget writer's expectations better (it's probably the #1 thing we get feedback on when it comes to dataengine usage)
svn path=/trunk/KDE/kdelibs/; revision=1013572
2009-08-20 09:34:36 +00:00
Aaron J. Seigo
71640d2866 kill the timer first, just in case on of the sources updates, causing a visualization to do something that then triggers another source update in the same engine
svn path=/trunk/KDE/kdelibs/; revision=1006047
2009-08-02 21:56:51 +00:00
Aaron J. Seigo
5bdb436709 allow kicking all visualizations immediately rather than wait for their timeouts in the case of changes that _must_ be reflected immediatley, e.g. time changes or network availability causing first fetch of data
svn path=/trunk/KDE/kdelibs/; revision=987939
2009-06-27 01:26:33 +00:00
Aaron J. Seigo
230a162b94 make all calls to scheduleSourcesUpdate async so engines that use that internally don't incure a time penalty for doing so
svn path=/trunk/KDE/kdelibs/; revision=965473
2009-05-09 00:32:45 +00:00
Aaron J. Seigo
599fcdd138 ignore timer id's that aren't ours
svn path=/trunk/KDE/kdelibs/; revision=944581
2009-03-25 19:10:02 +00:00
Aaron J. Seigo
240a1632a9 actually need to update queueCount otherwise we just go until we run out of sources and an assert due to dequeuing an empty stack. whoops.
svn path=/trunk/KDE/kdelibs/; revision=914768
2009-01-21 18:23:10 +00:00
Laurent Montel
eebb6178a5 Fix iterator
svn path=/trunk/KDE/kdelibs/; revision=906617
2009-01-06 13:09:05 +00:00
Aaron J. Seigo
bfd0c6cfba updateAllSources; second time i needed this tonight, so in it goes
svn path=/trunk/KDE/kdelibs/; revision=883535
2008-11-13 07:40:57 +00:00
Simon Edwards
ccb20997ab Send DataEngine::sources() and DataEngine::serviceForSource() on to the script engine if needed.
svn path=/trunk/KDE/kdelibs/; revision=881713
2008-11-08 20:44:03 +00:00
Richard Dale
ecad3fb271 * Add package() and mainScript() methods to the scripting dataengine class
* Fix expected load path for a scripting dataengine and change from
  'plasma/engines' to 'plasma/dataengines' to be in line with the 
  'dataengine' type option of the plasmapkg tool

CCMAIL: kde-bindings@kde.org


svn path=/trunk/KDE/kdelibs/; revision=880550
2008-11-05 20:32:51 +00:00
Aaron J. Seigo
4b08c03726 change KDE includes to use the .h style now that we're in libs
svn path=/trunk/KDE/kdelibs/; revision=879795
2008-11-04 02:04:34 +00:00
Aaron J. Seigo
1b523b9054 ok, this time JUST the plasma dir ;)
svn path=/trunk/KDE/kdelibs/; revision=879759
2008-11-03 23:08:39 +00:00
Aaron J. Seigo
fa5a2d87d9 bum-de-dum! plasma to kdelibs.
svn path=/trunk/KDE/kdelibs/; revision=879757
2008-11-03 23:03:26 +00:00
Simon Edwards
2b932160e6 Added a pluginName() method to DataEngine to match the one in Applet. (Useful for scripting.)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=874609
2008-10-21 22:22:57 +00:00