X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;ds=inline;f=src%2Flibs%2FCommon%2Finifile.cpp;h=ebdfd73affa70de1f0c75be772a31c541613d1f3;hb=HEAD;hp=55b9fd782a2548945fcbdd8e54cc70954d4e7618;hpb=13dedf19c628b9967e4c4106ab0fd967f1df0b90;p=evaf
diff --git a/src/libs/Common/inifile.cpp b/src/libs/Common/inifile.cpp
index 55b9fd7..ebdfd73 100644
--- a/src/libs/Common/inifile.cpp
+++ b/src/libs/Common/inifile.cpp
@@ -3,7 +3,7 @@
* @brief Internal implementation of the class for reading and writing parameter values in INI files.
* @author Enar Vaikene
*
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2019 Enar Vaikene
*
* This file is part of the eVaf C++ cross-platform application development framework.
*
@@ -96,7 +96,7 @@ IniFileImpl::~IniFileImpl()
mCache.clear();
}
-void IniFileImpl::updateCache(quint64 pos, qint64 diff)
+void IniFileImpl::updateCache(qint64 pos, qint64 diff)
{
// Walk through all the sections in the cache
QHash >::const_iterator it;
@@ -181,7 +181,7 @@ QExplicitlySharedDataPointer IniFileImpl::getParameter(QFile & fil
while (mValid && !file.atEnd()) {
// Current file position
- quint64 currentPos = file.pos();
+ qint64 currentPos = file.pos();
QByteArray line = file.readLine().trimmed();
@@ -352,7 +352,7 @@ bool IniFileImpl::setValue(QByteArray const & paramName, QVariant const & value)
if (c.unicode() < 32 || c.unicode() >= 127)
valueString = QByteArray("\\0x").append(QByteArray::number(c.unicode(), 16));
else
- valueString = QByteArray(1, (char const)c.unicode());
+ valueString = QByteArray(1, static_cast(c.unicode()));
break;
}
case QVariant::ByteArray:
@@ -399,7 +399,7 @@ bool IniFileImpl::setValue(QByteArray const & paramName, QVariant const & value)
}
// Current file position
- quint64 currentPos = f.pos();
+ qint64 currentPos = f.pos();
// Add the new section to the internal cache
sectionObject = new IniFileSection(currentPos);
@@ -423,8 +423,8 @@ bool IniFileImpl::setValue(QByteArray const & paramName, QVariant const & value)
// If the section is found, use the existing section object from the cache
else {
- quint64 currentPos;
- quint64 oldPos = f.pos();
+ qint64 currentPos;
+ qint64 oldPos = f.pos();
QString prefix; // Platform-specific prefix
// Locate the parameter value