Plasma-devel Digest, Vol 13, Issue 55
Diego Casella ([Po]lentino)
polentino911 at gmail.com
Tue Jul 21 11:58:17 CEST 2009
> On Mon, Jul 20, 2009 at 7:29 PM, Yuen Hoe Lim <yuenhoe86 at gmail.com> wrote:
>
>> Yep, it doesn't seem to accept regular expressions - but a string
>> containing every permitted character..
>>
>>
>> http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKRestrictedLine.html#f30d883fc60f67be39e8ffa039842cd6
>>
>> I've tried, and it actually does allow me to type every character in
>> the expression (like '[' and '$') =/ It doesn't seem like a pretty
>> thing to do 'qwertyQWERTY012345etcetc' so maybe we could try a regular
>> KLineEdit and do some form of validation?
>
>
> For that we've to find out what characters make a valid project name (if
> there is a restriction as such, say, on name of a Plasmoid).
> Help wanted from others. Guys?
>
Sorry but yesterday morning I was @ university, and in the evening I
compiled KDE 4.4 =P
By the way today I had a look to the code, fixed ( seems it works fine,
however tell me if something is wrong ) and committed.
The key point ( imo ) is that by typing:
QRegExpValidator *pluginname_validator = new
QRegExpValidator(ui->projectName);
you are simply telling to pluginname_validator "Hey, your parent is a
QObject reference called projectName"; but also a QWidget
could be a valid parent, or a QString. It doesn't know how to parse a
regular expression with a given QObject reference, that's up to us.
However, I removed all QRegExp* statement from setupWidgets(), and connected
signals from projectName to a slot I created to
parse the text and find unwanted characters. Let me know if it works !
P.S.: after upgrading to KDE4.4, PlasMate menu has changed: now it shows
entries like "Game", "Edit", "Move", "View", "Go",
and "Bookmarks", "Tools" O.o
The same problem appears with KTorrent.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20090721/17039735/attachment.htm
More information about the Plasma-devel
mailing list