qt5/6 compat
This commit is contained in:
parent
638450c8d4
commit
e34ccb69b8
@ -344,7 +344,12 @@ int main(int argc, char **argv)
|
||||
}
|
||||
QTranslator qt_trans(0);
|
||||
qt_trans.load(QString("qt_%1").arg(slang),
|
||||
QLibraryInfo::path(QLibraryInfo::TranslationsPath));
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
QLibraryInfo::path
|
||||
#else
|
||||
QLibraryInfo::location
|
||||
#endif
|
||||
(QLibraryInfo::TranslationsPath));
|
||||
app.installTranslator(&qt_trans);
|
||||
|
||||
// Translations for Recoll
|
||||
|
||||
@ -80,10 +80,13 @@ QString QxtConfirmationMessagePrivate::key() const
|
||||
{
|
||||
QString value = overrideKey;
|
||||
if (value.isEmpty()) {
|
||||
const QString all = qxt_p().windowTitle() + qxt_p().text() +
|
||||
qxt_p().informativeText();
|
||||
const QString all = qxt_p().windowTitle() + qxt_p().text() + qxt_p().informativeText();
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
value = QString::number(qChecksum(all.toLocal8Bit()));
|
||||
#else
|
||||
const QByteArray data = all.toLocal8Bit();
|
||||
value = QString::number(qChecksum(data.constData(), data.length()));
|
||||
#endif
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user