[Kst] branches/work/kst/portto4-objectstore/kst/src/libkst
Eli Fidler
eli at staikos.net
Thu Oct 18 22:53:52 CEST 2007
SVN commit 726775 by fidler:
handle empty stringlist
M +8 -4 objecttag.cpp
--- branches/work/kst/portto4-objectstore/kst/src/libkst/objecttag.cpp #726774:726775
@@ -51,10 +51,14 @@
ObjectTag::ObjectTag(const QStringList &fullTag)
: _minDisplayComponents(1), _uniqueDisplayComponents(UINT_MAX) {
- QStringList context = fullTag;
- _name = cleanTagComponent(context.last());
- context.pop_back();
- _context = context;
+ if (fullTag.isEmpty()) {
+ _minDisplayComponents = 0;
+ } else {
+ QStringList context = fullTag;
+ _name = cleanTagComponent(context.last());
+ context.pop_back();
+ _context = context;
+ }
}
More information about the Kst
mailing list