From fe0e76a5823851740f9bc69c768031cd63c9654c Mon Sep 17 00:00:00 2001 From: YAMAMOTO Atsushi Date: Mon, 24 Oct 2022 18:47:23 +0900 Subject: [PATCH] Fix typo in examples/i18n The name of the variable that handles the qm file is qmlFile. Change-Id: I873c73cd8f96ff821fe3d2e633e84fef8c687875 Reviewed-by: Tasuku Suzuki Reviewed-by: Friedemann Kleint --- examples/widgets/tools/i18n/languagechooser.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/widgets/tools/i18n/languagechooser.cpp b/examples/widgets/tools/i18n/languagechooser.cpp index 936c755e718..ff8dddd2da1 100644 --- a/examples/widgets/tools/i18n/languagechooser.cpp +++ b/examples/widgets/tools/i18n/languagechooser.cpp @@ -22,12 +22,12 @@ LanguageChooser::LanguageChooser(const QString &defaultLang, QWidget *parent) const QStringList qmFiles = findQmFiles(); for (int i = 0; i < qmFiles.size(); ++i) { - const QString &qmlFile = qmFiles.at(i); - QCheckBox *checkBox = new QCheckBox(languageName(qmlFile)); - qmFileForCheckBoxMap.insert(checkBox, qmlFile); + const QString &qmFile = qmFiles.at(i); + QCheckBox *checkBox = new QCheckBox(languageName(qmFile)); + qmFileForCheckBoxMap.insert(checkBox, qmFile); connect(checkBox, &QCheckBox::toggled, this, &LanguageChooser::checkBoxToggled); - if (languageMatch(defaultLang, qmlFile)) + if (languageMatch(defaultLang, qmFile)) checkBox->setCheckState(Qt::Checked); groupBoxLayout->addWidget(checkBox, i / 2, i % 2); } @@ -82,11 +82,11 @@ void LanguageChooser::checkBoxToggled() MainWindow *window = mainWindowForCheckBoxMap.value(checkBox); if (!window) { QTranslator translator; - const QString qmlFile = qmFileForCheckBoxMap.value(checkBox); - if (translator.load(qmlFile)) + const QString qmFile = qmFileForCheckBoxMap.value(checkBox); + if (translator.load(qmFile)) QCoreApplication::installTranslator(&translator); else - qWarning("Unable to load %s", qPrintable(QDir::toNativeSeparators(qmlFile))); + qWarning("Unable to load %s", qPrintable(QDir::toNativeSeparators(qmFile))); window = new MainWindow; window->setPalette(colorForLanguage(checkBox->text()));