Part: Use QStringLiteral
This commit is contained in:
@@ -155,7 +155,7 @@ void SectionCut::initControls(const Base::BoundBox3d& BoundCompound)
|
||||
ui->CutColor->setColor(cutColor.asValue<QColor>());
|
||||
ui->CutTransparencyHS->setValue(int(cutTransparency));
|
||||
ui->CutTransparencyHS->setToolTip(QString::number(cutTransparency)
|
||||
+ QString::fromLatin1(" %"));
|
||||
+ QStringLiteral(" %"));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -302,7 +302,7 @@ void SectionCut::initBooleanFragmentControls(Gui::ViewProviderGeometryObject* co
|
||||
long compoundTransparency = compoundBF->Transparency.getValue();
|
||||
ui->BFragTransparencyHS->setValue(int(compoundTransparency));
|
||||
ui->BFragTransparencyHS->setToolTip(QString::number(compoundTransparency)
|
||||
+ QString::fromLatin1(" %"));
|
||||
+ QStringLiteral(" %"));
|
||||
// Part::Cut ignores the cutbox transparency when it is set
|
||||
// to zero and the BooleanFragments transparency is not zero
|
||||
// therefore limit the cutbox transparency to 1 in this case
|
||||
@@ -467,14 +467,14 @@ void SectionCut::setAutoTransparency(int value)
|
||||
ui->CutTransparencyHS->blockSignals(true);
|
||||
ui->CutTransparencyHS->setValue(value);
|
||||
ui->CutTransparencyHS->setToolTip(QString::number(value)
|
||||
+ QString::fromLatin1(" %"));
|
||||
+ QStringLiteral(" %"));
|
||||
ui->CutTransparencyHS->blockSignals(false);
|
||||
}
|
||||
if (ui->autoBFColorCB->isChecked()) {
|
||||
ui->BFragTransparencyHS->blockSignals(true);
|
||||
ui->BFragTransparencyHS->setValue(value);
|
||||
ui->BFragTransparencyHS->setToolTip(QString::number(value)
|
||||
+ QString::fromLatin1(" %"));
|
||||
+ QStringLiteral(" %"));
|
||||
ui->BFragTransparencyHS->blockSignals(false);
|
||||
}
|
||||
}
|
||||
@@ -2097,9 +2097,9 @@ void SectionCut::changeCutBoxColors()
|
||||
|
||||
void SectionCut::onTransparencyHSMoved(int val)
|
||||
{
|
||||
ui->CutTransparencyHS->setToolTip(QString::number(val) + QString::fromLatin1(" %"));
|
||||
ui->CutTransparencyHS->setToolTip(QString::number(val) + QStringLiteral(" %"));
|
||||
// highlight the tooltip
|
||||
QToolTip::showText(QCursor::pos(), QString::number(val) + QString::fromLatin1(" %"), nullptr);
|
||||
QToolTip::showText(QCursor::pos(), QString::number(val) + QStringLiteral(" %"), nullptr);
|
||||
if (ui->groupBoxX->isChecked() || ui->groupBoxY->isChecked() || ui->groupBoxZ->isChecked()) {
|
||||
changeCutBoxColors();
|
||||
}
|
||||
@@ -2201,9 +2201,9 @@ void SectionCut::onBFragTransparencyHSMoved(int val)
|
||||
ui->CutTransparencyHS->setMinimum(0);
|
||||
}
|
||||
|
||||
ui->BFragTransparencyHS->setToolTip(QString::number(val) + QString::fromLatin1(" %"));
|
||||
ui->BFragTransparencyHS->setToolTip(QString::number(val) + QStringLiteral(" %"));
|
||||
// highlight the tooltip
|
||||
QToolTip::showText(QCursor::pos(), QString::number(val) + QString::fromLatin1(" %"), nullptr);
|
||||
QToolTip::showText(QCursor::pos(), QString::number(val) + QStringLiteral(" %"), nullptr);
|
||||
|
||||
// when there is no cut yet, there is nothing else to do
|
||||
if (ui->groupBoxX->isChecked() || ui->groupBoxY->isChecked() || ui->groupBoxZ->isChecked()) {
|
||||
|
||||
Reference in New Issue
Block a user