On Wednesday 13 May 2009, SUJITH H wrote:
> Aaron J. Seigo wrote:
> > On Tuesday 12 May 2009, SUJITH H wrote:
> >> I am able to iterate the row's. But have no clue how to retrieve the url
> >> of that sorted Favorite item :(
> >
> > KUrl url = childData->data(Kickoff::UrlRole);
>
> I am getting segmentation fault when I run 'plasmoidviewer launcher'.
> I had modified the sortFavorites. So the method becomes:
>
> 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 = model->d->headerItem->child(i, 0);
> kDebug() << "Url = " << childData->data(Kickoff::UrlRole);
> }
> Private::saveFavorites();
> }
>
>
> Any clue why am getting segmentation fault here?model isn't initialized, so it's point to some random place in memory and *crash* FavoritesModel *model = Private::models.first(); -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Software
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/plasma-devel
