Changeset 11052


Ignore:
Timestamp:
Jul 25, 2010, 5:16:03 PM (12 years ago)
Author:
charles
Message:

(trunk qt) add code for a favicon cache -- it even shares the GTK+ client's favicon cache directory. :) This isn't plugged in anywhere yet, but will be useful when the filterbar and trackers tab are synced with the GTK+ client.

Location:
trunk/qt
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/app.h

    r10775 r11052  
    1616#include <QApplication>
    1717#include <QTimer>
     18#include "favicon.h"
    1819
    1920class Prefs;
     
    3334    public:
    3435        void raise( );
     36
     37    public:
     38        Favicons favicons;
    3539
    3640    private:
  • trunk/qt/qtr.pro

    r10933 r11052  
    3131FORMS += mainwin.ui
    3232RESOURCES += application.qrc
    33 SOURCES += about.cc app.cc dbus-adaptor.cc details.cc file-tree.cc filters.cc \
    34            formatter.cc hig.cc license.cc mainwin.cc make-dialog.cc options.cc \
    35            prefs.cc prefs-dialog.cc qticonloader.cc relocate.cc session.cc \
    36            session-dialog.cc squeezelabel.cc stats-dialog.cc torrent.cc \
    37            torrent-delegate.cc torrent-delegate-min.cc torrent-filter.cc \
    38            torrent-model.cc triconpushbutton.cc utils.cc watchdir.cc
     33SOURCES += about.cc app.cc dbus-adaptor.cc details.cc favicon.cc file-tree.cc \
     34           filters.cc formatter.cc hig.cc license.cc mainwin.cc \
     35           make-dialog.cc options.cc prefs.cc prefs-dialog.cc qticonloader.cc \
     36           relocate.cc session.cc session-dialog.cc squeezelabel.cc \
     37           stats-dialog.cc torrent.cc torrent-delegate.cc \
     38           torrent-delegate-min.cc torrent-filter.cc torrent-model.cc \
     39           triconpushbutton.cc utils.cc watchdir.cc
    3940HEADERS += $$replace(SOURCES, .cc, .h)
    4041HEADERS += speed.h types.h
  • trunk/qt/torrent.cc

    r11047 r11052  
    2020#include <QString>
    2121#include <QStyle>
     22#include <QUrl>
    2223#include <QVariant>
    2324
     
    544545        QStringList list;
    545546        tr_benc * child;
    546         while(( child = tr_bencListChild( trackers, i++ )))
    547             if( tr_bencDictFindStr( child, "announce", &str ))
     547        while(( child = tr_bencListChild( trackers, i++ ))) {
     548            if( tr_bencDictFindStr( child, "announce", &str )) {
     549                dynamic_cast<MyApp*>(QApplication::instance())->favicons.add( QUrl(str) );
    548550                list.append( QString::fromUtf8( str ) );
     551            }
     552        }
    549553        if( myValues[TRACKERS] != list ) {
    550554            myValues[TRACKERS].setValue( list );
Note: See TracChangeset for help on using the changeset viewer.