Removed debug output

This commit is contained in:
Uwe Kindler 2020-05-13 11:20:32 +02:00
parent 056e1ef947
commit 64a2024513

View File

@ -886,7 +886,6 @@ void CDockManager::onFocusObjectChanged(QObject *focusObject)
{ {
return; return;
} }
std::cout << "\n\nCDockManager::onFocusObjectChanged " << focusObject->metaObject()->className() << std::endl;
auto FocusWidget = qobject_cast<QWidget*>(focusObject); auto FocusWidget = qobject_cast<QWidget*>(focusObject);
if (!FocusWidget) if (!FocusWidget)
@ -900,18 +899,14 @@ void CDockManager::onFocusObjectChanged(QObject *focusObject)
if (DockWidgetTab) if (DockWidgetTab)
{ {
DockWidget = DockWidgetTab->dockWidget(); DockWidget = DockWidgetTab->dockWidget();
std::cout << "TabText: " << DockWidgetTab->text().toStdString() << std::endl;
} }
else else
{ {
DockWidget = internal::findParent<CDockWidget*>(FocusWidget); DockWidget = internal::findParent<CDockWidget*>(FocusWidget);
} }
std::cout << "Focus Object " << focusObject->objectName().toStdString()
<< " meta: " << focusObject->metaObject()->className() << std::endl;
if (!DockWidget) if (!DockWidget)
{ {
std::cout << "!DockWidget" << std::endl;
return; return;
} }
@ -919,16 +914,15 @@ void CDockManager::onFocusObjectChanged(QObject *focusObject)
CDockAreaWidget* NewFocusedDockArea = nullptr; CDockAreaWidget* NewFocusedDockArea = nullptr;
if (d->FocusedDockWidget) if (d->FocusedDockWidget)
{ {
std::cout << "focuse = false: " << d->FocusedDockWidget->objectName().toStdString() << std::endl;
d->FocusedDockWidget->setProperty("focused", false); d->FocusedDockWidget->setProperty("focused", false);
d->FocusedDockWidget->tabWidget()->setProperty("focused", false); d->FocusedDockWidget->tabWidget()->setProperty("focused", false);
DockWidgets.append(d->FocusedDockWidget); DockWidgets.append(d->FocusedDockWidget);
} }
d->FocusedDockWidget = DockWidget; d->FocusedDockWidget = DockWidget;
std::cout << "d->FocusedDockWidget " << d->FocusedDockWidget->objectName().toStdString() << std::endl;
d->FocusedDockWidget->setProperty("focused", true); d->FocusedDockWidget->setProperty("focused", true);
d->FocusedDockWidget->tabWidget()->setProperty("focused", true); d->FocusedDockWidget->tabWidget()->setProperty("focused", true);
connect(d->FocusedDockWidget, SIGNAL(closed()), this, SLOT(onFocusedDockWidgetClosed())); //connect(d->FocusedDockWidget, SIGNAL(closed()), this, SLOT(onFocusedDockWidgetClosed()));
NewFocusedDockArea = d->FocusedDockWidget->dockAreaWidget(); NewFocusedDockArea = d->FocusedDockWidget->dockAreaWidget();
if (NewFocusedDockArea) if (NewFocusedDockArea)
{ {
@ -944,19 +938,16 @@ void CDockManager::onFocusObjectChanged(QObject *focusObject)
if (!NewFocusedDockArea || (d->FocusedArea == NewFocusedDockArea)) if (!NewFocusedDockArea || (d->FocusedArea == NewFocusedDockArea))
{ {
std::cout << "d->FocusedArea == NewFocusedDockArea" << std::endl;
return; return;
} }
if (d->FocusedArea) if (d->FocusedArea)
{ {
std::cout << "Repolish OldFocusedDockArea" << std::endl;
d->FocusedArea->setProperty("focused", false); d->FocusedArea->setProperty("focused", false);
internal::repolishStyle(d->FocusedArea); internal::repolishStyle(d->FocusedArea);
internal::repolishStyle(d->FocusedArea->titleBar()); internal::repolishStyle(d->FocusedArea->titleBar());
} }
std::cout << "Repolish NewFocusedDockArea" << std::endl;
NewFocusedDockArea->setProperty("focused", true); NewFocusedDockArea->setProperty("focused", true);
internal::repolishStyle(NewFocusedDockArea); internal::repolishStyle(NewFocusedDockArea);
internal::repolishStyle(NewFocusedDockArea->titleBar()); internal::repolishStyle(NewFocusedDockArea->titleBar());