mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Reader: fix QTimer-related memory leaks
This commit is contained in:
parent
b0082101d3
commit
0da59285cf
@ -1217,11 +1217,7 @@ void MainWindowViewer::checkNewVersion()
|
|||||||
connect(versionChecker, SIGNAL(newVersionDetected()),
|
connect(versionChecker, SIGNAL(newVersionDetected()),
|
||||||
this, SLOT(newVersion()));
|
this, SLOT(newVersion()));
|
||||||
|
|
||||||
auto tT = new QTimer;
|
QTimer::singleShot(100, versionChecker, &HttpVersionChecker::get);
|
||||||
tT->setSingleShot(true);
|
|
||||||
connect(tT, SIGNAL(timeout()), versionChecker, SLOT(get()));
|
|
||||||
//versionChecker->get(); //TOD<4F>
|
|
||||||
tT->start(100);
|
|
||||||
|
|
||||||
conf.setLastVersionCheck(current);
|
conf.setLastVersionCheck(current);
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ void Viewer::createConnections()
|
|||||||
connect(goToFlow, SIGNAL(goToPage(unsigned int)), this, SLOT(goTo(unsigned int)));
|
connect(goToFlow, SIGNAL(goToPage(unsigned int)), this, SLOT(goTo(unsigned int)));
|
||||||
|
|
||||||
//current time
|
//current time
|
||||||
auto t = new QTimer();
|
auto t = new QTimer(this);
|
||||||
connect(t, SIGNAL(timeout()), this, SLOT(updateInformation()));
|
connect(t, SIGNAL(timeout()), this, SLOT(updateInformation()));
|
||||||
t->start(1000);
|
t->start(1000);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user