diff options
-rw-r--r-- | src/libs/utils/reloadpromptutils.cpp | 8 | ||||
-rw-r--r-- | src/plugins/coreplugin/editormanager/editormanager.cpp | 10 | ||||
-rw-r--r-- | src/plugins/coreplugin/mimedatabase.cpp | 12 | ||||
-rw-r--r-- | src/plugins/debugger/stackhandler.cpp | 24 | ||||
-rw-r--r-- | src/plugins/debugger/stackhandler.h | 1 | ||||
-rw-r--r-- | src/plugins/debugger/watchhandler.cpp | 61 | ||||
-rw-r--r-- | src/plugins/debugger/watchhandler.h | 1 | ||||
-rw-r--r-- | src/plugins/designer/cpp/formclasswizard.cpp | 2 | ||||
-rw-r--r-- | src/plugins/fakevim/fakevimactions.cpp | 42 | ||||
-rw-r--r-- | src/plugins/genericprojectmanager/genericproject.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/embeddedpropertiespage.ui | 2 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/projectloadwizard.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/qtoptionspage.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp | 3 | ||||
-rw-r--r-- | src/shared/qrceditor/resourcefile.cpp | 12 |
16 files changed, 103 insertions, 83 deletions
diff --git a/src/libs/utils/reloadpromptutils.cpp b/src/libs/utils/reloadpromptutils.cpp index befa54308d5..9681f05fc6f 100644 --- a/src/libs/utils/reloadpromptutils.cpp +++ b/src/libs/utils/reloadpromptutils.cpp @@ -30,6 +30,7 @@ #include "reloadpromptutils.h" #include <QtGui/QMessageBox> +#include <QtCore/QCoreApplication> using namespace Core; using namespace Core::Utils; @@ -37,9 +38,10 @@ using namespace Core::Utils; QTCREATOR_UTILS_EXPORT Core::Utils::ReloadPromptAnswer Core::Utils::reloadPrompt(const QString &fileName, QWidget *parent) { - return reloadPrompt(QObject::tr("File Changed"), - QObject::tr("The file %1 has changed outside Qt Creator. Do you want to reload it?").arg(fileName), - parent); + const QString title = QCoreApplication::translate("Core::Utils::reloadPrompt", "File Changed"); + const QString msg = QCoreApplication::translate("Core::Utils::reloadPrompt", + "The file %1 has changed outside Qt Creator. Do you want to reload it?").arg(fileName); + return reloadPrompt(title, msg, parent); } QTCREATOR_UTILS_EXPORT Core::Utils::ReloadPromptAnswer diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 4c4d91b188d..94b56e6c317 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1241,19 +1241,19 @@ EditorManager::ReadOnlyAction QWidget *parent, bool displaySaveAsButton) { - QMessageBox msgBox(QMessageBox::Question, QObject::tr("File is Read Only"), - QObject::tr("The file %1 is read only.").arg(fileName), + QMessageBox msgBox(QMessageBox::Question, tr("File is Read Only"), + tr("The file %1 is read only.").arg(fileName), QMessageBox::Cancel, parent); QPushButton *sccButton = 0; if (versionControl && versionControl->supportsOperation(IVersionControl::OpenOperation)) - sccButton = msgBox.addButton(QObject::tr("Open with VCS (%1)").arg(versionControl->name()), QMessageBox::AcceptRole); + sccButton = msgBox.addButton(tr("Open with VCS (%1)").arg(versionControl->name()), QMessageBox::AcceptRole); - QPushButton *makeWritableButton = msgBox.addButton(QObject::tr("Make writable"), QMessageBox::AcceptRole); + QPushButton *makeWritableButton = msgBox.addButton(tr("Make writable"), QMessageBox::AcceptRole); QPushButton *saveAsButton = 0; if (displaySaveAsButton) - saveAsButton = msgBox.addButton(QObject::tr("Save as ..."), QMessageBox::ActionRole); + saveAsButton = msgBox.addButton(tr("Save as ..."), QMessageBox::ActionRole); msgBox.setDefaultButton(sccButton ? sccButton : makeWritableButton); msgBox.exec(); diff --git a/src/plugins/coreplugin/mimedatabase.cpp b/src/plugins/coreplugin/mimedatabase.cpp index 2464ad31d8e..1a5f457ecb5 100644 --- a/src/plugins/coreplugin/mimedatabase.cpp +++ b/src/plugins/coreplugin/mimedatabase.cpp @@ -647,7 +647,7 @@ static bool parseNumber(const QString &n, int *target, QString *errorMessage) bool ok; *target = n.toInt(&ok); if (!ok) { - *errorMessage = QCoreApplication::translate("MimeDatabase", "Not a number '%1'.").arg(n); + *errorMessage = QString::fromLatin1("Not a number '%1'.").arg(n); return false; } return true; @@ -667,7 +667,7 @@ static bool addMagicMatchRule(const QXmlStreamAttributes &atts, } const QString value = atts.value(QLatin1String(matchValueAttributeC)).toString(); if (value.isEmpty()) { - *errorMessage = QCoreApplication::translate("MimeDatabase", "Empty match value detected."); + *errorMessage = QString::fromLatin1("Empty match value detected."); return false; } // Parse for offset as "1" or "1:10" @@ -699,7 +699,7 @@ bool BaseMimeTypeParser::parse(QIODevice *dev, const QString &fileName, QString case ParseMimeType: { // start parsing a type const QString type = reader.attributes().value(QLatin1String(mimeTypeAttributeC)).toString(); if (type.isEmpty()) { - reader.raiseError(QCoreApplication::translate("MimeDatabase", "Missing 'type'-attribute")); + reader.raiseError(QString::fromLatin1("Missing 'type'-attribute")); } else { data.type = type; } @@ -748,7 +748,7 @@ bool BaseMimeTypeParser::parse(QIODevice *dev, const QString &fileName, QString return false; break; case ParseError: - reader.raiseError(QCoreApplication::translate("MimeDatabase", "Unexpected element <%1>").arg(reader.name().toString())); + reader.raiseError(QString::fromLatin1("Unexpected element <%1>").arg(reader.name().toString())); break; default: break; @@ -775,7 +775,7 @@ bool BaseMimeTypeParser::parse(QIODevice *dev, const QString &fileName, QString } if (reader.hasError()) { - *errorMessage = QCoreApplication::translate("MimeDatabase", "An error has been encountered at line %1 of %2: %3:").arg(reader.lineNumber()).arg(fileName, reader.errorString()); + *errorMessage = QString::fromLatin1("An error has been encountered at line %1 of %2: %3:").arg(reader.lineNumber()).arg(fileName, reader.errorString()); return false; } return true; @@ -890,7 +890,7 @@ bool MimeDatabasePrivate::addMimeTypes(const QString &fileName, QString *errorMe { QFile file(fileName); if (!file.open(QIODevice::ReadOnly|QIODevice::Text)) { - *errorMessage = QCoreApplication::translate("MimeDatabase", "Cannot open %1: %2").arg(fileName, file.errorString()); + *errorMessage = QString::fromLatin1("Cannot open %1: %2").arg(fileName, file.errorString()); return false; } return addMimeTypes(&file, fileName, errorMessage); diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index fcc2e166d24..96b7c0e4cc5 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -46,6 +46,21 @@ bool StackFrame::isUsable() const return !file.isEmpty() && QFileInfo(file).isReadable(); } +QString StackFrame::toToolTip() const +{ + QString res; + QTextStream str(&res); + str << "<html><body><table>" + << "<tr><td>" << StackHandler::tr("Address:") << "</td><td>" << address << "</td></tr>" + << "<tr><td>" << StackHandler::tr("Function:") << "</td><td>" << function << "</td></tr>" + << "<tr><td>" << StackHandler::tr("File:") << "</td><td>" << file << "</td></tr>" + << "<tr><td>" << StackHandler::tr("Line:") << "</td><td>" << line << "</td></tr>" + << "<tr><td>" << StackHandler::tr("From:") << "</td><td>" << from << "</td></tr>" + << "<tr><td>" << StackHandler::tr("To:") << "</td><td>" << to << "</td></tr>" + << "</table></body></html>"; + return res; +} + //////////////////////////////////////////////////////////////////////// // // StackHandler @@ -104,14 +119,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const } } else if (role == Qt::ToolTipRole) { //: Tooltip for variable - return tr("<table><tr><td>Address:</td><td>%1</td></tr>" - "<tr><td>Function: </td><td>%2</td></tr>" - "<tr><td>File: </td><td>%3</td></tr>" - "<tr><td>Line: </td><td>%4</td></tr>" - "<tr><td>From: </td><td>%5</td></tr></table>" - "<tr><td>To: </td><td>%6</td></tr></table>") - .arg(frame.address, frame.function, - frame.file, QString::number(frame.line), frame.from, frame.to); + return frame.toToolTip(); } else if (role == Qt::DecorationRole && index.column() == 0) { // Return icon that indicates whether this is the active stack frame return (index.row() == m_currentIndex) ? m_positionIcon : m_emptyIcon; diff --git a/src/plugins/debugger/stackhandler.h b/src/plugins/debugger/stackhandler.h index 12f771464a8..5435ecafaf9 100644 --- a/src/plugins/debugger/stackhandler.h +++ b/src/plugins/debugger/stackhandler.h @@ -48,6 +48,7 @@ struct StackFrame { StackFrame(int level = 0); bool isUsable() const; + QString toToolTip() const; int level; QString function; diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 144f85f4f8d..fe03cf9c9ee 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -236,6 +236,35 @@ QString WatchData::toString() const return res + QLatin1Char('}'); } +// Format a tooltip fow with aligned colon +template <class Streamable> + inline void formatToolTipRow(QTextStream &str, + const QString &category, + const Streamable &value) +{ + str << "<tr><td>" << category << "</td><td> : </td><td>" << value << "</td></tr>"; +} + +QString WatchData::toToolTip() const +{ + QString res; + QTextStream str(&res); + str << "<html><body><table>"; + formatToolTipRow(str, WatchHandler::tr("Expression"), Qt::escape(exp)); + formatToolTipRow(str, WatchHandler::tr("Type"), Qt::escape(type)); + QString val = value; + if (value.size() > 1000) { + val.truncate(1000); + val += WatchHandler::tr(" ... <cut off>"); + } + formatToolTipRow(str, WatchHandler::tr("Value"), Qt::escape(val)); + formatToolTipRow(str, WatchHandler::tr("Object Address"), Qt::escape(addr)); + formatToolTipRow(str, WatchHandler::tr("Stored Address"), Qt::escape(saddr)); + formatToolTipRow(str, WatchHandler::tr("iname"), Qt::escape(iname)); + str << "</table></body></html>"; + return res; +} + static bool iNameSorter(const WatchData &d1, const WatchData &d2) { if (d1.level != d2.level) @@ -482,36 +511,8 @@ QVariant WatchHandler::data(const QModelIndex &idx, int role) const break; } - case Qt::ToolTipRole: { - QString val = data.value; - if (val.size() > 1000) - val = val.left(1000) + QLatin1String(" ... <cut off>"); - - QString tt = QLatin1String("<table>"); - //tt += QLatin1String("<tr><td>internal name</td><td> : </td><td>"); - //tt += Qt::escape(iname) + QLatin1String("</td></tr>"); - tt += QLatin1String("<tr><td>expression</td><td> : </td><td>"); - tt += Qt::escape(data.exp) + QLatin1String("</td></tr>"); - tt += QLatin1String("<tr><td>type</td><td> : </td><td>"); - tt += Qt::escape(data.type) + QLatin1String("</td></tr>"); - //if (!valuetooltip.isEmpty()) - // tt += valuetooltip; - //else - tt += QLatin1String("<tr><td>value</td><td> : </td><td>"); - tt += Qt::escape(data.value) + QLatin1String("</td></tr>"); - tt += QLatin1String("<tr><td>object addr</td><td> : </td><td>"); - tt += Qt::escape(data.addr) + QLatin1String("</td></tr>"); - tt += QLatin1String("<tr><td>stored addr</td><td> : </td><td>"); - tt += Qt::escape(data.saddr) + QLatin1String("</td></tr>"); - tt += QLatin1String("<tr><td>iname</td><td> : </td><td>"); - tt += Qt::escape(data.iname) + QLatin1String("</td></tr>"); - tt += QLatin1String("</table>"); - tt.replace(QLatin1String("@value@"), Qt::escape(data.value)); - - if (tt.size() > 10000) - tt = tt.left(10000) + QLatin1String(" ... <cut off>"); - return tt; - } + case Qt::ToolTipRole: + return data.toToolTip(); case Qt::ForegroundRole: { static const QVariant red(QColor(200, 0, 0)); diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h index aaefbe6f8cc..389f52b2dc6 100644 --- a/src/plugins/debugger/watchhandler.h +++ b/src/plugins/debugger/watchhandler.h @@ -101,6 +101,7 @@ public: WatchData pointerChildPlaceHolder() const; QString toString() const; + QString toToolTip() const; bool isLocal() const { return iname.startsWith(QLatin1String("local.")); } bool isWatcher() const { return iname.startsWith(QLatin1String("watch.")); } bool isValid() const { return !iname.isEmpty(); } diff --git a/src/plugins/designer/cpp/formclasswizard.cpp b/src/plugins/designer/cpp/formclasswizard.cpp index d208372a724..937abf0db2c 100644 --- a/src/plugins/designer/cpp/formclasswizard.cpp +++ b/src/plugins/designer/cpp/formclasswizard.cpp @@ -90,7 +90,7 @@ Core::GeneratedFiles FormClassWizard::generateFiles(const QWizard *w, QString *e const FormClassWizardParameters params = wizardDialog->parameters(); if (params.uiTemplate.isEmpty()) { - *errorMessage = tr("Internal error: FormClassWizard::generateFiles: empty template contents"); + *errorMessage = QLatin1String("Internal error: FormClassWizard::generateFiles: empty template contents"); return Core::GeneratedFiles(); } diff --git a/src/plugins/fakevim/fakevimactions.cpp b/src/plugins/fakevim/fakevimactions.cpp index fff5a008ce7..6024c1e8a2c 100644 --- a/src/plugins/fakevim/fakevimactions.cpp +++ b/src/plugins/fakevim/fakevimactions.cpp @@ -45,6 +45,7 @@ #include <QtCore/QRegExp> #include <QtCore/QTextStream> #include <QtCore/QtAlgorithms> +#include <QtCore/QCoreApplication> #include <QtCore/QStack> using namespace Core::Utils; @@ -113,58 +114,59 @@ FakeVimSettings *theFakeVimSettings() SavedAction *item = 0; + const QString group = QLatin1String("FakeVim"); item = new SavedAction(instance); - item->setText(QObject::tr("Toggle vim-style editing")); - item->setSettingsKey("FakeVim", "UseFakeVim"); + item->setText(QCoreApplication::translate("FakeVim::Internal", "Toggle vim-style editing")); + item->setSettingsKey(group, QLatin1String("UseFakeVim")); item->setCheckable(true); instance->insertItem(ConfigUseFakeVim, item); item = new SavedAction(instance); item->setDefaultValue(false); - item->setSettingsKey("FakeVim", "StartOfLine"); + item->setSettingsKey(group, QLatin1String("StartOfLine")); item->setCheckable(true); - instance->insertItem(ConfigStartOfLine, item, "startofline", "sol"); + instance->insertItem(ConfigStartOfLine, item, QLatin1String("startofline"), QLatin1String("sol")); item = new SavedAction(instance); item->setDefaultValue(8); - item->setSettingsKey("FakeVim", "TabStop"); - instance->insertItem(ConfigTabStop, item, "tabstop", "ts"); + item->setSettingsKey(group, QLatin1String("TabStop")); + instance->insertItem(ConfigTabStop, item, QLatin1String("tabstop"), QLatin1String("ts")); item = new SavedAction(instance); item->setDefaultValue(false); - item->setSettingsKey("FakeVim", "SmartTab"); - instance->insertItem(ConfigSmartTab, item, "smarttab", "sta"); + item->setSettingsKey(group, QLatin1String("SmartTab")); + instance->insertItem(ConfigSmartTab, item, QLatin1String("smarttab"), QLatin1String("sta")); item = new SavedAction(instance); item->setDefaultValue(true); - item->setSettingsKey("FakeVim", "HlSearch"); + item->setSettingsKey(group, QLatin1String("HlSearch")); item->setCheckable(true); - instance->insertItem(ConfigHlSearch, item, "hlsearch", "hls"); + instance->insertItem(ConfigHlSearch, item, QLatin1String("hlsearch"), QLatin1String("hls")); item = new SavedAction(instance); item->setDefaultValue(8); - item->setSettingsKey("FakeVim", "ShiftWidth"); - instance->insertItem(ConfigShiftWidth, item, "shiftwidth", "sw"); + item->setSettingsKey(group, QLatin1String("ShiftWidth")); + instance->insertItem(ConfigShiftWidth, item, QLatin1String("shiftwidth"), QLatin1String("sw")); item = new SavedAction(instance); item->setDefaultValue(false); - item->setSettingsKey("FakeVim", "ExpandTab"); + item->setSettingsKey(group, QLatin1String("ExpandTab")); item->setCheckable(true); - instance->insertItem(ConfigExpandTab, item, "expandtab", "et"); + instance->insertItem(ConfigExpandTab, item, QLatin1String("expandtab"), QLatin1String("et")); item = new SavedAction(instance); item->setDefaultValue(false); - item->setSettingsKey("FakeVim", "AutoIndent"); + item->setSettingsKey(group, QLatin1String("AutoIndent")); item->setCheckable(true); - instance->insertItem(ConfigAutoIndent, item, "autoindent", "ai"); + instance->insertItem(ConfigAutoIndent, item, QLatin1String("autoindent"), QLatin1String("ai")); item = new SavedAction(instance); - item->setDefaultValue("indent,eol,start"); - item->setSettingsKey("FakeVim", "Backspace"); - instance->insertItem(ConfigBackspace, item, "backspace", "bs"); + item->setDefaultValue(QLatin1String("indent,eol,start")); + item->setSettingsKey(group, QLatin1String("Backspace")); + instance->insertItem(ConfigBackspace, item, QLatin1String("backspace"), QLatin1String("bs")); item = new SavedAction(instance); - item->setText(QObject::tr("FakeVim properties...")); + item->setText(QCoreApplication::translate("FakeVim::Internal", "FakeVim properties...")); instance->insertItem(SettingsDialog, item); return instance; diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp index be063ead32f..ccff2bb67dc 100644 --- a/src/plugins/genericprojectmanager/genericproject.cpp +++ b/src/plugins/genericprojectmanager/genericproject.cpp @@ -495,7 +495,7 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericProject *project) QComboBox *toolChainChooser = new QComboBox; toolChainChooser->addItems(ProjectExplorer::ToolChain::supportedToolChains()); toolChainChooser->setCurrentIndex(toolChainChooser->findText(m_project->toolChainId())); - fl->addRow(tr("Tool chain:"), toolChainChooser); + fl->addRow(tr("Toolchain:"), toolChainChooser); connect(toolChainChooser, SIGNAL(activated(QString)), m_project, SLOT(setToolChainId(QString))); } diff --git a/src/plugins/qt4projectmanager/embeddedpropertiespage.ui b/src/plugins/qt4projectmanager/embeddedpropertiespage.ui index 6185473212d..f4f42aa80cb 100644 --- a/src/plugins/qt4projectmanager/embeddedpropertiespage.ui +++ b/src/plugins/qt4projectmanager/embeddedpropertiespage.ui @@ -20,7 +20,7 @@ <property name="text" > <string>Use Virtual Box
 Note: This adds the toolchain to the build environment and runs the program inside a virtual machine.
 -It also automatically sets the correct qt version.</string> +It also automatically sets the correct Qt version.</string> </property> </widget> </item> diff --git a/src/plugins/qt4projectmanager/projectloadwizard.cpp b/src/plugins/qt4projectmanager/projectloadwizard.cpp index ab27fb981ce..1d1667cc142 100644 --- a/src/plugins/qt4projectmanager/projectloadwizard.cpp +++ b/src/plugins/qt4projectmanager/projectloadwizard.cpp @@ -210,7 +210,7 @@ void ProjectLoadWizard::setupImportPage(QtVersion *version, QtVersion::QmakeBuil import2Label = new QLabel(importPage); import2Label->setTextFormat(Qt::RichText); if (m_temporaryVersion) - import2Label->setText(tr("<b>Note:</b> Importing the settings will automatically add the Qt Version from:<br><b>%1</b> to the list of qt versions.") + import2Label->setText(tr("<b>Note:</b> Importing the settings will automatically add the Qt Version from:<br><b>%1</b> to the list of Qt versions.") .arg(QDir::toNativeSeparators(m_importVersion->path()))); importLayout->addWidget(import2Label); addPage(importPage); diff --git a/src/plugins/qt4projectmanager/qtoptionspage.cpp b/src/plugins/qt4projectmanager/qtoptionspage.cpp index 3848763524f..59efc8f678f 100644 --- a/src/plugins/qt4projectmanager/qtoptionspage.cpp +++ b/src/plugins/qt4projectmanager/qtoptionspage.cpp @@ -290,7 +290,7 @@ void QtOptionsPageWidget::showEnvironmentPage(QTreeWidgetItem *item) m_ui->errorLabel->setText(tr("The Qt Version %1 is not installed. Run make install") .arg(QDir::toNativeSeparators(m_versions.at(index)->path()))); else - m_ui->errorLabel->setText(tr("%1 is not a valid qt directory").arg(QDir::toNativeSeparators(m_versions.at(index)->path()))); + m_ui->errorLabel->setText(tr("%1 is not a valid Qt directory").arg(QDir::toNativeSeparators(m_versions.at(index)->path()))); } else { //ProjectExplorer::ToolChain::GCC m_ui->msvcComboBox->setVisible(false); makeMingwVisible(false); diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp index 031da0eb28e..e6b18d21e5d 100644 --- a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp +++ b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp @@ -51,7 +51,7 @@ ConsoleAppWizardDialog::ConsoleAppWizardDialog(const QString &templateName, m_introPage->setDescription(tr("This wizard generates a Qt4 console application " "project. The application derives from QCoreApplication and does not " - "present a GUI. You can press 'Finish' at any point in time.")); + "provide a GUI.")); addPage(m_introPage); diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp index 685973adc8b..a943e922528 100644 --- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp +++ b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp @@ -48,8 +48,7 @@ EmptyProjectWizardDialog::EmptyProjectWizardDialog(const QString &templateName, Core::BaseFileWizard::setupWizard(this); m_introPage->setDescription(tr("This wizard generates an empty Qt4 project. " - "Add files to it later on by using the other wizards. " - "You can press 'Finish' at any point in time.")); + "Add files to it later on by using the other wizards.")); addPage(m_introPage); diff --git a/src/shared/qrceditor/resourcefile.cpp b/src/shared/qrceditor/resourcefile.cpp index a259cf49ff3..f8986b52966 100644 --- a/src/shared/qrceditor/resourcefile.cpp +++ b/src/shared/qrceditor/resourcefile.cpp @@ -44,10 +44,16 @@ QT_BEGIN_NAMESPACE + /* TRANSLATOR qdesigner_internal::ResourceModel */ +static QString msgFileNameEmpty() +{ + return QCoreApplication::translate("Designer", "The file name is empty."); +} + namespace qdesigner_internal { @@ -82,7 +88,7 @@ bool ResourceFile::load() m_error_message.clear(); if (m_file_name.isEmpty()) { - m_error_message = QCoreApplication::translate("Designer", "file name is empty"); + m_error_message = msgFileNameEmpty(); return false; } @@ -106,7 +112,7 @@ bool ResourceFile::load() QDomElement root = doc.firstChildElement(QLatin1String("RCC")); if (root.isNull()) { - m_error_message = QCoreApplication::translate("Designer", "no <RCC> root element"); + m_error_message = QCoreApplication::translate("Designer", "The <RCC> root element is missing."); return false; } @@ -145,7 +151,7 @@ bool ResourceFile::save() m_error_message.clear(); if (m_file_name.isEmpty()) { - m_error_message = QCoreApplication::translate("Designer", "file name is empty"); + m_error_message = msgFileNameEmpty(); return false; } |