20 #ifndef __COMMON_INIFILE_P_H 21 #define __COMMON_INIFILE_P_H 23 #include <QSharedData> 24 #include <QExplicitlySharedDataPointer> 108 QHash<QByteArray, QExplicitlySharedDataPointer<IniFileValue> >
values;
119 IniFileImpl(QString
const & fileName, QIODevice::OpenMode mode);
123 QVariant getValue(QByteArray
const & paramName, QVariant
const & defaultValue);
125 bool setValue(QByteArray
const & paramName, QVariant
const &
value);
127 inline bool isValid()
const {
return mValid; }
129 inline QString
const &
fileName()
const {
return mFileName; }
131 inline QString
const &
errorString()
const {
return mErrorString; }
143 QIODevice::OpenMode mMode;
146 QString mErrorString;
153 QHash<QByteArray, QExplicitlySharedDataPointer<IniFileSection> > mCache;
156 QDateTime mLastModified;
170 void updateCache(quint64 pos, qint64 diff);
186 QExplicitlySharedDataPointer<IniFileSection> getSection(QFile & file, QByteArray
const & sectionName);
203 QExplicitlySharedDataPointer<IniFileValue> getParameter(QFile & file,
IniFileSection & section, QByteArray
const & paramName);
212 #endif // inifile_p.h QByteArray name
Name of the section.
Internal implementation of the IniFile class.
QVariant value
Value converted to the final type (defaults to QVariant::Invalid.
IniFileValue(quint64 pos)
QByteArray paramValue
Value from the INI file.
INI file value in the internal cache.
quint64 filePos
File position.
INI file section in the internal cache.
QByteArray name
Key name of the parameter.
IniFileSection(quint64 pos)
QHash< QByteArray, QExplicitlySharedDataPointer< IniFileValue > > values
List of all the known parameter values in this section.
bool thisOsOnly
Flag indicating that this value is valid on this OS only.
quint64 filePos
File position.
QString const & fileName() const
QString const & errorString() const