Add single TQObject root parent for all TDEIO::Job objects.

This helps keeping the object root list shorter, speeding up operations
which require lot of TQObject trees. This relates to TDE/tdebase#309.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/191/head
Michele Calgaro 2 years ago
parent 9189a0e97f
commit 4d90cc6117
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -106,7 +106,9 @@ public:
unsigned long m_userTimestamp;
};
Job::Job(bool showProgressInfo) : TQObject(0, "job"), m_error(0), m_percent(0)
static TQObject *__job_root_obj = new TQObject(0, "jobroot");
Job::Job(bool showProgressInfo) : TQObject(__job_root_obj, "job"), m_error(0), m_percent(0)
, m_progressId(0), m_speedTimer(0), d( new JobPrivate )
{
// All jobs delete themselves after emiting 'result'.

Loading…
Cancel
Save