Browse Source

- Fixed a memory leak in options

- Removed unneeded QTranslator object in options.
adaptive-webui-19844
Christophe Dumez 18 years ago
parent
commit
59e1e0bbf0
  1. 5
      src/options_imp.cpp
  2. 4
      src/options_imp.h

5
src/options_imp.cpp

@ -545,6 +545,11 @@ void options_imp::on_applyButton_clicked(){ @@ -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();

4
src/options_imp.h

@ -22,7 +22,7 @@ @@ -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{ @@ -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{ @@ -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();

Loading…
Cancel
Save