Suppress warning QString::arg: Argument missing.

This commit is contained in:
Roman Telezhynskyi 2022-05-28 15:14:50 +03:00
parent c9c46cc954
commit d6f446c452
4 changed files with 16 additions and 4 deletions

View File

@ -4642,8 +4642,11 @@ void TMainWindow::SaveSearchRequest()
void TMainWindow::UpdateSearchControlsTooltips() void TMainWindow::UpdateSearchControlsTooltips()
{ {
auto UpdateToolTip = [](QAbstractButton *button) auto UpdateToolTip = [](QAbstractButton *button)
{
if (button->toolTip().contains(QLatin1String("%1")))
{ {
button->setToolTip(button->toolTip().arg(button->shortcut().toString(QKeySequence::NativeText))); button->setToolTip(button->toolTip().arg(button->shortcut().toString(QKeySequence::NativeText)));
}
}; };
UpdateToolTip(ui->toolButtonCaseSensitive); UpdateToolTip(ui->toolButtonCaseSensitive);

View File

@ -886,8 +886,11 @@ void DialogFinalMeasurements::SaveSearchRequest()
void DialogFinalMeasurements::UpdateSearchControlsTooltips() void DialogFinalMeasurements::UpdateSearchControlsTooltips()
{ {
auto UpdateToolTip = [](QAbstractButton *button) auto UpdateToolTip = [](QAbstractButton *button)
{
if (button->toolTip().contains(QLatin1String("%1")))
{ {
button->setToolTip(button->toolTip().arg(button->shortcut().toString(QKeySequence::NativeText))); button->setToolTip(button->toolTip().arg(button->shortcut().toString(QKeySequence::NativeText)));
}
}; };
UpdateToolTip(ui->toolButtonCaseSensitive); UpdateToolTip(ui->toolButtonCaseSensitive);

View File

@ -780,8 +780,11 @@ void DialogHistory::SaveSearchRequest()
void DialogHistory::UpdateSearchControlsTooltips() void DialogHistory::UpdateSearchControlsTooltips()
{ {
auto UpdateToolTip = [](QAbstractButton *button) auto UpdateToolTip = [](QAbstractButton *button)
{
if (button->toolTip().contains(QLatin1String("%1")))
{ {
button->setToolTip(button->toolTip().arg(button->shortcut().toString(QKeySequence::NativeText))); button->setToolTip(button->toolTip().arg(button->shortcut().toString(QKeySequence::NativeText)));
}
}; };
UpdateToolTip(ui->toolButtonCaseSensitive); UpdateToolTip(ui->toolButtonCaseSensitive);

View File

@ -1100,8 +1100,11 @@ void DialogIncrements::SavePreviewCalculationsSearchRequest()
void DialogIncrements::UpdateSearchControlsTooltips() void DialogIncrements::UpdateSearchControlsTooltips()
{ {
auto UpdateToolTip = [](QAbstractButton *button) auto UpdateToolTip = [](QAbstractButton *button)
{
if (button->toolTip().contains(QLatin1String("%1")))
{ {
button->setToolTip(button->toolTip().arg(button->shortcut().toString(QKeySequence::NativeText))); button->setToolTip(button->toolTip().arg(button->shortcut().toString(QKeySequence::NativeText)));
}
}; };
UpdateToolTip(ui->toolButtonCaseSensitive); UpdateToolTip(ui->toolButtonCaseSensitive);