summaryrefslogtreecommitdiffstats
path: root/heimdall-frontend/Source/FirmwareInfo.cpp
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell@glassechidna.com.au>2011-07-19 20:18:18 +0200
committerBenjamin Dobell <benjamin.dobell@glassechidna.com.au>2011-07-19 20:18:18 +0200
commit3fe256448148044b7c4a6f70b7947ec51033cf86 (patch)
tree23b06e76f2d1257025218d62b0ec8f515c26b10d /heimdall-frontend/Source/FirmwareInfo.cpp
parentMerge branch 'master' of github.com:Benjamin-Dobell/Heimdall (diff)
downloadHeimdall-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 'heimdall-frontend/Source/FirmwareInfo.cpp')
-rw-r--r--heimdall-frontend/Source/FirmwareInfo.cpp17
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();