summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-09-01 15:25:00 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-09-01 15:27:14 (GMT)
commit8bc0dce2c74c28acd36daa73e84f7c9d79760e4a (patch)
tree30e71af7768f3a4718459ea0acadb2c94790999b /examples
parentabcfda3554ef2d1c1ab994a5215a9aa6b107c64a (diff)
downloadQt-8bc0dce2c74c28acd36daa73e84f7c9d79760e4a.zip
Qt-8bc0dce2c74c28acd36daa73e84f7c9d79760e4a.tar.gz
Qt-8bc0dce2c74c28acd36daa73e84f7c9d79760e4a.tar.bz2
QString usage cleanups
- tr() already returns a QString, duh - use multi-arg arg() (heh)
Diffstat (limited to 'examples')
-rw-r--r--examples/sql/masterdetail/mainwindow.cpp6
-rw-r--r--examples/tools/treemodelcompleter/mainwindow.cpp2
-rw-r--r--examples/xmlpatterns/filetree/mainwindow.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp
index b8c9df6..2ef8ad0 100644
--- a/examples/sql/masterdetail/mainwindow.cpp
+++ b/examples/sql/masterdetail/mainwindow.cpp
@@ -189,9 +189,9 @@ void MainWindow::deleteAlbum()
QMessageBox::StandardButton button;
button = QMessageBox::question(this, tr("Delete Album"),
- QString(tr("Are you sure you want to " \
- "delete '%1' by '%2'?"))
- .arg(title).arg(artist),
+ tr("Are you sure you want to "
+ "delete '%1' by '%2'?")
+ .arg(title, artist),
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
diff --git a/examples/tools/treemodelcompleter/mainwindow.cpp b/examples/tools/treemodelcompleter/mainwindow.cpp
index 0448e9d..cfe003a 100644
--- a/examples/tools/treemodelcompleter/mainwindow.cpp
+++ b/examples/tools/treemodelcompleter/mainwindow.cpp
@@ -241,6 +241,6 @@ void MainWindow::changeCase(int cs)
void MainWindow::updateContentsLabel(const QString& sep)
{
- contentsLabel->setText(QString(tr("Type path from model above with items at each level separated by a '%1'")).arg(sep));
+ contentsLabel->setText(tr("Type path from model above with items at each level separated by a '%1'").arg(sep));
}
diff --git a/examples/xmlpatterns/filetree/mainwindow.cpp b/examples/xmlpatterns/filetree/mainwindow.cpp
index 5b9b0c3..85348f3 100644
--- a/examples/xmlpatterns/filetree/mainwindow.cpp
+++ b/examples/xmlpatterns/filetree/mainwindow.cpp
@@ -140,7 +140,7 @@ void MainWindow::loadDirectory(const QString &directory)
QXmlFormatter formatter(query, &buffer);
query.evaluateTo(&formatter);
- treeInfo->setText((QString(tr("Model of %1 output as XML.")).arg(directory)));
+ treeInfo->setText(tr("Model of %1 output as XML.").arg(directory));
fileTree->setText(QString::fromLatin1(output.constData()));
evaluateResult();
//! [6]