111 |
// Try own Qt translation... |
// Try own Qt translation... |
112 |
m_pQtTranslator = new QTranslator(this); |
m_pQtTranslator = new QTranslator(this); |
113 |
QString sLocName = "qt_" + loc.name(); |
QString sLocName = "qt_" + loc.name(); |
114 |
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) |
115 |
|
QString sLocPath = QLibraryInfo::path(QLibraryInfo::TranslationsPath); |
116 |
|
#else |
117 |
QString sLocPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); |
QString sLocPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); |
118 |
|
#endif |
119 |
if (m_pQtTranslator->load(sLocName, sLocPath)) { |
if (m_pQtTranslator->load(sLocName, sLocPath)) { |
120 |
QApplication::installTranslator(m_pQtTranslator); |
QApplication::installTranslator(m_pQtTranslator); |
121 |
} else { |
} else { |
126 |
} else { |
} else { |
127 |
#endif |
#endif |
128 |
delete m_pQtTranslator; |
delete m_pQtTranslator; |
129 |
m_pQtTranslator = 0; |
m_pQtTranslator = nullptr; |
130 |
#ifdef CONFIG_DEBUG |
#ifdef CONFIG_DEBUG |
131 |
qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", |
qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", |
132 |
loc.name().toUtf8().constData(), |
loc.name().toUtf8().constData(), |
152 |
QApplication::installTranslator(m_pMyTranslator); |
QApplication::installTranslator(m_pMyTranslator); |
153 |
} else { |
} else { |
154 |
delete m_pMyTranslator; |
delete m_pMyTranslator; |
155 |
m_pMyTranslator = 0; |
m_pMyTranslator = nullptr; |
156 |
#ifdef CONFIG_DEBUG |
#ifdef CONFIG_DEBUG |
157 |
qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", |
qWarning("Warning: no translation found for '%s' locale: %s/%s.qm", |
158 |
loc.name().toUtf8().constData(), |
loc.name().toUtf8().constData(), |
488 |
#endif |
#endif |
489 |
#endif |
#endif |
490 |
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) |
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) |
491 |
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
492 |
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); |
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); |
493 |
#endif |
#endif |
494 |
|
#endif |
495 |
qsamplerApplication app(argc, argv); |
qsamplerApplication app(argc, argv); |
496 |
|
|
497 |
#if defined(__APPLE__) // Toshi Nagata 20080105 |
#if defined(__APPLE__) // Toshi Nagata 20080105 |