fix build
This commit is contained in:
parent
f098a560f1
commit
25f35227e4
4 changed files with 29 additions and 3 deletions
|
@ -40,7 +40,7 @@ if [ $is_linux = true ]; then
|
|||
|
||||
sudo apt-get -qy install appstream cmake ninja-build openssl libssl-dev
|
||||
sudo apt-get -qy install qt6-5compat-dev qt6-base-dev-tools qt6-image-formats-plugins qt6-multimedia-dev qt6-positioning-dev qt6-webengine-dev linguist-qt6 qt6-tools-dev
|
||||
sudo apt-get -qy install libmpv-dev libssl-dev libsqlite3-dev alsa-base alsa-oss alsa-tools alsa-utils gstreamer1.0-alsa gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio gstreamer1.0-qt6 gstreamer1.0-vaapi gstreamer1.0-x
|
||||
sudo apt-get -qy install libmpv-dev libssl-dev libsqlite3-dev alsa-base alsa-oss alsa-tools alsa-utils gstreamer1.0-alsa gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio gstreamer1.0-qt6 gstreamer1.0-vaapi gstreamer1.0-x libasound2-plugins libasound2-plugins-extra libasound2-dev
|
||||
|
||||
|
||||
else
|
||||
|
|
|
@ -71,6 +71,11 @@ bool Category::markAsReadUnread(RootItem::ReadStatus status) {
|
|||
|
||||
QString Category::additionalTooltip() const {
|
||||
return tr("Number of feeds: %1\n"
|
||||
"Number of categories: %2")
|
||||
.arg(QString::number(getSubTreeFeeds().size()), QString::number(getSubTreeCategories().size() - 1));
|
||||
"Number of categories: %2\n"
|
||||
"Number of disabled feeds: %3")
|
||||
.arg(QString::number(getSubTreeFeeds().size()),
|
||||
QString::number(getSubTreeCategories().size() - 1),
|
||||
QString::number(getSubTree([](const RootItem* ri) {
|
||||
return ri->kind() == RootItem::Kind::Feed && ri->toFeed()->isSwitchedOff();
|
||||
}).size()));
|
||||
}
|
||||
|
|
|
@ -285,6 +285,26 @@ QList<RootItem*> RootItem::getSubTree() const {
|
|||
return children;
|
||||
}
|
||||
|
||||
QList<RootItem*> RootItem::getSubTree(std::function<bool(const RootItem*)> tester) const {
|
||||
QList<RootItem*> children;
|
||||
QList<RootItem*> traversable_items;
|
||||
|
||||
traversable_items.append(const_cast<RootItem* const>(this));
|
||||
|
||||
// Iterate all nested items.
|
||||
while (!traversable_items.isEmpty()) {
|
||||
RootItem* active_item = traversable_items.takeFirst();
|
||||
|
||||
if (tester(active_item)) {
|
||||
children.append(active_item);
|
||||
}
|
||||
|
||||
traversable_items.append(active_item->childItems());
|
||||
}
|
||||
|
||||
return children;
|
||||
}
|
||||
|
||||
QList<RootItem*> RootItem::getSubTree(RootItem::Kind kind_of_item) const {
|
||||
QList<RootItem*> children;
|
||||
QList<RootItem*> traversable_items;
|
||||
|
|
|
@ -144,6 +144,7 @@ class RSSGUARD_DLLSPEC RootItem : public QObject {
|
|||
// Returns flat list of all items from subtree where this item is a root.
|
||||
// Returned list includes this item too.
|
||||
QList<RootItem*> getSubTree() const;
|
||||
QList<RootItem*> getSubTree(std::function<bool(const RootItem*)> tester) const;
|
||||
QList<RootItem*> getSubTree(RootItem::Kind kind_of_item) const;
|
||||
QList<Category*> getSubTreeCategories() const;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue