(trunk qt) fix a couple of small memory leaks detected by valgrind
This commit is contained in:
parent
c5838c01ff
commit
56f9f899a2
13
qt/app.cc
13
qt/app.cc
|
@ -90,14 +90,15 @@ MyApp :: MyApp( int& argc, char ** argv ):
|
|||
setApplicationName( MY_NAME );
|
||||
|
||||
// install the qt translator
|
||||
QTranslator * t = new QTranslator( );
|
||||
t->load( "qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
installTranslator( t );
|
||||
QTranslator qtTranslator;
|
||||
qtTranslator.load( "qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
installTranslator( &qtTranslator );
|
||||
|
||||
// install the transmission translator
|
||||
t = new QTranslator( );
|
||||
t->load( QString(MY_NAME) + "_" + QLocale::system().name() );
|
||||
installTranslator( t );
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load( QString(MY_NAME) + "_" + QLocale::system().name() );
|
||||
installTranslator( &appTranslator );
|
||||
|
||||
Formatter::initUnits( );
|
||||
|
||||
// set the default icon
|
||||
|
|
|
@ -185,6 +185,9 @@ Details :: Details( Session& session, Prefs& prefs, TorrentModel& model, QWidget
|
|||
|
||||
Details :: ~Details( )
|
||||
{
|
||||
myTrackerDelegate->deleteLater();
|
||||
myTrackerFilter->deleteLater();
|
||||
myTrackerModel->deleteLater();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -654,6 +654,11 @@ FileTreeView :: FileTreeView( QWidget * parent ):
|
|||
this, SIGNAL(wantedChanged(const QSet<int>&, bool)));
|
||||
}
|
||||
|
||||
FileTreeView :: ~FileTreeView( )
|
||||
{
|
||||
myProxy->deleteLater();
|
||||
}
|
||||
|
||||
void
|
||||
FileTreeView :: onClicked( const QModelIndex& proxyIndex )
|
||||
{
|
||||
|
|
|
@ -141,7 +141,7 @@ class FileTreeView: public QTreeView
|
|||
|
||||
public:
|
||||
FileTreeView( QWidget * parent=0 );
|
||||
virtual ~FileTreeView( ) { }
|
||||
virtual ~FileTreeView( );
|
||||
void clear( );
|
||||
void update( const FileList& files );
|
||||
void update( const FileList& files, bool torrentChanged );
|
||||
|
|
Loading…
Reference in New Issue