Fixed issue #859. Export to DXF in console never ends.
--HG-- branch : develop
This commit is contained in:
parent
598fea3969
commit
3db3d58961
|
@ -202,6 +202,12 @@ VDomDocument::VDomDocument(QObject *parent)
|
|||
connect(m_watcher, &QFutureWatcher<QHash<quint32, QDomElement>>::finished, this, &VDomDocument::CacheRefreshed);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VDomDocument::~VDomDocument()
|
||||
{
|
||||
m_watcher->cancel();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QDomElement VDomDocument::elementById(quint32 id, const QString &tagName)
|
||||
{
|
||||
|
@ -608,7 +614,10 @@ void VDomDocument::CollectId(const QDomElement &node, QVector<quint32> &vector)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VDomDocument::RefreshElementIdCache()
|
||||
{
|
||||
if (m_watcher->isFinished())
|
||||
{
|
||||
m_watcher->setFuture(QtConcurrent::run(this, &VDomDocument::RefreshCache, documentElement()));
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -95,7 +95,7 @@ public:
|
|||
static const QString TagLine;
|
||||
|
||||
explicit VDomDocument(QObject *parent = nullptr);
|
||||
virtual ~VDomDocument() Q_DECL_EQ_DEFAULT;
|
||||
virtual ~VDomDocument();
|
||||
QDomElement elementById(quint32 id, const QString &tagName = QString());
|
||||
|
||||
template <typename T>
|
||||
|
|
Loading…
Reference in New Issue
Block a user