D19925: Split up subcategories for KNS categories
This revision was automatically updated to reflect the committed changes. Closed by commit R134:29be60b13647: Split up subcategories for KNS categories (authored by leinir). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D19925?vs=55813&id=55881#toc REPOSITORY R134 Discover Software Store CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D19925?vs=55813&id=55881 REVISION DETAIL https://phabricator.kde.org/D19925 AFFECTED FILES libdiscover/Category/Category.cpp libdiscover/Category/Category.h libdiscover/backends/KNSBackend/KNSBackend.cpp To: leinir, #discover_software_store, apol, ngraham Cc: plasma-devel, #discover_software_store, jraleigh, bam, GB_2, ragreen, ixoos, Pitel, ZrenBot, James, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D19925: Split up subcategories for KNS categories
apol accepted this revision. apol added a comment. This revision is now accepted and ready to land. LGTM otherwise INLINE COMMENTS > KNSBackend.cpp:149 > +const QString catName = cat->name().append(QLatin1Char('/')); > +for (auto& potentialSubCat: categories) { > +if(potentialSubCat->name().startsWith(catName)) { const auto& REPOSITORY R134 Discover Software Store REVISION DETAIL https://phabricator.kde.org/D19925 To: leinir, #discover_software_store, apol, ngraham Cc: plasma-devel, #discover_software_store, jraleigh, bam, GB_2, ragreen, ixoos, Pitel, ZrenBot, James, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D19925: Split up subcategories for KNS categories
leinir updated this revision to Diff 55813. leinir marked an inline comment as done. leinir added a comment. Remove unnecessary (very noisy) debug messages REPOSITORY R134 Discover Software Store CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D19925?vs=54446&id=55813 REVISION DETAIL https://phabricator.kde.org/D19925 AFFECTED FILES libdiscover/Category/Category.cpp libdiscover/Category/Category.h libdiscover/backends/KNSBackend/KNSBackend.cpp To: leinir, #discover_software_store, apol, ngraham Cc: plasma-devel, #discover_software_store, jraleigh, bam, GB_2, ragreen, ixoos, Pitel, ZrenBot, James, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D19925: Split up subcategories for KNS categories
leinir planned changes to this revision. leinir added inline comments. INLINE COMMENTS > KNSBackend.cpp:149 > +const QString catName = cat->name().append(QLatin1Char('/')); > +qDebug() << "Checking" << catName; > +for (auto& potentialSubCat: categories) { Just realised how spammy these bits of debug are. Gone momentarily. REPOSITORY R134 Discover Software Store REVISION DETAIL https://phabricator.kde.org/D19925 To: leinir, #discover_software_store, apol, ngraham Cc: plasma-devel, #discover_software_store, jraleigh, bam, GB_2, ragreen, ixoos, Pitel, ZrenBot, James, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D19925: Split up subcategories for KNS categories
leinir added a comment. Ping? :) REPOSITORY R134 Discover Software Store REVISION DETAIL https://phabricator.kde.org/D19925 To: leinir, #discover_software_store, apol, ngraham Cc: plasma-devel, #discover_software_store, jraleigh, bam, GB_2, ragreen, ixoos, Pitel, ZrenBot, James, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D19925: Split up subcategories for KNS categories
leinir created this revision. leinir added reviewers: Discover Software Store, apol, ngraham. leinir added a project: Discover Software Store. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. leinir requested review of this revision. REVISION SUMMARY This adds functionality to programmatically add subcategories (with a suitable warning not to do so after the initialisation stage), and uses that to perform a splitting of the subcategories supplied the KNewStuff backend. TEST PLAN Previously: Many categories, with annoying and bad readability With patch: A nice dig-down tree of categories in the KDE Store applications category REPOSITORY R134 Discover Software Store REVISION DETAIL https://phabricator.kde.org/D19925 AFFECTED FILES libdiscover/Category/Category.cpp libdiscover/Category/Category.h libdiscover/backends/KNSBackend/KNSBackend.cpp To: leinir, #discover_software_store, apol, ngraham Cc: plasma-devel, #discover_software_store, jraleigh, bam, GB_2, ragreen, ixoos, Pitel, ZrenBot, James, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart