Commit 6d10a6f0 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Improve Go To Component

This improves the signals present in "Go To Component"
or "Add Signal Handler".
For some controls we have to offer property changed signal
handler as first options.
We simply hard code properties which are likely to be handled.

Change-Id: Ide26589534d6d058f1b60afcc6353c4f0340cb22
Reviewed-by: Tim Jenssen's avatarTim Jenssen <>
parent 0a340911
......@@ -55,6 +55,21 @@ QString AddSignalHandlerDialog::signal() const
return m_signal;
bool checkForPropertyChanges(const QString &signal)
static const QStringList importantProperties = {"pressed","position","value",
"text","currentText", "currentItem"};
if (!signal.endsWith("Changed"))
return true;
QString property = signal;
/* Some important property changes we keep */
return importantProperties.contains(property);
void AddSignalHandlerDialog::updateComboBox()
......@@ -62,12 +77,10 @@ void AddSignalHandlerDialog::updateComboBox()
if (m_ui->all->isChecked()) {
} else if (m_ui->properties->isChecked()) {
if (signal.contains(QLatin1String("Changed")))
} else {
if (!signal.contains(QLatin1String("Changed")))
if (signal.endsWith("Changed"))
} else if (checkForPropertyChanges(signal))
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