mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
AppFwk : Fix several warnings
This commit is contained in:
parent
2d1d9fed95
commit
6aa234cc9b
@ -34,6 +34,8 @@
|
||||
//
|
||||
//##################################################################################################
|
||||
|
||||
#pragma warning( disable : 4125 )
|
||||
|
||||
#include "QMinimizePanel.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
@ -331,7 +331,6 @@ void PdmUiListEditor::slotSelectionChanged(const QItemSelection & selected, cons
|
||||
{
|
||||
QModelIndexList idxList = m_listView->selectionModel()->selectedIndexes();
|
||||
|
||||
QVariant fieldValue = uiField()->uiValue();
|
||||
QList<QVariant> valuesSelectedInField = fieldValue.toList();
|
||||
|
||||
if (idxList.size() == 1 && valuesSelectedInField.size() == 1)
|
||||
|
@ -207,14 +207,14 @@ QVariant PdmUiTableViewQModel::data(const QModelIndex &index, int role /*= Qt::D
|
||||
|
||||
for (const QVariant& v : valuesSelectedInField)
|
||||
{
|
||||
int index = v.toInt();
|
||||
if (index != -1)
|
||||
int optionIndex = v.toInt();
|
||||
if (optionIndex != -1)
|
||||
{
|
||||
if (!displayText.isEmpty()) displayText += ", ";
|
||||
|
||||
if (index < options.size())
|
||||
if (optionIndex < options.size())
|
||||
{
|
||||
displayText += options.at(index).optionUiText();
|
||||
displayText += options.at(optionIndex).optionUiText();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -385,7 +385,6 @@ void PdmUiTableViewQModel::setArrayFieldAndBuildEditors(PdmChildArrayFieldHandle
|
||||
PdmUiFieldEditorHandle* fieldEditor = nullptr;
|
||||
|
||||
// Find or create FieldEditor
|
||||
std::map<QString, PdmUiFieldEditorHandle*>::iterator it;
|
||||
it = m_fieldEditors.find(field->fieldHandle()->keyword());
|
||||
|
||||
if (it == m_fieldEditors.end())
|
||||
|
@ -173,7 +173,6 @@ private:
|
||||
QRect lineRect(r.x() + horizontalMargin, vscroll, r.width() - 2*horizontalMargin, fm.height());
|
||||
|
||||
int minLB = qMax(0, -fm.minLeftBearing());
|
||||
int minRB = qMax(0, -fm.minRightBearing());
|
||||
|
||||
if (text().isEmpty())
|
||||
{
|
||||
|
@ -204,7 +204,6 @@ namespace caf {
|
||||
uint64_t totalPhysicalMemory = caf::MemoryInspector::getTotalPhysicalMemoryMiB();
|
||||
|
||||
float currentUsageFraction = 0.0f;
|
||||
float availVirtualFraction = 1.0f;
|
||||
if (currentUsage > 0u && totalPhysicalMemory > 0u)
|
||||
{
|
||||
currentUsageFraction = std::min(1.0f, static_cast<float>(currentUsage) / totalPhysicalMemory);
|
||||
|
Loading…
Reference in New Issue
Block a user