Use Application::getExecutableName() instead of Config()["ExeName"]

This commit is contained in:
wmayer
2025-05-10 17:05:11 +02:00
committed by Ladislav Michl
parent 4f116d8de3
commit cda2b8cbdb
8 changed files with 17 additions and 18 deletions

View File

@@ -1568,7 +1568,7 @@ void Material::save(QTextStream& stream, bool overwrite, bool saveAsCopy, bool s
}
stream << "---\n";
stream << "# File created by " << QString::fromStdString(App::Application::Config()["ExeName"])
stream << "# File created by " << QString::fromStdString(App::Application::getExecutableName())
<< " " << QString::fromStdString(App::Application::Config()["ExeVersion"])
<< " Revision: " << QString::fromStdString(App::Application::Config()["BuildRevision"])
<< "\n";

View File

@@ -267,9 +267,9 @@ private:
std::unique_ptr<Exporter> exporter;
if (exportFormat == MeshIO::AMF) {
std::map<std::string, std::string> meta;
meta["cad"] = App::Application::Config()["ExeName"] + " "
meta["cad"] = App::Application::getExecutableName() + " "
+ App::Application::Config()["ExeVersion"];
meta[App::Application::Config()["ExeName"] + "-buildRevisionHash"]
meta[App::Application::getExecutableName() + "-buildRevisionHash"]
= App::Application::Config()["BuildRevisionHash"];
exporter = std::make_unique<ExporterAMF>(outputFileName, meta, exportAmfCompressed);

View File

@@ -57,7 +57,6 @@ void FirstStartWidget::setupUi()
{
auto outerLayout = gsl::owner<QVBoxLayout*>(new QVBoxLayout(this));
outerLayout->setAlignment(Qt::AlignCenter);
QString application = QString::fromUtf8(App::Application::Config()["ExeName"].c_str());
_welcomeLabel = gsl::owner<QLabel*>(new QLabel);
outerLayout->addWidget(_welcomeLabel);
_descriptionLabel = gsl::owner<QLabel*>(new QLabel);
@@ -90,7 +89,7 @@ bool FirstStartWidget::eventFilter(QObject* object, QEvent* event)
void FirstStartWidget::retranslateUi()
{
_doneButton->setText(tr("Done"));
QString application = QString::fromUtf8(App::Application::Config()["ExeName"].c_str());
QString application = QString::fromStdString(App::Application::getExecutableName());
_welcomeLabel->setText(
QLatin1String("<h1>") + tr("Welcome to %1").arg(application) + QLatin1String("</h1>")
);