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 "QMinimizePanel.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -331,7 +331,6 @@ void PdmUiListEditor::slotSelectionChanged(const QItemSelection & selected, cons
|
|||||||
{
|
{
|
||||||
QModelIndexList idxList = m_listView->selectionModel()->selectedIndexes();
|
QModelIndexList idxList = m_listView->selectionModel()->selectedIndexes();
|
||||||
|
|
||||||
QVariant fieldValue = uiField()->uiValue();
|
|
||||||
QList<QVariant> valuesSelectedInField = fieldValue.toList();
|
QList<QVariant> valuesSelectedInField = fieldValue.toList();
|
||||||
|
|
||||||
if (idxList.size() == 1 && valuesSelectedInField.size() == 1)
|
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)
|
for (const QVariant& v : valuesSelectedInField)
|
||||||
{
|
{
|
||||||
int index = v.toInt();
|
int optionIndex = v.toInt();
|
||||||
if (index != -1)
|
if (optionIndex != -1)
|
||||||
{
|
{
|
||||||
if (!displayText.isEmpty()) displayText += ", ";
|
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;
|
PdmUiFieldEditorHandle* fieldEditor = nullptr;
|
||||||
|
|
||||||
// Find or create FieldEditor
|
// Find or create FieldEditor
|
||||||
std::map<QString, PdmUiFieldEditorHandle*>::iterator it;
|
|
||||||
it = m_fieldEditors.find(field->fieldHandle()->keyword());
|
it = m_fieldEditors.find(field->fieldHandle()->keyword());
|
||||||
|
|
||||||
if (it == m_fieldEditors.end())
|
if (it == m_fieldEditors.end())
|
||||||
|
@ -173,7 +173,6 @@ private:
|
|||||||
QRect lineRect(r.x() + horizontalMargin, vscroll, r.width() - 2*horizontalMargin, fm.height());
|
QRect lineRect(r.x() + horizontalMargin, vscroll, r.width() - 2*horizontalMargin, fm.height());
|
||||||
|
|
||||||
int minLB = qMax(0, -fm.minLeftBearing());
|
int minLB = qMax(0, -fm.minLeftBearing());
|
||||||
int minRB = qMax(0, -fm.minRightBearing());
|
|
||||||
|
|
||||||
if (text().isEmpty())
|
if (text().isEmpty())
|
||||||
{
|
{
|
||||||
|
@ -204,7 +204,6 @@ namespace caf {
|
|||||||
uint64_t totalPhysicalMemory = caf::MemoryInspector::getTotalPhysicalMemoryMiB();
|
uint64_t totalPhysicalMemory = caf::MemoryInspector::getTotalPhysicalMemoryMiB();
|
||||||
|
|
||||||
float currentUsageFraction = 0.0f;
|
float currentUsageFraction = 0.0f;
|
||||||
float availVirtualFraction = 1.0f;
|
|
||||||
if (currentUsage > 0u && totalPhysicalMemory > 0u)
|
if (currentUsage > 0u && totalPhysicalMemory > 0u)
|
||||||
{
|
{
|
||||||
currentUsageFraction = std::min(1.0f, static_cast<float>(currentUsage) / totalPhysicalMemory);
|
currentUsageFraction = std::min(1.0f, static_cast<float>(currentUsage) / totalPhysicalMemory);
|
||||||
|
Loading…
Reference in New Issue
Block a user