Skip to content

Warnings as error#1213

Merged
alxvth merged 12 commits intomasterfrom
feature/WarningsAsError
Mar 9, 2026
Merged

Warnings as error#1213
alxvth merged 12 commits intomasterfrom
feature/WarningsAsError

Conversation

@alxvth
Copy link
Copy Markdown
Contributor

@alxvth alxvth commented Mar 4, 2026

Let's compile with /W3 warnings as errors on MSVC (with /WX). This will help prevent subtle errors, and we are pretty much warning-free on this level already anyways. I guarded this compile setting behind a CMake option MV_WARNINGS_AS_ERRORS which is ON by default.

This PR also fixes the last couple of warnings, which are all deprecation warnings:

  • warning C4996: 'QtLiterals::operator ""_qs': Use _s from Qt::StringLiterals namespace instead
  • warning C4996: 'mv::ProjectMetaAction::getSplashScreenAction': Replaced by application-wide splash screen customization
    • use Application::current()->getConfigurationAction().getBrandingConfigurationAction().getSplashScreenAction() instead
  • warning C4996: 'ads::CDockWidget::CDockWidget': was declared deprecated
    • CDockWidget(const QString&, QWidget*) is deprecated, but internally just calls the other available constructor CDockWidget(CDockManager*, const QString&, QWidget*). We can do the same.
  • warning C4996: 'mv::gui::WebWidget::[thunk]: __cdecl mv::gui::WebWidget::vcall'{360,{flat}}' }'': was declared deprecated

Drive-by:

  • In Project::fromVariantMap and Project::toVariantMap call _projectMetaAction.fromVariantMap(variantMap) and _projectMetaAction.insertIntoVariantMap(variantMap) instead of manually seralizing
  • Do not skip the GroupAction serialization in ProjectMetaAction's serialization

@alxvth alxvth marked this pull request as ready for review March 5, 2026 08:11
Copy link
Copy Markdown
Contributor

@ThomasKroes ThomasKroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can observe, this change does not introduce any regressions. I tested the following scenarios:

  • Opening existing projects
  • Saving project A and reopening it in a new ManiVault session
  • Creating a blank project and adding various (view) plugins
  • Changing global settings

@alxvth alxvth merged commit 1f0edd4 into master Mar 9, 2026
8 checks passed
@alxvth alxvth deleted the feature/WarningsAsError branch March 9, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants