mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
#1292 Fixed CppCheck Issues in UserInterface
This commit is contained in:
parent
1275279528
commit
bd688f7ce8
@ -51,12 +51,12 @@ template <typename T>
|
||||
class RiuTypedPdmObjects
|
||||
{
|
||||
public:
|
||||
RiuTypedPdmObjects(const caf::PdmObjectGroup& objectGroup)
|
||||
explicit RiuTypedPdmObjects(const caf::PdmObjectGroup& objectGroup)
|
||||
{
|
||||
objectGroup.objectsByType(&m_typedObjects);
|
||||
}
|
||||
|
||||
RiuTypedPdmObjects(const std::vector<caf::PdmPointer<caf::PdmObjectHandle> >& objectHandles)
|
||||
explicit RiuTypedPdmObjects(const std::vector<caf::PdmPointer<caf::PdmObjectHandle> >& objectHandles)
|
||||
{
|
||||
for (size_t i = 0; i < objectHandles.size(); i++)
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ class RiuMessagePanel : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RiuMessagePanel(QDockWidget* parent);
|
||||
explicit RiuMessagePanel(QDockWidget* parent);
|
||||
|
||||
void addMessage(RILogLevel messageLevel, const QString& msg);
|
||||
virtual QSize sizeHint () const;
|
||||
@ -60,7 +60,7 @@ private:
|
||||
class RiuMessagePanelLogger : public RiaLogger
|
||||
{
|
||||
public:
|
||||
RiuMessagePanelLogger(RiuMessagePanel* messagePanel);
|
||||
explicit RiuMessagePanelLogger(RiuMessagePanel* messagePanel);
|
||||
|
||||
virtual int level() const override;
|
||||
virtual void setLevel(int logLevel) override;
|
||||
|
@ -27,7 +27,7 @@
|
||||
class FileListModel: public QStringListModel
|
||||
{
|
||||
public:
|
||||
FileListModel(QObject *parent = 0) : m_isItemsEditable(false), QStringListModel(parent)
|
||||
explicit FileListModel(QObject *parent = 0) : m_isItemsEditable(false), QStringListModel(parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ class RiuMultiCaseImportDialog: public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RiuMultiCaseImportDialog(QWidget *parent = 0);
|
||||
explicit RiuMultiCaseImportDialog(QWidget *parent = 0);
|
||||
virtual ~RiuMultiCaseImportDialog();
|
||||
|
||||
QStringList eclipseCaseFileNames() const;
|
||||
|
@ -46,7 +46,7 @@ private:
|
||||
caf::UiProcess* m_monitoredProcess; // Pointer to the process we're monitoring. Needed to fetch text
|
||||
|
||||
public:
|
||||
RiuProcessMonitor(QDockWidget* pParent);
|
||||
explicit RiuProcessMonitor(QDockWidget* pParent);
|
||||
~RiuProcessMonitor();
|
||||
|
||||
void startMonitorWorkProcess(caf::UiProcess* process);
|
||||
|
@ -12,7 +12,7 @@ class RiuQwtScalePicker : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RiuQwtScalePicker(QwtPlot *plot);
|
||||
explicit RiuQwtScalePicker(QwtPlot *plot);
|
||||
|
||||
virtual bool eventFilter( QObject *, QEvent * );
|
||||
|
||||
|
@ -35,7 +35,7 @@ class RiuRecentFileActionProvider : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RiuRecentFileActionProvider(int maxActionCount = 9);
|
||||
explicit RiuRecentFileActionProvider(int maxActionCount = 9);
|
||||
~RiuRecentFileActionProvider();
|
||||
|
||||
void addFileName(const QString& fileName);
|
||||
|
@ -35,7 +35,7 @@ class RiuResultInfoPanel : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RiuResultInfoPanel(QDockWidget* parent);
|
||||
explicit RiuResultInfoPanel(QDockWidget* parent);
|
||||
|
||||
void setInfo(const QString& info);
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace cvf
|
||||
class RiuResultQwtPlot : public QwtPlot
|
||||
{
|
||||
public:
|
||||
RiuResultQwtPlot(QWidget* parent = NULL);
|
||||
explicit RiuResultQwtPlot(QWidget* parent = NULL);
|
||||
virtual ~RiuResultQwtPlot();
|
||||
|
||||
void addCurve(const QString& curveName, const cvf::Color3f& curveColor, const std::vector<QDateTime>& dateTimes, const std::vector<double>& timeHistoryValues);
|
||||
|
@ -431,9 +431,7 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigEclipseCaseData* eclips
|
||||
{
|
||||
cvf::ref<RigResultAccessor> multResultAccessor = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedMultResultName());
|
||||
{
|
||||
double scalarValue = 0.0;
|
||||
|
||||
scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_I);
|
||||
double scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_I);
|
||||
resultInfoText->append(QString("MULTX : %1\n").arg(scalarValue));
|
||||
scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::NEG_I);
|
||||
resultInfoText->append(QString("MULTX- : %1\n").arg(scalarValue));
|
||||
|
@ -49,9 +49,6 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
RiuSelectionManager();
|
||||
~RiuSelectionManager();
|
||||
|
||||
static RiuSelectionManager* instance();
|
||||
|
||||
// Returns selected items
|
||||
@ -72,6 +69,10 @@ public:
|
||||
bool isEmpty(int role = RUI_APPLICATION_GLOBAL) const;
|
||||
|
||||
private:
|
||||
RiuSelectionManager();
|
||||
~RiuSelectionManager();
|
||||
RiuSelectionManager(const RiuSelectionManager&) = delete;
|
||||
|
||||
void deleteAllItemsFromSelection(int role);
|
||||
|
||||
private:
|
||||
|
@ -52,7 +52,7 @@
|
||||
class RiuQwtPlotPicker : public QwtPlotPicker
|
||||
{
|
||||
public:
|
||||
RiuQwtPlotPicker(QWidget *canvas)
|
||||
explicit RiuQwtPlotPicker(QWidget *canvas)
|
||||
: QwtPlotPicker(canvas)
|
||||
{
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
class RiuToolTipMenu : public QMenu
|
||||
{
|
||||
public:
|
||||
RiuToolTipMenu(QWidget * parent);
|
||||
explicit RiuToolTipMenu(QWidget * parent);
|
||||
|
||||
bool event(QEvent* e);
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ class RiuTreeViewEventFilter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RiuTreeViewEventFilter(QObject* parent);
|
||||
explicit RiuTreeViewEventFilter(QObject* parent);
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
@ -398,16 +398,15 @@ void RiuViewer::paintOverlayItems(QPainter* painter)
|
||||
{
|
||||
m_histogramWidget->resize(columnWidth, 40);
|
||||
m_histogramWidget->render(painter,QPoint(columnPos, yPos));
|
||||
yPos += m_histogramWidget->height() + margin;
|
||||
//yPos += m_histogramWidget->height() + margin;
|
||||
}
|
||||
|
||||
if (m_showInfoText)
|
||||
if (m_showInfoText) // Version Label
|
||||
{
|
||||
QSize size(m_versionInfoLabel->sizeHint().width(), m_versionInfoLabel->sizeHint().height());
|
||||
QPoint pos(this->width() - size.width() - margin, this->height() - size.height() - margin);
|
||||
m_versionInfoLabel->resize(size.width(), size.height());
|
||||
m_versionInfoLabel->render(painter, pos);
|
||||
yPos += size.height() + margin;
|
||||
}
|
||||
|
||||
if (!m_cursorPositionDomainCoords.isUndefined())
|
||||
|
@ -50,7 +50,7 @@ class RiuViewerCommands: public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RiuViewerCommands(RiuViewer* ownerViewer);
|
||||
explicit RiuViewerCommands(RiuViewer* ownerViewer);
|
||||
~RiuViewerCommands();
|
||||
|
||||
void setOwnerView(RimView * owner);
|
||||
|
@ -54,7 +54,7 @@
|
||||
class RiuWellLogTrackQwtPicker : public QwtPlotPicker
|
||||
{
|
||||
public:
|
||||
RiuWellLogTrackQwtPicker(QWidget *canvas)
|
||||
explicit RiuWellLogTrackQwtPicker(QWidget *canvas)
|
||||
: QwtPlotPicker(canvas)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user