D22497: Remove as deprecated marked classes and functions

Aleix Pol Gonzalez noreply at phabricator.kde.org
Tue Jul 16 23:10:57 BST 2019


apol added a comment.


  Overall, looks good to me. :)

INLINE COMMENTS

> dashboard.cpp:228
>  
> -        m_practiceSignalMapper->setMapping(backWidget, urlString);
> -        connect(backWidget, SIGNAL(practiceButtonClicked()), m_practiceSignalMapper, SLOT(map()));
> -        m_removeSignalMapper->setMapping(backWidget, urlString);
> -        connect(backWidget, SIGNAL(removeButtonClicked()), m_removeSignalMapper, SLOT(map()));
> +        connect(backWidget, &CollectionWidget::practiceButtonClicked,
> +                [=] {slotPracticeButtonClicked(urlString);});

add this as a 3rd argument.

> editor.cpp:144
>          m_spellCheckMenu->menu()->addAction(languageSpellCheck);
> -        m_spellCheckMapper->setMapping(languageSpellCheck, i);
> -        connect(languageSpellCheck, SIGNAL(triggered()), m_spellCheckMapper, SLOT(map()));
> +        connect(languageSpellCheck, &QAction::triggered, [=] {m_vocabularyView->checkSpelling(i);});
>      }

Add this as third argument:
`        connect(languageSpellCheck, &QAction::triggered, this, [=] {m_vocabularyView->checkSpelling(i);});`

> summarywordwidget.cpp:61
>  
> -    connect(wordTypeComboBox, static_cast<void (KComboBox::*)(const QString &)>(&KComboBox::currentIndexChanged), this, &SummaryWordWidget::wordTypeSelected);
> +    connect(wordTypeComboBox, static_cast<void (KComboBox::*)(const QString &)>(&KComboBox::currentTextChanged),
> +            this, &SummaryWordWidget::wordTypeSelected);

You can use QOverload::of(), it reads easier.

> languagepropertiespage.cpp:43
>  
> -    connect(localeComboBox, static_cast<void (KComboBox::*)(const QString &)>(&KComboBox::currentIndexChanged), this, &LanguagePropertiesPage::localeChanged);
> +    connect(localeComboBox, static_cast<void (KComboBox::*)(const QString &)>(&KComboBox::currentTextChanged),
> +            this, &LanguagePropertiesPage::localeChanged);

QOverload

> statisticsmainwindow.cpp:133
>      }
> -    QSignalMapper* mapper = new QSignalMapper(this);
> -    mapper->setMapping(m_ui->flashCard, Prefs::EnumPracticeMode::FlashCardsPractice);
> -    mapper->setMapping(m_ui->mixedLetters, Prefs::EnumPracticeMode::MixedLettersPractice);
> -    mapper->setMapping(m_ui->multipleChoice, Prefs::EnumPracticeMode::MultipleChoicePractice);
> -    mapper->setMapping(m_ui->written, Prefs::EnumPracticeMode::WrittenPractice);
> -    mapper->setMapping(m_ui->exampleSentence, Prefs::EnumPracticeMode::ExampleSentencesPractice);
> -    mapper->setMapping(m_ui->gender, Prefs::EnumPracticeMode::GenderPractice);
> -    mapper->setMapping(m_ui->comparisonForms, Prefs::EnumPracticeMode::ComparisonPractice);
> -    mapper->setMapping(m_ui->conjugations, Prefs::EnumPracticeMode::ConjugationPractice);
> -    connect(m_ui->flashCard, SIGNAL(clicked(bool)), mapper, SLOT(map()));
> -    connect(m_ui->mixedLetters, SIGNAL(clicked(bool)), mapper, SLOT(map()));
> -    connect(m_ui->multipleChoice, SIGNAL(clicked(bool)), mapper, SLOT(map()));
> -    connect(m_ui->written, SIGNAL(clicked(bool)), mapper, SLOT(map()));
> -    connect(m_ui->exampleSentence, SIGNAL(clicked(bool)), mapper, SLOT(map()));
> -    connect(m_ui->gender, SIGNAL(clicked(bool)), mapper, SLOT(map()));
> -    connect(m_ui->comparisonForms, SIGNAL(clicked(bool)), mapper, SLOT(map()));
> -    connect(m_ui->conjugations, SIGNAL(clicked(bool)), mapper, SLOT(map()));
> -    connect(mapper, SIGNAL(mapped(int)), this, SLOT(practiceModeSelected(int)));
> +    connect(m_ui->flashCard, &QRadioButton::clicked,
> +            [=] {practiceModeSelected(Prefs::EnumPracticeMode::FlashCardsPractice);});

This, to all.

REPOSITORY
  R340 Parley

REVISION DETAIL
  https://phabricator.kde.org/D22497

To: hriesenbeck, #kde_edu
Cc: apol, kde-edu, narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190716/9f16dc6e/attachment-0001.html>


More information about the kde-edu mailing list