[KCompletion] Port away from deprecated methods in Qt 5.14
ClosedPublic

Authored by dfaure on Sep 10 2019, 5:42 PM.

Details

Summary

the QComboBox::activated(QString) signal being deprecated
and optionally non-existent makes this interesting in subclasses trying
to emit it.

Test Plan

-DQT_DISABLE_DEPRECATED_BEFORE=0x060000, make, ctest
and playing a bit with kcompletionuitest.

Diff Detail

Repository
R284 KCompletion
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16341
Build 16359: arc lint + arc unit
dfaure created this revision.Sep 10 2019, 5:42 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 10 2019, 5:42 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
dfaure requested review of this revision.Sep 10 2019, 5:42 PM
vkrause accepted this revision.Sep 10 2019, 9:53 PM
This revision is now accepted and ready to land.Sep 10 2019, 9:53 PM
dfaure closed this revision.Sep 11 2019, 9:59 AM
broulik added inline comments.
src/kcombobox.cpp
59

With this removed, the KUrlComboBox in e.g. "Look in" in KFind autocompletes history entries rather than paths when hitting tab.

dfaure added inline comments.Sep 16 2019, 1:58 PM
src/kcombobox.cpp
59

Good catch!

More precisely, history entries are offered in the lineedit edit, pre-selected, and only hitting "Del" allows to get normal path completion.

Amazing. setAutoCompletion(false) really only does setCompleter(nullptr) like we do (and setting the bool for the old unused property).

Ah.... unless we're not yet editable when coming here, and we're made editable later, then no code is doing the setCompleter(nullptr) anymore. Tricky!

In fact, due to the way init() is called, isEditable() is *NEVER* true here.

I'll keep working on a fix, just wanted to let you know I'm on it.

kossebau added inline comments.
src/kcombobox.cpp
363

Why the QOverload<const QString&>::of() with &QComboBox::textActivated? Accidental copy&paste?
After all the purpose of the new signals is to get rid of the overloading, no?