refactor(cpn): introduce BoundedString<N> for ModelData string fields (#7438)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
68873e2955
commit
9326a202b2
@@ -123,7 +123,7 @@ void CompareDialog::compare()
|
||||
|
||||
for (int i=0; i < modelsList.size(); ++i) {
|
||||
multimodelprinter->setModel(i, &modelsList[i].model, &modelsList[i].gs);
|
||||
QString name(modelsList.at(i).model.name);
|
||||
QString name(modelsList.at(i).model.name.toQString());
|
||||
if (name.isEmpty())
|
||||
name = tr("Unnamed Model %1").arg(i+1);
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ QString MultiModelPrinter::printSetup()
|
||||
|
||||
MultiColumns columns(modelPrinterMap.size());
|
||||
columns.appendSectionTableStart();
|
||||
ROWLABELCOMPARECELL(tr("Name"), 20, model->name, 80);
|
||||
ROWLABELCOMPARECELL(tr("Name"), 20, model->name.toQString(), 80);
|
||||
if (firmware->getCapability(HasModelImage)) {
|
||||
ROWLABELCOMPARECELL(tr("Model Image"), 0, model->bitmap, 0);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ PrintDialog::PrintDialog(QWidget *parent, Firmware * firmware, GeneralSettings &
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowIcon(CompanionIcon("print.png"));
|
||||
setWindowTitle(model.name);
|
||||
setWindowTitle(model.name.toQString());
|
||||
multiModelPrinter.setModel(0, &model, &generalSettings);
|
||||
ui->textEdit->setHtml(multiModelPrinter.print(ui->textEdit->document()));
|
||||
if (!printfilename.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user