mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-01 02:48:05 +01:00
aa
This commit is contained in:
parent
99fa66167e
commit
54c8b6a3c2
@ -5,26 +5,26 @@
|
|||||||
// NOTE: Macro is used due to QTranslator persistency.
|
// NOTE: Macro is used due to QTranslator persistency.
|
||||||
#define LoadLocalization(); \
|
#define LoadLocalization(); \
|
||||||
QString locale_name = Settings::getInstance()->value( \
|
QString locale_name = Settings::getInstance()->value( \
|
||||||
APP_CFG_GEN, \
|
APP_CFG_GEN, \
|
||||||
"language", \
|
"language", \
|
||||||
"en").toString(); \
|
"en").toString(); \
|
||||||
QTranslator qt_translator, app_translator; \
|
QTranslator qt_translator, app_translator; \
|
||||||
if (app_translator.load(QString("rssguard_%1.qm").arg(locale_name), \
|
if (app_translator.load(QString("rssguard_%1.qm").arg(locale_name), \
|
||||||
APP_LANG_PATH)) { \
|
APP_LANG_PATH)) { \
|
||||||
QApplication::installTranslator(&app_translator); \
|
QApplication::installTranslator(&app_translator); \
|
||||||
qDebug("Application localization %s loaded successfully.", \
|
qDebug("Application localization '%s' loaded successfully.", \
|
||||||
qPrintable(locale_name)); \
|
qPrintable(locale_name)); \
|
||||||
} \
|
} \
|
||||||
else { \
|
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), \
|
if (qt_translator.load(QString("qt_%1.qm").arg(locale_name), \
|
||||||
APP_LANG_PATH)) { \
|
APP_LANG_PATH)) { \
|
||||||
qDebug("Qt localization %s loaded successfully.", \
|
qDebug("Qt localization '%s' loaded successfully.", \
|
||||||
qPrintable(locale_name)); \
|
qPrintable(locale_name)); \
|
||||||
} \
|
} \
|
||||||
else { \
|
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));
|
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 {
|
QVariant MessagesModel::data(const QModelIndex &idx, int role) const {
|
||||||
switch (role) {
|
switch (role) {
|
||||||
//
|
// Human readable data for viewing.
|
||||||
case Qt::DisplayRole: {
|
case Qt::DisplayRole: {
|
||||||
int index_column = idx.column();
|
int index_column = idx.column();
|
||||||
if (index_column != MSG_DB_IMPORTANT_INDEX &&
|
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_URL_INDEX);
|
||||||
hideColumn(MSG_DB_CONTENTS_INDEX);
|
hideColumn(MSG_DB_CONTENTS_INDEX);
|
||||||
|
|
||||||
|
|
||||||
//hideColumn(0);
|
|
||||||
|
|
||||||
// NOTE: It is recommended to call this after the model is set
|
// NOTE: It is recommended to call this after the model is set
|
||||||
// due to sorting performance.
|
// due to sorting performance.
|
||||||
setupAppearance();
|
setupAppearance();
|
||||||
|
Loading…
Reference in New Issue
Block a user