qtquick: Don't create two main windows with the same name

This commit is contained in:
Sergio Martins
2021-04-05 14:48:51 +01:00
parent c804c806e1
commit 548e38fca0

View File

@@ -61,10 +61,10 @@ void MainWindowInstantiator::componentComplete()
return;
}
// if (DockRegistry::self()->contains(m_uniqueName)) {
// Dock widget already exists. all good.
// return;
//}
if (DockRegistry::self()->containsMainWindow(m_uniqueName)) {
// MainWindow already exists
return;
}
if (m_uniqueName.isEmpty()) {
qWarning() << Q_FUNC_INFO << "Name can't be empty";