Prevent a c++11 range-loop might detach Qt container

Just make it const.
This commit is contained in:
Luís Pereira
2020-01-14 19:02:06 +00:00
committed by Alf Gaida
parent 887efa8151
commit ae71042e0d
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -276,7 +276,7 @@ void QTermWidget::init(int startnow)
m_translator = new QTranslator(this);
for (const QString& dir : dirs) {
for (const QString& dir : qAsConst(dirs)) {
//qDebug() << "Trying to load translation file from dir" << dir;
if (m_translator->load(QLocale::system(), QLatin1String("qtermwidget"), QLatin1String(QLatin1String("_")), dir)) {
qApp->installTranslator(m_translator);