Commit 41b8f742 authored by Carlos Alves's avatar Carlos Alves
Browse files

Use Q_EMIT instead of emit

Continuing Ahmad Samir MR: !343
In C++20 there are new classes that have member functions named
emit().
parent 52a9df57
......@@ -569,7 +569,7 @@ void Vt102Emulation::processToken(int token, int p, int q)
case token_ctl('D' ) : /* EOT: ignored */ break;
case token_ctl('E' ) : reportAnswerBack ( ); break; //VT100
case token_ctl('F' ) : /* ACK: ignored */ break;
case token_ctl('G' ) : emit bell();
case token_ctl('G' ) : Q_EMIT bell();
break; //VT100
case token_ctl('H' ) : _currentScreen->backspace ( ); break; //VT100
case token_ctl('I' ) : _currentScreen->tab ( ); break; //VT100
......@@ -657,7 +657,7 @@ void Vt102Emulation::processToken(int token, int p, int q)
break;
// change tab text color : \e[28;<color>t color: 0-16,777,215
case token_csi_ps('t', 28) : emit changeTabTextColorRequest ( p ); break;
case token_csi_ps('t', 28) : Q_EMIT changeTabTextColorRequest ( p ); break;
case token_csi_ps('K', 0) : _currentScreen->clearToEndOfLine ( ); break;
case token_csi_ps('K', 1) : _currentScreen->clearToBeginOfLine ( ); break;
......@@ -925,14 +925,14 @@ void Vt102Emulation::processToken(int token, int p, int q)
// Set Cursor Style (DECSCUSR), VT520, with the extra xterm sequences
// the first one is a special case, 'ESC[ q', which mimics 'ESC[1 q'
// Using 0 to reset to default is matching VTE, but not any official standard.
case token_csi_sp ('q' ) : emit setCursorStyleRequest(Enum::BlockCursor, true); break;
case token_csi_psp('q', 0) : emit resetCursorStyleRequest(); break;
case token_csi_psp('q', 1) : emit setCursorStyleRequest(Enum::BlockCursor, true); break;
case token_csi_psp('q', 2) : emit setCursorStyleRequest(Enum::BlockCursor, false); break;
case token_csi_psp('q', 3) : emit setCursorStyleRequest(Enum::UnderlineCursor, true); break;
case token_csi_psp('q', 4) : emit setCursorStyleRequest(Enum::UnderlineCursor, false); break;
case token_csi_psp('q', 5) : emit setCursorStyleRequest(Enum::IBeamCursor, true); break;
case token_csi_psp('q', 6) : emit setCursorStyleRequest(Enum::IBeamCursor, false); break;
case token_csi_sp ('q' ) : Q_EMIT setCursorStyleRequest(Enum::BlockCursor, true); break;
case token_csi_psp('q', 0) : Q_EMIT resetCursorStyleRequest(); break;
case token_csi_psp('q', 1) : Q_EMIT setCursorStyleRequest(Enum::BlockCursor, true); break;
case token_csi_psp('q', 2) : Q_EMIT setCursorStyleRequest(Enum::BlockCursor, false); break;
case token_csi_psp('q', 3) : Q_EMIT setCursorStyleRequest(Enum::UnderlineCursor, true); break;
case token_csi_psp('q', 4) : Q_EMIT setCursorStyleRequest(Enum::UnderlineCursor, false); break;
case token_csi_psp('q', 5) : Q_EMIT setCursorStyleRequest(Enum::IBeamCursor, true); break;
case token_csi_psp('q', 6) : Q_EMIT setCursorStyleRequest(Enum::IBeamCursor, false); break;
//FIXME: weird DEC reset sequence
case token_csi_pe('p' ) : /* IGNORED: reset ( ) */ break;
......
......@@ -675,7 +675,7 @@ void TerminalDisplay::updateImage()
}
if (_scrollBar->highlightScrolledLines().isEnabled()) {
dirtyRegion |= emit highlightScrolledLinesRegion(dirtyRegion.isEmpty(), _scrollBar);
dirtyRegion |= Q_EMIT highlightScrolledLinesRegion(dirtyRegion.isEmpty(), _scrollBar);
}
_screenWindow->resetScrollCount();
......@@ -2758,7 +2758,7 @@ void TerminalDisplay::dropEvent(QDropEvent* event)
// plus an additional Paste option.
QAction* pasteAction = new QAction(i18n("&Paste Location"), this);
connect(pasteAction, &QAction::triggered, this, [this, dropText]{ emit sendStringToEmu(dropText.toLocal8Bit());} );
connect(pasteAction, &QAction::triggered, this, [this, dropText]{ Q_EMIT sendStringToEmu(dropText.toLocal8Bit());} );
QList<QAction*> additionalActions;
additionalActions.append(pasteAction);
......
......@@ -76,7 +76,7 @@ TabbedViewContainer::TabbedViewContainer(ViewManager *connectedViewManager, QWid
connect(tabBarWidget, &DetachableTabBar::closeTab,
this, &TabbedViewContainer::closeTerminalTab);
connect(tabBarWidget, &DetachableTabBar::newTabRequest,
this, [this]{ emit newViewRequest(); });
this, [this]{ Q_EMIT newViewRequest(); });
connect(this, &TabbedViewContainer::currentChanged, this, &TabbedViewContainer::currentTabChanged);
connect(this, &TabbedViewContainer::setColor, tabBarWidget, &DetachableTabBar::setColor);
......@@ -99,7 +99,7 @@ TabbedViewContainer::TabbedViewContainer(ViewManager *connectedViewManager, QWid
auto detachAction = _contextPopupMenu->addAction(
QIcon::fromTheme(QStringLiteral("tab-detach")),
i18nc("@action:inmenu", "&Detach Tab"), this,
[this] { emit detachTab(_contextMenuTabIndex); }
[this] { Q_EMIT detachTab(_contextMenuTabIndex); }
);
detachAction->setObjectName(QStringLiteral("tab-detach"));
......
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