Blame kdelibs-4.3.1-kdebug#202550.patch
|
|
5638876 |
--- branches/KDE/4.3/kdelibs/plasma/private/service_p.h 2009/08/02 18:26:50 1005966
|
|
|
5638876 |
+++ branches/KDE/4.3/kdelibs/plasma/private/service_p.h 2009/08/02 18:27:44 1005967
|
|
|
5638876 |
@@ -73,6 +73,7 @@
|
|
|
5638876 |
ServicePrivate(Service *service)
|
|
|
5638876 |
: q(service),
|
|
|
5638876 |
config(0),
|
|
|
5638876 |
+ dummyConfig(0),
|
|
|
5638876 |
tempFile(0)
|
|
|
5638876 |
{
|
|
|
5638876 |
}
|
|
|
5638876 |
@@ -80,6 +81,7 @@
|
|
|
5638876 |
~ServicePrivate()
|
|
|
5638876 |
{
|
|
|
5638876 |
delete config;
|
|
|
5638876 |
+ delete dummyConfig;
|
|
|
5638876 |
delete tempFile;
|
|
|
5638876 |
}
|
|
|
5638876 |
|
|
|
5638876 |
@@ -98,10 +100,25 @@
|
|
|
5638876 |
associatedGraphicsWidgets.remove(static_cast<QGraphicsWidget*>(obj));
|
|
|
5638876 |
}
|
|
|
5638876 |
|
|
|
5638876 |
+ KConfigGroup dummyGroup()
|
|
|
5638876 |
+ {
|
|
|
5638876 |
+ if (!dummyConfig) {
|
|
|
5638876 |
+ if (!tempFile) {
|
|
|
5638876 |
+ tempFile = new KTemporaryFile;
|
|
|
5638876 |
+ tempFile->open();
|
|
|
5638876 |
+ }
|
|
|
5638876 |
+
|
|
|
5638876 |
+ dummyConfig = new KConfig(tempFile->fileName());
|
|
|
5638876 |
+ }
|
|
|
5638876 |
+
|
|
|
5638876 |
+ return KConfigGroup(dummyConfig, "DummyGroup");
|
|
|
5638876 |
+ }
|
|
|
5638876 |
+
|
|
|
5638876 |
Service *q;
|
|
|
5638876 |
QString destination;
|
|
|
5638876 |
QString name;
|
|
|
5638876 |
ConfigLoader *config;
|
|
|
5638876 |
+ KConfig *dummyConfig;
|
|
|
5638876 |
KTemporaryFile *tempFile;
|
|
|
5638876 |
QMultiHash<QWidget *, QString> associatedWidgets;
|
|
|
5638876 |
QMultiHash<QGraphicsWidget *, QString> associatedGraphicsWidgets;
|
|
|
5638876 |
--- branches/KDE/4.3/kdelibs/plasma/service.cpp 2009/08/02 18:26:50 1005966
|
|
|
5638876 |
+++ branches/KDE/4.3/kdelibs/plasma/service.cpp 2009/08/02 18:27:44 1005967
|
|
|
5638876 |
@@ -116,7 +116,7 @@
|
|
|
5638876 |
{
|
|
|
5638876 |
if (!d->config) {
|
|
|
5638876 |
kDebug() << "No valid operations scheme has been registered";
|
|
|
5638876 |
- return KConfigGroup();
|
|
|
5638876 |
+ return d->dummyGroup();
|
|
|
5638876 |
}
|
|
|
5638876 |
|
|
|
5638876 |
d->config->writeConfig();
|
|
|
5638876 |
@@ -212,6 +212,9 @@
|
|
|
5638876 |
delete d->tempFile;
|
|
|
5638876 |
d->tempFile = 0;
|
|
|
5638876 |
|
|
|
5638876 |
+ delete d->dummyConfig;
|
|
|
5638876 |
+ d->dummyConfig = 0;
|
|
|
5638876 |
+
|
|
|
5638876 |
registerOperationsScheme();
|
|
|
5638876 |
}
|
|
|
5638876 |
|
|
|
5638876 |
@@ -258,6 +261,9 @@
|
|
|
5638876 |
delete d->config;
|
|
|
5638876 |
delete d->tempFile;
|
|
|
5638876 |
|
|
|
5638876 |
+ delete d->dummyConfig;
|
|
|
5638876 |
+ d->dummyConfig = 0;
|
|
|
5638876 |
+
|
|
|
5638876 |
//FIXME: make KSharedConfig and KConfigSkeleton not braindamaged in 4.2 and then get rid of the
|
|
|
5638876 |
// temp file object here
|
|
|
5638876 |
d->tempFile = new KTemporaryFile;
|