1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 04:54:18 +00:00

- Fixed memory leak in search engine autocompletion (introduced by gtsoul)

This commit is contained in:
Christophe Dumez 2007-03-10 19:08:37 +00:00
parent e85a82a426
commit 7e1f98cd46

View File

@ -218,7 +218,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
// new qCompleter to the search pattern // new qCompleter to the search pattern
startSearchHistory(); startSearchHistory();
QCompleter *searchCompleter = new QCompleter(searchHistory, this); searchCompleter = new QCompleter(searchHistory, this);
searchCompleter->setCaseSensitivity(Qt::CaseInsensitive); searchCompleter->setCaseSensitivity(Qt::CaseInsensitive);
search_pattern->setCompleter(searchCompleter); search_pattern->setCompleter(searchCompleter);
@ -265,6 +265,7 @@ GUI::~GUI(){
searchProcess->kill(); searchProcess->kill();
searchProcess->waitForFinished(); searchProcess->waitForFinished();
delete searchProcess; delete searchProcess;
delete searchCompleter;
delete checkConnect; delete checkConnect;
delete refresher; delete refresher;
delete myTrayIcon; delete myTrayIcon;
@ -867,7 +868,6 @@ void GUI::showCreateWindow(){
// Called when we minimize the program // Called when we minimize the program
void GUI::hideEvent(QHideEvent *e){ void GUI::hideEvent(QHideEvent *e){
qDebug("* Receiced hideEvent()");
QSettings settings("qBittorrent", "qBittorrent"); QSettings settings("qBittorrent", "qBittorrent");
if(settings.value("Options/Misc/GoToSystray", true).toBool()){ if(settings.value("Options/Misc/GoToSystray", true).toBool()){
// Hide window // Hide window