diff options
| author | Andrea Diamantini <adjam7@gmail.com> | 2010-04-20 12:34:12 +0200 | 
|---|---|---|
| committer | Andrea Diamantini <adjam7@gmail.com> | 2010-04-20 12:34:12 +0200 | 
| commit | f68a57ae64887cc1d9c18efed629df3b1cc49bb8 (patch) | |
| tree | ef42866bbed79b033760596cfd3799c8962a9f73 /src | |
| parent | Partially fixing deleteLater related crashes. But... why these crashes (diff) | |
| download | rekonq-f68a57ae64887cc1d9c18efed629df3b1cc49bb8.tar.xz | |
Reverting the switch case to an if-else one.
I forgot t consider the particular condition in it. Sorry for the mistake.
Diffstat (limited to 'src')
| -rw-r--r-- | src/urlbar/listitem.cpp | 25 | 
1 files changed, 12 insertions, 13 deletions
| diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp index 7dc22dda..a182c1a2 100644 --- a/src/urlbar/listitem.cpp +++ b/src/urlbar/listitem.cpp @@ -417,21 +417,20 @@ ListItem *ListItemFactory::create(const UrlSearchItem &item, const QString &text  {      ListItem *newItem; -    switch(item.type) +    if(item.type & UrlSearchItem::Browse)      { -    case UrlSearchItem::Browse:          newItem = new BrowseListItem(item, text, parent); -        break; -     -    case UrlSearchItem::Search: -        newItem = new SearchListItem(item, text, parent); -        break; -     -    case UrlSearchItem::History: -    case UrlSearchItem::Bookmark: -    default: -        newItem = new PreviewListItem(item, text, parent); -        break; +    } +    else +    { +        if(item.type & UrlSearchItem::Search) +        { +            newItem = new SearchListItem(item, text, parent); +        } +        else +        { +            newItem = new PreviewListItem(item, text, parent); +        }      }      return newItem; | 
