Commit c4b5474f authored by flypig's avatar flypig

Merge branch 'jb46544' into 'master'

Use multi-char compression marker

See merge request mer-core/nemo-qml-plugin-contacts!29
parents e794670e 32b1e486
......@@ -277,7 +277,9 @@ void SeasideDisplayLabelGroupModel::reloadGroupIndices()
for (int i = 0; i < m_compressedGroups.count(); i++) {
const QString &group = m_compressedGroups.at(i);
if (SeasideStringListCompressor::isCompressionMarker(group)) {
const QStringList &groupContent = m_compressedContent.value(i);
// An empty default must be passed in, otherwise if the key doesn't exist
// the reference to the returned default-constructed value can become invalid
const QStringList &groupContent = m_compressedContent.value(i, QStringList());
for (const QString &groupContentEntry : groupContent) {
m_groupIndices.insert(groupContentEntry, i);
}
......
......@@ -35,7 +35,11 @@
namespace {
const QChar CompressionMarker = QChar('.');
// The implementaiton requires the CompressionMarker to be distinct from any
// group display labels. Most labels are single character so won't conflict,
// but that's not a requirement and so display label grouper plugins must avoid
// using ".." as a label.
const QString CompressionMarker = QStringLiteral("..");
const int MinimumCompressionInputCount = 5;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment