mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-04-01 02:42:39 +08:00
clazy: loop over containers
This commit is contained in:
parent
fe8f205b50
commit
6d53c16ed0
@ -206,10 +206,10 @@ void DockInDockWidget::fillPerspectivesMenu( QMenu* menu )
|
||||
if ( !perspectiveNames.isEmpty() )
|
||||
{
|
||||
QMenu* load = menu->addMenu( "Load perspective" );
|
||||
for ( auto name : perspectiveNames )
|
||||
for ( const QString& name : perspectiveNames )
|
||||
load->addAction( new LoadPerspectiveAction( load, name, *this ) );
|
||||
QMenu* remove = menu->addMenu( "Remove perspective" );
|
||||
for ( auto name : perspectiveNames )
|
||||
for ( const QString& name : perspectiveNames )
|
||||
remove->addAction( new RemovePerspectiveAction( remove, name, *this ) );
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ PerspectivesManager::PerspectivesManager( const QString& perspectivesFolder ) :
|
||||
PerspectivesManager::~PerspectivesManager()
|
||||
{
|
||||
// remove temp files:
|
||||
for ( auto perspective : m_perspectives )
|
||||
for ( auto& perspective : m_perspectives )
|
||||
{
|
||||
QString fileName = perspective.settings->fileName();
|
||||
perspective.settings.reset();
|
||||
@ -219,7 +219,7 @@ void PerspectivesManager::loadPerspectives()
|
||||
|
||||
// load group info:
|
||||
mainSettings->beginGroup(GROUP_PREFIX);
|
||||
for ( auto key : mainSettings->allKeys() )
|
||||
for ( const QString& key : mainSettings->allKeys() )
|
||||
m_perspectives[perspective].groups[key] = mainSettings->value( key ).toStringList();
|
||||
mainSettings->endGroup();
|
||||
}
|
||||
|
@ -928,7 +928,7 @@ void CDockManager::removePerspective(const QString& Name)
|
||||
void CDockManager::removePerspectives(const QStringList& Names)
|
||||
{
|
||||
int Count = 0;
|
||||
for (auto Name : Names)
|
||||
for (const QString& Name : Names)
|
||||
{
|
||||
Count += d->Perspectives.remove(Name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user