Fixed clazy warnings: new-style signal/slot connect syntax.

This commit is contained in:
Mat Sutcliffe
2018-12-19 18:42:47 +00:00
parent 26376a5fa1
commit fc23a25ce1
4 changed files with 7 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ namespace BlackGui
void CConsoleTextEdit::customMenuRequested(const QPoint &pos)
{
QMenu *menu = QPlainTextEdit::createStandardContextMenu();
menu->addAction(CIcons::delete16(), "Clear console", this, SLOT(clear()));
menu->addAction(CIcons::delete16(), "Clear console", this, &QPlainTextEdit::clear);
menu->exec(this->mapToGlobal(pos));
}

View File

@@ -349,7 +349,7 @@ namespace BlackGui
a = contextMenu->addAction(CIcons::resize16(), "2 columns", this, &CNavigatorDialog::changeLayout);
a->setData("2c");
const QString frameLessActionText = this->isFrameless() ? "Normal window" : "Frameless";
contextMenu->addAction(CIcons::tableSheet16(), frameLessActionText, this, SLOT(toggleFrameless()));
contextMenu->addAction(CIcons::tableSheet16(), frameLessActionText, this, &CNavigatorDialog::toggleFrameless);
contextMenu->addAction("Adjust margins", this, &CNavigatorDialog::dummyFunction);
contextMenu->addAction(m_marginMenuAction);
contextMenu->addSeparator();

View File

@@ -124,7 +124,7 @@ namespace BlackGui
toggleFloatingMenuAction->setCheckable(true);
toggleFloatingMenuAction->setChecked(!dw->isFloating());
subMenuToggleFloat->addAction(toggleFloatingMenuAction);
c = connect(toggleFloatingMenuAction, SIGNAL(toggled(bool)), signalMapperToggleFloating, SLOT(map()));
c = connect(toggleFloatingMenuAction, &QAction::toggled, signalMapperToggleFloating, qOverload<>(&QSignalMapper::map));
BLACK_VERIFY_X(c, Q_FUNC_INFO, "Cannot map floating action"); // do not make that shutdown reason in a release build
signalMapperToggleFloating->setMapping(toggleFloatingMenuAction, i);
}
@@ -160,7 +160,7 @@ namespace BlackGui
connect(showTabbar, &QAction::toggled, this, &CInfoArea::showTabBar);
// tab bar position
menu->addAction(CIcons::dockBottom16(), "Toogle tabbar position", this, SLOT(toggleTabBarPosition()));
menu->addAction(CIcons::dockBottom16(), "Toogle tabbar position", this, &CInfoArea::toggleTabBarPosition);
Q_UNUSED(c);
}
}