Changeset 11065 for trunk/qt/app.cc


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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.