[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: extragear/multimedia/amarok/src
From:       Seb Ruiz <ruiz () kde ! org>
Date:       2009-01-22 4:03:12
Message-ID: 60ebdd0b0901212003y18d9c1fbi790c3508ce38733b () mail ! gmail ! com
[Download RAW message or body]

2009/1/22 Casey Link <unnamedrambler@gmail.com>:
> +BookmarkList PlayUrlRunner::bookmarksFromUrl( KUrl url )
> +{
> +    DEBUG_BLOCK
> +    BookmarkList list;
> +
> +    QString track_encoded = url.toEncoded().toBase64();
> +    track_encoded.chop(1);
> +
> +    QString query = "SELECT id, parent_id, name, url, description FROM bookmarks \
> WHERE url LIKE '%%1%'"; +    query = query.arg( track_encoded );
> +    debug() << "query: " << query;
> +    QStringList result = CollectionManager::instance()->sqlStorage()->query( query \
> ); +
> +    int resultRows = result.count() / 5;
> +
> +    for( int i = 0; i < resultRows; i++ )
> +    {
> +        QStringList row = result.mid( i*5, 5 );
> +            list << AmarokUrlPtr( new AmarokUrl( row ) );
> +    }
> +    return list;
> +}

Could you please document this method  - I have no idea what it's
doing. Especially the result.mid and encoding to base64.



-- 
Seb Ruiz

http://www.sebruiz.net/
http://amarok.kde.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic