Ignore:
Timestamp:
Mar 16, 2012, 4:02:47 PM (13 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: 0.7.1 trunk update

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/urlhistory.cpp

    r119 r124  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2011 Ricardo Villalba <rvm@escomposlinux.org>
     2    Copyright (C) 2006-2012 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    1818
    1919#include "urlhistory.h"
    20 #include "constants.h"
    2120
    2221URLHistory::URLHistory() : Recents()
     
    2827}
    2928
    30 void URLHistory::addUrl(QString url, bool is_playlist) {
     29void URLHistory::addUrl(QString url) {
    3130        qDebug("Recents::addItem: '%s'", url.toUtf8().data());
    3231
     
    3534        while (iterator != l.end()) {
    3635                QString s = (*iterator);
    37                 if (isPlaylist(s)) {
    38                         s = s.remove( QRegExp(IS_PLAYLIST_TAG_RX) );
    39                 }
    4036                if (s == url)
    4137                        iterator = l.erase(iterator);
     
    4541
    4642        // Add new item to list
    47         if (is_playlist) url = url + IS_PLAYLIST_TAG;
    4843        l.prepend(url);
    4944
     
    5146}
    5247
    53 void URLHistory::addUrl(QString url) {
    54         bool is_playlist = isPlaylist(url);
    55         if (is_playlist) url = url.remove( QRegExp(IS_PLAYLIST_TAG_RX) );
    56         addUrl(url, is_playlist);
    57 }
    58 
    5948QString URLHistory::url(int n) {
    6049        QString s = l[n];
    61         if (isPlaylist(n)) s = s.remove( QRegExp(IS_PLAYLIST_TAG_RX) );
    6250        return s;
    6351}
    6452
    65 bool URLHistory::isPlaylist(int n) {
    66         return isPlaylist(l[n]);
    67 }
    68 
    69 bool URLHistory::isPlaylist(QString url) {
    70         return url.endsWith(IS_PLAYLIST_TAG);
    71 }
    72 
Note: See TracChangeset for help on using the changeset viewer.