From df2eb7afd1783a8750b8034890ff7a9e6abb7388 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 19 Dec 2020 22:55:58 +0900 Subject: Fixed some uncrustify's code formatting offending files. Signed-off-by: Michele Calgaro (cherry picked from commit 491e1c72c7e2a19b58772fd285284e974d489501) --- kded/vfolder_menu.cpp | 65 ++++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 37 deletions(-) (limited to 'kded/vfolder_menu.cpp') diff --git a/kded/vfolder_menu.cpp b/kded/vfolder_menu.cpp index 2e04965ea..880a17576 100644 --- a/kded/vfolder_menu.cpp +++ b/kded/vfolder_menu.cpp @@ -311,25 +311,6 @@ VFolderMenu::~VFolderMenu() delete m_rootMenu; } -#define FOR_ALL_APPLICATIONS(it) \ - for(appsInfo *info = m_appsInfoStack.first(); \ - info; info = m_appsInfoStack.next()) \ - { \ - for(TQDictIterator it( info->applications ); \ - it.current(); ++it ) \ - { -#define FOR_ALL_APPLICATIONS_END } } - -#define FOR_CATEGORY(category, it) \ - for(appsInfo *info = m_appsInfoStack.first(); \ - info; info = m_appsInfoStack.next()) \ - { \ - KService::List *list = info->dictCategories.find(category); \ - if (list) for(KService::List::ConstIterator it = list->begin(); \ - it != list->end(); ++it) \ - { -#define FOR_CATEGORY_END } } - KService * VFolderMenu::findApplication(const TQString &relPath) { @@ -934,12 +915,14 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict *items) } else if (domElem.tagName() == "Not") { - FOR_ALL_APPLICATIONS(it) - { - KService *s = it.current(); - items->replace(s->menuId(), s); - } - FOR_ALL_APPLICATIONS_END + for (appsInfo *info = m_appsInfoStack.first(); info; info = m_appsInfoStack.next()) + { + for (TQDictIterator it( info->applications ); it.current(); ++it ) + { + KService *s = it.current(); + items->replace(s->menuId(), s); + } + } TQDict notItems; TQDomNode n = domElem.firstChild(); @@ -955,21 +938,29 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict *items) } else if (domElem.tagName() == "Category") { - FOR_CATEGORY(domElem.text(), it) - { - KService *s = *it; - items->replace(s->menuId(), s); - } - FOR_CATEGORY_END + for (appsInfo *info = m_appsInfoStack.first(); info; info = m_appsInfoStack.next()) + { + KService::List *list = info->dictCategories.find(domElem.text()); + if (list) + { + for(KService::List::ConstIterator it = list->begin(); it != list->end(); ++it) + { + KService *s = *it; + items->replace(s->menuId(), s); + } + } + } } else if (domElem.tagName() == "All") { - FOR_ALL_APPLICATIONS(it) - { - KService *s = it.current(); - items->replace(s->menuId(), s); - } - FOR_ALL_APPLICATIONS_END + for (appsInfo *info = m_appsInfoStack.first(); info; info = m_appsInfoStack.next()) + { + for (TQDictIterator it( info->applications ); it.current(); ++it ) + { + KService *s = it.current(); + items->replace(s->menuId(), s); + } + } } else if (domElem.tagName() == "Filename") { -- cgit v1.2.1