From 051569b998d3804b54a04bdc7edea3e9526063ed Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 31 Jan 2012 12:35:02 +0100 Subject: [PATCH] Mobile app templates: QString::fromLatin1 instead of fromAscii Task-number: QTCREATORBUG-6879 Change-Id: I0a98df8a7bfd588909886b322e0b87106a4f4c37 Reviewed-by: Denis Mingulov Reviewed-by: Kai Koehne --- .../html5app/html5applicationviewer/html5applicationviewer.cpp | 2 +- share/qtcreator/templates/mobileapp/mainwindow.cpp | 2 +- .../qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp b/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp index 3e74ea1d4ff..a727536337c 100644 --- a/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp +++ b/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp @@ -143,7 +143,7 @@ void Html5ApplicationViewer::setOrientation(ScreenOrientation orientation) #if defined(Q_OS_SYMBIAN) // If the version of Qt on the device is < 4.7.2, that attribute won't work if (orientation != ScreenOrientationAuto) { - const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); + const QStringList v = QString::fromLatin1(qVersion()).split(QLatin1Char('.')); if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); return; diff --git a/share/qtcreator/templates/mobileapp/mainwindow.cpp b/share/qtcreator/templates/mobileapp/mainwindow.cpp index 2bf1b73c54b..c0d05b3e6e9 100644 --- a/share/qtcreator/templates/mobileapp/mainwindow.cpp +++ b/share/qtcreator/templates/mobileapp/mainwindow.cpp @@ -19,7 +19,7 @@ void MainWindow::setOrientation(ScreenOrientation orientation) #if defined(Q_OS_SYMBIAN) // If the version of Qt on the device is < 4.7.2, that attribute won't work if (orientation != ScreenOrientationAuto) { - const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); + const QStringList v = QString::fromLatin1(qVersion()).split(QLatin1Char('.')); if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); return; diff --git a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp index 448714fb524..63cdc9b1900 100644 --- a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp +++ b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -114,7 +114,7 @@ void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) #if defined(Q_OS_SYMBIAN) // If the version of Qt on the device is < 4.7.2, that attribute won't work if (orientation != ScreenOrientationAuto) { - const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); + const QStringList v = QString::fromLatin1(qVersion()).split(QLatin1Char('.')); if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); return;