diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-05-06 18:26:24 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-05-06 22:36:50 +0900 |
| commit | ac3f0014232619edc41865f6e42e6510bdd8acc6 (patch) | |
| tree | 9f851f02238781fb9ffe7f76ac446d25e9c92668 /src/xml_to_data/device_xml_to_data.cpp | |
| parent | 1c22ae157c39e2c1434e5ec43a05eda78dc86798 (diff) | |
| download | piklab-ac3f0014232619edc41865f6e42e6510bdd8acc6.tar.gz piklab-ac3f0014232619edc41865f6e42e6510bdd8acc6.zip | |
Allow generation of build time data files in out-of-source builds. Also fix generation of data file for devices/mem24 subfolder
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/xml_to_data/device_xml_to_data.cpp')
| -rw-r--r-- | src/xml_to_data/device_xml_to_data.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xml_to_data/device_xml_to_data.cpp b/src/xml_to_data/device_xml_to_data.cpp index 5ad40a5..84d177f 100644 --- a/src/xml_to_data/device_xml_to_data.cpp +++ b/src/xml_to_data/device_xml_to_data.cpp @@ -241,10 +241,16 @@ Device::Package Device::XmlToDataBase::processPackage(TQDomElement element) void Device::XmlToDataBase::parse() { // process device files - TQStringList files = TQDir::current().entryList("*.xml"); + TQStringList files; + TQDir xmlFilesDir; + if (!xmlFolder.isEmpty()) + { + xmlFilesDir.setPath(xmlFolder); + } + files = xmlFilesDir.entryList("*.xml"); for (uint i=0; i<uint(files.count()); i++) { _data = 0; - TQDomDocument doc = parseFile(files[i]); + TQDomDocument doc = parseFile(xmlFilesDir.absFilePath(files[i])); TQDomElement root = doc.documentElement(); if ( root.nodeName()!="device" ) tqFatal("root node should be \"device\""); processDevice(root); |
