diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-12-02 14:16:47 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-26 10:37:06 +0000 |
commit | bf4bf3a58360d4f7907895096b452cb3821ea593 (patch) | |
tree | 0a784f40986afb9c73aed2f5d13a2f554a09ce2e /examples/widgets/widgets/codeeditor | |
parent | e81acde7d0cf5fb44a3fb2cf0bf7aaa2c65f807e (diff) |
Cleanup Widgets examples - signals/slots
Cleanup the widgets examples - use new signal/slot syntax where possible
Change-Id: I6bc8953534d8b1efca0de4ee6a9fe4a6aa79fda9
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/widgets/widgets/codeeditor')
-rw-r--r-- | examples/widgets/widgets/codeeditor/codeeditor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/widgets/codeeditor/codeeditor.cpp b/examples/widgets/widgets/codeeditor/codeeditor.cpp index 7e56a75294..8e29860669 100644 --- a/examples/widgets/widgets/codeeditor/codeeditor.cpp +++ b/examples/widgets/widgets/codeeditor/codeeditor.cpp @@ -58,9 +58,9 @@ CodeEditor::CodeEditor(QWidget *parent) : QPlainTextEdit(parent) { lineNumberArea = new LineNumberArea(this); - connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth(int))); - connect(this, SIGNAL(updateRequest(QRect,int)), this, SLOT(updateLineNumberArea(QRect,int))); - connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlightCurrentLine())); + connect(this, &CodeEditor::blockCountChanged, this, &CodeEditor::updateLineNumberAreaWidth); + connect(this, &CodeEditor::updateRequest, this, &CodeEditor::updateLineNumberArea); + connect(this, &CodeEditor::cursorPositionChanged, this, &CodeEditor::highlightCurrentLine); updateLineNumberAreaWidth(0); highlightCurrentLine(); |