summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-28 08:27:50 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-28 08:31:07 (GMT)
commitf390f9b51cf8686e9ed44f13a33c7349b9e96a09 (patch)
tree162c768769713a7215bca64daf8f2bdc75c9fbee /src/gui/dialogs
parent0bb0699d403b7541472a72a4057ecf0ca366a7cd (diff)
downloadQt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.zip
Qt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.tar.gz
Qt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.tar.bz2
improved string operations all over the place
used character operations whenever possible better usage of QLatin1String
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qprintdialog_unix.cpp8
-rw-r--r--src/gui/dialogs/qprintpreviewdialog.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp
index 87a4e65..8456d13 100644
--- a/src/gui/dialogs/qprintdialog_unix.cpp
+++ b/src/gui/dialogs/qprintdialog_unix.cpp
@@ -669,7 +669,7 @@ QUnixPrintWidgetPrivate::QUnixPrintWidgetPrivate(QUnixPrintWidget *p)
for (int i = 0; i < cupsPrinterCount; ++i) {
QString printerName(QString::fromLocal8Bit(cupsPrinters[i].name));
if (cupsPrinters[i].instance)
- printerName += QLatin1String("/") + QString::fromLocal8Bit(cupsPrinters[i].instance);
+ printerName += QLatin1Char('/') + QString::fromLocal8Bit(cupsPrinters[i].instance);
widget.printers->addItem(printerName);
if (cupsPrinters[i].is_default)
@@ -813,7 +813,7 @@ void QUnixPrintWidgetPrivate::_q_printerChanged(int index)
optionsPane->selectPrinter(0);
#endif
if (lprPrinters.count() > 0) {
- QString type = lprPrinters.at(index).name + QLatin1String("@") + lprPrinters.at(index).host;
+ QString type = lprPrinters.at(index).name + QLatin1Char('@') + lprPrinters.at(index).host;
if (!lprPrinters.at(index).comment.isEmpty())
type += QLatin1String(", ") + lprPrinters.at(index).comment;
widget.type->setText(type);
@@ -1194,9 +1194,9 @@ QVariant QPPDOptionsModel::headerData(int section, Qt::Orientation, int role) co
switch(section){
case 0:
- return QVariant(QApplication::translate("QPPDOptionsModel","Name"));
+ return QVariant(QApplication::translate("QPPDOptionsModel", "Name"));
case 1:
- return QVariant(QApplication::translate("QPPDOptionsModel","Value"));
+ return QVariant(QApplication::translate("QPPDOptionsModel", "Value"));
default:
return QVariant();
}
diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp
index 29a2738..a696160 100644
--- a/src/gui/dialogs/qprintpreviewdialog.cpp
+++ b/src/gui/dialogs/qprintpreviewdialog.cpp
@@ -460,7 +460,7 @@ void QPrintPreviewDialogPrivate::updatePageNumLabel()
int numPages = preview->numPages();
int maxChars = QString::number(numPages).length();
- pageNumLabel->setText(QString(QLatin1String("/ %1")).arg(numPages));
+ pageNumLabel->setText(QString::fromLatin1("/ %1").arg(numPages));
int cyphersWidth = q->fontMetrics().width(QString().fill(QLatin1Char('8'), maxChars));
int maxWidth = pageNumEdit->minimumSizeHint().width() + cyphersWidth;
pageNumEdit->setMinimumWidth(maxWidth);
@@ -611,7 +611,7 @@ void QPrintPreviewDialogPrivate::_q_zoomFactorChanged()
factor = qMax(qreal(1.0), qMin(qreal(1000.0), factor));
if (ok) {
preview->setZoomFactor(factor/100.0);
- zoomFactor->setEditText(QString(QLatin1String("%1%")).arg(factor));
+ zoomFactor->setEditText(QString::fromLatin1("%1%").arg(factor));
setFitting(false);
}
}