Commit 460ef2d2 authored by Shashwat Jolly's avatar Shashwat Jolly
Browse files

Convert #RRGGBBAA etebase collection colors to #AARRGGBB

etebase can have collection color in #RRGGBBAA. This needs to be converted to #AARRGGBB format, ehich is accepted by Qt.
parent 62db2574
......@@ -155,6 +155,10 @@ void JournalsFetchJob::setupCollection(Akonadi::Collection &collection, const Et
if (collectionColor.isEmpty()) {
collectionColor = ETESYNC_DEFAULT_COLLECTION_COLOR;
}
// Convert #RRGGBBAA strings to #AARRGGBB, which is required by Qt
if (collectionColor.length() == 9) {
collectionColor = collectionColor.left(1) + collectionColor.right(2) + collectionColor.mid(1, 6);
}
colorAttr->setColor(collectionColor);
if (etebase_collection_get_access_level(etesyncCollection) == ETEBASE_COLLECTION_ACCESS_LEVEL_READ_ONLY) {
......
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