Use icu transliterator to convert i18n'ed name into ascii for initial
character grouping. Since AppsModel does not use group(), just use group
to store this value for convenience.
Relevant qt feature request for having a new mode for section:
https://bugreports.qt.io/browse/QTBUG-91258
Strategy used by this code mainly focused on CJK language.
1. Japanese locale will group all Han script together.
Katakana will be converted to hiragana.
2. Hangul will decompose and use consonant as group name.
3. Han will use icu "Han-Latin" transliteration to convert to pinyin.
BUG: 433297
Qt's foreach is deprecated and should be replaced with modern C++
range-for loops. Const qualifiers are added to variable declarations
and wrapper in std::as_const as required to prevent unnecessary
clones/detach.
And factored out some duplicated code on the way.
Arguably, `found=false; for(list) {if(cond) {found=true; break;}}` is
harder to read than a single `found=array.contains(cond)` expression.
My only regret is that C++ does not provide any `contains()` function /
algorithm, so we are forced to `find_if` an element and compare it with
an iterator's `end()` which would be an utter nonsense in any other
language.
But most importantly, this commit replaces Qt's deprecated foreach with
a standard for-loop.
Summary: {F7331506}
Test Plan: Open Kicker and open the context menu for a menu item.
Reviewers: #plasma, #vdg, ngraham
Reviewed By: #vdg, ngraham
Subscribers: #vdg, plasma-devel, #plasma
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23793
Summary:
Code currently gets the applet interface object passed in explicitly,
from this it gets the configuration via the metaobject system
We always guard the appletConfig not being available, but never the
appletInterface, resulting in crashes if used from qmlscene or any
potential tests.
Test Plan: Used from qmlscene
Reviewers: #plasma, apol, hein
Reviewed By: #plasma, apol, hein
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22818
Kickoff uses AppsModel instead of RootModel but since RootModel inherits AppsModel we can just move everything over here.
Differential Revision: https://phabricator.kde.org/D10506
Summary:
This does three changes needed to support the Simple Menu UI:
* Support for pagination with configurable page size and related
API naming changes.
* Make showing the Power / Session top-level category optional.
* Emit a signal on wheel move events in WheelInterceptor.
As well as adding inheritance from QQmlParserStatus to RootModel
to avoid startup churn.
Reviewers: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3655
Summary:
And default to on.
I don't like this, but downstream complains that their users get
confused when using kmenuedit to edit their menu and newly-
installed apps are no longer sorted-in alphabetically in the
presence of the kmenuedit-generated files causing sorting to be
disabled. And we don't have the resources to fix kmenuedit.
Reviewers: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2940
Summary:
This will happen if KSycoca::ensureCacheValid fails. (which shouldn't
ever happen).
Hopefully it'll just call refresh later. In any case, we won't
crash.
BUG: 363339
Test Plan: None.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2341
* Not just apps, also documents and contacts can now be added
to the favorites. All types of content have their full context
menu action list available also in the favorites sidebar.
* Contact favorites use the contact photo as icon, with a circular
alpha mask and the presence status icon as overlay badge.
* Adding/removing favorites from context menus now works every-
where, e.g. also in KRunner-based search results.
* Far fewer actions now cause a full rebuild of the model tree
and instead only delta updates, as a side-effect of adding a
mechanism for this to e.g. handle status changes for contact
items.
* Various bugs around hiding/unhiding apps got fixed.
* Lots of code cleanup + less coupling all around.
If menu flattening is enabled and a group actually has subgroups
that get flattened in, separators are ignored and entriees are
collated alphabetically.
Leading or trailing separators are always ignored, and multiple
consecutive separators are collapsed into one.
BUG:347412
Needs kactivities.git:ivan/libkactivities-experimental-stats
Known problems:
* The model class hierarchy in Kicker needs refactoring to
work properly with proxy models; lots of mess right now
just to get things to display for testing.
* Due to the above, the funnel model that enables proper
delegate instance reuse when switching a menu dialog
between sibling categories is currently disabled, causing
bad performance.
* Forget/Forget All for documents isn't available anymore
due to missing API in KActivities.
* KActivitiesStats' ResultModel isn't inserting rows when
new files are opened at runtime.
Ivan: This currently assumes my locally hacked up KActivities
copy to fix the CMake problems; please feel free to push to
this branch when you've made the upstream CMake changes to
make it build.
CCMAIL:ivan.cukic@kde.org