Commit d6e81eb4 authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppEditor: Emit member variable for qproperty refactoring

For a line like

    Q_PROPERTY(bool foo READ isFoo WRITE setFoo NOTIFY fooChanged)

the generated setter will now "emit fooChanged(m_foo)" instead of "emit
fooChanged(foo)".

Change-Id: I417607ea614bfde0aafa6de401ffa888daf37c4c
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent 1aaf840f
......@@ -4463,7 +4463,7 @@ public:
} else {
setter << "if (" << m_storageName << " == " << baseName << ")\nreturn;\n\n"
<< m_storageName << " = " << baseName << ";\nemit " << m_signalName
<< '(' << baseName << ");\n}\n";
<< '(' << m_storageName << ");\n}\n";
}
InsertionLocation setterLoc = locator.methodDeclarationInClass(file->fileName(), m_class, InsertionPointLocator::PublicSlot);
QTC_ASSERT(setterLoc.isValid(), return);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment