IRCView: convert to signal/slot connect based on member function pointer

parent 8867df47
......@@ -119,8 +119,8 @@ IRCView::IRCView(QWidget* parent) : QTextBrowser(parent), m_rememberLine(nullptr
document()->documentLayout()->registerHandler(IRCView::DateLine, &markerFormatObject);
connect(this, SIGNAL(anchorClicked(QUrl)), this, SLOT(anchorClicked(QUrl)));
connect( this, SIGNAL(highlighted(QString)), this, SLOT(highlightedSlot(QString)) );
connect(this, &IRCView::anchorClicked, this, &IRCView::handleAnchorClicked);
connect(this, QOverload<const QString&>::of(&IRCView::highlighted), this, &IRCView::highlightedSlot);
setOpenLinks(false);
setUndoRedoEnabled(0);
document()->setDefaultStyleSheet(QStringLiteral("a.nick:link {text-decoration: none}"));
......@@ -2122,7 +2122,7 @@ void IRCView::keyPressEvent(QKeyEvent* ev)
QTextBrowser::keyPressEvent(ev);
}
void IRCView::anchorClicked(const QUrl& url)
void IRCView::handleAnchorClicked(const QUrl& url)
{
openLink(url);
}
......
......@@ -214,7 +214,7 @@ class IRCView : public QTextBrowser
protected Q_SLOTS:
void highlightedSlot(const QString& link);
void anchorClicked(const QUrl& url);
void handleAnchorClicked(const QUrl& url);
protected:
void openLink(const QUrl &url);
......
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