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
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to