Merge pull request #21377 from WandererFan/Removesnprintf

[TD]remove snprintf
This commit is contained in:
WandererFan
2025-06-02 12:24:05 -04:00
committed by GitHub
parent 273156472c
commit 5cdf13d6bd
2 changed files with 14 additions and 25 deletions

View File

@@ -173,11 +173,7 @@ void TaskCustomizeFormat::onFormatChanged()
QString formatPreview = ui->leFormat->text();
if (isDimension)
{
constexpr int size(80);
char buffer[size];
std::string formatString = formatPreview.toUtf8().constData();
auto usedSize = snprintf(buffer, size, formatString.c_str(), dimRawValue);
formatPreview = QString::fromUtf8(buffer, usedSize);
formatPreview = QString::asprintf(formatPreview.toUtf8(), dimRawValue);
}
ui->lbShowPreview->setText(formatPreview);
}