From 1aa252d612c8315ef27cec727b39da511deed410 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sat, 1 Nov 2008 22:01:31 +0000 Subject: [PATCH] package metadat by reference, not pointer, for API clarity and health svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=878840 --- package.cpp | 4 ++-- package.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.cpp b/package.cpp index 5a26f2f9f..8c63898ff 100644 --- a/package.cpp +++ b/package.cpp @@ -177,13 +177,13 @@ QStringList Package::entryList(const char *fileType) const return QStringList(); } -const PackageMetadata *Package::metadata() const +PackageMetadata Package::metadata() const { //FIXME: this only works for native plasma packges; should fall back to... PackageStructure? if (!d->metadata) { d->metadata = new PackageMetadata(d->basePath + "metadata.desktop"); } - return d->metadata; + return *d->metadata; } const QString Package::path() const diff --git a/package.h b/package.h index 4f6d0fe76..807c93a33 100644 --- a/package.h +++ b/package.h @@ -101,7 +101,7 @@ class PLASMA_EXPORT Package /** * @return the package metadata object. */ - const PackageMetadata *metadata() const; + PackageMetadata metadata() const; /** * @return the path to the root of this particular package