aboutsummaryrefslogtreecommitdiff
path: root/src/core/kcoreconfigskeleton.h
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2021-02-22 17:38:09 +0200
committerAhmad Samir <a.samirh78@gmail.com>2021-02-22 17:38:09 +0200
commit8bed00ab34e31f2b9c70026d418d923913325798 (patch)
treef289c15575415a36bc19c047a2037998e9b11ce8 /src/core/kcoreconfigskeleton.h
parent186755fd56b58dc97250846c5305ef89f9487f86 (diff)
downloadkconfig-8bed00ab34e31f2b9c70026d418d923913325798.tar.gz
kconfig-8bed00ab34e31f2b9c70026d418d923913325798.tar.bz2
Run clang-format on all cpp/h files
NO_CHANGELOG
Diffstat (limited to 'src/core/kcoreconfigskeleton.h')
-rw-r--r--src/core/kcoreconfigskeleton.h256
1 files changed, 101 insertions, 155 deletions
diff --git a/src/core/kcoreconfigskeleton.h b/src/core/kcoreconfigskeleton.h
index e7b814e8..aafc417c 100644
--- a/src/core/kcoreconfigskeleton.h
+++ b/src/core/kcoreconfigskeleton.h
@@ -12,15 +12,15 @@
#include <kconfigcore_export.h>
-#include <ksharedconfig.h>
#include <kconfiggroup.h>
+#include <ksharedconfig.h>
#include <QDate>
#include <QHash>
#include <QRect>
#include <QStringList>
-#include <QVariant>
#include <QUrl>
+#include <QVariant>
class KCoreConfigSkeletonPrivate;
@@ -42,9 +42,9 @@ class KCONFIGCORE_EXPORT KConfigSkeletonItem
{
Q_DECLARE_PRIVATE(KConfigSkeletonItem)
public:
- typedef QList < KConfigSkeletonItem * >List;
- typedef QHash < QString, KConfigSkeletonItem * > Dict;
- typedef QHash < QString, KConfigSkeletonItem * >::Iterator DictIterator;
+ typedef QList<KConfigSkeletonItem *> List;
+ typedef QHash<QString, KConfigSkeletonItem *> Dict;
+ typedef QHash<QString, KConfigSkeletonItem *>::Iterator DictIterator;
/**
* Constructor.
@@ -310,29 +310,35 @@ public:
* Set a notify function, it will be invoked when the value of the property changes.
* @since 5.68
*/
- void setNotifyFunction(const std::function<void ()> &impl);
+ void setNotifyFunction(const std::function<void()> &impl);
};
-
/**
* \class KConfigSkeletonGenericItem kcoreconfigskeleton.h <KConfigSkeletonGenericItem>
*/
-template < typename T > class KConfigSkeletonGenericItem: public KConfigSkeletonItem
+template<typename T>
+class KConfigSkeletonGenericItem : public KConfigSkeletonItem
{
public:
/** @copydoc KConfigSkeletonItem(const QString&, const QString&)
@param reference The initial value to hold in the item
@param defaultValue The default value for the item
*/
- KConfigSkeletonGenericItem(const QString &_group, const QString &_key, T &reference,
- T defaultValue)
- : KConfigSkeletonItem(_group, _key), mReference(reference),
- mDefault(defaultValue), mLoadedValue(defaultValue)
+ KConfigSkeletonGenericItem(const QString &_group, const QString &_key, T &reference, T defaultValue)
+ : KConfigSkeletonItem(_group, _key)
+ , mReference(reference)
+ , mDefault(defaultValue)
+ , mLoadedValue(defaultValue)
{
- setIsDefaultImpl([this] { return mReference == mDefault; });
- setIsSaveNeededImpl([this] { return mReference != mLoadedValue; });
- setGetDefaultImpl([this] { return QVariant::fromValue(mDefault); });
-
+ setIsDefaultImpl([this] {
+ return mReference == mDefault;
+ });
+ setIsSaveNeededImpl([this] {
+ return mReference != mLoadedValue;
+ });
+ setGetDefaultImpl([this] {
+ return QVariant::fromValue(mDefault);
+ });
}
/**
@@ -407,7 +413,7 @@ public:
}
protected:
- T &mReference; ///< Stores the value for this item
+ T &mReference; ///< Stores the value for this item
T mDefault; ///< The default value for this item
T mLoadedValue;
};
@@ -428,17 +434,16 @@ protected:
class KCONFIGCORE_EXPORT KConfigCompilerSignallingItem : public KConfigSkeletonItem
{
public:
- typedef void (QObject::* NotifyFunction)(quint64 arg);
- /**
- * Constructor.
- *
- * @param item the KConfigSkeletonItem to wrap
- * @param targetFunction the method to invoke whenever the value of @p item changes
- * @param object The object on which the method is invoked.
- * @param userData This data will be passed to @p targetFunction on every property change
- */
- KConfigCompilerSignallingItem(KConfigSkeletonItem *item, QObject* object,
- NotifyFunction targetFunction, quint64 userData);
+ typedef void (QObject::*NotifyFunction)(quint64 arg);
+ /**
+ * Constructor.
+ *
+ * @param item the KConfigSkeletonItem to wrap
+ * @param targetFunction the method to invoke whenever the value of @p item changes
+ * @param object The object on which the method is invoked.
+ * @param userData This data will be passed to @p targetFunction on every property change
+ */
+ KConfigCompilerSignallingItem(KConfigSkeletonItem *item, QObject *object, NotifyFunction targetFunction, quint64 userData);
~KConfigCompilerSignallingItem() override;
void readConfig(KConfig *) override;
@@ -466,14 +471,14 @@ private:
// call the pointer to member function using the strange ->* operator
(mObject->*mTargetFunction)(mUserData);
}
+
private:
QScopedPointer<KConfigSkeletonItem> mItem;
NotifyFunction mTargetFunction;
- QObject* mObject;
+ QObject *mObject;
quint64 mUserData;
};
-
/**
* \class KCoreConfigSkeleton kcoreconfigskeleton.h <KCoreConfigSkeleton>
*
@@ -540,7 +545,7 @@ public:
/**
* Class for handling a string preferences item.
*/
- class KCONFIGCORE_EXPORT ItemString: public KConfigSkeletonGenericItem < QString >
+ class KCONFIGCORE_EXPORT ItemString : public KConfigSkeletonGenericItem<QString>
{
public:
enum Type {
@@ -565,9 +570,10 @@ public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem
@param type The type of string held by the item
*/
- ItemString(const QString &_group, const QString &_key,
+ ItemString(const QString &_group,
+ const QString &_key,
QString &reference,
- const QString &defaultValue = QLatin1String(""), // NOT QString() !!
+ const QString &defaultValue = QLatin1String(""), // NOT QString() !!
Type type = Normal);
/** @copydoc KConfigSkeletonItem::writeConfig(KConfig*) */
@@ -592,39 +598,33 @@ public:
/**
* Class for handling a password preferences item.
*/
- class KCONFIGCORE_EXPORT ItemPassword: public ItemString
+ class KCONFIGCORE_EXPORT ItemPassword : public ItemString
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemPassword(const QString &_group, const QString &_key,
- QString &reference,
- const QString &defaultValue = QLatin1String("")); // NOT QString() !!
+ ItemPassword(const QString &_group, const QString &_key, QString &reference,
+ const QString &defaultValue = QLatin1String("")); // NOT QString() !!
};
/**
* Class for handling a path preferences item.
*/
- class KCONFIGCORE_EXPORT ItemPath: public ItemString
+ class KCONFIGCORE_EXPORT ItemPath : public ItemString
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemPath(const QString &_group, const QString &_key,
- QString &reference,
- const QString &defaultValue = QString());
+ ItemPath(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue = QString());
};
/**
* Class for handling a url preferences item.
*/
- class KCONFIGCORE_EXPORT ItemUrl: public KConfigSkeletonGenericItem < QUrl >
+ class KCONFIGCORE_EXPORT ItemUrl : public KConfigSkeletonGenericItem<QUrl>
{
public:
-
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem
*/
- ItemUrl(const QString &_group, const QString &_key,
- QUrl &reference,
- const QUrl &defaultValue = QUrl());
+ ItemUrl(const QString &_group, const QString &_key, QUrl &reference, const QUrl &defaultValue = QUrl());
/** @copydoc KConfigSkeletonItem::writeConfig(KConfig*) */
void writeConfig(KConfig *config) override;
@@ -645,12 +645,11 @@ public:
/**
* Class for handling a QVariant preferences item.
*/
- class KCONFIGCORE_EXPORT ItemProperty: public KConfigSkeletonGenericItem < QVariant >
+ class KCONFIGCORE_EXPORT ItemProperty : public KConfigSkeletonGenericItem<QVariant>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemProperty(const QString &_group, const QString &_key,
- QVariant &reference, const QVariant &defaultValue = QVariant());
+ ItemProperty(const QString &_group, const QString &_key, QVariant &reference, const QVariant &defaultValue = QVariant());
void readConfig(KConfig *config) override;
void setProperty(const QVariant &p) override;
@@ -665,12 +664,11 @@ public:
/**
* Class for handling a bool preferences item.
*/
- class KCONFIGCORE_EXPORT ItemBool: public KConfigSkeletonGenericItem < bool >
+ class KCONFIGCORE_EXPORT ItemBool : public KConfigSkeletonGenericItem<bool>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemBool(const QString &_group, const QString &_key, bool &reference,
- bool defaultValue = true);
+ ItemBool(const QString &_group, const QString &_key, bool &reference, bool defaultValue = true);
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -688,12 +686,11 @@ public:
/**
* Class for handling a 32-bit integer preferences item.
*/
- class KCONFIGCORE_EXPORT ItemInt: public KConfigSkeletonGenericItem < qint32 >
+ class KCONFIGCORE_EXPORT ItemInt : public KConfigSkeletonGenericItem<qint32>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemInt(const QString &_group, const QString &_key, qint32 &reference,
- qint32 defaultValue = 0);
+ ItemInt(const QString &_group, const QString &_key, qint32 &reference, qint32 defaultValue = 0);
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -733,12 +730,11 @@ public:
/**
* Class for handling a 64-bit integer preferences item.
*/
- class KCONFIGCORE_EXPORT ItemLongLong: public KConfigSkeletonGenericItem < qint64 >
+ class KCONFIGCORE_EXPORT ItemLongLong : public KConfigSkeletonGenericItem<qint64>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemLongLong(const QString &_group, const QString &_key, qint64 &reference,
- qint64 defaultValue = 0);
+ ItemLongLong(const QString &_group, const QString &_key, qint64 &reference, qint64 defaultValue = 0);
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -777,7 +773,7 @@ public:
/**
* Class for handling enums.
*/
- class KCONFIGCORE_EXPORT ItemEnum: public ItemInt
+ class KCONFIGCORE_EXPORT ItemEnum : public ItemInt
{
public:
struct Choice {
@@ -790,8 +786,7 @@ public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem
@param choices The list of enums that can be stored in this item
*/
- ItemEnum(const QString &_group, const QString &_key, qint32 &reference,
- const QList<Choice> &choices, qint32 defaultValue = 0);
+ ItemEnum(const QString &_group, const QString &_key, qint32 &reference, const QList<Choice> &choices, qint32 defaultValue = 0);
QList<Choice> choices() const;
@@ -823,12 +818,11 @@ public:
/**
* Class for handling an unsigned 32-bit integer preferences item.
*/
- class KCONFIGCORE_EXPORT ItemUInt: public KConfigSkeletonGenericItem < quint32 >
+ class KCONFIGCORE_EXPORT ItemUInt : public KConfigSkeletonGenericItem<quint32>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemUInt(const QString &_group, const QString &_key,
- quint32 &reference, quint32 defaultValue = 0);
+ ItemUInt(const QString &_group, const QString &_key, quint32 &reference, quint32 defaultValue = 0);
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -864,12 +858,11 @@ public:
/**
* Class for handling unsigned 64-bit integer preferences item.
*/
- class KCONFIGCORE_EXPORT ItemULongLong: public KConfigSkeletonGenericItem < quint64 >
+ class KCONFIGCORE_EXPORT ItemULongLong : public KConfigSkeletonGenericItem<quint64>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemULongLong(const QString &_group, const QString &_key, quint64 &reference,
- quint64 defaultValue = 0);
+ ItemULongLong(const QString &_group, const QString &_key, quint64 &reference, quint64 defaultValue = 0);
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -908,12 +901,11 @@ public:
/**
* Class for handling a floating point preference item.
*/
- class KCONFIGCORE_EXPORT ItemDouble: public KConfigSkeletonGenericItem < double >
+ class KCONFIGCORE_EXPORT ItemDouble : public KConfigSkeletonGenericItem<double>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemDouble(const QString &_group, const QString &_key,
- double &reference, double defaultValue = 0);
+ ItemDouble(const QString &_group, const QString &_key, double &reference, double defaultValue = 0);
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -949,12 +941,11 @@ public:
/**
* Class for handling a QRect preferences item.
*/
- class KCONFIGCORE_EXPORT ItemRect: public KConfigSkeletonGenericItem < QRect >
+ class KCONFIGCORE_EXPORT ItemRect : public KConfigSkeletonGenericItem<QRect>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemRect(const QString &_group, const QString &_key, QRect &reference,
- const QRect &defaultValue = QRect());
+ ItemRect(const QString &_group, const QString &_key, QRect &reference, const QRect &defaultValue = QRect());
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -972,12 +963,11 @@ public:
/**
* Class for handling a QPoint preferences item.
*/
- class KCONFIGCORE_EXPORT ItemPoint: public KConfigSkeletonGenericItem < QPoint >
+ class KCONFIGCORE_EXPORT ItemPoint : public KConfigSkeletonGenericItem<QPoint>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemPoint(const QString &_group, const QString &_key, QPoint &reference,
- const QPoint &defaultValue = QPoint());
+ ItemPoint(const QString &_group, const QString &_key, QPoint &reference, const QPoint &defaultValue = QPoint());
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -995,12 +985,11 @@ public:
/**
* Class for handling a QSize preferences item.
*/
- class KCONFIGCORE_EXPORT ItemSize: public KConfigSkeletonGenericItem < QSize >
+ class KCONFIGCORE_EXPORT ItemSize : public KConfigSkeletonGenericItem<QSize>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemSize(const QString &_group, const QString &_key, QSize &reference,
- const QSize &defaultValue = QSize());
+ ItemSize(const QString &_group, const QString &_key, QSize &reference, const QSize &defaultValue = QSize());
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -1018,13 +1007,11 @@ public:
/**
* Class for handling a QDateTime preferences item.
*/
- class KCONFIGCORE_EXPORT ItemDateTime: public KConfigSkeletonGenericItem < QDateTime >
+ class KCONFIGCORE_EXPORT ItemDateTime : public KConfigSkeletonGenericItem<QDateTime>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemDateTime(const QString &_group, const QString &_key,
- QDateTime &reference,
- const QDateTime &defaultValue = QDateTime());
+ ItemDateTime(const QString &_group, const QString &_key, QDateTime &reference, const QDateTime &defaultValue = QDateTime());
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -1042,13 +1029,11 @@ public:
/**
* Class for handling a string list preferences item.
*/
- class KCONFIGCORE_EXPORT ItemStringList: public KConfigSkeletonGenericItem < QStringList >
+ class KCONFIGCORE_EXPORT ItemStringList : public KConfigSkeletonGenericItem<QStringList>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemStringList(const QString &_group, const QString &_key,
- QStringList &reference,
- const QStringList &defaultValue = QStringList());
+ ItemStringList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue = QStringList());
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -1066,13 +1051,11 @@ public:
/**
* Class for handling a path list preferences item.
*/
- class KCONFIGCORE_EXPORT ItemPathList: public ItemStringList
+ class KCONFIGCORE_EXPORT ItemPathList : public ItemStringList
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemPathList(const QString &_group, const QString &_key,
- QStringList &reference,
- const QStringList &defaultValue = QStringList());
+ ItemPathList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue = QStringList());
/** @copydoc KConfigSkeletonItem::readConfig */
void readConfig(KConfig *config) override;
@@ -1083,13 +1066,11 @@ public:
/**
* Class for handling a url list preferences item.
*/
- class KCONFIGCORE_EXPORT ItemUrlList: public KConfigSkeletonGenericItem < QList<QUrl> >
+ class KCONFIGCORE_EXPORT ItemUrlList : public KConfigSkeletonGenericItem<QList<QUrl>>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemUrlList(const QString &_group, const QString &_key,
- QList<QUrl> &reference,
- const QList<QUrl> &defaultValue = QList<QUrl>());
+ ItemUrlList(const QString &_group, const QString &_key, QList<QUrl> &reference, const QList<QUrl> &defaultValue = QList<QUrl>());
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -1110,13 +1091,11 @@ public:
/**
* Class for handling an integer list preferences item.
*/
- class KCONFIGCORE_EXPORT ItemIntList: public KConfigSkeletonGenericItem < QList < int > >
+ class KCONFIGCORE_EXPORT ItemIntList : public KConfigSkeletonGenericItem<QList<int>>
{
public:
/** @copydoc KConfigSkeletonGenericItem::KConfigSkeletonGenericItem */
- ItemIntList(const QString &_group, const QString &_key,
- QList < int > &reference,
- const QList < int > &defaultValue = QList < int >());
+ ItemIntList(const QString &_group, const QString &_key, QList<int> &reference, const QList<int> &defaultValue = QList<int>());
/** @copydoc KConfigSkeletonItem::readConfig(KConfig*) */
void readConfig(KConfig *config) override;
@@ -1246,8 +1225,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemString *addItemString(const QString &name, QString &reference,
- const QString &defaultValue = QLatin1String(""), // NOT QString() !!
+ ItemString *addItemString(const QString &name,
+ QString &reference,
+ const QString &defaultValue = QLatin1String(""), // NOT QString() !!
const QString &key = QString());
/**
@@ -1263,9 +1243,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemPassword *addItemPassword(const QString &name, QString &reference,
- const QString &defaultValue = QLatin1String(""),
- const QString &key = QString());
+ ItemPassword *addItemPassword(const QString &name, QString &reference, const QString &defaultValue = QLatin1String(""), const QString &key = QString());
/**
* Register a path item of type QString. The string value is interpreted
@@ -1280,9 +1258,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemPath *addItemPath(const QString &name, QString &reference,
- const QString &defaultValue = QLatin1String(""),
- const QString &key = QString());
+ ItemPath *addItemPath(const QString &name, QString &reference, const QString &defaultValue = QLatin1String(""), const QString &key = QString());
/**
* Register a property item of type QVariant. Note that only the following
@@ -1297,9 +1273,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemProperty *addItemProperty(const QString &name, QVariant &reference,
- const QVariant &defaultValue = QVariant(),
- const QString &key = QString());
+ ItemProperty *addItemProperty(const QString &name, QVariant &reference, const QVariant &defaultValue = QVariant(), const QString &key = QString());
/**
* Register an item of type bool.
*
@@ -1311,9 +1285,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemBool *addItemBool(const QString &name, bool &reference,
- bool defaultValue = false,
- const QString &key = QString());
+ ItemBool *addItemBool(const QString &name, bool &reference, bool defaultValue = false, const QString &key = QString());
/**
* Register an item of type qint32.
@@ -1326,8 +1298,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemInt *addItemInt(const QString &name, qint32 &reference, qint32 defaultValue = 0,
- const QString &key = QString());
+ ItemInt *addItemInt(const QString &name, qint32 &reference, qint32 defaultValue = 0, const QString &key = QString());
/**
* Register an item of type quint32.
@@ -1340,9 +1311,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemUInt *addItemUInt(const QString &name, quint32 &reference,
- quint32 defaultValue = 0,
- const QString &key = QString());
+ ItemUInt *addItemUInt(const QString &name, quint32 &reference, quint32 defaultValue = 0, const QString &key = QString());
/**
* Register an item of type qint64.
@@ -1355,18 +1324,14 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemLongLong *addItemLongLong(const QString &name, qint64 &reference,
- qint64 defaultValue = 0,
- const QString &key = QString());
+ ItemLongLong *addItemLongLong(const QString &name, qint64 &reference, qint64 defaultValue = 0, const QString &key = QString());
#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0)
/**
* @deprecated Since 5.0, use addItemLongLong().
*/
KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Use KCoreConfigSkeleton::addItemLongLong(...)")
- ItemLongLong *addItemInt64(const QString &name, qint64 &reference,
- qint64 defaultValue = 0,
- const QString &key = QString());
+ ItemLongLong *addItemInt64(const QString &name, qint64 &reference, qint64 defaultValue = 0, const QString &key = QString());
#endif
/**
@@ -1380,18 +1345,14 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemULongLong *addItemULongLong(const QString &name, quint64 &reference,
- quint64 defaultValue = 0,
- const QString &key = QString());
+ ItemULongLong *addItemULongLong(const QString &name, quint64 &reference, quint64 defaultValue = 0, const QString &key = QString());
#if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0)
/**
* @deprecated Since 5.0, use addItemULongLong().
*/
KCONFIGCORE_DEPRECATED_VERSION(5, 0, "Use KCoreConfigSkeleton::addItemULongLong(...)")
- ItemULongLong *addItemUInt64(const QString &name, quint64 &reference,
- quint64 defaultValue = 0,
- const QString &key = QString());
+ ItemULongLong *addItemUInt64(const QString &name, quint64 &reference, quint64 defaultValue = 0, const QString &key = QString());
#endif
/**
@@ -1405,9 +1366,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemDouble *addItemDouble(const QString &name, double &reference,
- double defaultValue = 0.0,
- const QString &key = QString());
+ ItemDouble *addItemDouble(const QString &name, double &reference, double defaultValue = 0.0, const QString &key = QString());
/**
* Register an item of type QRect.
@@ -1420,9 +1379,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemRect *addItemRect(const QString &name, QRect &reference,
- const QRect &defaultValue = QRect(),
- const QString &key = QString());
+ ItemRect *addItemRect(const QString &name, QRect &reference, const QRect &defaultValue = QRect(), const QString &key = QString());
/**
* Register an item of type QPoint.
@@ -1435,9 +1392,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemPoint *addItemPoint(const QString &name, QPoint &reference,
- const QPoint &defaultValue = QPoint(),
- const QString &key = QString());
+ ItemPoint *addItemPoint(const QString &name, QPoint &reference, const QPoint &defaultValue = QPoint(), const QString &key = QString());
/**
* Register an item of type QSize.
@@ -1450,9 +1405,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemSize *addItemSize(const QString &name, QSize &reference,
- const QSize &defaultValue = QSize(),
- const QString &key = QString());
+ ItemSize *addItemSize(const QString &name, QSize &reference, const QSize &defaultValue = QSize(), const QString &key = QString());
/**
* Register an item of type QDateTime.
@@ -1465,9 +1418,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemDateTime *addItemDateTime(const QString &name, QDateTime &reference,
- const QDateTime &defaultValue = QDateTime(),
- const QString &key = QString());
+ ItemDateTime *addItemDateTime(const QString &name, QDateTime &reference, const QDateTime &defaultValue = QDateTime(), const QString &key = QString());
/**
* Register an item of type QStringList.
@@ -1480,9 +1431,8 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemStringList *addItemStringList(const QString &name, QStringList &reference,
- const QStringList &defaultValue = QStringList(),
- const QString &key = QString());
+ ItemStringList *
+ addItemStringList(const QString &name, QStringList &reference, const QStringList &defaultValue = QStringList(), const QString &key = QString());
/**
* Register an item of type QList<int>.
@@ -1495,10 +1445,7 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemIntList *addItemIntList(const QString &name, QList < int > &reference,
- const QList < int > &defaultValue =
- QList < int >(),
- const QString &key = QString());
+ ItemIntList *addItemIntList(const QString &name, QList<int> &reference, const QList<int> &defaultValue = QList<int>(), const QString &key = QString());
/**
* Return the @ref KConfig object used for reading and writing the settings.
@@ -1623,7 +1570,7 @@ protected:
virtual bool usrSave();
#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0)
- /**
+ /**
* @deprecated since 5.0, override usrRead instead. This method is still called from usrRead
* for compatibility.
*/
@@ -1632,7 +1579,7 @@ protected:
#endif
#if KCONFIGCORE_BUILD_DEPRECATED_SINCE(5, 0)
- /**
+ /**
* @deprecated since 5.0, override usrSave instead. This method is still called from usrSave
* for compatibility.
*/
@@ -1643,7 +1590,6 @@ protected:
private:
KCoreConfigSkeletonPrivate *const d;
friend class KConfigSkeleton;
-
};
#endif