mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
Merge pull request #5936 from birarda/tv-es-lockup
fix a timer leak, line width in PacketList
This commit is contained in:
commit
f2e65f5a98
2 changed files with 5 additions and 3 deletions
|
@ -49,7 +49,8 @@ void ThreadedAssignment::setFinished(bool isFinished) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_statsTimer) {
|
if (_statsTimer) {
|
||||||
_statsTimer->stop();
|
_statsTimer->deleteLater();
|
||||||
|
_statsTimer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// call our virtual aboutToFinish method - this gives the ThreadedAssignment subclass a chance to cleanup
|
// call our virtual aboutToFinish method - this gives the ThreadedAssignment subclass a chance to cleanup
|
||||||
|
@ -105,7 +106,7 @@ void ThreadedAssignment::sendStatsPacket() {
|
||||||
void ThreadedAssignment::startSendingStats() {
|
void ThreadedAssignment::startSendingStats() {
|
||||||
// send the stats packet every 1s
|
// send the stats packet every 1s
|
||||||
if (!_statsTimer) {
|
if (!_statsTimer) {
|
||||||
_statsTimer = new QTimer();
|
_statsTimer = new QTimer;
|
||||||
connect(_statsTimer, &QTimer::timeout, this, &ThreadedAssignment::sendStatsPacket);
|
connect(_statsTimer, &QTimer::timeout, this, &ThreadedAssignment::sendStatsPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,8 @@ class Packet;
|
||||||
class PacketList : public QIODevice {
|
class PacketList : public QIODevice {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static std::unique_ptr<PacketList> create(PacketType packetType, QByteArray extendedHeader = QByteArray(), bool isReliable = false, bool isOrdered = false);
|
static std::unique_ptr<PacketList> create(PacketType packetType, QByteArray extendedHeader = QByteArray(),
|
||||||
|
bool isReliable = false, bool isOrdered = false);
|
||||||
static std::unique_ptr<PacketList> fromReceivedPackets(std::list<std::unique_ptr<Packet>>&& packets);
|
static std::unique_ptr<PacketList> fromReceivedPackets(std::list<std::unique_ptr<Packet>>&& packets);
|
||||||
|
|
||||||
bool isReliable() const { return _isReliable; }
|
bool isReliable() const { return _isReliable; }
|
||||||
|
|
Loading…
Reference in a new issue