undeprecated PredicateProperties as an alternative to nepomuk

This commit is contained in:
Ivailo Monev 2014-12-07 23:35:01 +00:00
parent 0efeec57ab
commit 80ce862656
2 changed files with 1 additions and 15 deletions

View file

@ -28,9 +28,7 @@ class PredicateProperties::Private : public QSharedData {
public:
static const QString nullString;
static const QStringList nullStringList;
#ifndef KDE_NO_DEPRECATED
static const PredicateProperties nullPP;
#endif
PredicateProperties parent;
QString key;
QString name;
@ -39,18 +37,14 @@ public:
};
const QString PredicateProperties::Private::nullString;
const QStringList PredicateProperties::Private::nullStringList;
#ifndef KDE_NO_DEPRECATED
const PredicateProperties PredicateProperties::Private::nullPP;
#endif
#ifndef KDE_NO_DEPRECATED
PredicateProperties::PredicateProperties(const QString& predicate) {
if (!predicate.isEmpty()) {
d = new Private();
d->key = predicate;
}
}
#endif
PredicateProperties::PredicateProperties(const PredicateProperties& pp)
: d(pp.d) {
}
@ -96,11 +90,7 @@ PredicateProperties::createValidator() const {
}
const PredicateProperties&
PredicateProperties::parent() const {
#ifndef KDE_NO_DEPRECATED
return ( d) ? d->parent :Private::nullPP;
#else
return d->parent;
#endif
}
bool
PredicateProperties::isValid() const {

View file

@ -30,15 +30,11 @@ class QValidator;
* It is identified by URI and it defines the type of the relationship.
* For file metadata, a predicate can be seen as a fieldname.
* It has a data type, a description, a short id, a cardinality
*
* @deprecated use Nepomuk::Types::Property instead
**/
class KIO_EXPORT PredicateProperties {
friend class PredicatePropertyProvider;
public:
#ifndef KDE_NO_DEPRECATED
KDE_DEPRECATED PredicateProperties(const QString& predicate = QString());
#endif
PredicateProperties(const QString& predicate = QString());
PredicateProperties(const PredicateProperties& p);
~PredicateProperties();
const PredicateProperties& operator=(const PredicateProperties& p);