mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Fix ODR violations when using CMake unity builds. (#609)
This commit is contained in:
parent
6bf593ef4b
commit
fb58c435ef
@ -44,7 +44,6 @@
|
|||||||
|
|
||||||
namespace ads
|
namespace ads
|
||||||
{
|
{
|
||||||
static const char* const LocationProperty = "Location";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private data class of CDockWidgetTab class (pimpl)
|
* Private data class of CDockWidgetTab class (pimpl)
|
||||||
@ -102,7 +101,7 @@ struct AutoHideTabPrivate
|
|||||||
QMenu* Menu)
|
QMenu* Menu)
|
||||||
{
|
{
|
||||||
auto Action = Menu->addAction(Title);
|
auto Action = Menu->addAction(Title);
|
||||||
Action->setProperty("Location", Location);
|
Action->setProperty(internal::LocationProperty, Location);
|
||||||
QObject::connect(Action, &QAction::triggered, _this, &CAutoHideTab::onAutoHideToActionClicked);
|
QObject::connect(Action, &QAction::triggered, _this, &CAutoHideTab::onAutoHideToActionClicked);
|
||||||
Action->setEnabled(Location != _this->sideBarLocation());
|
Action->setEnabled(Location != _this->sideBarLocation());
|
||||||
return Action;
|
return Action;
|
||||||
@ -419,7 +418,7 @@ void CAutoHideTab::unpinDockWidget()
|
|||||||
//===========================================================================
|
//===========================================================================
|
||||||
void CAutoHideTab::onAutoHideToActionClicked()
|
void CAutoHideTab::onAutoHideToActionClicked()
|
||||||
{
|
{
|
||||||
int Location = sender()->property(LocationProperty).toInt();
|
int Location = sender()->property(internal::LocationProperty).toInt();
|
||||||
d->DockWidget->setAutoHide(true, (SideBarLocation)Location);
|
d->DockWidget->setAutoHide(true, (SideBarLocation)Location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,6 @@
|
|||||||
|
|
||||||
namespace ads
|
namespace ads
|
||||||
{
|
{
|
||||||
static const char* const LocationProperty = "Location";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private data class of CDockAreaTitleBar class (pimpl)
|
* Private data class of CDockAreaTitleBar class (pimpl)
|
||||||
@ -159,7 +158,7 @@ struct DockAreaTitleBarPrivate
|
|||||||
QMenu* Menu)
|
QMenu* Menu)
|
||||||
{
|
{
|
||||||
auto Action = Menu->addAction(Title);
|
auto Action = Menu->addAction(Title);
|
||||||
Action->setProperty("Location", Location);
|
Action->setProperty(internal::LocationProperty, Location);
|
||||||
QObject::connect(Action, &QAction::triggered, _this, &CDockAreaTitleBar::onAutoHideToActionClicked);
|
QObject::connect(Action, &QAction::triggered, _this, &CDockAreaTitleBar::onAutoHideToActionClicked);
|
||||||
return Action;
|
return Action;
|
||||||
}
|
}
|
||||||
@ -569,7 +568,7 @@ void CDockAreaTitleBar::onAutoHideDockAreaActionClicked()
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
void CDockAreaTitleBar::onAutoHideToActionClicked()
|
void CDockAreaTitleBar::onAutoHideToActionClicked()
|
||||||
{
|
{
|
||||||
int Location = sender()->property(LocationProperty).toInt();
|
int Location = sender()->property(internal::LocationProperty).toInt();
|
||||||
d->DockArea->toggleAutoHide((SideBarLocation)Location);
|
d->DockArea->toggleAutoHide((SideBarLocation)Location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@
|
|||||||
|
|
||||||
namespace ads
|
namespace ads
|
||||||
{
|
{
|
||||||
static const char* const LocationProperty = "Location";
|
|
||||||
using tTabLabel = CElidingLabel;
|
using tTabLabel = CElidingLabel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -225,7 +224,7 @@ struct DockWidgetTabPrivate
|
|||||||
QMenu* Menu)
|
QMenu* Menu)
|
||||||
{
|
{
|
||||||
auto Action = Menu->addAction(Title);
|
auto Action = Menu->addAction(Title);
|
||||||
Action->setProperty("Location", Location);
|
Action->setProperty(internal::LocationProperty, Location);
|
||||||
QObject::connect(Action, &QAction::triggered, _this, &CDockWidgetTab::onAutoHideToActionClicked);
|
QObject::connect(Action, &QAction::triggered, _this, &CDockWidgetTab::onAutoHideToActionClicked);
|
||||||
return Action;
|
return Action;
|
||||||
}
|
}
|
||||||
@ -764,7 +763,7 @@ void CDockWidgetTab::autoHideDockWidget()
|
|||||||
//===========================================================================
|
//===========================================================================
|
||||||
void CDockWidgetTab::onAutoHideToActionClicked()
|
void CDockWidgetTab::onAutoHideToActionClicked()
|
||||||
{
|
{
|
||||||
int Location = sender()->property(LocationProperty).toInt();
|
int Location = sender()->property(internal::LocationProperty).toInt();
|
||||||
d->DockWidget->toggleAutoHide((SideBarLocation)Location);
|
d->DockWidget->toggleAutoHide((SideBarLocation)Location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ static const char* windowsMessageString(int MessageId)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static unsigned int zOrderCounter = 0;
|
static unsigned int zOrderCounterFloating = 0;
|
||||||
/**
|
/**
|
||||||
* Private data class of CFloatingDockContainer class (pimpl)
|
* Private data class of CFloatingDockContainer class (pimpl)
|
||||||
*/
|
*/
|
||||||
@ -365,7 +365,7 @@ struct FloatingDockContainerPrivate
|
|||||||
{
|
{
|
||||||
CFloatingDockContainer *_this;
|
CFloatingDockContainer *_this;
|
||||||
CDockContainerWidget *DockContainer;
|
CDockContainerWidget *DockContainer;
|
||||||
unsigned int zOrderIndex = ++zOrderCounter;
|
unsigned int zOrderIndex = ++zOrderCounterFloating;
|
||||||
QPointer<CDockManager> DockManager;
|
QPointer<CDockManager> DockManager;
|
||||||
eDragState DraggingState = DraggingInactive;
|
eDragState DraggingState = DraggingInactive;
|
||||||
QPoint DragStartMousePosition;
|
QPoint DragStartMousePosition;
|
||||||
@ -818,7 +818,7 @@ void CFloatingDockContainer::changeEvent(QEvent *event)
|
|||||||
if (isActiveWindow())
|
if (isActiveWindow())
|
||||||
{
|
{
|
||||||
ADS_PRINT("FloatingWidget::changeEvent QEvent::ActivationChange ");
|
ADS_PRINT("FloatingWidget::changeEvent QEvent::ActivationChange ");
|
||||||
d->zOrderIndex = ++zOrderCounter;
|
d->zOrderIndex = ++zOrderCounterFloating;
|
||||||
|
|
||||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||||
if (d->DraggingState == DraggingFloatingWidget)
|
if (d->DraggingState == DraggingFloatingWidget)
|
||||||
|
@ -167,6 +167,7 @@ static const bool RestoreTesting = true;
|
|||||||
static const bool Restore = false;
|
static const bool Restore = false;
|
||||||
static const char* const ClosedProperty = "close";
|
static const char* const ClosedProperty = "close";
|
||||||
static const char* const DirtyProperty = "dirty";
|
static const char* const DirtyProperty = "dirty";
|
||||||
|
static const char* const LocationProperty = "Location";
|
||||||
extern const int FloatingWidgetDragStartEvent;
|
extern const int FloatingWidgetDragStartEvent;
|
||||||
extern const int DockedWidgetDragStartEvent;
|
extern const int DockedWidgetDragStartEvent;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user