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

Authored by dfaure on Tue, Sep 10, 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.Tue, Sep 10, 5:42 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptTue, Sep 10, 5:42 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
dfaure requested review of this revision.Tue, Sep 10, 5:42 PM
vkrause accepted this revision.Tue, Sep 10, 9:53 PM
This revision is now accepted and ready to land.Tue, Sep 10, 9:53 PM
dfaure closed this revision.Wed, Sep 11, 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.Mon, Sep 16, 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.