diff options
author | Benjamin Dobell <benjamin.dobell@glassechidna.com.au> | 2011-07-20 04:18:18 +1000 |
---|---|---|
committer | Benjamin Dobell <benjamin.dobell@glassechidna.com.au> | 2011-07-20 04:18:18 +1000 |
commit | 3fe256448148044b7c4a6f70b7947ec51033cf86 (patch) | |
tree | 23b06e76f2d1257025218d62b0ec8f515c26b10d /heimdall-frontend/Source/FirmwareInfo.cpp | |
parent | a18d2e6b02914f0f8ac9a4d4b8ee37a349c11ea5 (diff) | |
download | external_heimdall-3fe256448148044b7c4a6f70b7947ec51033cf86.zip external_heimdall-3fe256448148044b7c4a6f70b7947ec51033cf86.tar.gz external_heimdall-3fe256448148044b7c4a6f70b7947ec51033cf86.tar.bz2 |
- Heimdall Frontend large font fixes.
- Heimdall Frontend name collision resolution (over the top).
- Attempt at resolving SGS2 failure to end session errors. (Needs testing)
Diffstat (limited to 'heimdall-frontend/Source/FirmwareInfo.cpp')
-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(); |