Commit e349fb48 authored by Andrew Knight's avatar Andrew Knight

Improve property offering in Utils::PathChooser

Add notifier to path property.
Add promptDialogFilter to property list.

Change-Id: Ic0e5dbdc1a2c1ac64477baeee5f55bc4416bc526
Reviewed-by: default avatarFriedemann Kleint <>
parent c32db575
......@@ -246,6 +246,7 @@ PathChooser::PathChooser(QWidget *parent) :
connect(d->m_lineEdit, SIGNAL(validChanged()), this, SIGNAL(validChanged()));
connect(d->m_lineEdit, SIGNAL(validChanged(bool)), this, SIGNAL(validChanged(bool)));
connect(d->m_lineEdit, SIGNAL(editingFinished()), this, SIGNAL(editingFinished()));
connect(d->m_lineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotTextChanged()));
......@@ -421,6 +422,11 @@ void PathChooser::slotBrowse()
void PathChooser::slotTextChanged()
emit pathChanged(path());
bool PathChooser::isValid() const
return d->m_lineEdit->isValid();
......@@ -50,8 +50,9 @@ class QTCREATOR_UTILS_EXPORT PathChooser : public QWidget
Q_PROPERTY(QString path READ path WRITE setPath DESIGNABLE true)
Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged DESIGNABLE true)
Q_PROPERTY(QString promptDialogTitle READ promptDialogTitle WRITE setPromptDialogTitle DESIGNABLE true)
Q_PROPERTY(QString promptDialogFilter READ promptDialogFilter WRITE setPromptDialogFilter DESIGNABLE true)
Q_PROPERTY(Kind expectedKind READ expectedKind WRITE setExpectedKind DESIGNABLE true)
Q_PROPERTY(QString baseDirectory READ baseDirectory WRITE setBaseDirectory DESIGNABLE true)
Q_PROPERTY(QStringList commandVersionArguments READ commandVersionArguments WRITE setCommandVersionArguments)
......@@ -139,6 +140,7 @@ signals:
void validChanged();
void validChanged(bool validState);
void changed(const QString &text);
void pathChanged(const QString &path);
void editingFinished();
void beforeBrowsing();
void browsingFinished();
......@@ -150,6 +152,7 @@ public slots:
private slots:
void slotBrowse();
void slotTextChanged();
PathChooserPrivate *d;
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