mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 10:25:36 +08:00
Fixed clazy warnings: new-style signal/slot connect syntax.
This commit is contained in:
@@ -42,7 +42,7 @@ namespace BlackGui
|
|||||||
void CConsoleTextEdit::customMenuRequested(const QPoint &pos)
|
void CConsoleTextEdit::customMenuRequested(const QPoint &pos)
|
||||||
{
|
{
|
||||||
QMenu *menu = QPlainTextEdit::createStandardContextMenu();
|
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));
|
menu->exec(this->mapToGlobal(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ namespace BlackGui
|
|||||||
a = contextMenu->addAction(CIcons::resize16(), "2 columns", this, &CNavigatorDialog::changeLayout);
|
a = contextMenu->addAction(CIcons::resize16(), "2 columns", this, &CNavigatorDialog::changeLayout);
|
||||||
a->setData("2c");
|
a->setData("2c");
|
||||||
const QString frameLessActionText = this->isFrameless() ? "Normal window" : "Frameless";
|
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("Adjust margins", this, &CNavigatorDialog::dummyFunction);
|
||||||
contextMenu->addAction(m_marginMenuAction);
|
contextMenu->addAction(m_marginMenuAction);
|
||||||
contextMenu->addSeparator();
|
contextMenu->addSeparator();
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ namespace BlackGui
|
|||||||
toggleFloatingMenuAction->setCheckable(true);
|
toggleFloatingMenuAction->setCheckable(true);
|
||||||
toggleFloatingMenuAction->setChecked(!dw->isFloating());
|
toggleFloatingMenuAction->setChecked(!dw->isFloating());
|
||||||
subMenuToggleFloat->addAction(toggleFloatingMenuAction);
|
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
|
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);
|
signalMapperToggleFloating->setMapping(toggleFloatingMenuAction, i);
|
||||||
}
|
}
|
||||||
@@ -160,7 +160,7 @@ namespace BlackGui
|
|||||||
connect(showTabbar, &QAction::toggled, this, &CInfoArea::showTabBar);
|
connect(showTabbar, &QAction::toggled, this, &CInfoArea::showTabBar);
|
||||||
|
|
||||||
// tab bar position
|
// 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);
|
Q_UNUSED(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,11 +60,11 @@ void CSwiftData::initDynamicMenus()
|
|||||||
{
|
{
|
||||||
Q_ASSERT_X(ui->comp_MainInfoArea, Q_FUNC_INFO, "Missing main info area");
|
Q_ASSERT_X(ui->comp_MainInfoArea, Q_FUNC_INFO, "Missing main info area");
|
||||||
Q_ASSERT_X(ui->comp_MainInfoArea->getDataInfoAreaComponent(), Q_FUNC_INFO, "Missing DB info area");
|
Q_ASSERT_X(ui->comp_MainInfoArea->getDataInfoAreaComponent(), Q_FUNC_INFO, "Missing DB info area");
|
||||||
ui->menu_Mapping->addAction(CIcons::database16(), "Load all DB data", ui->comp_MainInfoArea->getDataInfoAreaComponent(), SLOT(requestUpdateOfAllDbData()));
|
ui->menu_Mapping->addAction(CIcons::database16(), "Load all DB data", ui->comp_MainInfoArea->getDataInfoAreaComponent(), &CDataInfoAreaComponent::requestUpdateOfAllDbData);
|
||||||
ui->menu_Mapping->addAction(CIcons::load16(), "Load DB test data from disk", ui->comp_MainInfoArea->getDataInfoAreaComponent(), SLOT(readDbDataFromResourceDir()));
|
ui->menu_Mapping->addAction(CIcons::load16(), "Load DB test data from disk", ui->comp_MainInfoArea->getDataInfoAreaComponent(), &CDataInfoAreaComponent::readDbDataFromResourceDir);
|
||||||
if (sGui->isDeveloperFlagSet())
|
if (sGui->isDeveloperFlagSet())
|
||||||
{
|
{
|
||||||
ui->menu_Mapping->addAction(CIcons::save16(), "Save DB test data to disk", ui->comp_MainInfoArea->getDataInfoAreaComponent(), SLOT(writeDbDataToResourceDir()));
|
ui->menu_Mapping->addAction(CIcons::save16(), "Save DB test data to disk", ui->comp_MainInfoArea->getDataInfoAreaComponent(), &CDataInfoAreaComponent::writeDbDataToResourceDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user