Changeset 11065


Ignore:
Timestamp:
Jul 28, 2010, 8:17:16 PM (12 years ago)
Author:
charles
Message:

(trunk qt) fix a couple of small memory leaks detected by valgrind

Location:
trunk/qt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/app.cc

    r10957 r11065  
    9191
    9292    // install the qt translator
    93     QTranslator * t = new QTranslator( );
    94     t->load( "qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
    95     installTranslator( t );
     93    QTranslator qtTranslator;
     94    qtTranslator.load( "qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
     95    installTranslator( &qtTranslator );
    9696
    9797    // install the transmission translator
    98     t = new QTranslator( );
    99     t->load( QString(MY_NAME) + "_" + QLocale::system().name() );
    100     installTranslator( t );
     98    QTranslator appTranslator;
     99    appTranslator.load( QString(MY_NAME) + "_" + QLocale::system().name() );
     100    installTranslator( &appTranslator );
     101
    101102    Formatter::initUnits( );
    102103
  • trunk/qt/details.cc

    r11061 r11065  
    186186Details :: ~Details( )
    187187{
     188    myTrackerDelegate->deleteLater();
     189    myTrackerFilter->deleteLater();
     190    myTrackerModel->deleteLater();
    188191}
    189192
  • trunk/qt/file-tree.cc

    r11064 r11065  
    653653    connect( &myModel, SIGNAL(wantedChanged(const QSet<int>&, bool)),
    654654             this,     SIGNAL(wantedChanged(const QSet<int>&, bool)));
     655}
     656
     657FileTreeView :: ~FileTreeView( )
     658{
     659    myProxy->deleteLater();
    655660}
    656661
  • trunk/qt/file-tree.h

    r11063 r11065  
    142142    public:
    143143        FileTreeView( QWidget * parent=0 );
    144         virtual ~FileTreeView( ) { }
     144        virtual ~FileTreeView( );
    145145        void clear( );
    146146        void update( const FileList& files );
Note: See TracChangeset for help on using the changeset viewer.