[qrvthtool] MessageSound: The KF6 Framework Integration Plugin is in kf6/.

This commit is contained in:
David Korth 2024-02-20 23:28:14 -05:00
parent 754a2da58b
commit c3e5186d58

View File

@ -64,7 +64,14 @@ void MessageSound::play(QMessageBox::Icon notificationType, const QString &messa
// should be fast, and we won't have to maintain the QPluginLoader
// instance. (Keeping the lib.instance() pointer in memory is likely
// to be undefined behavior.)
# if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
QPluginLoader lib(QStringLiteral("kf6/FrameworkIntegrationPlugin"));
# elif QT_VERSION >= QT_VERSION_CHECK(5,0,0)
QPluginLoader lib(QStringLiteral("kf5/FrameworkIntegrationPlugin"));
# else
# error Unsupported Qt version
# endif
QObject *rootObj = lib.instance();
if (rootObj) {
KMessageBoxNotifyInterface *iface =