Skip to content
Snippets Groups Projects
Commit de64a463 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Designer plugin: Generate object names correctly.

stripping namespaces.
parent 718f8fa8
No related branches found
No related tags found
No related merge requests found
......@@ -127,8 +127,11 @@ template <class Widget>
{
const QString className = name();
QString rc;
// Name: 'QClass' -> 'class'
// Name: 'Namespace::QClass' -> 'class'
QString name = className;
const int lastColonPos = name.lastIndexOf(QLatin1Char(':'));
if (lastColonPos != -1)
name.remove(0, lastColonPos + 1);
if (name.startsWith(QLatin1Char('Q')))
name.remove(0, 1);
name[0] = name.at(0).toLower();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment