Commit 60d1f6da authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Port away from deprecated KNS3::QtQuickDialogWrapper::exec

parent cc15b3b7
Pipeline #184227 passed with stage
in 2 minutes and 19 seconds
......@@ -505,15 +505,21 @@ void KHangMan::loadLevels()
void KHangMan::slotDownloadNewStuff()
{
KNS3::QtQuickDialogWrapper dialog(QStringLiteral("khangman.knsrc"), this);
const QList<KNSCore::EntryInternal> entries = dialog.exec();
if ( entries.size() > 0 ){
SharedKvtmlFiles::sortDownloadedFiles();
//look for languages dirs installed
scanLanguages();
//refresh Languages menu
setCurrentLanguage(m_languages.indexOf(Prefs::selectedLanguage()));
}
KNS3::QtQuickDialogWrapper *dialog = new KNS3::QtQuickDialogWrapper(QStringLiteral("khangman.knsrc"), this);
dialog->open();
connect(dialog, &KNS3::QtQuickDialogWrapper::closed, this, [this, dialog] {
const QList<KNSCore::EntryInternal> entries = dialog->changedEntries();
if ( !entries.isEmpty() ){
SharedKvtmlFiles::sortDownloadedFiles();
//look for languages dirs installed
scanLanguages();
//refresh Languages menu
setCurrentLanguage(m_languages.indexOf(Prefs::selectedLanguage()));
}
dialog->deleteLater();
});
}
void KHangMan::loadLanguageSpecialCharacters()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment