<br><br><div class="gmail_quote">On Tue, Jul 21, 2009 at 3:28 PM, Diego Casella ([Po]lentino) <span dir="ltr"><<a href="mailto:polentino911@gmail.com">polentino911@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote">On Mon, Jul 20, 2009 at 7:29 PM, Yuen Hoe Lim <span dir="ltr"><<a href="mailto:yuenhoe86@gmail.com" target="_blank">yuenhoe86@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yep, it doesn't seem to accept regular expressions - but a string<br>
containing every permitted character..<br>
<br>
<a href="http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKRestrictedLine.html#f30d883fc60f67be39e8ffa039842cd6" target="_blank">http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKRestrictedLine.html#f30d883fc60f67be39e8ffa039842cd6</a><br>
<br>
I've tried, and it actually does allow me to type every character in<br>
the expression (like '[' and '$') =/ It doesn't seem like a pretty<br>
thing to do 'qwertyQWERTY012345etcetc' so maybe we could try a regular<br>
KLineEdit and do some form of validation?</blockquote><div><br>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).<br>Help wanted from others. Guys?<br>
</div></div></blockquote><div><br>Sorry but yesterday morning I was @ university, and in the evening I compiled KDE 4.4 =P</div></div></blockquote><div> </div><div>You mean trunk, right? ;) <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div><br>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.<br>
The key point ( imo ) is that by typing:<br><br>
<p style="margin: 0px 0px 0px 40px; text-indent: 0px;">QRegExpValidator *pluginname_validator = new QRegExpValidator(ui->projectName);</p><p style="margin: 0px 0px 0px 40px; text-indent: 0px;"><br></p>you are simply telling to pluginname_validator "Hey, your parent is a QObject reference called projectName"; but also a QWidget<br>
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.<br>However, I removed all QRegExp* statement from setupWidgets(), and connected signals from
projectName to a slot I created to<br>parse the text and find unwanted characters. Let me know if it works !</div></div></blockquote><div><br>Yep, it works as expected. Also, I think now KRestrictedLine is not necessary now. So I've replaced it with KLineEdit to keep things simple.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div><br><br>P.S.: after upgrading to KDE4.4, PlasMate menu has changed: now it shows entries like "Game", "Edit", "Move", "View", "Go",<br>
and "Bookmarks", "Tools" O.o</div></div></blockquote><div> </div><div>No, that doesn't happen here. Maybe some problem with your installation.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div><br>The same problem appears with KTorrent.<br></div></div>
<br>_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Shantanu Tushar (UTC +0530)<br><a href="http://www.shantanutushar.com">http://www.shantanutushar.com</a><br>