|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Krazy Check for Missing toolTips and whatsThisHowdy,
Starting with tonight's run on the EBN, you can now ask Krazy to report widgets that are missing toolTips or whatsThis text. This check (called "tipsandthis") is NOT enabled by default -- you need to add the appropriate EXTRA directive to your project .krazy file for this checker to run on your project files. For example, in the kdepim/korganizer/.krazy file add the line EXTRA tipsandthis and then svn commit that file. I'm looking for feedback on how well this checker works. It should process C++, Qt designer (.ui) and KConfigXT (.kcfg) files. BTW: I ran this checker in KOrganizer source and it reported back about 800 issues. That's an awful lot of new i18n strings to add. Regards, Allen |
|
|
|
|
|
Re: Krazy Check for Missing toolTips and whatsThisOn Sunday 07 September 2008 11:00:22 Parker Coates wrote:
> On Tue, Sep 2, 2008 at 16:43, Allen Winter wrote: > > I'm looking for feedback on how well this checker works. > > It should process C++, Qt designer (.ui) and KConfigXT (.kcfg) files. > > So I added the test last night and have the following comments. > Nice, thanks for the feedback. > - The checker currently complains about QLabels not having tooltips or > whatsthis text. I'm not sure where the usability folks stands on this, > but it was my understanding that these extra bits of help information > should be added to control widgets, but not necessarily to the labels > describing them. Others may disagree, but I would recommend disabling > the check for QLabels. > I don't know if QLabels should be checked either. Any usability folks out there wish to comment? Should QLabels have tooltips/whatthis? > - The checker complains that widgets controlled by KConfigXT (named > "kcfg_*") are lacking tooltips and whatsthis text. Since these widgets > pull the tooltips and whatsthis text from the .kfcg, they're not set > explicitly in the C++ source. I would recommend disabling the check > for variables starting with "kcfg_". > I can do that, sure. > - My application has two .kcfg files, one is used in the traditional > sense to store application settings and to hook up to a settings > dialog. The other is used to define a custom filetype used by my game > to load store and load different rulesets. This second .kcfg file > contains no tooltip or whatsthis tags because it has no association > with any GUI. Is there a way to tell Krazy not to run a particular > check on a particular file? Or vice versa, to run a particular check > only on a particular file? I realise I could make this work by > splitting the files into separate directories and adding .krazy files > to each, but that seems a bit kludgy. > <!-- krazy:excludeall=tipsandthis --> > Anyway, I like the checker and I think it makes sense that one has to > opt-in. I hope the above is useful. > > Parker > > > P.S. Sorry that this email breaks threading, but I subscribed to the > list after the original email was sent, so I had to fake the reply. > > |
|
|
Re: Krazy Check for Missing toolTips and whatsThisOn Monday 08 September 2008 00:59:28 Allen Winter wrote:
> On Sunday 07 September 2008 11:00:22 Parker Coates wrote: > > On Tue, Sep 2, 2008 at 16:43, Allen Winter wrote: > > I don't know if QLabels should be checked either. > Any usability folks out there wish to comment? Should QLabels have > tooltips/whatthis? I think they shouldn't as QLabels usually are associated with another widget which will have the tooltip (I am not a usability folk though). > > - The checker complains that widgets controlled by KConfigXT (named > > "kcfg_*") are lacking tooltips and whatsthis text. Since these widgets > > pull the tooltips and whatsthis text from the .kfcg, they're not set > > explicitly in the C++ source. I would recommend disabling the check > > for variables starting with "kcfg_". "Since these widgets pull the tooltips and whatsthis text from the .kfcg" Is that so? I thought not, please check that info. As far as I know Tooltips and QWhatsThis are pulled from .ui files or directly from code but not from .kcfg files. Keep the check if I am true. Clarify if I am wrong. > I can do that, sure. Anne-Marie (welcoming this check!) |
|
|
Re: Krazy Check for Missing toolTips and whatsThisSorry for the delayed response; I was out of the country for a few weeks.
On Mon, Sep 8, 2008 at 07:16, Anne-Marie Mahfouf wrote: > I think they shouldn't as QLabels usually are associated with another widget > which will have the tooltip (I am not a usability folk though). Since no one has objected, can we remove the check for QLabels? Even if tooltips and whatthis help are required for QLabels, it should probably be the same text as the control widget they're labeling. If that were the case, we should come up with some (semi-) automatic way to copy the tooltip and whatsthis from the buddy to the label, instead of just duplicating the string in the code. > "Since these widgets pull the tooltips and whatsthis text from the .kfcg" > Is that so? I thought not, please check that info. > As far as I know Tooltips and QWhatsThis are pulled from .ui files or directly > from code but not from .kcfg files. > Keep the check if I am true. Clarify if I am wrong. It seems we'll have to split the cheque. It seems (in my application, at least) that the whatthis text IS pulled from the kcfg file, but the tooltip IS NOT. I knew it worked for the whatsthis and assumed it would work for the tooltips. If the whatthis text is set in both the code and the kcfg file, the code overrides the kcfg. I have no idea what the intended behaviour is though. It seems a bit silly to have to duplicate this information in both the code/UI and the kcfg file. Do any of the KConfig guys have any input? Parker |
|
|
Re: Krazy Check for Missing toolTips and whatsThisOn Sun, Sep 7, 2008 at 18:59, Allen Winter <winter@...> wrote:
> On Sunday 07 September 2008 11:00:22 Parker Coates wrote: >> Is there a way to tell Krazy not to run a particular >> check on a particular file? Or vice versa, to run a particular check >> only on a particular file? >> > Yep, anywhere in the .kcfg file put the comment line > <!-- krazy:excludeall=tipsandthis --> This didn't seem to work. See the rulesetbase.kcfg file in the kconfigxt section of http://www.englishbreakfastnetwork.org/krazy/reports/playground/games/killbots/index.html . Parker |
|
|
Re: Krazy Check for Missing toolTips and whatsThisOn Tue, Sep 23, 2008 at 10:56, Parker Coates <parker.coates@...> wrote:
> On Mon, Sep 8, 2008 at 07:16, Anne-Marie Mahfouf wrote: >> "Since these widgets pull the tooltips and whatsthis text from the .kfcg" >> Is that so? I thought not, please check that info. >> As far as I know Tooltips and QWhatsThis are pulled from .ui files or directly >> from code but not from .kcfg files. >> Keep the check if I am true. Clarify if I am wrong. > > It seems we'll have to split the cheque. It seems (in my application, > at least) that the whatthis text IS pulled from the kcfg file, but the > tooltip IS NOT. I knew it worked for the whatsthis and assumed it > would work for the tooltips. If the whatthis text is set in both the > code and the kcfg file, the code overrides the kcfg. > > I have no idea what the intended behaviour is though. It seems a bit > silly to have to duplicate this information in both the code/UI and > the kcfg file. Do any of the KConfig guys have any input? pulled from the kfcg file just the as the whatsthis text already is. If the tooltip has already been set in the UI file or the C++ code, it will not replaced. Is anyone opposed to me committing this? It seems like this must have been the original intention. Parker [kconfigxttooltips.diff] Index: kconfigdialogmanager.cpp =================================================================== --- kconfigdialogmanager.cpp (revision 868296) +++ kconfigdialogmanager.cpp (working copy) @@ -196,7 +196,16 @@ widget->setWhatsThis(whatsThis ); } } - + + if (widget->toolTip().isEmpty()) + { + QString toolTip = item->toolTip(); + if ( !toolTip.isEmpty() ) + { + widget->setToolTip(toolTip); + } + } + if(!item->isEqual( property(widget) )) setProperty( widget, item->property() ); } |
|
|
Re: Krazy Check for Missing toolTips and whatsThisOn Monday 06 October 2008 01:40:43 Parker Coates wrote:
> On Tue, Sep 23, 2008 at 10:56, Parker Coates <parker.coates@...> wrote: > > On Mon, Sep 8, 2008 at 07:16, Anne-Marie Mahfouf wrote: > >> "Since these widgets pull the tooltips and whatsthis text from the .kfcg" > >> Is that so? I thought not, please check that info. > >> As far as I know Tooltips and QWhatsThis are pulled from .ui files or directly > >> from code but not from .kcfg files. > >> Keep the check if I am true. Clarify if I am wrong. > > > > It seems we'll have to split the cheque. It seems (in my application, > > at least) that the whatthis text IS pulled from the kcfg file, but the > > tooltip IS NOT. I knew it worked for the whatsthis and assumed it > > would work for the tooltips. If the whatthis text is set in both the > > code and the kcfg file, the code overrides the kcfg. > > > > I have no idea what the intended behaviour is though. It seems a bit > > silly to have to duplicate this information in both the code/UI and > > the kcfg file. Do any of the KConfig guys have any input? > > The attached patch to KConfigDialogManager causes the tooltips to be > pulled from the kfcg file just the as the whatsthis text already is. > If the tooltip has already been set in the UI file or the C++ code, it > will not replaced. > > Is anyone opposed to me committing this? It seems like this must have > been the original intention. > |
|
|
Re: Krazy Check for Missing toolTips and whatsThisOn Tuesday 23 September 2008 10:56:38 Parker Coates wrote:
> Sorry for the delayed response; I was out of the country for a few weeks. > > On Mon, Sep 8, 2008 at 07:16, Anne-Marie Mahfouf wrote: > > I think they shouldn't as QLabels usually are associated with another widget > > which will have the tooltip (I am not a usability folk though). > > Since no one has objected, can we remove the check for QLabels? > Done. |
| Free Forum Powered by Nabble | Forum Help |