diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-09-27 16:24:07 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-27 16:27:44 +0200 |
commit | f9a30a4021a93e84a0589733dbbd55196faa6ac4 (patch) | |
tree | 53cfe732521c147e042dcdad6cf49bfa767fbb9a /src/designer/src/lib/shared/formwindowbase.cpp | |
parent | 085dcbab9c2baa77f649e96db78fe2950001a4ca (diff) | |
download | qttools-f9a30a4021a93e84a0589733dbbd55196faa6ac4.tar.gz |
Designer: Fix string conversion warnings/introduce QStringLiteral.
on this occasion.
Change-Id: Ib80dfdf8aae162b02500293a83e3bc12941f7406
Reviewed-on: http://codereview.qt-project.org/5637
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/designer/src/lib/shared/formwindowbase.cpp')
-rw-r--r-- | src/designer/src/lib/shared/formwindowbase.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/designer/src/lib/shared/formwindowbase.cpp b/src/designer/src/lib/shared/formwindowbase.cpp index 1a78f799f..8dcaa9f79 100644 --- a/src/designer/src/lib/shared/formwindowbase.cpp +++ b/src/designer/src/lib/shared/formwindowbase.cpp @@ -185,11 +185,11 @@ void FormWindowBase::reloadProperties() while (itIndex.hasNext()) { const int index = itIndex.next().key(); const QVariant newValue = sheet->property(index); - if (qobject_cast<QLabel *>(sheet->object()) && sheet->propertyName(index) == QLatin1String("text")) { + if (qobject_cast<QLabel *>(sheet->object()) && sheet->propertyName(index) == QStringLiteral("text")) { const PropertySheetStringValue newString = qvariant_cast<PropertySheetStringValue>(newValue); // optimize a bit, reset only if the text value might contain a reference to qt resources // (however reloading of icons other than taken from resources might not work here) - if (newString.value().contains(QLatin1String(":/"))) { + if (newString.value().contains(QStringLiteral(":/"))) { const QVariant resetValue = QVariant::fromValue(PropertySheetStringValue()); sheet->setProperty(index, resetValue); } @@ -199,7 +199,7 @@ void FormWindowBase::reloadProperties() if (QTabWidget *tabWidget = qobject_cast<QTabWidget *>(sheet->object())) { const int count = tabWidget->count(); const int current = tabWidget->currentIndex(); - const QString currentTabIcon = QLatin1String("currentTabIcon"); + const QString currentTabIcon = QStringLiteral("currentTabIcon"); for (int i = 0; i < count; i++) { tabWidget->setCurrentIndex(i); const int index = sheet->indexOf(currentTabIcon); @@ -209,7 +209,7 @@ void FormWindowBase::reloadProperties() } else if (QToolBox *toolBox = qobject_cast<QToolBox *>(sheet->object())) { const int count = toolBox->count(); const int current = toolBox->currentIndex(); - const QString currentItemIcon = QLatin1String("currentItemIcon"); + const QString currentItemIcon = QStringLiteral("currentItemIcon"); for (int i = 0; i < count; i++) { toolBox->setCurrentIndex(i); const int index = sheet->indexOf(currentItemIcon); @@ -423,7 +423,7 @@ QMenu *FormWindowBase::createExtensionTaskMenu(QDesignerFormWindowInterface *fw, QExtensionManager *em = fw->core()->extensionManager(); if (const QDesignerTaskMenuExtension *extTaskMenu = qt_extension<QDesignerTaskMenuExtension*>(em, o)) actions += extTaskMenu->taskActions(); - if (const QDesignerTaskMenuExtension *intTaskMenu = qobject_cast<QDesignerTaskMenuExtension *>(em->extension(o, QLatin1String("QDesignerInternalTaskMenuExtension")))) { + if (const QDesignerTaskMenuExtension *intTaskMenu = qobject_cast<QDesignerTaskMenuExtension *>(em->extension(o, QStringLiteral("QDesignerInternalTaskMenuExtension")))) { if (!actions.empty()) { QAction *a = new QAction(fw); a->setSeparator(true); |