[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Get url list
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2009-05-13 7:28:38
Message-ID: 200905130128.39222.aseigo () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
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" (application/pgp-signature)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic