diff options
author | John Fultz <jfultz@wolfram.com> | 2023-07-15 16:46:26 -0500 |
---|---|---|
committer | John Fultz <jfultz@wolfram.com> | 2023-07-16 08:29:07 -0500 |
commit | 525f330420d6f3b112dbae36c2fb9769265321a8 (patch) | |
tree | 9c89e1b4a3b2ef647577a9320c514caa0e307cb8 /quacker/lexicondialog.cpp | |
parent | 9fe15e565708b1efbf2dbc6b6f9dd19d89ff29da (diff) |
Fix up some Qt signals.
Some of the signals we’re using aren’t supported or working
in Qt 6. Refactor for things that are working and
documented.
Diffstat (limited to 'quacker/lexicondialog.cpp')
-rw-r--r-- | quacker/lexicondialog.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/quacker/lexicondialog.cpp b/quacker/lexicondialog.cpp index e5f6e93..4f6d35d 100644 --- a/quacker/lexicondialog.cpp +++ b/quacker/lexicondialog.cpp @@ -113,13 +113,13 @@ LexiconDialog::LexiconDialog(QWidget *parent, const QString &originalName) : QDi connect(m_saveChanges, SIGNAL(clicked()), this, SLOT(accept())); connect(m_cancel, SIGNAL(clicked()), this, SLOT(reject())); connect(m_deleteLexicon, SIGNAL(clicked()), this, SLOT(deleteLexicon())); - connect(m_alphabetCombo, SIGNAL(activated(const QString &)), this, SLOT(alphabetChanged(const QString &))); + connect(m_alphabetCombo, SIGNAL(activated(int)), this, SLOT(alphabetChanged(int))); setWindowTitle(tr("Configure Lexicon - Quackle")); Settings::populateComboFromFilenames(m_alphabetCombo, "alphabets", ".quackle_alphabet", ""); m_alphabetCombo->setCurrentIndex(m_alphabetCombo->findText(QuackleIO::Util::stdStringToQString(QUACKLE_ALPHABET_PARAMETERS->alphabetName()))); - alphabetChanged(m_alphabetCombo->currentText()); + alphabetChanged(m_alphabetCombo->currentIndex()); m_lexiconName->setValidator(m_fileNameValidator); m_lexiconName->setText(m_originalName); @@ -163,8 +163,9 @@ void LexiconDialog::addWordsFromFile() updateLexiconInformation(); } -void LexiconDialog::alphabetChanged(const QString &alphabet) +void LexiconDialog::alphabetChanged(int alphabetIndex) { + QString alphabet = m_alphabetCombo->currentText(); delete m_wordFactory; m_wordFactory = NULL; updateLexiconInformation(); |