clarity in variable naming
This commit is contained in:
parent
d82144b609
commit
ca320eb0d4
22
applet.cpp
22
applet.cpp
@ -1642,8 +1642,8 @@ bool Applet::hasConfigurationInterface() const
|
|||||||
|
|
||||||
void Applet::publish(AnnouncementMethods methods, const QString &resourceName)
|
void Applet::publish(AnnouncementMethods methods, const QString &resourceName)
|
||||||
{
|
{
|
||||||
if (!d->service) {
|
if (!d->remotingService) {
|
||||||
d->service = new PlasmoidService(this);
|
d->remotingService = new PlasmoidService(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString resName = resourceName.isEmpty() ? i18nc("%1 is the name of a plasmoid, %2 the name of the machine that plasmoid is published on",
|
const QString resName = resourceName.isEmpty() ? i18nc("%1 is the name of a plasmoid, %2 the name of the machine that plasmoid is published on",
|
||||||
@ -1653,12 +1653,12 @@ void Applet::publish(AnnouncementMethods methods, const QString &resourceName)
|
|||||||
kDebug() << "publishing package under name " << resName;
|
kDebug() << "publishing package under name " << resName;
|
||||||
#endif
|
#endif
|
||||||
if (d->package && d->package->isValid()) {
|
if (d->package && d->package->isValid()) {
|
||||||
d->service->d->publish(methods, resName, d->package->metadata());
|
d->remotingService->d->publish(methods, resName, d->package->metadata());
|
||||||
} else if (!d->package && d->appletDescription.isValid()) {
|
} else if (!d->package && d->appletDescription.isValid()) {
|
||||||
d->service->d->publish(methods, resName, d->appletDescription);
|
d->remotingService->d->publish(methods, resName, d->appletDescription);
|
||||||
} else {
|
} else {
|
||||||
delete d->service;
|
delete d->remotingService;
|
||||||
d->service = 0;
|
d->remotingService = 0;
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
kDebug() << "Can not publish invalid applets.";
|
kDebug() << "Can not publish invalid applets.";
|
||||||
#endif
|
#endif
|
||||||
@ -1667,14 +1667,14 @@ void Applet::publish(AnnouncementMethods methods, const QString &resourceName)
|
|||||||
|
|
||||||
void Applet::unpublish()
|
void Applet::unpublish()
|
||||||
{
|
{
|
||||||
if (d->service) {
|
if (d->remotingService) {
|
||||||
d->service->d->unpublish();
|
d->remotingService->d->unpublish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Applet::isPublished() const
|
bool Applet::isPublished() const
|
||||||
{
|
{
|
||||||
return d->service && d->service->d->isPublished();
|
return d->remotingService && d->remotingService->d->isPublished();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Applet::setHasConfigurationInterface(bool hasInterface)
|
void Applet::setHasConfigurationInterface(bool hasInterface)
|
||||||
@ -2541,7 +2541,7 @@ bool Applet::isContainment() const
|
|||||||
AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int uniqueID, Applet *applet)
|
AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int uniqueID, Applet *applet)
|
||||||
: appletId(uniqueID),
|
: appletId(uniqueID),
|
||||||
q(applet),
|
q(applet),
|
||||||
service(0),
|
remotingService(0),
|
||||||
preferredBackgroundHints(StandardBackground),
|
preferredBackgroundHints(StandardBackground),
|
||||||
backgroundHints(NoBackground),
|
backgroundHints(NoBackground),
|
||||||
aspectRatioMode(Plasma::KeepAspectRatio),
|
aspectRatioMode(Plasma::KeepAspectRatio),
|
||||||
@ -2655,7 +2655,7 @@ void AppletPrivate::init(const QString &packagePath)
|
|||||||
// find where the Package is
|
// find where the Package is
|
||||||
QString path = packagePath;
|
QString path = packagePath;
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
QString subPath = package->defaultPackageRoot() + appletDescription.pluginName() + '/';
|
const QString subPath = package->defaultPackageRoot() + appletDescription.pluginName() + '/';
|
||||||
path = KStandardDirs::locate("data", subPath + "metadata.desktop");
|
path = KStandardDirs::locate("data", subPath + "metadata.desktop");
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
path = KStandardDirs::locate("data", subPath);
|
path = KStandardDirs::locate("data", subPath);
|
||||||
|
@ -154,7 +154,7 @@ public:
|
|||||||
|
|
||||||
// applet attributes
|
// applet attributes
|
||||||
QWeakPointer<Extender> extender;
|
QWeakPointer<Extender> extender;
|
||||||
Service *service;
|
Service *remotingService;
|
||||||
BackgroundHints preferredBackgroundHints;
|
BackgroundHints preferredBackgroundHints;
|
||||||
BackgroundHints backgroundHints;
|
BackgroundHints backgroundHints;
|
||||||
AspectRatioMode aspectRatioMode;
|
AspectRatioMode aspectRatioMode;
|
||||||
|
Loading…
Reference in New Issue
Block a user