From 525f330420d6f3b112dbae36c2fb9769265321a8 Mon Sep 17 00:00:00 2001 From: John Fultz Date: Sat, 15 Jul 2023 16:46:26 -0500 Subject: Fix up some Qt signals. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of the signals we’re using aren’t supported or working in Qt 6. Refactor for things that are working and documented. --- quacker/lexicondialog.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'quacker/lexicondialog.cpp') 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(); -- cgit v1.2.3