From b1309da89a43f9dfb1ac23f240ff090ad70a7539 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 12 Jul 2019 10:37:14 +0200 Subject: [PATCH] Some changes to fix build for windows --- src/DockAreaTitleBar.cpp | 2 +- src/DockOverlay.cpp | 6 +++--- src/FloatingDockContainer.cpp | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/DockAreaTitleBar.cpp b/src/DockAreaTitleBar.cpp index 99c81ee..150b0cc 100644 --- a/src/DockAreaTitleBar.cpp +++ b/src/DockAreaTitleBar.cpp @@ -99,7 +99,7 @@ struct DockAreaTitleBarPrivate } /** - * Helper class to set title bar burron icons depending on operating system + * Helper class to set title bar button icons depending on operating system * and to avoid duplicated code */ void setTitleBarButtonIcon(tTileBarButton* Button, QStyle::StandardPixmap StandarPixmap) diff --git a/src/DockOverlay.cpp b/src/DockOverlay.cpp index 896de27..5423d80 100644 --- a/src/DockOverlay.cpp +++ b/src/DockOverlay.cpp @@ -137,7 +137,7 @@ struct DockOverlayCrossPrivate * Helper function that returns the drop indicator width depending on the * operating system */ - qreal dropIndicatiorWidth() const + qreal dropIndicatiorWidth(QLabel* l) const { #ifdef Q_OS_LINUX return 40; @@ -154,7 +154,7 @@ struct DockOverlayCrossPrivate QLabel* l = new QLabel(); l->setObjectName("DockWidgetAreaLabel"); - const qreal metric = dropIndicatiorWidth(); + const qreal metric = dropIndicatiorWidth(l); const QSizeF size(metric, metric); l->setPixmap(createHighDpiDropIndicatorPixmap(size, DockWidgetArea, Mode)); @@ -168,7 +168,7 @@ struct DockOverlayCrossPrivate void updateDropIndicatorIcon(QWidget* DropIndicatorWidget) { QLabel* l = qobject_cast(DropIndicatorWidget); - const qreal metric = dropIndicatiorWidth(); + const qreal metric = dropIndicatiorWidth(l); const QSizeF size(metric, metric); int Area = l->property("dockWidgetArea").toInt(); diff --git a/src/FloatingDockContainer.cpp b/src/FloatingDockContainer.cpp index 9efa8a3..2603f74 100644 --- a/src/FloatingDockContainer.cpp +++ b/src/FloatingDockContainer.cpp @@ -38,8 +38,6 @@ #include #include #include -#include -#include #include "DockContainerWidget.h" #include "DockAreaWidget.h" @@ -52,8 +50,6 @@ #include #endif -#include - namespace ads { @@ -71,8 +67,10 @@ struct FloatingDockContainerPrivate QPoint DragStartMousePosition; CDockContainerWidget* DropContainer = nullptr; CDockAreaWidget* SingleDockArea = nullptr; +#ifdef Q_OS_LINUX QWidget* MouseEventHandler = nullptr; CFloatingWidgetTitleBar* TitleBar = nullptr; +#endif /** * Private data constructor @@ -257,6 +255,7 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager* DockManager) : l->setContentsMargins(0, 0, 0, 0); l->setSpacing(0); setLayout(l); + l->addWidget(d->DockContainer); #endif DockManager->registerFloatingWidget(this); @@ -494,6 +493,9 @@ bool CFloatingDockContainer::eventFilter(QObject *watched, QEvent *event) void CFloatingDockContainer::startFloating(const QPoint& DragStartMousePos, const QSize& Size, eDragState DragState, QWidget* MouseEventHandler) { +#ifndef Q_OS_LINUX + Q_UNUSED(MouseEventHandler) +#endif resize(Size); d->setState(DragState); d->DragStartMousePosition = DragStartMousePos; @@ -617,7 +619,7 @@ QList CFloatingDockContainer::dockWidgets() const //============================================================================ void CFloatingDockContainer::finishDragging() { - std::cout << "CFloatingDockContainer::finishDragging" << std::endl; + qDebug() << "CFloatingDockContainer::finishDragging"; #ifdef Q_OS_LINUX setAttribute(Qt::WA_X11NetWmWindowTypeDock, false); setWindowOpacity(1);