mirror of
https://github.com/martinrotter/rssguard.git
synced 2024-12-29 01:20:32 +01:00
aa
This commit is contained in:
parent
99fa66167e
commit
54c8b6a3c2
@ -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));
|
||||
|
||||
|
@ -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 &&
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user