--Boundary-00=_iZAiKoXXvXy6Jpc Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Am Friday 14 August 2009 schrieb Matthew Woehlke: > Forgetting the intricasies of appName, KMainWindow currently applies the > following sanitization to objectName(): > > > > This is wrong because it would allow the illegal characters '.' and '-' > to pass through. This should either be fixed, or else removed entirely > on the theory that objectName() can't be invalid to begin with. simple test* says: QObject::setObjectName() (unline the Qt designer ui editor) does /not/ restrict the object name *at all*, so the patch fixes a /real/ bug (and not just sanitizes a sane string sanitization) Therefore please apply it to prevent apps from running into this unnecessary assert. on anybodies worries: a) if you ever had such object name on a mainwindow it could have never been used w/o an assert exit b) if QChar::isLetter() wouldn't rank "_" as letter it would be replace by "_" anyway I however fear the other thread is the much more driving one. Thomas *code attached --Boundary-00=_iZAiKoXXvXy6Jpc Content-Type: text/x-c++src; charset="UTF-8"; name="objectnametest.cc" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="objectnametest.cc" #include #include main (int argc, char **argv) { if (argc < 2) qDebug() << "you forgot the object name"; else { QObject o; o.setObjectName(argv[1]); qDebug() << o.objectName(); } } --Boundary-00=_iZAiKoXXvXy6Jpc--