From 0a96b436d9845899888f7c7d153f0d9909ce4c06 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 3 Apr 2017 10:59:11 +0200 Subject: QQuickIcon: pass signal arguments This makes it possible for QQuickAbstractButton to sync its icon with the icon from QQuickAction by simply connecting signals to the setters. Change-Id: I6b944dd598d66389bdb06f4f2874aa813c1246c7 Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickicon.cpp | 10 +++++----- src/quicktemplates2/qquickicon_p.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickicon.cpp b/src/quicktemplates2/qquickicon.cpp index cebfd66f..cc513829 100644 --- a/src/quicktemplates2/qquickicon.cpp +++ b/src/quicktemplates2/qquickicon.cpp @@ -76,7 +76,7 @@ void QQuickIcon::setName(const QString &name) return; d->name = name; - emit nameChanged(); + emit nameChanged(name); } QString QQuickIcon::source() const @@ -92,7 +92,7 @@ void QQuickIcon::setSource(const QString &source) return; d->source = source; - emit sourceChanged(); + emit sourceChanged(source); } int QQuickIcon::width() const @@ -108,7 +108,7 @@ void QQuickIcon::setWidth(int width) return; d->width = width; - emit widthChanged(); + emit widthChanged(width); } int QQuickIcon::height() const @@ -124,7 +124,7 @@ void QQuickIcon::setHeight(int height) return; d->height = height; - emit heightChanged(); + emit heightChanged(height); } QColor QQuickIcon::color() const @@ -140,7 +140,7 @@ void QQuickIcon::setColor(const QColor &color) return; d->color = color; - emit colorChanged(); + emit colorChanged(color); } void QQuickIcon::resetColor() diff --git a/src/quicktemplates2/qquickicon_p.h b/src/quicktemplates2/qquickicon_p.h index 8dae6d25..d4790579 100644 --- a/src/quicktemplates2/qquickicon_p.h +++ b/src/quicktemplates2/qquickicon_p.h @@ -85,11 +85,11 @@ public: void resetColor(); Q_SIGNALS: - void nameChanged(); - void sourceChanged(); - void widthChanged(); - void heightChanged(); - void colorChanged(); + void nameChanged(const QString &name); + void sourceChanged(const QString &source); + void widthChanged(int width); + void heightChanged(int height); + void colorChanged(const QColor &color); private: Q_DISABLE_COPY(QQuickIcon) -- cgit v1.2.3