summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorYAMAMOTO Atsushi <atsushi.yamamoto@signal-slot.co.jp>2022-10-24 18:47:23 +0900
committerYAMAMOTO Atsushi - Signal Slot <atsushi.yamamoto@signal-slot.co.jp>2022-10-25 10:06:59 +0000
commitfe0e76a5823851740f9bc69c768031cd63c9654c (patch)
treeaf2773568fe9f21e031c21f021d0427bd9237558 /examples
parentd553ec049d3496240a2af6b04be14cf124cb1a4d (diff)
Fix typo in examples/i18n
The name of the variable that handles the qm file is qmlFile. Change-Id: I873c73cd8f96ff821fe3d2e633e84fef8c687875 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/widgets/tools/i18n/languagechooser.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/widgets/tools/i18n/languagechooser.cpp b/examples/widgets/tools/i18n/languagechooser.cpp
index 936c755e71..ff8dddd2da 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()));