summaryrefslogtreecommitdiffstats
path: root/src/tools/uic3/ui3reader.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-06-25 13:49:53 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-06-25 13:49:53 (GMT)
commitdb8f05e257019694f5e8076845626008f2adc3dd (patch)
tree05d3959403cf15ac5f702091439e028af01f343b /src/tools/uic3/ui3reader.cpp
parent8aafaa65a1d16f8b982279f5aceedf1e281ddb5a (diff)
parent796a5a2c7d8c91a46ac761dde18b7da2ec6c177b (diff)
downloadQt-db8f05e257019694f5e8076845626008f2adc3dd.zip
Qt-db8f05e257019694f5e8076845626008f2adc3dd.tar.gz
Qt-db8f05e257019694f5e8076845626008f2adc3dd.tar.bz2
Merge commit 'qt/master-stable' into 4.6-stable
Bring Qt 4.6 into the Qt-S60 repo. Conflicts: configure.exe mkspecs/features/qttest_p4.prf qmake/generators/makefile.cpp src/corelib/io/qdir.cpp src/corelib/io/qprocess.h src/corelib/kernel/qcoreevent.h src/corelib/kernel/qobject.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/corelib/thread/qthread_p.h src/corelib/tools/qvector.h src/gui/dialogs/qdialog.cpp src/gui/dialogs/qfiledialog.cpp src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qmessagebox.cpp src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsview.cpp src/gui/image/qpixmapcache.cpp src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication_p.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h src/gui/painting/qdrawhelper.cpp src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qmenubar.cpp src/network/socket/qlocalserver.cpp src/testlib/qtestcase.cpp src/testlib/testlib.pro tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qitemdelegate/tst_qitemdelegate.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qpixmap/qpixmap.pro
Diffstat (limited to 'src/tools/uic3/ui3reader.cpp')
-rw-r--r--src/tools/uic3/ui3reader.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/tools/uic3/ui3reader.cpp b/src/tools/uic3/ui3reader.cpp
index 1ba4b2f..539565c 100644
--- a/src/tools/uic3/ui3reader.cpp
+++ b/src/tools/uic3/ui3reader.cpp
@@ -125,10 +125,10 @@ QString Ui3Reader::fixString(const QString &str, bool encode)
QString s;
if (!encode) {
s = str;
- s.replace(QLatin1String("\\"), QLatin1String("\\\\"));
- s.replace(QLatin1String("\""), QLatin1String("\\\""));
- s.replace(QLatin1String("\r"), QLatin1String(""));
- s.replace(QLatin1String("\n"), QLatin1String("\\n\"\n\""));
+ s.replace(QLatin1Char('\\'), QLatin1String("\\\\"));
+ s.replace(QLatin1Char('\"'), QLatin1String("\\\""));
+ s.remove(QLatin1Char('\r'));
+ s.replace(QLatin1Char('\n'), QLatin1String("\\n\"\n\""));
} else {
QByteArray utf8 = str.utf8();
const int l = utf8.length();
@@ -136,7 +136,7 @@ QString Ui3Reader::fixString(const QString &str, bool encode)
s += QLatin1String("\\x") + QString::number((uchar)utf8[i], 16);
}
- return QLatin1String("\"") + s + QLatin1String("\"");
+ return QLatin1Char('\"') + s + QLatin1Char('\"');
}
QString Ui3Reader::trcall(const QString& sourceText, const QString& comment)
@@ -158,12 +158,12 @@ QString Ui3Reader::trcall(const QString& sourceText, const QString& comment)
}
if (comment.isEmpty()) {
- return t + QLatin1String("(") + fixString(sourceText, encode) + QLatin1String(")");
+ return t + QLatin1Char('(') + fixString(sourceText, encode) + QLatin1Char(')');
} else {
- return t + QLatin1String("(")
+ return t + QLatin1Char('(')
+ fixString(sourceText, encode)
+ QLatin1String(", ")
- + fixString(comment, encode) + QLatin1String(")");
+ + fixString(comment, encode) + QLatin1Char(')');
}
}
@@ -480,10 +480,10 @@ void Ui3Reader::createColorGroupImpl(const QString& name, const QDomElement& e)
QString pixmap = n.firstChild().toText().data();
if (!pixmapLoaderFunction.isEmpty()) {
pixmap.prepend(pixmapLoaderFunction
- + QLatin1String("(")
+ + QLatin1Char('(')
+ QLatin1String(externPixmaps ? "\"" : ""));
- pixmap.append(QLatin1String(externPixmaps ? "\"" : "") + QLatin1String(")"));
+ pixmap.append(QLatin1String(externPixmaps ? "\"" : "") + QLatin1Char(')'));
}
out << indent << name << ".setBrush(QColorGroup::"
<< ColorRole[r] << ", QBrush(" << color << ", " << pixmap << "));" << endl;
@@ -578,9 +578,9 @@ QString Ui3Reader::registerObject(const QString& name)
if (objectNames.contains(result)) {
int i = 2;
- while (objectNames.contains(result + QLatin1String("_") + QString::number(i)))
+ while (objectNames.contains(result + QLatin1Char('_') + QString::number(i)))
i++;
- result += QLatin1String("_");
+ result += QLatin1Char('_');
result += QString::number(i);
}
objectNames += result;