diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-31 13:53:29 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-31 14:21:15 +0000 |
commit | af38340720aa26ce95ceae661e3fd1dfc2770195 (patch) | |
tree | dc8bdd90fc73e95f87a9aa4e6733a593b7932c6e /examples/widgets/itemviews/basicsortfiltermodel/window.cpp | |
parent | 7b72cc205ccd3e568b59a32a5cd751bd62b42e94 (diff) |
Port examples/widgets/itemviews to new connection syntax.
Rename some slots to avoid ugly casts.
Change-Id: I5d7b2c044ab6a725f7259e5e34f00c3d06fff050
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'examples/widgets/itemviews/basicsortfiltermodel/window.cpp')
-rw-r--r-- | examples/widgets/itemviews/basicsortfiltermodel/window.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/examples/widgets/itemviews/basicsortfiltermodel/window.cpp b/examples/widgets/itemviews/basicsortfiltermodel/window.cpp index b518460230..0f5a434bcc 100644 --- a/examples/widgets/itemviews/basicsortfiltermodel/window.cpp +++ b/examples/widgets/itemviews/basicsortfiltermodel/window.cpp @@ -77,16 +77,18 @@ Window::Window() filterColumnLabel = new QLabel(tr("Filter &column:")); filterColumnLabel->setBuddy(filterColumnComboBox); - connect(filterPatternLineEdit, SIGNAL(textChanged(QString)), - this, SLOT(filterRegExpChanged())); - connect(filterSyntaxComboBox, SIGNAL(currentIndexChanged(int)), - this, SLOT(filterRegExpChanged())); - connect(filterColumnComboBox, SIGNAL(currentIndexChanged(int)), - this, SLOT(filterColumnChanged())); - connect(filterCaseSensitivityCheckBox, SIGNAL(toggled(bool)), - this, SLOT(filterRegExpChanged())); - connect(sortCaseSensitivityCheckBox, SIGNAL(toggled(bool)), - this, SLOT(sortChanged())); + connect(filterPatternLineEdit, &QLineEdit::textChanged, + this, &Window::filterRegExpChanged); + + typedef void (QComboBox::*QComboIntSignal)(int); + connect(filterSyntaxComboBox, static_cast<QComboIntSignal>(&QComboBox::currentIndexChanged), + this, &Window::filterRegExpChanged); + connect(filterColumnComboBox, static_cast<QComboIntSignal>(&QComboBox::currentIndexChanged), + this, &Window::filterColumnChanged); + connect(filterCaseSensitivityCheckBox, &QAbstractButton::toggled, + this, &Window::filterRegExpChanged); + connect(sortCaseSensitivityCheckBox, &QAbstractButton::toggled, + this, &Window::sortChanged); sourceGroupBox = new QGroupBox(tr("Original Model")); proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model")); |