diff --git a/taglib/ape/apetag.cpp b/taglib/ape/apetag.cpp index c633d575..00e1bc77 100644 --- a/taglib/ape/apetag.cpp +++ b/taglib/ape/apetag.cpp @@ -195,7 +195,7 @@ PropertyMap APE::Tag::properties() const String tagName = it->first.upper(); // if the item is Binary or Locator, or if the key is an invalid string, // add to unsupportedData - if(it->second.type() != Item::Text || tagName.isNull()) + if(it->second.type() != Item::Text || tagName.isEmpty()) properties.unsupportedData().append(it->first); else { // Some tags need to be handled specially @@ -232,7 +232,7 @@ PropertyMap APE::Tag::setProperties(const PropertyMap &origProps) for(; remIt != itemListMap().end(); ++remIt) { String key = remIt->first.upper(); // only remove if a) key is valid, b) type is text, c) key not contained in new properties - if(!key.isNull() && remIt->second.type() == APE::Item::Text && !properties.contains(key)) + if(!key.isEmpty() && remIt->second.type() == APE::Item::Text && !properties.contains(key)) toRemove.append(remIt->first); } diff --git a/taglib/mod/modtag.cpp b/taglib/mod/modtag.cpp index 4ba72117..4b180bbb 100644 --- a/taglib/mod/modtag.cpp +++ b/taglib/mod/modtag.cpp @@ -128,7 +128,7 @@ PropertyMap Mod::Tag::properties() const PropertyMap properties; properties["TITLE"] = d->title; properties["COMMENT"] = d->comment; - if(!(d->trackerName.isNull())) + if(!(d->trackerName.isEmpty())) properties["TRACKERNAME"] = d->trackerName; return properties; } diff --git a/taglib/mpeg/id3v2/frames/commentsframe.cpp b/taglib/mpeg/id3v2/frames/commentsframe.cpp index deaa9d9a..b5618322 100644 --- a/taglib/mpeg/id3v2/frames/commentsframe.cpp +++ b/taglib/mpeg/id3v2/frames/commentsframe.cpp @@ -116,8 +116,6 @@ PropertyMap CommentsFrame::asProperties() const PropertyMap map; if(key.isEmpty() || key == "COMMENT") map.insert("COMMENT", text()); - else if(key.isNull()) - map.unsupportedData().append(L"COMM/" + description()); else map.insert("COMMENT:" + key, text()); return map; @@ -164,7 +162,7 @@ void CommentsFrame::parseFields(const ByteVector &data) } else { d->description = String(l.front(), d->textEncoding); d->text = String(l.back(), d->textEncoding); - } + } } } diff --git a/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.cpp b/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.cpp index 86c11f7a..2ab46481 100644 --- a/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.cpp +++ b/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.cpp @@ -159,7 +159,7 @@ void SynchronizedLyricsFrame::parseFields(const ByteVector &data) int pos = 6; d->description = readStringField(data, d->textEncoding, &pos); - if(d->description.isNull()) + if(d->description.isEmpty()) return; /* @@ -190,7 +190,7 @@ void SynchronizedLyricsFrame::parseFields(const ByteVector &data) } } String text = readStringField(data, enc, &pos); - if(text.isNull() || pos + 4 > end) + if(text.isEmpty() || pos + 4 > end) return; uint time = data.toUInt(pos, true); diff --git a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp index 07bf0ede..7eacf932 100644 --- a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp +++ b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp @@ -292,7 +292,7 @@ PropertyMap TextIdentificationFrame::makeTMCLProperties() const StringList l = fieldList(); for(StringList::ConstIterator it = l.begin(); it != l.end(); ++it) { String instrument = it->upper(); - if(instrument.isNull()) { + if(instrument.isEmpty()) { // instrument is not a valid key -> frame unsupported map.clear(); map.unsupportedData().append(frameID()); diff --git a/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp b/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp index 8f96cb8d..f97cdc5a 100644 --- a/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp +++ b/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp @@ -119,8 +119,6 @@ PropertyMap UnsynchronizedLyricsFrame::asProperties() const String key = description().upper(); if(key.isEmpty() || key.upper() == "LYRICS") map.insert("LYRICS", text()); - else if(key.isNull()) - map.unsupportedData().append(L"USLT/" + description()); else map.insert("LYRICS:" + key, text()); return map; @@ -164,7 +162,7 @@ void UnsynchronizedLyricsFrame::parseFields(const ByteVector &data) } else { d->description = String(l.front(), d->textEncoding); d->text = String(l.back(), d->textEncoding); - } + } } } diff --git a/taglib/mpeg/id3v2/frames/urllinkframe.cpp b/taglib/mpeg/id3v2/frames/urllinkframe.cpp index e42d64d1..e59a80dd 100644 --- a/taglib/mpeg/id3v2/frames/urllinkframe.cpp +++ b/taglib/mpeg/id3v2/frames/urllinkframe.cpp @@ -159,8 +159,6 @@ PropertyMap UserUrlLinkFrame::asProperties() const String key = description().upper(); if(key.isEmpty() || key.upper() == "URL") map.insert("URL", url()); - else if(key.isNull()) - map.unsupportedData().append(L"WXXX/" + description()); else map.insert("URL:" + key, url()); return map; diff --git a/taglib/tag.cpp b/taglib/tag.cpp index eb8fab7a..d13b248f 100644 --- a/taglib/tag.cpp +++ b/taglib/tag.cpp @@ -58,15 +58,15 @@ bool Tag::isEmpty() const PropertyMap Tag::properties() const { PropertyMap map; - if(!(title().isNull())) + if(!(title().isEmpty())) map["TITLE"].append(title()); - if(!(artist().isNull())) + if(!(artist().isEmpty())) map["ARTIST"].append(artist()); - if(!(album().isNull())) + if(!(album().isEmpty())) map["ALBUM"].append(album()); - if(!(comment().isNull())) + if(!(comment().isEmpty())) map["COMMENT"].append(comment()); - if(!(genre().isNull())) + if(!(genre().isEmpty())) map["GENRE"].append(genre()); if(!(year() == 0)) map["DATE"].append(String::number(year())); diff --git a/taglib/toolkit/tpropertymap.cpp b/taglib/toolkit/tpropertymap.cpp index 313d7fb4..2c696417 100644 --- a/taglib/toolkit/tpropertymap.cpp +++ b/taglib/toolkit/tpropertymap.cpp @@ -35,7 +35,7 @@ PropertyMap::PropertyMap(const SimplePropertyMap &m) { for(SimplePropertyMap::ConstIterator it = m.begin(); it != m.end(); ++it){ String key = it->first.upper(); - if(!key.isNull()) + if(!key.isEmpty()) insert(it->first, it->second); else unsupported.append(it->first);