]> OCCT Git - occt-copy.git/commitdiff
0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspe...
authorkgv <kgv@opencascade.com>
Tue, 6 Jul 2021 13:46:31 +0000 (16:46 +0300)
committerkgv <kgv@opencascade.com>
Tue, 6 Jul 2021 13:46:31 +0000 (16:46 +0300)
18 files changed:
tools/DFBrowser/DFBrowser_ItemBase.hxx
tools/DFBrowser/DFBrowser_SearchView.cxx
tools/DFBrowserPane/DFBrowserPane_AttributePaneModel.hxx
tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeItem.hxx
tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.cxx
tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.hxx
tools/DFBrowserPane/DFBrowserPane_TNamingUsedShapes.hxx
tools/DFBrowserPane/DFBrowserPane_TableView.cxx
tools/ShapeView/ShapeView_ItemRoot.hxx
tools/ShapeView/ShapeView_ItemShape.hxx
tools/ShapeView/ShapeView_OpenFileDialog.cxx
tools/ShapeView/ShapeView_Window.cxx
tools/TInspector/TInspector_OpenFileDialog.cxx
tools/TInspector/TInspector_Preferences.cxx
tools/TreeModel/TreeModel_ItemStream.hxx
tools/TreeModel/TreeModel_ModelBase.cxx
tools/ViewControl/ViewControl_ColorSelector.cxx
tools/ViewControl/ViewControl_TableModel.hxx

index c87ca1d0818a86341f6c031956cc10389bb6b98f..44f9cae780fcfb66a72b51097414d408fb26745c 100644 (file)
@@ -85,7 +85,7 @@ protected:
   virtual TreeModel_ItemBasePtr createChild (int theRow, int theColumn) Standard_OVERRIDE;
 
   //! Initializes the current item. It creates a backup of the specific item information
-  virtual void initItem() const {}
+  virtual void initItem() const Standard_OVERRIDE {}
 
 protected:
 
index 08ae8f658d123f601969beaa6b96e6d388afee4d..5ca5182b787907d5b6001beb3b3e801731cfc1cc 100644 (file)
@@ -35,8 +35,7 @@
 #include <QWidget>
 #include <Standard_WarningsRestore.hxx>
 
-const int DEFAULT_COLUMN_WIDTH = 500;
-const int DEFAULT_ICON_SIZE = 40;
+static const int DEFAULT_ICON_SIZE = 40;
 
 // =======================================================================
 // function : Constructor
index 804372ce177255a9c4abcfe4e2ad52921ac8ca88..e9b9d6db52c0c4bba54e63ade5136a04754237c1 100644 (file)
@@ -104,7 +104,7 @@ public:
   //! Returns flags for the item: ItemIsEnabled | Qt::ItemIsSelectable
   //! \param theIndex a model index
   //! \return flags
-  Qt::ItemFlags flags (const QModelIndex& theIndex) const
+  virtual Qt::ItemFlags flags (const QModelIndex& theIndex) const Standard_OVERRIDE
   { return theIndex.isValid() ? Qt::ItemIsEnabled | Qt::ItemIsSelectable : Qt::NoItemFlags; }
 
 private:
index 9570aea1b6a36c64ea866804e6600490ab4257ea..3c4e0a138805b65a1d7a77306996c839107b4ec6 100644 (file)
@@ -97,7 +97,7 @@ protected:
     : TreeModel_ItemBase (theParent, theRow, theColumn), myIsCurrentItem (false) {}
 
   //! Initializes the current item. It creates a backup of the specific item information
-  void initItem() const;
+  virtual void initItem() const Standard_OVERRIDE;
 
   //! Returns number of children attributes, initializes item is necessary
   int getRowCount() const;
index c93f7bf8f0d2ad42eb2ce9d41276616ec799f950..781c6d6efb31501ece4a817b9a81ef0bc752f6a8 100644 (file)
 #include <QWidget>
 #include <Standard_WarningsRestore.hxx>
 
-const int COLUMN_EXPORT_WIDTH = 20;
-const int COLUMN_TYPE_WIDTH = 70;
-const int COLUMN_POINTER_WIDTH = 110;
-const int COLUMN_REFERENCE_WIDTH = 90;
-const int COLUMN_EVOLUTION_WIDTH = 90;
+static const int COLUMN_EXPORT_WIDTH = 20;
 
 // =======================================================================
 // function : Constructor
index ccffd18335e34c7f4875bee8896412904e78a689..2d934d2330242de1ef5ddece73a949da1ccfb46a 100644 (file)
@@ -51,7 +51,7 @@ public:
 
   //! Initializes the content of the pane by the parameter attribute
   //! \param theAttribute an OCAF attribute
-  Standard_EXPORT void Init (const Handle(TDF_Attribute)& theAttribute);
+  Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
 
   //! Returns information for the given attribute
   //! \param theAttribute a current attribute
index d7b0466e977518ecff4aa02a794cb37a0a0ca62a..095b9556f80d957fc32651021a36891f7af40775 100644 (file)
@@ -58,7 +58,7 @@ public:
 protected:
   //! Defines widths of table columns
   //! \return container of widths
-  Standard_EXPORT virtual QMap<int, int> getTableColumnWidths() const;
+  Standard_EXPORT virtual QMap<int, int> getTableColumnWidths() const Standard_OVERRIDE;
 
 };
 
index 5bbf2281b661e06e0517b81aa61357cd97232241..514b46d3d1acef3e7b92b7f5407b323d95efda4a 100644 (file)
@@ -27,8 +27,6 @@
 #include <QWidget>
 #include <Standard_WarningsRestore.hxx>
 
-static const int DEFAULT_ROW_HEIGHT = 30;
-
 // =======================================================================
 // function : Constructor
 // purpose :
index c05495dfd2cebdc6f6973558bf19c5cdca39a76c..af31b26d6bd941f202bdccb83264b56373e60875 100644 (file)
@@ -55,7 +55,7 @@ protected:
   //! Returns data value for the role.
   //! \param theItemRole a value role
   //! \return the value
-  virtual QVariant initValue(const int theItemRole) const;
+  virtual QVariant initValue(const int theItemRole) const Standard_OVERRIDE;
 
   //! \return number of children.
   virtual int initRowCount() const Standard_OVERRIDE { return myShapes.Size(); }
index 6615691b619df570bd35b8ce8d027ef1cd4789a7..888a0e691546a9ba220de3e56cd02c8ec389a1e3 100644 (file)
@@ -82,7 +82,7 @@ public:
   //! Returns data value for the role.
   //! \param theRole a value role
   //! \return the value
-  Standard_EXPORT virtual QVariant initValue(const int theRole) const;
+  Standard_EXPORT virtual QVariant initValue(const int theRole) const Standard_OVERRIDE;
 
   //! \return number of children.
   Standard_EXPORT virtual int initRowCount() const Standard_OVERRIDE;
index 3ea9b1fb337514025ef006dfad12daf7c078df4c..b3588d414a4fa28e264ee10c7d1cffd9cf04ee9d 100644 (file)
 #include <QToolButton>
 #include <Standard_WarningsRestore.hxx>
 
-const int FONT_POINT_SIZE = 18;
-const int ICON_SIZE = 40;
+static const int ICON_SIZE = 40;
 
-const int OPEN_DIALOG_WIDTH = 550;
-const int OPEN_DIALOG_HEIGHT = 200;
+static const int OPEN_DIALOG_WIDTH = 550;
+static const int OPEN_DIALOG_HEIGHT = 200;
 
-const int MARGIN_DIALOG = 4;
-const int SPACING_DIALOG = 2;
+static const int MARGIN_DIALOG = 4;
+static const int SPACING_DIALOG = 2;
 
 // =======================================================================
 // function : StartButton
index d6f54d75cc4cd24f428c2f91b08d2dfc7b1c5ea6..d53ad474397d55d4f20bc02efe19ca03f9efe5d7 100644 (file)
 #include <QVBoxLayout>
 #include <Standard_WarningsRestore.hxx>
 
-const int DEFAULT_TEXT_VIEW_WIDTH = 800;
-const int DEFAULT_TEXT_VIEW_HEIGHT = 700;
-const int DEFAULT_TEXT_VIEW_POSITION_X = 430;
-const int DEFAULT_TEXT_VIEW_POSITION_Y = 30;
-const int DEFAULT_TEXT_VIEW_DELTA = 100;
-
-const int DEFAULT_SHAPE_VIEW_WIDTH = 900;
-const int DEFAULT_SHAPE_VIEW_HEIGHT = 450;
-const int DEFAULT_SHAPE_VIEW_POSITION_X = 60;
-const int DEFAULT_SHAPE_VIEW_POSITION_Y = 60;
-
-const int SHAPEVIEW_DEFAULT_TREE_VIEW_WIDTH = 600;
-const int SHAPEVIEW_DEFAULT_TREE_VIEW_HEIGHT = 500;
-
-const int SHAPEVIEW_DEFAULT_VIEW_WIDTH = 300;
-const int SHAPEVIEW_DEFAULT_VIEW_HEIGHT = 1000;
+static const int DEFAULT_SHAPE_VIEW_WIDTH = 900;
+static const int DEFAULT_SHAPE_VIEW_HEIGHT = 450;
+static const int DEFAULT_SHAPE_VIEW_POSITION_X = 60;
+static const int DEFAULT_SHAPE_VIEW_POSITION_Y = 60;
+
+static const int SHAPEVIEW_DEFAULT_TREE_VIEW_WIDTH = 600;
+static const int SHAPEVIEW_DEFAULT_TREE_VIEW_HEIGHT = 500;
+
+static const int SHAPEVIEW_DEFAULT_VIEW_WIDTH = 300;
+static const int SHAPEVIEW_DEFAULT_VIEW_HEIGHT = 1000;
 
 // =======================================================================
 // function : Constructor
index 622818ab8389fd6c2487bfe1c7404e57aac89fd4..04473faf581e055022d6cc5c1c0fcf8954ff6e42 100644 (file)
 #include <QWidget>
 #include <Standard_WarningsRestore.hxx>
 
-const int FONT_POINT_SIZE = 18;
-const int ICON_SIZE = 40;
+static const int ICON_SIZE = 40;
 
-const int OPEN_DIALOG_WIDTH = 550;
-const int OPEN_DIALOG_HEIGHT = 200;
+static const int OPEN_DIALOG_WIDTH = 550;
+static const int OPEN_DIALOG_HEIGHT = 200;
 
-const int MARGIN_DIALOG = 4;
-const int SPACING_DIALOG = 2;
+static const int MARGIN_DIALOG = 4;
+static const int SPACING_DIALOG = 2;
 
-const int RECENT_FILES_CACHE_SIZE = 10;
+static const int RECENT_FILES_CACHE_SIZE = 10;
 
 TInspector_Communicator* MyCommunicator;
 
index c335fab59c44a967c45da34e60d77607b57c3570..00d6593eea302e3e416feaea9086847b6ecae7f2 100644 (file)
@@ -79,7 +79,9 @@ void TInspector_Preferences::StorePreferences()
   QTextStream aTextStream (&aFile);
   QStringList aDocumentStr = aDomDocument.toString().split ("\n");
   for (QStringList::ConstIterator aContentIt = aDocumentStr.begin(); aContentIt != aDocumentStr.end(); ++aContentIt)
-    aTextStream << *aContentIt << endl;
+  {
+    aTextStream << *aContentIt << '\n';
+  }
   aFile.close();
 }
 
index 800e014cb1eec42f5840124b1779f454b99fbfdd..65fa16c7ff9dd9efb99ce997ccdc2f1395a2e5f3 100644 (file)
@@ -69,7 +69,7 @@ public:
 protected:
   //! Returns stream value of the item to fulfill property panel.
   //! \return stream value or dummy
-  Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const;
+  Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE;
 
   //! Initializes the current item. It creates a backup of the specific item information
   //! Does nothing as context has been already set into item
index 5dd4055b7e027ed4f5dae409bc25710dc6509f04..30b320251c9e09dc445b73d16b3acc7b6bd2dfbc 100644 (file)
@@ -162,7 +162,9 @@ QModelIndex TreeModel_ModelBase::parent (const QModelIndex& theIndex) const
 Qt::ItemFlags TreeModel_ModelBase::flags (const QModelIndex& theIndex) const
 {
   if (!theIndex.isValid())
-    return 0;
+  {
+    return Qt::ItemFlags();
+  }
   return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
 }
 
index 67fff81f73205a750094e785814cbf4d6591d585..2e480bcf7ad52e2355ea7d1b4be6a9db0f921185 100644 (file)
@@ -105,7 +105,7 @@ public:
   //! \param theColumn a model index column
   //! \param theRole a view role
   //! \return true if the value is changed
-  virtual bool SetData (const int theRow, const int theColumn, const QVariant& theValue, int)
+  virtual bool SetData (const int theRow, const int theColumn, const QVariant& theValue, int) Standard_OVERRIDE
   {
     if (theColumn != 1 || theRow < 2 || theRow > 5)
       return false;
@@ -138,7 +138,7 @@ public:
 
   //! Returns editable flag for color RGB and alpha rows
   //! \return flags
-  Qt::ItemFlags Flags (const QModelIndex& theIndex) const
+  virtual Qt::ItemFlags Flags (const QModelIndex& theIndex) const Standard_OVERRIDE
   {
     Qt::ItemFlags aFlags = ViewControl_TableModelValues::Flags (theIndex);
 
index 0255187feb02d053f55e04fdaf25e2c7e8f03c67..aeadc44bd1fe6a2f64fc0dbd1fee30b4e134b2de 100644 (file)
@@ -90,7 +90,7 @@ public:
   //! Returns flags for the item: ItemIsEnabled | Qt::ItemIsSelectable
   //! \param theIndex a model index
   //! \return flags
-  Qt::ItemFlags flags (const QModelIndex& theIndex) const
+  virtual Qt::ItemFlags flags (const QModelIndex& theIndex) const Standard_OVERRIDE
   { return myModelValues ? myModelValues->Flags (theIndex) : Qt::NoItemFlags; }
 
 private: