Changeset 12549
- Timestamp:
- Jul 15, 2011, 2:17:33 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt/filterbar.cc
r12547 r12549 310 310 const Torrent * tor = index.data( TorrentModel::TorrentRole ).value<const Torrent*>(); 311 311 const QStringList trackers = tor->trackers( ); 312 QSet<QString> torrent Hosts;312 QSet<QString> torrentNames; 313 313 foreach( QString tracker, trackers ) { 314 314 const QString host = Favicons::getHost( QUrl( tracker ) ); 315 315 if( host.isEmpty( ) ) 316 316 qWarning() << "torrent" << qPrintable(tor->name()) << "has an invalid announce URL:" << tracker; 317 else 318 torrentHosts.insert( host );319 }320 foreach( QString host, torrentHosts ) {321 newHosts.insert( host );322 ++torrentsPerHost[ readableHostName( host ) ];323 }317 else { 318 newHosts.insert( host ); 319 torrentNames.insert( readableHostName( host ) ); 320 } 321 } 322 foreach( QString name, torrentNames ) 323 ++torrentsPerHost[ name ]; 324 324 } 325 325
Note: See TracChangeset
for help on using the changeset viewer.