summaryrefslogtreecommitdiff
path: root/src/libs/utils/pathchooser.h
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-04-30 15:22:57 +0200
committerhjk <hjk@theqtcompany.com>2015-05-07 11:20:19 +0000
commit5b7e8f42c1bc063a744d736deec30a35458bff5f (patch)
treefae9fd0588aca8336149ae36d9960e135e60091c /src/libs/utils/pathchooser.h
parent9ff6cfdde4a512acc55aafe0c91ebc28f9e99cc2 (diff)
downloadqt-creator-5b7e8f42c1bc063a744d736deec30a35458bff5f.tar.gz
PathChooser: Use a std::function as callback
... instead of a SLOT(...) Change-Id: I32ed3ea014d1efde54bac2d5153f3083e37ef7ec Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/libs/utils/pathchooser.h')
-rw-r--r--src/libs/utils/pathchooser.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libs/utils/pathchooser.h b/src/libs/utils/pathchooser.h
index 04c5c72df4..64beffa91a 100644
--- a/src/libs/utils/pathchooser.h
+++ b/src/libs/utils/pathchooser.h
@@ -115,8 +115,8 @@ public:
/** Return the home directory, which needs some fixing under Windows. */
static QString homePath();
- void addButton(const QString &text, QObject *receiver, const char *slotFunc);
- void insertButton(int index, const QString &text, QObject *receiver, const char *slotFunc);
+ void addButton(const QString &text, QObject *context, const std::function<void()> &callback);
+ void insertButton(int index, const QString &text, QObject *context, const std::function<void()> &callback);
QAbstractButton *buttonAtIndex(int index) const;
FancyLineEdit *lineEdit() const;
@@ -144,6 +144,7 @@ private:
bool validatePath(FancyLineEdit *edit, QString *errorMessage) const;
// Returns overridden title or the one from <title>
QString makeDialogTitle(const QString &title);
+ void slotBrowse();
signals:
void validChanged(bool validState);
@@ -158,10 +159,6 @@ public slots:
void setPath(const QString &);
void setFileName(const Utils::FileName &);
-private slots:
- void slotBrowse();
- void slotTextChanged();
-
private:
PathChooserPrivate *d;
};