diff options
author | Benjamin Dobell <benjamin.dobell@glassechidna.com.au> | 2011-07-19 20:18:18 +0200 |
---|---|---|
committer | Benjamin Dobell <benjamin.dobell@glassechidna.com.au> | 2011-07-19 20:18:18 +0200 |
commit | 3fe256448148044b7c4a6f70b7947ec51033cf86 (patch) | |
tree | 23b06e76f2d1257025218d62b0ec8f515c26b10d /heimdall-frontend/Source/FirmwareInfo.cpp | |
parent | Merge branch 'master' of github.com:Benjamin-Dobell/Heimdall (diff) | |
download | Heimdall-3fe256448148044b7c4a6f70b7947ec51033cf86.tar Heimdall-3fe256448148044b7c4a6f70b7947ec51033cf86.tar.gz Heimdall-3fe256448148044b7c4a6f70b7947ec51033cf86.tar.bz2 Heimdall-3fe256448148044b7c4a6f70b7947ec51033cf86.tar.lz Heimdall-3fe256448148044b7c4a6f70b7947ec51033cf86.tar.xz Heimdall-3fe256448148044b7c4a6f70b7947ec51033cf86.tar.zst Heimdall-3fe256448148044b7c4a6f70b7947ec51033cf86.zip |
Diffstat (limited to '')
-rw-r--r-- | heimdall-frontend/Source/FirmwareInfo.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/heimdall-frontend/Source/FirmwareInfo.cpp b/heimdall-frontend/Source/FirmwareInfo.cpp index aee9313..7870621 100644 --- a/heimdall-frontend/Source/FirmwareInfo.cpp +++ b/heimdall-frontend/Source/FirmwareInfo.cpp @@ -18,9 +18,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ +// Qt +#include "QRegExp" + // Heimdall Frontend #include "Alerts.h" #include "FirmwareInfo.h" +#include "Packaging.h" using namespace HeimdallFrontend; @@ -320,7 +324,7 @@ bool FileInfo::ParseXml(QXmlStreamReader& xml) return (false); } -void FileInfo::WriteXml(QXmlStreamWriter& xml) const +void FileInfo::WriteXml(QXmlStreamWriter& xml, const QString& filename) const { xml.writeStartElement("file"); @@ -329,14 +333,7 @@ void FileInfo::WriteXml(QXmlStreamWriter& xml) const xml.writeEndElement(); xml.writeStartElement("filename"); - - int lastSlash = filename.lastIndexOf('/'); - - if (lastSlash < 0) - lastSlash = filename.lastIndexOf('\\'); - - xml.writeCharacters(filename.mid(lastSlash + 1)); - + xml.writeCharacters(filename); xml.writeEndElement(); xml.writeEndElement(); @@ -775,7 +772,7 @@ void FirmwareInfo::WriteXml(QXmlStreamWriter& xml) const xml.writeStartElement("files"); for (int i = 0; i < fileInfos.length(); i++) - fileInfos[i].WriteXml(xml); + fileInfos[i].WriteXml(xml, Packaging::ClashlessFilename(fileInfos, i)); xml.writeEndElement(); |