diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/tools/uic/utils.h | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/tools/uic/utils.h')
-rw-r--r-- | src/tools/uic/utils.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/tools/uic/utils.h b/src/tools/uic/utils.h index 3f32a532ca..34c4ab23d4 100644 --- a/src/tools/uic/utils.h +++ b/src/tools/uic/utils.h @@ -42,55 +42,6 @@ inline bool toBool(const QString &str) inline QString toString(const DomString *str) { return str ? str->text() : QString(); } -inline QString fixString(const QString &str, const QString &indent) -{ - QString cursegment; - QStringList result; - const QByteArray utf8 = str.toUtf8(); - const int utf8Length = utf8.length(); - - for (int i = 0; i < utf8Length; ++i) { - const uchar cbyte = utf8.at(i); - if (cbyte >= 0x80) { - cursegment += QLatin1Char('\\'); - cursegment += QString::number(cbyte, 8); - } else { - switch(cbyte) { - case '\\': - cursegment += QLatin1String("\\\\"); break; - case '\"': - cursegment += QLatin1String("\\\""); break; - case '\r': - break; - case '\n': - cursegment += QLatin1String("\\n\"\n\""); break; - default: - cursegment += QLatin1Char(cbyte); - } - } - - if (cursegment.length() > 1024) { - result << cursegment; - cursegment.clear(); - } - } - - if (!cursegment.isEmpty()) - result << cursegment; - - - QString joinstr = QLatin1String("\"\n"); - joinstr += indent; - joinstr += indent; - joinstr += QLatin1Char('"'); - - QString rc(QLatin1Char('"')); - rc += result.join(joinstr); - rc += QLatin1Char('"'); - - return rc; -} - inline QHash<QString, DomProperty *> propertyMap(const QList<DomProperty *> &properties) { QHash<QString, DomProperty *> map; |