Skip to content

Commit b1309da

Browse files
Some changes to fix build for windows
1 parent d2f751e commit b1309da

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/DockAreaTitleBar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ struct DockAreaTitleBarPrivate
9999
}
100100

101101
/**
102-
* Helper class to set title bar burron icons depending on operating system
102+
* Helper class to set title bar button icons depending on operating system
103103
* and to avoid duplicated code
104104
*/
105105
void setTitleBarButtonIcon(tTileBarButton* Button, QStyle::StandardPixmap StandarPixmap)

src/DockOverlay.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ struct DockOverlayCrossPrivate
137137
* Helper function that returns the drop indicator width depending on the
138138
* operating system
139139
*/
140-
qreal dropIndicatiorWidth() const
140+
qreal dropIndicatiorWidth(QLabel* l) const
141141
{
142142
#ifdef Q_OS_LINUX
143143
return 40;
@@ -154,7 +154,7 @@ struct DockOverlayCrossPrivate
154154
QLabel* l = new QLabel();
155155
l->setObjectName("DockWidgetAreaLabel");
156156

157-
const qreal metric = dropIndicatiorWidth();
157+
const qreal metric = dropIndicatiorWidth(l);
158158
const QSizeF size(metric, metric);
159159

160160
l->setPixmap(createHighDpiDropIndicatorPixmap(size, DockWidgetArea, Mode));
@@ -168,7 +168,7 @@ struct DockOverlayCrossPrivate
168168
void updateDropIndicatorIcon(QWidget* DropIndicatorWidget)
169169
{
170170
QLabel* l = qobject_cast<QLabel*>(DropIndicatorWidget);
171-
const qreal metric = dropIndicatiorWidth();
171+
const qreal metric = dropIndicatiorWidth(l);
172172
const QSizeF size(metric, metric);
173173

174174
int Area = l->property("dockWidgetArea").toInt();

src/FloatingDockContainer.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
#include <QDebug>
3939
#include <QAbstractButton>
4040
#include <QElapsedTimer>
41-
#include <QTime>
42-
#include <QAbstractEventDispatcher>
4341

4442
#include "DockContainerWidget.h"
4543
#include "DockAreaWidget.h"
@@ -52,8 +50,6 @@
5250
#include <xcb/xcb.h>
5351
#endif
5452

55-
#include <iostream>
56-
5753

5854
namespace ads
5955
{
@@ -71,8 +67,10 @@ struct FloatingDockContainerPrivate
7167
QPoint DragStartMousePosition;
7268
CDockContainerWidget* DropContainer = nullptr;
7369
CDockAreaWidget* SingleDockArea = nullptr;
70+
#ifdef Q_OS_LINUX
7471
QWidget* MouseEventHandler = nullptr;
7572
CFloatingWidgetTitleBar* TitleBar = nullptr;
73+
#endif
7674

7775
/**
7876
* Private data constructor
@@ -257,6 +255,7 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager* DockManager) :
257255
l->setContentsMargins(0, 0, 0, 0);
258256
l->setSpacing(0);
259257
setLayout(l);
258+
l->addWidget(d->DockContainer);
260259
#endif
261260

262261
DockManager->registerFloatingWidget(this);
@@ -494,6 +493,9 @@ bool CFloatingDockContainer::eventFilter(QObject *watched, QEvent *event)
494493
void CFloatingDockContainer::startFloating(const QPoint& DragStartMousePos, const QSize& Size,
495494
eDragState DragState, QWidget* MouseEventHandler)
496495
{
496+
#ifndef Q_OS_LINUX
497+
Q_UNUSED(MouseEventHandler)
498+
#endif
497499
resize(Size);
498500
d->setState(DragState);
499501
d->DragStartMousePosition = DragStartMousePos;
@@ -617,7 +619,7 @@ QList<CDockWidget*> CFloatingDockContainer::dockWidgets() const
617619
//============================================================================
618620
void CFloatingDockContainer::finishDragging()
619621
{
620-
std::cout << "CFloatingDockContainer::finishDragging" << std::endl;
622+
qDebug() << "CFloatingDockContainer::finishDragging";
621623
#ifdef Q_OS_LINUX
622624
setAttribute(Qt::WA_X11NetWmWindowTypeDock, false);
623625
setWindowOpacity(1);

0 commit comments

Comments
 (0)