https://bugs.kde.org/show_bug.cgi?id=432093

--- Comment #13 from EDeadLock <maicolgabr...@hotmail.com> ---
(In reply to Bharadwaj Raju from comment #9)
> (In reply to EDeadLock from comment #8)
> > I would love to help fix this issue but I dont know where to start. I
> > managed to set up the neon docker container. How can I enable logging on the
> > settings app or edit the code and test?
> 
> Sorry for the late reply. Please check out
> https://community.kde.org/Get_Involved/development which will help you about
> compiling the code etc.

TL;DR;
I was able to remove the incorrect headers using the patch below, but I have
yet to figure out how display the correct Header


Yeah, no worries, I was able to figure out how to play with it. Your link and
the Docker container setup https://community.kde.org/Neon/Docker came in really
helpful in debugging this

I had done some troubleshooting by changing different parts of the code and
seeing how things behaved. It's not the best way to go about it but there is
really not much else I can do when I am unfamiliar with the code base.

In any case,  I had done the troubleshooting late November and wanted to do
some more before I updated here, but I had not found the time to do more, so I
will just update what I have with my notes from then. I also added some details
from what I remember and also sat down and spent 2 hours investigating more
when I originally wanted to only spend 30mins :)


What I have found is that there are 3 Headers within the entire code base. 2 Of
those headers are "incorrect" and one is "correct". Pages that use the correct
headers have no issues.

I tweaked the code to make it so that all 3 headers are shown at the same time.
Well, I found how to make Header1 and Header2 to always be shown or hidden. I
havent found the code for Header3. See screenshot headers_shown.png and
headers_hidden.png to understand which headers are Header1, Header2, and
Header3. Header1 and Header2 are the incorrect headers while Header3 is the
correct one

The following diff removes the incorrect Headers Header1 and Header2. To make
them always visible just toggle them to true. This is how I made the
screenshots. Note that I am on an old commit 2dcc904bcc

diff --git a/core/ModuleView.cpp b/core/ModuleView.cpp
index 203b6021..9d10d22b 100644
--- a/core/ModuleView.cpp
+++ b/core/ModuleView.cpp
@@ -458,6 +458,8 @@ void ModuleView::activeModuleChanged(KPageWidgetItem
*current, KPageWidgetItem *

         moduleShowDefaultsIndicators(d->mDefaultsIndicatorsVisible);
     }
+    current->setHeaderVisible(false);
+    d->mCustomHeader->setVisible(false);
 }

 void ModuleView::stateChanged()
@@ -485,7 +487,7 @@ void ModuleView::stateChanged()
     updatePageIconHeader(d->mPageWidget->currentPage());

     KCModuleProxy *moduleProxy =
d->mPages.value(d->mPageWidget->currentPage());
-    d->mCustomHeader->setVisible(!moduleProxy ||
!moduleProxy->realModule()->inherits("KCModuleQml"));
+    d->mCustomHeader->setVisible(false);

     d->mApplyAuthorize->setAuthAction(moduleAction);
     d->mDefault->setEnabled(!defaulted);


Header1 is fixed by d->mCustomHeader->setVisible(false);
Header2 is fixed by current->setHeaderVisible(false);

I havent found how to make Header3 present in the broken pages. I guess that is
the next step. It seems that all the broken pages seem to be using Header1 and
Header2, which are wrong. The pages need to migrate to using Header3 type. It
also seems that correct pages use Header3 and stay away from using Header1 and
Header2. If anyone knows the trick to display Header3 then we can get started
in setting a proper patch

Thanks all :)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to