Fix several compiler warnings

* fix -Winconsistent-missing-override
* fix -Wunused-but-set-variable
* fix -Wunused-parameter
* fix -Wunused-lambda-capture
* fix -Wunused-private-field
* fix -Wpessimizing-move
This commit is contained in:
wmayer
2024-04-03 07:29:46 +02:00
committed by wwmayer
parent 4263ab1937
commit c96fd71e4f
9 changed files with 16 additions and 14 deletions

View File

@@ -803,8 +803,7 @@ void Application::createStandardOperations()
void Application::slotNewDocument(const App::Document& Doc, bool isMainDoc)
{
#ifdef FC_DEBUG
std::map<const App::Document*, Gui::Document*>::const_iterator it = d->documents.find(&Doc);
assert(it==d->documents.end());
assert(d->documents.find(&Doc) == d->documents.end());
#endif
auto pDoc = new Gui::Document(const_cast<App::Document*>(&Doc),this);
d->documents[&Doc] = pDoc;

View File

@@ -238,7 +238,7 @@ void WorkbenchTabWidget::buildPrefMenu()
menu->addSeparator();
QAction* preferencesAction = menu->addAction(tr("Preferences"));
connect(preferencesAction, &QAction::triggered, this, [this]() {
connect(preferencesAction, &QAction::triggered, this, []() {
Gui::Dialog::DlgPreferencesImp cDlg(getMainWindow());
cDlg.activateGroupPage(QString::fromUtf8("Workbenches"), 0);
cDlg.exec();