Log Viewer: Fix UI text

Also update the string in the documentation.

Task-number: QTCREATORBUG-27055
Change-Id: Idce699a7796e7cb55d8218c105ec851c369cef7b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Leena Miettinen
2022-02-16 18:07:05 +01:00
parent 81c9051feb
commit b2d90241fe
2 changed files with 9 additions and 9 deletions

View File

@@ -83,7 +83,7 @@
By default, logging categories and messages coming directly from Qt are
disabled. To display them, select \inlineimage icons/qtlogo-16.png
(\uicontrol {Toggle logging of Qt internal loggings.})
(\uicontrol {Toggle Qt Internal Logging}).
New messages automatically scroll the message display to the bottom.
To stop automatic scrolling, toggle \inlineimage icons/arrowdown.png

View File

@@ -425,7 +425,7 @@ LoggingViewManagerWidget::LoggingViewManagerWidget(QWidget *parent)
buttonsLayout->addWidget(stop);
auto qtInternal = new QToolButton;
qtInternal->setIcon(Core::Icons::QTLOGO.icon());
qtInternal->setToolTip(tr("Toggle logging of Qt internal loggings"));
qtInternal->setToolTip(tr("Toggle Qt Internal Logging"));
qtInternal->setCheckable(true);
qtInternal->setChecked(false);
buttonsLayout->addWidget(qtInternal);
@@ -616,7 +616,7 @@ void LoggingViewManagerWidget::saveLoggingsToFile() const
if (enabled)
m_manager->setEnabled(false);
const Utils::FilePath fp = Utils::FileUtils::getSaveFilePath(ICore::dialogParent(),
tr("Save logs as"));
tr("Save Logs As"));
if (fp.isEmpty())
return;
const bool useTS = m_timestamps->isChecked();
@@ -628,7 +628,7 @@ void LoggingViewManagerWidget::saveLoggingsToFile() const
if (res == -1) {
QMessageBox::critical(
ICore::dialogParent(), tr("Error"),
tr("Failed to write logs to '%1'.").arg(fp.toUserOutput()));
tr("Failed to write logs to \"%1\".").arg(fp.toUserOutput()));
break;
}
}
@@ -636,14 +636,14 @@ void LoggingViewManagerWidget::saveLoggingsToFile() const
} else {
QMessageBox::critical(
ICore::dialogParent(), tr("Error"),
tr("Failed to open file '%1' for writing logs.").arg(fp.toUserOutput()));
tr("Failed to open file \"%1\" for writing logs.").arg(fp.toUserOutput()));
}
}
void LoggingViewManagerWidget::saveEnabledCategoryPreset() const
{
Utils::FilePath fp = Utils::FileUtils::getSaveFilePath(ICore::dialogParent(),
tr("Save enabled categories as"));
tr("Save Enabled Categories As"));
if (fp.isEmpty())
return;
const QList<LoggingCategoryItem> enabled = m_categoryModel->enabledCategories();
@@ -663,13 +663,13 @@ void LoggingViewManagerWidget::saveEnabledCategoryPreset() const
if (!fp.writeFileContents(doc.toJson(QJsonDocument::Compact)))
QMessageBox::critical(
ICore::dialogParent(), tr("Error"),
tr("Failed to write preset file '%1'.").arg(fp.toUserOutput()));
tr("Failed to write preset file \"%1\".").arg(fp.toUserOutput()));
}
void LoggingViewManagerWidget::loadAndUpdateFromPreset()
{
Utils::FilePath fp = Utils::FileUtils::getOpenFilePath(ICore::dialogParent(),
tr("Load enabled categories from"));
tr("Load Enabled Categories From"));
if (fp.isEmpty())
return;
// read file, update categories
@@ -677,7 +677,7 @@ void LoggingViewManagerWidget::loadAndUpdateFromPreset()
QJsonDocument doc = QJsonDocument::fromJson(fp.fileContents(), &error);
if (error.error != QJsonParseError::NoError) {
QMessageBox::critical(ICore::dialogParent(), tr("Error"),
tr("Failed to read preset file '%1': %2").arg(fp.toUserOutput())
tr("Failed to read preset file \"%1\": %2").arg(fp.toUserOutput())
.arg(error.errorString()));
return;
}