freetype-commit
[Top][All Lists]
Advanced

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

[freetype2-demos] master 8a6edd4 7/7: [ftinspect] Avoid parameters for s


From: Werner LEMBERG
Subject: [freetype2-demos] master 8a6edd4 7/7: [ftinspect] Avoid parameters for signal functions.
Date: Sun, 01 May 2016 08:05:41 +0000

branch: master
commit 8a6edd445a274824235594a2dad30155dee682f9
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [ftinspect] Avoid parameters for signal functions.
    
    This makes the code a bit more elegant.
    
    * src/ftinspect.cpp (MainGUI::checkHintingMode,
    MainGUI::checkAntiAliasing): Implement.
    (MainGUI::createConnections, MainGUI::setDefaults): Updated.
    
    * src/ftinspect.h: Updated.
---
 ChangeLog         |   12 ++++++++++++
 src/ftinspect.cpp |   15 +++++++++------
 src/ftinspect.h   |    4 ++--
 3 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5c4d478..1b7b416 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2016-05-01  Werner Lemberg  <address@hidden>
 
+       [ftinspect] Avoid parameters for signal functions.
+
+       This makes the code a bit more elegant.
+
+       * src/ftinspect.cpp (MainGUI::checkHintingMode,
+       MainGUI::checkAntiAliasing): Implement.
+       (MainGUI::createConnections, MainGUI::setDefaults): Updated.
+
+       * src/ftinspect.h: Updated.
+
+2016-05-01  Werner Lemberg  <address@hidden>
+
        [ftinspect] Rename some enum values.
 
        * src/ftinspect.cpp, src/ftinspect.h: Updated.
diff --git a/src/ftinspect.cpp b/src/ftinspect.cpp
index 4a6418b..d1852ee 100644
--- a/src/ftinspect.cpp
+++ b/src/ftinspect.cpp
@@ -63,8 +63,9 @@ MainGUI::about()
 
 
 void
-MainGUI::checkHintingMode(int index)
+MainGUI::checkHintingMode()
 {
+  int index = hintingModeComboBox->currentIndex();
   const QStandardItemModel* model = qobject_cast<const QStandardItemModel*>
                                       (antiAliasingComboBox->model());
   QStandardItem* AAslightItem = model->item(AntiAliasing_Slight);
@@ -105,8 +106,10 @@ MainGUI::checkHintingMode(int index)
 
 
 void
-MainGUI::checkAntiAliasing(int index)
+MainGUI::checkAntiAliasing()
 {
+  int index = antiAliasingComboBox->currentIndex();
+
   if (index == AntiAliasing_None
       || index == AntiAliasing_Normal
       || index == AntiAliasing_Slight)
@@ -391,9 +394,9 @@ void
 MainGUI::createConnections()
 {
   connect(hintingModeComboBox, SIGNAL(currentIndexChanged(int)), this,
-          SLOT(checkHintingMode(int)));
+          SLOT(checkHintingMode()));
   connect(antiAliasingComboBox, SIGNAL(currentIndexChanged(int)), this,
-          SLOT(checkAntiAliasing(int)));
+          SLOT(checkAntiAliasing()));
 
   connect(showPointsCheckBox, SIGNAL(clicked()), this,
           SLOT(checkShowPoints()));
@@ -454,8 +457,8 @@ MainGUI::setDefaults()
   showBitmapsCheckBox->setChecked(true);
   showOutlinesCheckBox->setChecked(true);
 
-  checkHintingMode(hintingModeComboBox->currentIndex());
-  checkAntiAliasing(antiAliasingComboBox->currentIndex());
+  checkHintingMode();
+  checkAntiAliasing();
   checkShowPoints();
 }
 
diff --git a/src/ftinspect.h b/src/ftinspect.h
index 0cdf5c8..9dd2394 100644
--- a/src/ftinspect.h
+++ b/src/ftinspect.h
@@ -46,8 +46,8 @@ protected:
 
 private slots:
   void about();
-  void checkAntiAliasing(int);
-  void checkHintingMode(int);
+  void checkAntiAliasing();
+  void checkHintingMode();
   void checkShowPoints();
 
 private:



reply via email to

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