tests: Don't complain there's a leak if the FloatingWindow is being deleted already

This commit is contained in:
Sergio Martins
2020-10-10 20:50:28 +01:00
parent 7bfac091ae
commit 74148aabc3
3 changed files with 21 additions and 5 deletions

View File

@@ -84,7 +84,7 @@ Config::Flags Config::flags() const
void Config::setFlags(Flags f)
{
auto dr = DockRegistry::self();
if (!dr->isEmpty()) {
if (!dr->isEmpty(/*excludeBeingDeleted=*/ true)) {
qWarning() << Q_FUNC_INFO << "Only use this function at startup before creating any DockWidget or MainWindow"
<< "; These are already created: " << dr->mainWindowsNames()
<< dr->dockWidgetNames() << dr->floatingWindows();
@@ -138,7 +138,7 @@ int Config::separatorThickness() const
void Config::setSeparatorThickness(int value)
{
if (!DockRegistry::self()->isEmpty()) {
if (!DockRegistry::self()->isEmpty(/*excludeBeingDeleted=*/ true)) {
qWarning() << Q_FUNC_INFO << "Only use this function at startup before creating any DockWidget or MainWindow";
return;
}