mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-26 14:29:02 +08:00
Fix various clazy warnings
This commit is contained in:
parent
ca1d3fcd38
commit
8d30fc9c3c
@ -206,11 +206,15 @@ void DockInDockWidget::fillPerspectivesMenu( QMenu* menu )
|
|||||||
if ( !perspectiveNames.isEmpty() )
|
if ( !perspectiveNames.isEmpty() )
|
||||||
{
|
{
|
||||||
QMenu* load = menu->addMenu( "Load perspective" );
|
QMenu* load = menu->addMenu( "Load perspective" );
|
||||||
for ( auto name : perspectiveNames )
|
for (const auto& name : perspectiveNames)
|
||||||
load->addAction( new LoadPerspectiveAction( load, name, *this ) );
|
{
|
||||||
|
load->addAction(new LoadPerspectiveAction( load, name, *this));
|
||||||
|
}
|
||||||
QMenu* remove = menu->addMenu( "Remove perspective" );
|
QMenu* remove = menu->addMenu( "Remove perspective" );
|
||||||
for ( auto name : perspectiveNames )
|
for (const auto& name : perspectiveNames)
|
||||||
remove->addAction( new RemovePerspectiveAction( remove, name, *this ) );
|
{
|
||||||
|
remove->addAction( new RemovePerspectiveAction( remove, name, *this ));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,8 +219,10 @@ void PerspectivesManager::loadPerspectives()
|
|||||||
|
|
||||||
// load group info:
|
// load group info:
|
||||||
mainSettings->beginGroup(GROUP_PREFIX);
|
mainSettings->beginGroup(GROUP_PREFIX);
|
||||||
for ( auto key : mainSettings->allKeys() )
|
for (const auto& key : mainSettings->allKeys())
|
||||||
|
{
|
||||||
m_perspectives[perspective].groups[key] = mainSettings->value( key ).toStringList();
|
m_perspectives[perspective].groups[key] = mainSettings->value( key ).toStringList();
|
||||||
|
}
|
||||||
mainSettings->endGroup();
|
mainSettings->endGroup();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1010,7 +1010,7 @@ bool CDockAreaWidget::isCentralWidgetArea() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return dockManager()->centralWidget() == dockWidgets()[0];
|
return dockManager()->centralWidget() == dockWidgets().constFirst();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -568,7 +568,6 @@ void DockContainerWidgetPrivate::dropIntoSection(CFloatingDockContainer* Floatin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QList<int> NewSplitterSizes;
|
|
||||||
QSplitter* NewSplitter = newSplitter(InsertParam.orientation());
|
QSplitter* NewSplitter = newSplitter(InsertParam.orientation());
|
||||||
int TargetAreaSize = (InsertParam.orientation() == Qt::Horizontal) ? TargetArea->width() : TargetArea->height();
|
int TargetAreaSize = (InsertParam.orientation() == Qt::Horizontal) ? TargetArea->width() : TargetArea->height();
|
||||||
bool AdjustSplitterSizes = true;
|
bool AdjustSplitterSizes = true;
|
||||||
@ -692,7 +691,6 @@ void DockContainerWidgetPrivate::moveToNewSection(QWidget* Widget, CDockAreaWidg
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto Sizes = TargetAreaSplitter->sizes();
|
|
||||||
int TargetAreaSize = (InsertParam.orientation() == Qt::Horizontal) ? TargetArea->width() : TargetArea->height();
|
int TargetAreaSize = (InsertParam.orientation() == Qt::Horizontal) ? TargetArea->width() : TargetArea->height();
|
||||||
QSplitter* NewSplitter = newSplitter(InsertParam.orientation());
|
QSplitter* NewSplitter = newSplitter(InsertParam.orientation());
|
||||||
NewSplitter->addWidget(TargetArea);
|
NewSplitter->addWidget(TargetArea);
|
||||||
|
@ -928,7 +928,7 @@ void CDockManager::removePerspective(const QString& Name)
|
|||||||
void CDockManager::removePerspectives(const QStringList& Names)
|
void CDockManager::removePerspectives(const QStringList& Names)
|
||||||
{
|
{
|
||||||
int Count = 0;
|
int Count = 0;
|
||||||
for (auto Name : Names)
|
for (const auto& Name : Names)
|
||||||
{
|
{
|
||||||
Count += d->Perspectives.remove(Name);
|
Count += d->Perspectives.remove(Name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user