[Telepathy-commits] [telepathy-qt4/master] Renamed escapedKey to validateKey and escapedString to unescapeString.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Mon Jan 5 06:43:57 PST 2009
Renamed escapedKey to validateKey and escapedString to unescapeString as
suggested by smcv.
---
TelepathyQt4/key-file.cpp | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/TelepathyQt4/key-file.cpp b/TelepathyQt4/key-file.cpp
index a27f367..b0e77ea 100644
--- a/TelepathyQt4/key-file.cpp
+++ b/TelepathyQt4/key-file.cpp
@@ -45,8 +45,8 @@ struct KeyFile::Private
void setError(KeyFile::Status status, const QString &reason);
bool read();
- bool escapedKey(const QByteArray &data, int from, int to, QString &result);
- bool escapedString(const QByteArray &data, int from, int to, QString &result);
+ bool validateKey(const QByteArray &data, int from, int to, QString &result);
+ bool unescapeString(const QByteArray &data, int from, int to, QString &result);
QStringList allGroups() const;
QStringList allKeys() const;
@@ -144,7 +144,7 @@ bool KeyFile::Private::read()
}
currentGroup = "";
- if (!escapedString(group, 0, group.size(), currentGroup)) {
+ if (!unescapeString(group, 0, group.size(), currentGroup)) {
setError(KeyFile::FormatError,
QString("invalid group '%1' at line %2")
.arg(currentGroup).arg(line));
@@ -167,7 +167,7 @@ bool KeyFile::Private::read()
}
QString key;
- if (!escapedKey(data, 0, idx, key)) {
+ if (!validateKey(data, 0, idx, key)) {
setError(KeyFile::FormatError,
QString("invalid key '%1' at line %2")
.arg(key).arg(line));
@@ -176,7 +176,7 @@ bool KeyFile::Private::read()
data = data.mid(idx + 1).trimmed();
QString value;
- if (!escapedString(data, 0, data.size(), value)) {
+ if (!unescapeString(data, 0, data.size(), value)) {
setError(KeyFile::FormatError,
QString("invalid key value for key '%2' at line %3")
.arg(key).arg(line));
@@ -201,7 +201,7 @@ bool KeyFile::Private::read()
return true;
}
-bool KeyFile::Private::escapedKey(const QByteArray &data, int from, int to, QString &result)
+bool KeyFile::Private::validateKey(const QByteArray &data, int from, int to, QString &result)
{
int i = from;
bool ret = true;
@@ -218,7 +218,7 @@ bool KeyFile::Private::escapedKey(const QByteArray &data, int from, int to, QStr
return ret;
}
-bool KeyFile::Private::escapedString(const QByteArray &data, int from, int to, QString &result)
+bool KeyFile::Private::unescapeString(const QByteArray &data, int from, int to, QString &result)
{
int i = from;
while (i < to) {
--
1.5.6.5
More information about the Telepathy-commits
mailing list