diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-07-27 15:43:00 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-07-27 17:08:12 +0200 |
commit | bf980649d2f28266838b7e16e8828a2271d8a69c (patch) | |
tree | 0a9b6a0bebea42de04404f1d737fe75c885af6b8 /src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp | |
parent | 5635272b44a8a5a79fbb073180ca8aa8414d1dab (diff) | |
download | qt-creator-bf980649d2f28266838b7e16e8828a2271d8a69c.tar.gz |
tr()-Fixes for 2.6.
- ProjectExplorer::Profile should appear as 'Target' in the UI.
- Fix messagebox title capitalization
- Fix Q_DECLARE_TR_FUNCTIONS to contain fully qualified class
names, add where applicable to replace
QCoreApplication::translate().
- Introduce message utility function for the commonly used
'No tool chain set up for this profile' message to
ToolChainProfileInformation.
- Introduce message utility functions related to adding files
to version control to VcsManager to be shared by QmlJsEditor.
- Fix typos.
- Remove QObject::tr(), QCoreApplication::tr().
- Do not translate diagnostic console warnings of
QmlProfiler.
Change-Id: I6cee717a504796ef39f6eae58f552c5c8630adf3
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp')
-rw-r--r-- | src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp index e28e6f6819..75b5b26f93 100644 --- a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp +++ b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp @@ -110,21 +110,15 @@ public: Core::IVersionControl *versionControl = Core::ICore::vcsManager()->findVersionControlForDirectory(path); if (versionControl && versionControl->supportsOperation(Core::IVersionControl::AddOperation)) { - QString title = QCoreApplication::translate("QmlJSEditor::ComponentFromObjectDef", - "Add to Version Control"); - QString question = QCoreApplication::translate("QmlJSEditor::ComponentFromObjectDef", - "Add file\n%1\nto version control (%2)?") - .arg(newFileName, versionControl->displayName()); - QString error = QCoreApplication::translate("QmlJSEditor::ComponentFromObjectDef", - "Could not add file\n%1\nto version control (%2).") - .arg(newFileName, versionControl->displayName()); - - QMessageBox::StandardButton button = - QMessageBox::question(Core::ICore::mainWindow(), title, - question, QMessageBox::Yes | QMessageBox::No); - if (button == QMessageBox::Yes) { - if (!versionControl->vcsAdd(newFileName)) - QMessageBox::warning(Core::ICore::mainWindow(), title, error); + const QMessageBox::StandardButton button = + QMessageBox::question(Core::ICore::mainWindow(), + Core::VcsManager::msgAddToVcsTitle(), + Core::VcsManager::msgPromptToAddToVcs(QStringList(newFileName), versionControl), + QMessageBox::Yes | QMessageBox::No); + if (button == QMessageBox::Yes && !versionControl->vcsAdd(newFileName)) { + QMessageBox::warning(Core::ICore::mainWindow(), + Core::VcsManager::msgAddToVcsFailedTitle(), + Core::VcsManager::msgToAddToVcsFailed(QStringList(newFileName), versionControl)); } } QString replacement = componentName + QLatin1String(" {\n"); |