Dolphin: Use the Nepomuk2::FileMetaDatConfigWidget

Instead of the KFileMetaDataConfigurationWidget

REVIEW: 111294
This commit is contained in:
Vishesh Handa 2013-06-28 19:08:30 +05:30
parent 9eb556fab3
commit 626f4cb6e7
2 changed files with 23 additions and 2 deletions

View file

@ -19,7 +19,12 @@
#include "filemetadataconfigurationdialog.h"
#ifndef HAVE_NEPOMUK
#include <kfilemetadataconfigurationwidget.h>
#else
#include <nepomuk2/filemetadataconfigwidget.h>
#endif
#include <KLocale>
#include <QLabel>
#include <QVBoxLayout>
@ -34,13 +39,17 @@ FileMetaDataConfigurationDialog::FileMetaDataConfigurationDialog(QWidget* parent
setButtons(KDialog::Ok | KDialog::Cancel);
setDefaultButton(KDialog::Ok);
m_descriptionLabel = new QLabel(i18nc("@label::textbox",
"Select which data should "
"be shown:"), this);
m_descriptionLabel->setWordWrap(true);
#ifndef HAVE_NEPOMUK
m_configWidget = new KFileMetaDataConfigurationWidget(this);
#else
m_configWidget = new Nepomuk2::FileMetaDataConfigWidget(this);
#endif
QWidget* mainWidget = new QWidget(this);
QVBoxLayout* topLayout = new QVBoxLayout(mainWidget);

View file

@ -22,9 +22,17 @@
#include <KDialog>
#include <KFileItem>
#include "config-nepomuk.h"
#ifndef HAVE_NEPOMUK
class KFileMetaDataConfigurationWidget;
#else
namespace Nepomuk2 {
class FileMetaDataConfigWidget;
}
#endif
class QLabel;
class KFileMetaDataConfigurationWidget;
/**
* @brief Dialog which allows to configure which meta data should be shown
@ -63,7 +71,11 @@ protected slots:
private:
QLabel* m_descriptionLabel;
#ifndef HAVE_NEPOMUK
KFileMetaDataConfigurationWidget* m_configWidget;
#else
Nepomuk2::FileMetaDataConfigWidget* m_configWidget;
#endif
};
#endif