diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-12-13 16:17:43 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-12-13 16:20:26 +0100 |
commit | 948c7af9f202cac2fc02679172acb069ca61bfcd (patch) | |
tree | 16b46e6bcc51ee8b3ed7f017d967f8d33671aae5 /src/plugins/qmljseditor | |
parent | 0d08db21891e5b647c108a2ad8e955e13f84ceaf (diff) | |
download | qt-creator-948c7af9f202cac2fc02679172acb069ca61bfcd.tar.gz |
tr()-Fixes.
- Capitalization
- Fix lupdate warnings about tr() Usage in ZeroConf
- Fix some messages.
Change-Id: I95e4095ce54040e30d9a7968407bfc99b76643ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/qmljseditor')
-rw-r--r-- | src/plugins/qmljseditor/qmljsquickfixes.cpp | 1 | ||||
-rw-r--r-- | src/plugins/qmljseditor/qmljswrapinloader.cpp | 16 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/qmljseditor/qmljsquickfixes.cpp b/src/plugins/qmljseditor/qmljsquickfixes.cpp index 8c5b25f99c..61d3175769 100644 --- a/src/plugins/qmljseditor/qmljsquickfixes.cpp +++ b/src/plugins/qmljseditor/qmljsquickfixes.cpp @@ -138,6 +138,7 @@ private: */ class AddAnalysisMessageSuppressionComment: public QmlJSQuickFixFactory { + Q_DECLARE_TR_FUNCTIONS(QmlJSEditor::AddAnalysisMessageSuppressionComment) public: virtual QList<QmlJSQuickFixOperation::Ptr> match( const QSharedPointer<const QmlJSQuickFixAssistInterface> &interface) diff --git a/src/plugins/qmljseditor/qmljswrapinloader.cpp b/src/plugins/qmljseditor/qmljswrapinloader.cpp index 21c47f3647..dcb73f200a 100644 --- a/src/plugins/qmljseditor/qmljswrapinloader.cpp +++ b/src/plugins/qmljseditor/qmljswrapinloader.cpp @@ -43,6 +43,7 @@ #include <QtCore/QDir> #include <QtCore/QFileInfo> +#include <QtCore/QCoreApplication> using namespace QmlJS; using namespace QmlJS::AST; @@ -79,6 +80,8 @@ protected: class Operation: public QmlJSQuickFixOperation { + Q_DECLARE_TR_FUNCTIONS(QmlJSEditor::Internal::Operation) + UiObjectDefinition *m_objDef; public: @@ -89,7 +92,7 @@ public: { Q_ASSERT(m_objDef != 0); - setDescription(WrapInLoader::tr("Wrap Component in Loader")); + setDescription(tr("Wrap Component in Loader")); } QString findFreeName(const QString &base) @@ -129,12 +132,10 @@ public: FindIds::Result innerIds = FindIds()(m_objDef); innerIds.remove(id); - QString comment = WrapInLoader::tr( - "// TODO: Move position bindings from the component to the Loader.\n" - "// Check all uses of 'parent' inside the root element of the component.\n"); + QString comment = tr("// TODO: Move position bindings from the component to the Loader.\n" + "// Check all uses of 'parent' inside the root element of the component.\n"); if (idBinding) { - comment += WrapInLoader::tr( - "// Rename all outer uses of the id '%1' to '%2.item'.\n").arg( + comment += tr("// Rename all outer uses of the id '%1' to '%2.item'.\n").arg( id, loaderId); } @@ -144,8 +145,7 @@ public: while (it.hasNext()) { it.next(); const QString innerId = it.key(); - comment += WrapInLoader::tr( - "// Rename all outer uses of the id '%1' to '%2.item.%1'.\n").arg( + comment += tr("// Rename all outer uses of the id '%1' to '%2.item.%1'.\n").arg( innerId, loaderId); changes.replace(it.value().begin(), it.value().end(), QString("inner_%1").arg(innerId)); innerIdForwarders += QString("\nproperty alias %1: inner_%1").arg(innerId); |