Skip to content

Commit

Permalink
Some minor cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Oct 24, 2019
1 parent 95f6279 commit 06d4e61
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 28 deletions.
Expand Up @@ -92,7 +92,7 @@ void CellmlAnnotationViewWidget::retranslateUi()
{
// Retranslate our editing widgets

for (auto editingWidget : mEditingWidgets.values()) {
for (auto editingWidget : mEditingWidgets) {
editingWidget->retranslateUi();
}
}
Expand Down
Expand Up @@ -446,7 +446,7 @@ void CellmlTextViewWidget::retranslateUi()
{
// Retranslate all of our data

for (auto data : mData.values()) {
for (auto data : mData) {
data->retranslateUi();
}
}
Expand Down Expand Up @@ -1271,7 +1271,7 @@ void CellmlTextViewWidget::selectFirstItemInEditorList()

mEditorLists.removeFirst();

for (auto data : mData.values()) {
for (auto data : mData) {
if (data->editingWidget()->editorListWidget() == editorList) {
editorList->selectFirstItem();

Expand Down
Expand Up @@ -92,7 +92,7 @@ void RawCellmlViewWidget::retranslateUi()
{
// Retranslate all our editing widgets

for (auto editingWidget : mEditingWidgets.values()) {
for (auto editingWidget : mEditingWidgets) {
editingWidget->retranslateUi();
}
}
Expand Down
Expand Up @@ -219,17 +219,17 @@ void SimulationExperimentViewInformationGraphPanelAndGraphsWidget::retranslateUi

// Retranslate all our property editors

for (auto graphPanelPropertyEditor : mGraphPanelPropertyEditors.values()) {
for (auto graphPanelPropertyEditor : mGraphPanelPropertyEditors) {
graphPanelPropertyEditor->retranslateUi();
}

for (auto graphsPropertyEditor : mGraphsPropertyEditors.values()) {
for (auto graphsPropertyEditor : mGraphsPropertyEditors) {
graphsPropertyEditor->retranslateUi();
}

// Retranslate the contents of our graph panel property editors

for (auto graphPanelPropertyEditor : mGraphPanelPropertyEditors.values()) {
for (auto graphPanelPropertyEditor : mGraphPanelPropertyEditors) {
retranslateGraphPanelPropertyEditor(graphPanelPropertyEditor);
}

Expand Down Expand Up @@ -272,7 +272,7 @@ void SimulationExperimentViewInformationGraphPanelAndGraphsWidget::finalize()

// Remove all our graphs' runs

for (auto graph : mGraphs.values()) {
for (auto graph : mGraphs) {
graph->removeRuns();
}
}
Expand Down Expand Up @@ -1724,7 +1724,7 @@ void SimulationExperimentViewInformationGraphPanelAndGraphsWidget::updateAllGrap
// Go through our graphs property editors and update the information about
// the graph properties they hold

for (auto graphsPropertyEditor : mGraphsPropertyEditors.values()) {
for (auto graphsPropertyEditor : mGraphsPropertyEditors) {
mGraphsPropertyEditor = graphsPropertyEditor;

updateGraphsInfo();
Expand Down
Expand Up @@ -2341,7 +2341,7 @@ void SimulationExperimentViewSimulationWidget::sedmlExportCombineArchive(const Q

// Remove the local copy of our remote imported CellML files, if any

for (const auto &localImportedFileName : remoteImportedFileNames.values()) {
for (const auto &localImportedFileName : remoteImportedFileNames) {
QFile::remove(localImportedFileName);
}

Expand Down Expand Up @@ -4551,13 +4551,13 @@ void SimulationExperimentViewSimulationWidget::updateSedmlFileOrCombineArchiveMo
bool graphsPropertiesModified = mGraphsProperties.keys() != mGraphsPropertiesModified.keys();

if (!graphPanelPropertiesModified) {
for (auto someGraphPanelPropertiesModified : mGraphPanelPropertiesModified.values()) {
for (auto someGraphPanelPropertiesModified : mGraphPanelPropertiesModified) {
graphPanelPropertiesModified = graphPanelPropertiesModified || someGraphPanelPropertiesModified;
}
}

if (!graphsPropertiesModified) {
for (auto someGraphsPropertiesModified : mGraphsPropertiesModified.values()) {
for (auto someGraphsPropertiesModified : mGraphsPropertiesModified) {
graphsPropertiesModified = graphsPropertiesModified || someGraphsPropertiesModified;
}
}
Expand Down
Expand Up @@ -140,7 +140,7 @@ void SimulationExperimentViewWidget::retranslateUi()
{
// Retranslate our simulation widgets

for (auto simulationWidget : mSimulationWidgets.values()) {
for (auto simulationWidget : mSimulationWidgets) {
simulationWidget->retranslateUi();
}
}
Expand Down Expand Up @@ -304,7 +304,7 @@ void SimulationExperimentViewWidget::fileOpened(const QString &pFileName)

// Make sure that the GUI of our simulation widgets is up to date

for (auto simulationWidget : mSimulationWidgets.values()) {
for (auto simulationWidget : mSimulationWidgets) {
simulationWidget->updateGui(true);
}
}
Expand Down Expand Up @@ -361,7 +361,7 @@ void SimulationExperimentViewWidget::fileReloaded(const QString &pFileName)

// Make sure that the GUI of our simulation widgets is up to date

for (auto otherSimulationWidget : mSimulationWidgets.values()) {
for (auto otherSimulationWidget : mSimulationWidgets) {
otherSimulationWidget->updateGui(true);
}
}
Expand Down Expand Up @@ -389,7 +389,7 @@ void SimulationExperimentViewWidget::fileRenamed(const QString &pOldFileName,

// Let our simulation widgets know that a file has been renamed

for (auto otherSimulationWidget : mSimulationWidgets.values()) {
for (auto otherSimulationWidget : mSimulationWidgets) {
otherSimulationWidget->fileRenamed(pOldFileName, pNewFileName);
}
}
Expand All @@ -404,7 +404,7 @@ void SimulationExperimentViewWidget::fileClosed(const QString &pFileName)

// Make sure that the GUI of our simulation widgets is up to date

for (auto simulationWidget : mSimulationWidgets.values()) {
for (auto simulationWidget : mSimulationWidgets) {
simulationWidget->updateGui(true);
}
}
Expand Down Expand Up @@ -541,7 +541,7 @@ void SimulationExperimentViewWidget::checkSimulationResults(const QString &pFile
quint64 previousSimulationResultsSize = simulation->results()->size(simulationRunsCount-2);

if (previousSimulationResultsSize != mSimulationResultsSizes.value(pFileName)) {
for (auto currentSimulationWidget : mSimulationWidgets.values()) {
for (auto currentSimulationWidget : mSimulationWidgets) {
currentSimulationWidget->updateSimulationResults(simulationWidget,
previousSimulationResultsSize,
simulationRunsCount-2,
Expand All @@ -561,7 +561,7 @@ void SimulationExperimentViewWidget::checkSimulationResults(const QString &pFile
|| (simulationResultsSize != mSimulationResultsSizes.value(pFileName))) {
mSimulationResultsSizes.insert(pFileName, simulationResultsSize);

for (auto currentSimulationWidget : mSimulationWidgets.values()) {
for (auto currentSimulationWidget : mSimulationWidgets) {
currentSimulationWidget->updateSimulationResults(simulationWidget,
simulationResultsSize,
simulationRunsCount-1,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/solver/KINSOLSolver/src/kinsolsolver.cpp
Expand Up @@ -192,7 +192,7 @@ KinsolSolver::~KinsolSolver()
{
// Delete some internal objects

for (auto data : mData.values()) {
for (auto data : mData) {
delete data;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/support/PMRSupport/src/pmrworkspacemanager.cpp
Expand Up @@ -82,7 +82,7 @@ PmrWorkspaces PmrWorkspaceManager::workspaces() const

PmrWorkspaces res = PmrWorkspaces();

for (auto workspace : mUrlWorkspaces.values()) {
for (auto workspace : mUrlWorkspaces) {
res << workspace;
}

Expand Down Expand Up @@ -146,7 +146,7 @@ void PmrWorkspaceManager::clearWorkspaces()
{
// Stop tracking all of our workspaces

for (auto workspace : mUrlWorkspaces.values()) {
for (auto workspace : mUrlWorkspaces) {
workspace->close();
}

Expand Down
Expand Up @@ -1474,7 +1474,7 @@ bool GraphPanelPlotLegendWidget::needScrollBar() const

int legendLabelsHeight = 0;

for (auto legendLabel : mLegendLabels.values()) {
for (auto legendLabel : mLegendLabels) {
legendLabelsHeight += legendLabel->height();
}

Expand Down
6 changes: 3 additions & 3 deletions src/pluginsdialog.cpp
Expand Up @@ -192,7 +192,7 @@ PluginsDialog::PluginsDialog(PluginManager *pPluginManager,

// Make a category checkable if it contains selectable plugins

for (auto categoryItem : mCategoryItems.values()) {
for (auto categoryItem : mCategoryItems) {
for (int i = 0, iMax = categoryItem->rowCount(); i < iMax; ++i) {
if (categoryItem->child(i)->isCheckable()) {
categoryItem->setCheckable(true);
Expand Down Expand Up @@ -474,7 +474,7 @@ void PluginsDialog::updatePluginsSelectedState(QStandardItem *pItem,
// Update the selected state of all our categories which have at least one
// selectable plugin

for (auto categoryItem : mCategoryItems.values()) {
for (auto categoryItem : mCategoryItems) {
int nbOfPlugins = categoryItem->rowCount();

if (nbOfPlugins != 0) {
Expand Down Expand Up @@ -661,7 +661,7 @@ void PluginsDialog::selectablePluginsCheckBoxToggled(bool pChecked)

// Show/hide our categories, based on whether they contain visible plugins

for (auto categoryItem : mCategoryItems.values()) {
for (auto categoryItem : mCategoryItems) {
if (categoryItem->hasChildren()) {
// The category contains plugins, but the question is whether they
// are visible
Expand Down
4 changes: 2 additions & 2 deletions src/preferencesdialog.cpp
Expand Up @@ -343,7 +343,7 @@ void PreferencesDialog::buttonBoxAccepted()

mPluginNames = QStringList();

for (auto preferencesWidget : mItemPreferencesWidgets.values()) {
for (auto preferencesWidget : mItemPreferencesWidgets) {
if (preferencesWidget->preferencesChanged()) {
preferencesWidget->savePreferences();

Expand Down Expand Up @@ -417,7 +417,7 @@ void PreferencesDialog::resetAll()
{
// Reset all of our general and plugins' preferences

for (auto preferencesWidget : mItemPreferencesWidgets.values()) {
for (auto preferencesWidget : mItemPreferencesWidgets) {
preferencesWidget->resetPreferences();
}
}
Expand Down

0 comments on commit 06d4e61

Please sign in to comment.