[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KMainWindow/KAboutData allows invalid names
From:       Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date:       2009-08-10 22:27:58
Message-ID: 4A809EEE.7000904 () users ! sourceforge ! net
[Download RAW message or body]

Thomas Lübking wrote:
> On the one hand i'd say to sanitize this only where necessary, but on the 
> other hand sanitizing QCoreApplication::applicationName() ensures that the app 
> will internally (if not hardcoded...) not mismatch when e.g. trying to export 
> or access this value for dbus usage.
> 
> So i'd (slightly) rather handle this in KAboutData (i think this has to be set 
> for the major and almost only used KApplication c'tor anyway) and drop the 
> check in KMainWindow - but feel quite out of pos to decide this ;-)

Well it would help to keep this on k-c-d, which I think is the proper 
place ;-).

Also.... you need to read the code more closely :-). The dbus path is 
two parts, one which appears to be the class name of the KMainWindow 
(which in my example is the boring "MainWindow_1"), which is sanitized, 
and one which ultimately comes from KAboutData::appName. Given that, I 
wonder if the sanitizing in KMainWindow is actually needed (I don't know 
how you'd get non-identifier characters in there in the first place, but 
since the code exists I have to assume it is possible). However, whether 
or not appData is a valid identifier is a separate issue.

So KMainWindow should probably be fixed regardless of what we do with 
appData; might as well get the ball rolling:
http://reviewboard.kde.org/r/1261/

-- 
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
-- 
Never give up on learning
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic