freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][gsoc-2022-chariri] [ftinspect] Add `overr


From: Charlie Jiang (@cqjjjzr)
Subject: [Git][freetype/freetype-demos][gsoc-2022-chariri] [ftinspect] Add `override` modifiers to all overriding functions.
Date: Fri, 08 Jul 2022 00:39:15 +0000

Charlie Jiang pushed to branch gsoc-2022-chariri at FreeType / FreeType Demo Programs

Commits:

  • 8168f4aa
    by Charlie Jiang at 2022-07-08T08:38:11+08:00
    [ftinspect] Add `override` modifiers to all overriding functions.
    
    * src/ftinspect/**: As descibed above.
    

14 changed files:

Changes:

  • src/ftinspect/engine/engine.cpp
    ... ... @@ -28,12 +28,12 @@ FaceID::FaceID()
    28 28
     }
    
    29 29
     
    
    30 30
     
    
    31
    -FaceID::FaceID(int fontIdx,
    
    32
    -               long faceIdx,
    
    33
    -               int namedInstanceIdx)
    
    34
    -: fontIndex(fontIdx),
    
    35
    -  faceIndex(faceIdx),
    
    36
    -  namedInstanceIndex(namedInstanceIdx)
    
    31
    +FaceID::FaceID(int fontIndex,
    
    32
    +               long faceIndex,
    
    33
    +               int namedInstanceIndex)
    
    34
    +: fontIndex(fontIndex),
    
    35
    +  faceIndex(faceIndex),
    
    36
    +  namedInstanceIndex(namedInstanceIndex)
    
    37 37
     {
    
    38 38
       // empty
    
    39 39
     }
    

  • src/ftinspect/engine/fontfilemanager.hpp
    ... ... @@ -20,7 +20,7 @@ class FontFileManager
    20 20
       Q_OBJECT
    
    21 21
     public:
    
    22 22
       FontFileManager();
    
    23
    -  virtual ~FontFileManager() = default;
    
    23
    +  ~FontFileManager() override = default;
    
    24 24
     
    
    25 25
       int size();
    
    26 26
       void append(QStringList newFileNames);
    

  • src/ftinspect/maingui.hpp
    ... ... @@ -50,7 +50,7 @@ class MainGUI
    50 50
     
    
    51 51
     public:
    
    52 52
       MainGUI(Engine* engine);
    
    53
    -  ~MainGUI();
    
    53
    +  ~MainGUI() override;
    
    54 54
     
    
    55 55
       void setDefaults();
    
    56 56
     
    
    ... ... @@ -61,9 +61,9 @@ public:
    61 61
                                     FT_Face*);
    
    62 62
     
    
    63 63
     protected:
    
    64
    -  void closeEvent(QCloseEvent*);
    
    65
    -  void dragEnterEvent(QDragEnterEvent* event);
    
    66
    -  void dropEvent(QDropEvent* event);
    
    64
    +  void closeEvent(QCloseEvent*) override;
    
    65
    +  void dragEnterEvent(QDragEnterEvent* event) override;
    
    66
    +  void dropEvent(QDropEvent* event) override;
    
    67 67
     
    
    68 68
     private slots:
    
    69 69
       void about();
    

  • src/ftinspect/models/ttsettingscomboboxmodel.hpp
    ... ... @@ -26,12 +26,12 @@ public:
    26 26
       };
    
    27 27
     
    
    28 28
       explicit HintingModeComboBoxModel(QObject* parent);
    
    29
    -  virtual ~HintingModeComboBoxModel() = default;
    
    29
    +  ~HintingModeComboBoxModel() override = default;
    
    30 30
     
    
    31
    -  int rowCount(const QModelIndex& parent) const;
    
    31
    +  int rowCount(const QModelIndex& parent) const override;
    
    32 32
       QVariant data(const QModelIndex& index,
    
    33
    -                int role) const;
    
    34
    -  Qt::ItemFlags flags(const QModelIndex& index) const;
    
    33
    +                int role) const override;
    
    34
    +  Qt::ItemFlags flags(const QModelIndex& index) const override;
    
    35 35
     
    
    36 36
       int indexToTTInterpreterVersion(int index) const;
    
    37 37
       int indexToCFFMode(int index) const;
    
    ... ... @@ -83,7 +83,7 @@ public:
    83 83
       };
    
    84 84
     
    
    85 85
       explicit SimpleComboBoxModel(QObject* parent);
    
    86
    -  virtual ~SimpleComboBoxModel() = default;
    
    86
    +  ~SimpleComboBoxModel() override = default;
    
    87 87
     
    
    88 88
       int rowCount(const QModelIndex& parent) const;
    
    89 89
       QVariant data(const QModelIndex& index,
    

  • src/ftinspect/panels/settingpanel.hpp
    ... ... @@ -20,7 +20,7 @@ class SettingPanel
    20 20
       Q_OBJECT
    
    21 21
     public:
    
    22 22
       SettingPanel(QWidget* parent, Engine* engine);
    
    23
    -  ~SettingPanel() = default;
    
    23
    +  ~SettingPanel() override = default;
    
    24 24
     
    
    25 25
       void syncSettings();
    
    26 26
     
    

  • src/ftinspect/panels/singular.hpp
    ... ... @@ -35,12 +35,12 @@ class SingularTab
    35 35
       Q_OBJECT
    
    36 36
     public:
    
    37 37
       SingularTab(QWidget* parent, Engine* engine);
    
    38
    -  virtual ~SingularTab();
    
    38
    +  ~SingularTab() override;
    
    39 39
     
    
    40
    -  void repaint();
    
    41
    -  void reloadFont();
    
    42
    -  void syncSettings();
    
    43
    -  void setDefaults();
    
    40
    +  void repaint() override;
    
    41
    +  void reloadFont() override;
    
    42
    +  void syncSettings() override;
    
    43
    +  void setDefaults() override;
    
    44 44
     
    
    45 45
     private slots:
    
    46 46
       void setGlyphIndex(int);
    

  • src/ftinspect/rendering/glyphbitmap.hpp
    ... ... @@ -22,11 +22,11 @@ public:
    22 22
                   FT_Pixel_Mode pixelMode,
    
    23 23
                   const QVector<QRgb>& monoColorTable,
    
    24 24
                   const QVector<QRgb>& grayColorTable);
    
    25
    -  ~GlyphBitmap();
    
    26
    -  QRectF boundingRect() const;
    
    25
    +  ~GlyphBitmap() override;
    
    26
    +  QRectF boundingRect() const override;
    
    27 27
       void paint(QPainter* painter,
    
    28 28
                  const QStyleOptionGraphicsItem* option,
    
    29
    -             QWidget* widget);
    
    29
    +             QWidget* widget) override;
    
    30 30
     
    
    31 31
     private:
    
    32 32
       FT_Outline transformed_;
    

  • src/ftinspect/rendering/glyphoutline.cpp
    ... ... @@ -87,10 +87,10 @@ static FT_Outline_Funcs outlineFuncs =
    87 87
     } // extern "C"
    
    88 88
     
    
    89 89
     
    
    90
    -GlyphOutline::GlyphOutline(const QPen& outlineP,
    
    91
    -                           FT_Outline* outln)
    
    92
    -: outlinePen_(outlineP),
    
    93
    -  outline_(outln)
    
    90
    +GlyphOutline::GlyphOutline(const QPen& pen,
    
    91
    +                           FT_Outline* outline)
    
    92
    +: outlinePen_(pen),
    
    93
    +  outline_(outline)
    
    94 94
     {
    
    95 95
       FT_BBox cbox;
    
    96 96
     
    

  • src/ftinspect/rendering/glyphoutline.hpp
    ... ... @@ -19,10 +19,10 @@ class GlyphOutline
    19 19
     public:
    
    20 20
       GlyphOutline(const QPen& pen,
    
    21 21
                    FT_Outline* outline);
    
    22
    -  QRectF boundingRect() const;
    
    22
    +  QRectF boundingRect() const override;
    
    23 23
       void paint(QPainter* painter,
    
    24 24
                  const QStyleOptionGraphicsItem* option,
    
    25
    -             QWidget* widget);
    
    25
    +             QWidget* widget) override;
    
    26 26
     
    
    27 27
     private:
    
    28 28
       QPen outlinePen_;
    

  • src/ftinspect/rendering/glyphpointnumbers.hpp
    ... ... @@ -20,10 +20,10 @@ public:
    20 20
       GlyphPointNumbers(const QPen& onPen,
    
    21 21
                         const QPen& offPen,
    
    22 22
                         FT_Outline* outline);
    
    23
    -  QRectF boundingRect() const;
    
    23
    +  QRectF boundingRect() const override;
    
    24 24
       void paint(QPainter* painter,
    
    25 25
                  const QStyleOptionGraphicsItem* option,
    
    26
    -             QWidget* widget);
    
    26
    +             QWidget* widget) override;
    
    27 27
     
    
    28 28
     private:
    
    29 29
       QPen onPen_;
    

  • src/ftinspect/rendering/glyphpoints.hpp
    ... ... @@ -20,10 +20,10 @@ public:
    20 20
       GlyphPoints(const QPen& onPen,
    
    21 21
                   const QPen& offPen,
    
    22 22
                   FT_Outline* outline);
    
    23
    -  QRectF boundingRect() const;
    
    23
    +  QRectF boundingRect() const override;
    
    24 24
       void paint(QPainter* painter,
    
    25 25
                  const QStyleOptionGraphicsItem* option,
    
    26
    -             QWidget* widget);
    
    26
    +             QWidget* widget) override;
    
    27 27
     
    
    28 28
     private:
    
    29 29
       QPen onPen_;
    

  • src/ftinspect/rendering/grid.hpp
    ... ... @@ -15,10 +15,10 @@ public:
    15 15
       Grid(QGraphicsView* parentView,
    
    16 16
            const QPen& gridPen,
    
    17 17
            const QPen& axisPen);
    
    18
    -  QRectF boundingRect() const;
    
    18
    +  QRectF boundingRect() const override;
    
    19 19
       void paint(QPainter* painter,
    
    20 20
                  const QStyleOptionGraphicsItem* option,
    
    21
    -             QWidget* widget);
    
    21
    +             QWidget* widget) override;
    
    22 22
     
    
    23 23
       void updateRect(); // there's no signal/slots for QGraphicsItem.
    
    24 24
     
    

  • src/ftinspect/widgets/customwidgets.hpp
    ... ... @@ -31,10 +31,10 @@ signals:
    31 31
       void ctrlWheelEvent(QWheelEvent* event);
    
    32 32
     
    
    33 33
     protected:
    
    34
    -  void wheelEvent(QWheelEvent* event);
    
    35
    -  void resizeEvent(QResizeEvent* event);
    
    34
    +  void wheelEvent(QWheelEvent* event) override;
    
    35
    +  void resizeEvent(QResizeEvent* event) override;
    
    36 36
       void scrollContentsBy(int dx,
    
    37
    -                        int dy);
    
    37
    +                        int dy) override;
    
    38 38
     
    
    39 39
     private:
    
    40 40
       QPointF lastBottomLeftPoint_;
    
    ... ... @@ -50,8 +50,8 @@ class ZoomSpinBox
    50 50
     
    
    51 51
     public:
    
    52 52
       ZoomSpinBox(QWidget* parent);
    
    53
    -  void stepBy(int val);
    
    54
    -  int valueFromText(const QString& text) const;
    
    53
    +  void stepBy(int val) override;
    
    54
    +  int valueFromText(const QString& text) const override;
    
    55 55
     };
    
    56 56
     
    
    57 57
     
    

  • src/ftinspect/widgets/glyphindexselector.hpp
    ... ... @@ -17,7 +17,7 @@ class GlyphIndexSelector
    17 17
       Q_OBJECT
    
    18 18
     public:
    
    19 19
       GlyphIndexSelector(QWidget* parent);
    
    20
    -  virtual ~GlyphIndexSelector() = default;
    
    20
    +  ~GlyphIndexSelector() override = default;
    
    21 21
     
    
    22 22
       void setMin(int min);
    
    23 23
       void setMax(int max);
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]