diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2014-03-03 13:46:44 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2014-03-03 13:46:44 +0100 |
commit | 2e02da046d3e56cdf4744f644af35ad07424f48b (patch) | |
tree | f2dcf353aa2338eae1c2ff2c41af971c580c2762 /src/translators/tellicoimporter.cpp | |
parent | 3c13229d98167ae4ae0710d5eeef23fef5005bf0 (diff) | |
download | tellico-2e02da046d3e56cdf4744f644af35ad07424f48b.tar.gz tellico-2e02da046d3e56cdf4744f644af35ad07424f48b.zip |
Update to upstream version 1.3.6
Diffstat (limited to 'src/translators/tellicoimporter.cpp')
-rw-r--r-- | src/translators/tellicoimporter.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/translators/tellicoimporter.cpp b/src/translators/tellicoimporter.cpp index a8dfb62..d722c0c 100644 --- a/src/translators/tellicoimporter.cpp +++ b/src/translators/tellicoimporter.cpp @@ -39,11 +39,6 @@ using Tellico::Import::TellicoImporter; -bool TellicoImporter::versionConversion(uint from, uint to) { - // version 10 only added board games to version 9 - return from < to && (from != 9 || to != 10); -} - TellicoImporter::TellicoImporter(const KURL& url_, bool loadAllImages_) : DataImporter(url_), m_coll(0), m_loadAllImages(loadAllImages_), m_format(Unknown), m_modified(false), m_cancelled(false), m_hasImages(false), m_buffer(0), m_zip(0), m_imgDir(0) { @@ -157,7 +152,7 @@ void TellicoImporter::loadXMLData(const TQByteArray& data_, bool loadImages_) { } m_format = Error; return; - } else if(versionConversion(syntaxVersion, XML::syntaxVersion)) { + } else if(XML::versionConversion(syntaxVersion, XML::syntaxVersion)) { // going form version 9 to 10, there's no conversion needed TQString str = i18n("Tellico is converting the file to a more recent document format. " "Information loss may occur if an older version of Tellico is used " @@ -374,7 +369,7 @@ void TellicoImporter::readField(uint syntaxVersion_, const TQDomElement& elem_) Data::FieldPtr field; if(type == Data::Field::Choice) { - TQStringList allowed = TQStringList::split(TQString::fromLatin1(";"), + TQStringList allowed = TQStringList::split(TQRegExp(TQString::fromLatin1("\\s*;\\s*")), elem_.attribute(TQString::fromLatin1("allowed"))); if(isI18n) { for(TQStringList::Iterator it = allowed.begin(); it != allowed.end(); ++it) { @@ -652,8 +647,9 @@ void TellicoImporter::readEntry(uint syntaxVersion_, const TQDomElement& entryEl void TellicoImporter::readImage(const TQDomElement& elem_, bool loadImage_) { TQString format = elem_.attribute(TQString::fromLatin1("format")); const bool link = elem_.attribute(TQString::fromLatin1("link")) == Latin1Literal("true"); - TQString id = shareString(link ? elem_.attribute(TQString::fromLatin1("id")) - : Data::Image::idClean(elem_.attribute(TQString::fromLatin1("id")))); + // idClean() already calls shareString() + TQString id = link ? shareString(elem_.attribute(TQString::fromLatin1("id"))) + : Data::Image::idClean(elem_.attribute(TQString::fromLatin1("id"))); bool readInfo = true; if(loadImage_) { |