<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">&lt;<a href="mailto:yuenhoe86@gmail.com" target="_blank">yuenhoe86@gmail.com</a>&gt;</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&#39;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&#39;ve tried, and it actually does allow me to type every character in<br>
the expression (like &#39;[&#39; and &#39;$&#39;) =/ It doesn&#39;t seem like a pretty<br>
thing to do &#39;qwertyQWERTY012345etcetc&#39; so maybe we could try a regular<br>
KLineEdit and do some form of validation?</blockquote><div><br>For that we&#39;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<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>
<meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px 0px 0px 40px; text-indent: 0px;">QRegExpValidator *pluginname_validator = new QRegExpValidator(ui-&gt;projectName);</p><p style="margin: 0px 0px 0px 40px; text-indent: 0px;"><br></p>you are simply telling to pluginname_validator &quot;Hey, your parent is a QObject reference called projectName&quot;; but also a QWidget<br>
could be a valid parent, or a QString. It doesn&#39;t know how to parse a regular expression with a given QObject reference, that&#39;s up to us.<br>However, I removed all QRegExp* statement from setupWidgets(), and connected signals from 
<meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }</style>projectName to a slot I created to<br>parse the text and find unwanted characters. Let me know if it works !<br><br>P.S.: after upgrading to KDE4.4, PlasMate menu has changed: now it shows entries like &quot;Game&quot;, &quot;Edit&quot;, &quot;Move&quot;, &quot;View&quot;, &quot;Go&quot;,<br>
and &quot;Bookmarks&quot;, &quot;Tools&quot; O.o<br>The same problem appears with KTorrent.<br></div></div>