This commit is contained in:
Martin Rotter 2013-11-24 18:42:37 +01:00
parent 99fa66167e
commit 54c8b6a3c2
3 changed files with 13 additions and 16 deletions

View File

@ -5,26 +5,26 @@
// NOTE: Macro is used due to QTranslator persistency.
#define LoadLocalization(); \
QString locale_name = Settings::getInstance()->value( \
APP_CFG_GEN, \
"language", \
"en").toString(); \
APP_CFG_GEN, \
"language", \
"en").toString(); \
QTranslator qt_translator, app_translator; \
if (app_translator.load(QString("rssguard_%1.qm").arg(locale_name), \
APP_LANG_PATH)) { \
QApplication::installTranslator(&app_translator); \
qDebug("Application localization %s loaded successfully.", \
qPrintable(locale_name)); \
APP_LANG_PATH)) { \
QApplication::installTranslator(&app_translator); \
qDebug("Application localization '%s' loaded successfully.", \
qPrintable(locale_name)); \
} \
else { \
qWarning("Application localization %s was not loaded.", qPrintable(locale_name)); \
qWarning("Application localization '%s' was not loaded.", qPrintable(locale_name)); \
} \
if (qt_translator.load(QString("qt_%1.qm").arg(locale_name), \
APP_LANG_PATH)) { \
qDebug("Qt localization %s loaded successfully.", \
qPrintable(locale_name)); \
APP_LANG_PATH)) { \
qDebug("Qt localization '%s' loaded successfully.", \
qPrintable(locale_name)); \
} \
else { \
qWarning("Qt localization %s was not loaded.", qPrintable(locale_name)); \
qWarning("Qt localization '%s' was not loaded.", qPrintable(locale_name)); \
} \
QLocale::setDefault(QLocale(locale_name));

View File

@ -111,7 +111,7 @@ QVariant MessagesModel::data(int row, int column, int role) const {
QVariant MessagesModel::data(const QModelIndex &idx, int role) const {
switch (role) {
//
// Human readable data for viewing.
case Qt::DisplayRole: {
int index_column = idx.column();
if (index_column != MSG_DB_IMPORTANT_INDEX &&

View File

@ -47,9 +47,6 @@ MessagesView::MessagesView(QWidget *parent) : QTreeView(parent) {
hideColumn(MSG_DB_URL_INDEX);
hideColumn(MSG_DB_CONTENTS_INDEX);
//hideColumn(0);
// NOTE: It is recommended to call this after the model is set
// due to sorting performance.
setupAppearance();