From aa7b36dbd1e3af6f0f3bd6324ee06c717d8d190f Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 7 Sep 2018 12:56:20 +0200 Subject: [PATCH] Removed debug output --- src/DockAreaWidget.cpp | 17 +++-------------- src/DockAreaWidget.h | 5 ----- src/DockContainerWidget.cpp | 2 -- src/DockManager.cpp | 1 - src/DockOverlay.cpp | 2 -- src/DockWidget.cpp | 3 --- src/DockWidgetTab.cpp | 2 +- src/FloatingDockContainer.cpp | 1 - 8 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index e4d8492..624ed6e 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -43,7 +43,6 @@ #include #include - #include "DockContainerWidget.h" #include "DockWidget.h" #include "FloatingDockContainer.h" @@ -51,8 +50,6 @@ #include "DockOverlay.h" #include "DockAreaTabBar.h" -#include - namespace ads { @@ -103,7 +100,7 @@ struct DockAreaWidgetPrivate /** * Convenience function to ease title widget access by index */ - CDockWidgetTab* titleWidgetAt(int index) + CDockWidgetTab* tabWidgetAt(int index) { return dockWidgetAt(index)->tabWidget(); } @@ -503,13 +500,6 @@ int CDockAreaWidget::index(CDockWidget* DockWidget) } -//============================================================================ -int CDockAreaWidget::tabIndex(CDockWidget* DockWidget) -{ - -} - - //============================================================================ QList CDockAreaWidget::dockWidgets() const { @@ -543,8 +533,8 @@ int CDockAreaWidget::indexOfContentByTitlePos(const QPoint& p, QWidget* exclude) { for (int i = 0; i < d->ContentsLayout->count(); ++i) { - auto TitleWidget = d->titleWidgetAt(i); - if (TitleWidget->geometry().contains(p) && (!exclude || TitleWidget != exclude)) + auto TabWidget = d->tabWidgetAt(i); + if (TabWidget->isVisible() && TabWidget->geometry().contains(p) && (!exclude || TabWidget != exclude)) { return i; } @@ -673,7 +663,6 @@ CDockWidget* CDockAreaWidget::nextOpenDockWidget(CDockWidget* DockWidget) const //============================================================================ void CDockAreaWidget::onTabsMenuAboutToShow() { - std::cout << "CDockAreaWidget::onTabsMenuAboutToShow()" << std::endl; d->updateTabsMenu(); } diff --git a/src/DockAreaWidget.h b/src/DockAreaWidget.h index aba05be..5a07155 100644 --- a/src/DockAreaWidget.h +++ b/src/DockAreaWidget.h @@ -118,11 +118,6 @@ protected: */ int index(CDockWidget* DockWidget); - /** - * Returns the tab index for the given dock widget - */ - int tabIndex(CDockWidget* DockWidget); - public: /** * Default Constructor diff --git a/src/DockContainerWidget.cpp b/src/DockContainerWidget.cpp index 9994354..a71aa37 100644 --- a/src/DockContainerWidget.cpp +++ b/src/DockContainerWidget.cpp @@ -30,8 +30,6 @@ //============================================================================ #include "DockContainerWidget.h" -#include - #include #include #include diff --git a/src/DockManager.cpp b/src/DockManager.cpp index be6d770..8abc7f4 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -31,7 +31,6 @@ #include #include "DockManager.h" -#include #include #include diff --git a/src/DockOverlay.cpp b/src/DockOverlay.cpp index deaf374..3dc81da 100644 --- a/src/DockOverlay.cpp +++ b/src/DockOverlay.cpp @@ -37,8 +37,6 @@ #include "DockAreaWidget.h" -#include - namespace ads { diff --git a/src/DockWidget.cpp b/src/DockWidget.cpp index 8e0c532..16db4d2 100644 --- a/src/DockWidget.cpp +++ b/src/DockWidget.cpp @@ -49,7 +49,6 @@ #include "DockSplitter.h" #include "ads_globals.h" -#include namespace ads { @@ -382,8 +381,6 @@ void CDockWidget::setToggleViewActionMode(eToggleViewActionMode Mode) //============================================================================ void CDockWidget::toggleView(bool Open) { - std::cout << "CDockWidget::toggleView " << objectName().toStdString() - << " " << Open << std::endl; QAction* Sender = qobject_cast(sender()); if (Sender == d->ToggleViewAction && !d->ToggleViewAction->isCheckable()) { diff --git a/src/DockWidgetTab.cpp b/src/DockWidgetTab.cpp index 28d3e23..486fd4f 100644 --- a/src/DockWidgetTab.cpp +++ b/src/DockWidgetTab.cpp @@ -251,7 +251,7 @@ void CDockWidgetTab::mouseReleaseEvent(QMouseEvent* ev) toIndex = d->DockArea->count() - 1; } qDebug() << "Move tab from " << fromIndex << " to " << toIndex; - //d->DockArea->reorderDockWidget(fromIndex, toIndex); + d->DockArea->reorderDockWidget(fromIndex, toIndex); } if (!d->DragStartMousePosition.isNull()) diff --git a/src/FloatingDockContainer.cpp b/src/FloatingDockContainer.cpp index 9155190..d170ace 100644 --- a/src/FloatingDockContainer.cpp +++ b/src/FloatingDockContainer.cpp @@ -43,7 +43,6 @@ #include "DockWidget.h" #include "DockOverlay.h" -#include namespace ads {