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

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

View File

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

View File

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

View File

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