mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 03:35:38 +08:00
Use std::as_const (C++17 feature)
This commit is contained in:
@@ -340,7 +340,7 @@ namespace BlackGui
|
||||
|
||||
void CInfoArea::adjustSizeForAllDockWidgets()
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
dw->adjustSize();
|
||||
}
|
||||
@@ -348,7 +348,7 @@ namespace BlackGui
|
||||
|
||||
void CInfoArea::floatAllWidgets()
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
if (dw->isFloating()) { continue; }
|
||||
dw->toggleFloating();
|
||||
@@ -357,7 +357,7 @@ namespace BlackGui
|
||||
|
||||
void CInfoArea::resetAllFloatingWidgetSettings()
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
if (!dw || !dw->isFloating()) { continue; }
|
||||
dw->resetSettings();
|
||||
@@ -366,7 +366,7 @@ namespace BlackGui
|
||||
|
||||
void CInfoArea::resetAllWidgetSettings()
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
if (!dw || !dw->isFloating()) { continue; }
|
||||
dw->resetSettings();
|
||||
@@ -375,7 +375,7 @@ namespace BlackGui
|
||||
|
||||
void CInfoArea::allFloatingOnTop()
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
const bool f = dw->isFloating();
|
||||
CGuiUtility::stayOnTop(f, dw);
|
||||
@@ -511,11 +511,11 @@ namespace BlackGui
|
||||
|
||||
void CInfoArea::displayStatusMessage(const CStatusMessage &statusMessage)
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
dw->displayStatusMessage(statusMessage);
|
||||
}
|
||||
for (CInfoArea *ia : as_const(m_childInfoAreas))
|
||||
for (CInfoArea *ia : std::as_const(m_childInfoAreas))
|
||||
{
|
||||
ia->displayStatusMessage(statusMessage);
|
||||
}
|
||||
@@ -523,11 +523,11 @@ namespace BlackGui
|
||||
|
||||
void CInfoArea::displayStatusMessages(const CStatusMessageList &statusMessages)
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
dw->displayStatusMessages(statusMessages);
|
||||
}
|
||||
for (CInfoArea *ia : as_const(m_childInfoAreas))
|
||||
for (CInfoArea *ia : std::as_const(m_childInfoAreas))
|
||||
{
|
||||
ia->displayStatusMessages(statusMessages);
|
||||
}
|
||||
@@ -535,7 +535,7 @@ namespace BlackGui
|
||||
|
||||
void CInfoArea::setDockArea(Qt::DockWidgetArea area)
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
Qt::DockWidgetAreas newAreas = static_cast<Qt::DockWidgetAreas>(area);
|
||||
Qt::DockWidgetAreas oldAreas = dw->allowedAreas();
|
||||
@@ -678,7 +678,7 @@ namespace BlackGui
|
||||
|
||||
void CInfoArea::connectTopLevelChanged()
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
connect(dw, &CDockWidgetInfoArea::widgetTopLevelChanged, this, &CInfoArea::onWidgetTopLevelChanged, Qt::QueuedConnection);
|
||||
}
|
||||
@@ -815,7 +815,7 @@ namespace BlackGui
|
||||
|
||||
void CInfoArea::setFeaturesForDockableWidgets(QDockWidget::DockWidgetFeatures features)
|
||||
{
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
dw->setFeatures(features);
|
||||
}
|
||||
@@ -898,7 +898,7 @@ namespace BlackGui
|
||||
{
|
||||
if (show == m_showTabTexts) { return; }
|
||||
m_showTabTexts = show;
|
||||
for (CDockWidgetInfoArea *dw : as_const(m_dockWidgetInfoAreas))
|
||||
for (CDockWidgetInfoArea *dw : std::as_const(m_dockWidgetInfoAreas))
|
||||
{
|
||||
dw->showTitleWhenDocked(show);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user