mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-03 07:29:59 +08:00
- Fixed a memory leak in options
- Removed unneeded QTranslator object in options.
This commit is contained in:
parent
d53e85a232
commit
59e1e0bbf0
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user