Fixes compiler warning C4482 (enum usage with type name).

This commit is contained in:
mfreiholz
2016-02-15 13:56:42 +01:00
parent 34d7bf6aeb
commit 3ec2d9d8f6
6 changed files with 25 additions and 25 deletions

View File

@@ -83,19 +83,19 @@ void DropOverlay::paintEvent(QPaintEvent*)
const DropArea da = cursorLocation();
switch (da)
{
case DropArea::TopDropArea:
case ADS_NS::TopDropArea:
r.setHeight(r.height() / 2);
break;
case DropArea::RightDropArea:
case ADS_NS::RightDropArea:
r.setX(r.width() / 2);
break;
case DropArea::BottomDropArea:
case ADS_NS::BottomDropArea:
r.setY(r.height() / 2);
break;
case DropArea::LeftDropArea:
case ADS_NS::LeftDropArea:
r.setWidth(r.width() / 2);
break;
case DropArea::CenterDropArea:
case ADS_NS::CenterDropArea:
r = rect();
break;
default:
@@ -155,27 +155,27 @@ DropSplitAreas::DropSplitAreas(DropAreas areas, QWidget* parent) :
grid->setContentsMargins(0, 0, 0, 0);
grid->setSpacing(6);
if (areas.testFlag(DropArea::TopDropArea))
if (areas.testFlag(ADS_NS::TopDropArea))
{
_top = createDropWidget(":/img/split-top.png");
grid->addWidget(_top, 0, 1, Qt::AlignHCenter | Qt::AlignBottom);
}
if (areas.testFlag(DropArea::RightDropArea))
if (areas.testFlag(ADS_NS::RightDropArea))
{
_right = createDropWidget(":/img/split-right.png");
grid->addWidget(_right, 1, 2, Qt::AlignLeft | Qt::AlignVCenter);
}
if (areas.testFlag(DropArea::BottomDropArea))
if (areas.testFlag(ADS_NS::BottomDropArea))
{
_bottom = createDropWidget(":/img/split-bottom.png");
grid->addWidget(_bottom, 2, 1, Qt::AlignHCenter | Qt::AlignTop);
}
if (areas.testFlag(DropArea::LeftDropArea))
if (areas.testFlag(ADS_NS::LeftDropArea))
{
_left = createDropWidget(":/img/split-left.png");
grid->addWidget(_left, 1, 0, Qt::AlignRight | Qt::AlignVCenter);
}
if (areas.testFlag(DropArea::CenterDropArea))
if (areas.testFlag(ADS_NS::CenterDropArea))
{
_center = createDropWidget(":/img/dock-center.png");
grid->addWidget(_center, 1, 1, Qt::AlignCenter);

View File

@@ -120,17 +120,17 @@ void SectionTitleWidget::mouseReleaseEvent(QMouseEvent* ev)
// Mouse is over a outer-edge drop area
else
{
DropArea dropArea = DropArea::InvalidDropArea;
DropArea dropArea = ADS_NS::InvalidDropArea;
if (cw->outerTopDropRect().contains(cw->mapFromGlobal(ev->globalPos())))
dropArea = DropArea::TopDropArea;
dropArea = ADS_NS::TopDropArea;
if (cw->outerRightDropRect().contains(cw->mapFromGlobal(ev->globalPos())))
dropArea = DropArea::RightDropArea;
dropArea = ADS_NS::RightDropArea;
if (cw->outerBottomDropRect().contains(cw->mapFromGlobal(ev->globalPos())))
dropArea = DropArea::BottomDropArea;
dropArea = ADS_NS::BottomDropArea;
if (cw->outerLeftDropRect().contains(cw->mapFromGlobal(ev->globalPos())))
dropArea = DropArea::LeftDropArea;
dropArea = ADS_NS::LeftDropArea;
if (dropArea != DropArea::InvalidDropArea)
if (dropArea != ADS_NS::InvalidDropArea)
{
#if !defined(ADS_ANIMATIONS_ENABLED)
InternalContentData data;
@@ -197,19 +197,19 @@ void SectionTitleWidget::mouseMoveEvent(QMouseEvent* ev)
// Top, Right, Bottom, Left
else if (cw->outerTopDropRect().contains(cw->mapFromGlobal(QCursor::pos())))
{
showDropOverlay(cw, cw->outerTopDropRect(), DropArea::TopDropArea);
showDropOverlay(cw, cw->outerTopDropRect(), ADS_NS::TopDropArea);
}
else if (cw->outerRightDropRect().contains(cw->mapFromGlobal(QCursor::pos())))
{
showDropOverlay(cw, cw->outerRightDropRect(), DropArea::RightDropArea);
showDropOverlay(cw, cw->outerRightDropRect(), ADS_NS::RightDropArea);
}
else if (cw->outerBottomDropRect().contains(cw->mapFromGlobal(QCursor::pos())))
{
showDropOverlay(cw, cw->outerBottomDropRect(), DropArea::BottomDropArea);
showDropOverlay(cw, cw->outerBottomDropRect(), ADS_NS::BottomDropArea);
}
else if (cw->outerLeftDropRect().contains(cw->mapFromGlobal(QCursor::pos())))
{
showDropOverlay(cw, cw->outerLeftDropRect(), DropArea::LeftDropArea);
showDropOverlay(cw, cw->outerLeftDropRect(), ADS_NS::LeftDropArea);
}
else
{