From 0bd6e46b2b274be3b9cd9c3759b771abf04a6eb9 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 16 Oct 2009 15:50:30 +0000 Subject: prepare the behavior-settings dialog to configure the shown meta data for tooltips svn path=/trunk/KDE/kdebase/apps/; revision=1036100 --- src/panels/information/metadataconfigurationdialog.cpp | 5 +++++ src/panels/information/metadataconfigurationdialog.h | 8 ++++++++ 2 files changed, 13 insertions(+) (limited to 'src/panels') diff --git a/src/panels/information/metadataconfigurationdialog.cpp b/src/panels/information/metadataconfigurationdialog.cpp index a725e976f..f3bb929da 100644 --- a/src/panels/information/metadataconfigurationdialog.cpp +++ b/src/panels/information/metadataconfigurationdialog.cpp @@ -92,6 +92,11 @@ void MetaDataConfigurationDialog::Private::loadMetaData() #ifdef HAVE_NEPOMUK // Get all meta information labels that are available for // the currently shown file item and add them to the list. + if (m_url.isEmpty()) { + // TODO: in this case all available meta data from the system + // should be added. + return; + } Nepomuk::Resource res(m_url); QHash properties = res.properties(); QHash::const_iterator it = properties.constBegin(); diff --git a/src/panels/information/metadataconfigurationdialog.h b/src/panels/information/metadataconfigurationdialog.h index 18f0ecde6..9dda9c190 100644 --- a/src/panels/information/metadataconfigurationdialog.h +++ b/src/panels/information/metadataconfigurationdialog.h @@ -30,9 +30,17 @@ class MetaDataConfigurationDialog : public KDialog Q_OBJECT public: + /** + * @param url URL for which should be configured what kind of meta data is + * shown. If the URL is empty, the configuration dialog will contain + * all available meta data from the system. + * @param parent Parent widget which opens the dialog. + * @param flags Window flags for the dialog. + */ MetaDataConfigurationDialog(const KUrl& url, QWidget* parent = 0, Qt::WFlags flags = 0); + virtual ~MetaDataConfigurationDialog(); protected slots: -- cgit v1.3