- Fixed a memory leak in options

- Removed unneeded QTranslator object in options.
This commit is contained in:
Christophe Dumez 2007-03-19 14:31:08 +00:00
parent d53e85a232
commit 59e1e0bbf0
2 changed files with 7 additions and 2 deletions

View File

@ -545,6 +545,11 @@ void options_imp::on_applyButton_clicked(){
emit status_changed(tr("Options were saved successfully."), false);
}
void options_imp::closeEvent(QCloseEvent *e){
setAttribute(Qt::WA_DeleteOnClose);
e->accept();
}
void options_imp::on_cancelButton_clicked(){
setAttribute(Qt::WA_DeleteOnClose);
reject();

View File

@ -22,7 +22,7 @@
#ifndef OPTIONS_IMP_H
#define OPTIONS_IMP_H
#include <QTranslator>
#include <QCloseEvent>
#include "ui_options.h"
#include <libtorrent/session.hpp>
#include <libtorrent/ip_filter.hpp>
@ -66,7 +66,6 @@ class options_imp : public QDialog, private Ui::Dialog{
QString getProxyPassword() const;
// Language Settings
QString getLocale() const;
QTranslator translator;
// Misc Settings
bool useAdditionDialog() const;
QString getSavePath() const;
@ -81,6 +80,7 @@ class options_imp : public QDialog, private Ui::Dialog{
protected slots:
void on_okButton_clicked();
void closeEvent(QCloseEvent *e);
void on_cancelButton_clicked();
void on_applyButton_clicked();
void on_addFilterRange_clicked();