Get url list
SUJITH H
sujith.h at gmail.com
Tue May 12 20:54:15 CEST 2009
Aaron J. Seigo wrote:
> On Monday 11 May 2009, SUJITH H wrote:
>
>> Can anyone help me how to get the url list of the sorted item
>> in launcher applet?
>>
>
> KUrl::List urls;
>
> foreach (QuicklaunchIcon *icon, m_icons) {
> urls << icon->url();
> }
>
>
Ok I think my explanation wasn't sufficient. My intention is to get the
Url of the sorted item in the launcher applet(kickoff). That is if
sorted either A-Z or Z-A. And then update globalFavoruteList
accordingly. Here is the small snippet I had done to sortFavorite method
in kickoff/core/favoritesmodel.cpp:
void FavoritesModel::sortFavorites(Qt::SortOrder order)
{
foreach (FavoritesModel *model, Private::models) {
model->d->headerItem->sortChildren(0, order);
}
FavoritesModel *model;
QStandardItem *childData;
for (int i = 0; i < numberOfFavorites(); i++) {
childData = d->headerItem->child(i, 0);
}
Private::saveFavorites();
}
I am able to iterate the row's. But have no clue how to retrieve the url
of that sorted Favorite item :(
This work is related to the bug https://bugs.kde.org/show_bug.cgi?id=189607
Sujith H
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20090513/3c1f3023/attachment.htm
More information about the Plasma-devel
mailing list