forked from qt-creator/qt-creator
SerialTerminal: Modernize
modernize-* Change-Id: If7b19d7c560ecda5f6e519d88b7eab46d4eabccf Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -414,7 +414,7 @@ void SerialOutputPane::createToolButtons()
|
||||
void SerialOutputPane::updateLineEndingsComboBox()
|
||||
{
|
||||
m_lineEndingsSelection->clear();
|
||||
for (QPair<QString,QByteArray> value : m_settings.lineEndings)
|
||||
for (auto &value : m_settings.lineEndings)
|
||||
m_lineEndingsSelection->addItem(value.first, value.second);
|
||||
|
||||
m_lineEndingsSelection->setCurrentIndex(m_settings.defaultLineEndingIndex);
|
||||
@@ -520,7 +520,7 @@ void SerialOutputPane::contextMenuRequested(const QPoint &pos, int index)
|
||||
{
|
||||
QList<QAction *> actions { m_closeCurrentTabAction, m_closeAllTabsAction, m_closeOtherTabsAction };
|
||||
|
||||
QAction *action = QMenu::exec(actions, m_tabWidget->mapToGlobal(pos), 0, m_tabWidget);
|
||||
QAction *action = QMenu::exec(actions, m_tabWidget->mapToGlobal(pos), nullptr, m_tabWidget);
|
||||
const int currentIdx = index != -1 ? index : currentIndex();
|
||||
|
||||
if (action == m_closeCurrentTabAction) {
|
||||
|
||||
Reference in New Issue
Block a user