Commit 43e8b5c3 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

make static tables be const

parent d61b37c0
......@@ -26,7 +26,7 @@
#include <QCoreApplication>
#include <klocalizedstring.h>
static QString ruleTagNames[] = {QString("source"), QString("falseFriend"), QString("target")};
static const QString ruleTagNames[] = {QString("source"), QString("falseFriend"), QString("target")};
static QStringList domListToStringList(const QDomNodeList& nodes)
{
......
......@@ -243,10 +243,10 @@ QVariant TMDBModel::data(const QModelIndex& item, int role) const
} else if (item.column() == TMDBModel::Filepath) {
return shorterFilePath(result.toString());
} else if (item.column() == TMDBModel::TransationStatus) {
static QString statuses[] = {i18nc("@info:status 'non-fuzzy' in gettext terminology", "Ready"),
i18nc("@info:status 'fuzzy' in gettext terminology", "Needs review"),
i18nc("@info:status", "Untranslated")
};
static const QString statuses[] = {i18nc("@info:status 'non-fuzzy' in gettext terminology", "Ready"),
i18nc("@info:status 'fuzzy' in gettext terminology", "Needs review"),
i18nc("@info:status", "Untranslated")
};
return statuses[translationStatus(item)];
}
if (doHtml && item.column() < TMDBModel::Context)
......@@ -377,10 +377,10 @@ QueryStylesModel::QueryStylesModel(QObject* parent): QStringListModel(parent)
QVariant QueryStylesModel::data(const QModelIndex& item, int role) const
{
if (role == Qt::ToolTipRole) {
static QString tooltips[] = {i18n("Case insensitive"),
i18n("Space is AND operator. Case insensitive."),
i18n("Shell globs (* and ?). Case sensitive.")
};
static const QString tooltips[] = {i18n("Case insensitive"),
i18n("Space is AND operator. Case insensitive."),
i18n("Shell globs (* and ?). Case sensitive.")
};
return tooltips[item.row()];
}
return QStringListModel::data(item, role);
......
......@@ -172,7 +172,7 @@ void TranslationUnitTextEdit::fileLoaded()
}
//"i use an english locale while translating kde pot files from english to hebrew" Bug #181989
Qt::LayoutDirection targetLanguageDirection = Qt::LeftToRight;
static QLocale::Language rtlLanguages[] = {QLocale::Arabic, QLocale::Hebrew, QLocale::Urdu, QLocale::Persian, QLocale::Pashto};
static const QLocale::Language rtlLanguages[] = {QLocale::Arabic, QLocale::Hebrew, QLocale::Urdu, QLocale::Persian, QLocale::Pashto};
int i = sizeof(rtlLanguages) / sizeof(QLocale::Arabic);
while (--i >= 0 && langLocale.language() != rtlLanguages[i])
;
......@@ -184,7 +184,7 @@ void TranslationUnitTextEdit::fileLoaded()
return;
//"Some language do not need space between words. For example Chinese."
static QLocale::Language noSpaceLanguages[] = {QLocale::Chinese};
static const QLocale::Language noSpaceLanguages[] = {QLocale::Chinese};
i = sizeof(noSpaceLanguages) / sizeof(QLocale::Chinese);
while (--i >= 0 && langLocale.language() != noSpaceLanguages[i])
;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment