Skip to content

Commit

Permalink
StelPluginInterface: Use the most-used override in base class.
Browse files Browse the repository at this point in the history
- comment away all same-code overrides. (But keep it to remind us of possible override)
  • Loading branch information
gzotti committed Sep 11, 2023
1 parent cfe356a commit dec1204
Show file tree
Hide file tree
Showing 27 changed files with 29 additions and 25 deletions.
2 changes: 1 addition & 1 deletion plugins/AngleMeasure/src/AngleMeasure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class AngleMeasureStelPluginInterface : public QObject, public StelPluginInterfa
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /*ANGLEMEASURE_HPP*/
2 changes: 1 addition & 1 deletion plugins/ArchaeoLines/src/ArchaeoLines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ class ArchaeoLinesStelPluginInterface : public QObject, public StelPluginInterfa
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /*ARCHAEOLINES_HPP*/
Expand Down
2 changes: 1 addition & 1 deletion plugins/Calendars/src/Calendars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class CalendarsStelPluginInterface : public QObject, public StelPluginInterface
public:
StelModule* getStelModule() const override;
StelPluginInfo getPluginInfo() const override;
QObjectList getExtensionList() const override { return QObjectList(); }
//QObjectList getExtensionList() const override { return QObjectList(); }
};

#endif /* CALENDARS_HPP */
2 changes: 1 addition & 1 deletion plugins/EquationOfTime/src/EquationOfTime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class EquationOfTimeStelPluginInterface : public QObject, public StelPluginInter
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /* EQUATIONOFTIME_HPP */
2 changes: 1 addition & 1 deletion plugins/Exoplanets/src/Exoplanets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ class ExoplanetsStelPluginInterface : public QObject, public StelPluginInterface
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /* EXOPLANETS_HPP */
2 changes: 1 addition & 1 deletion plugins/MeteorShowers/src/MeteorShowersMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class MeteorShowersStelPluginInterface : public QObject, public StelPluginInterf
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /*METEORSHOWERSMGR_HPP*/
2 changes: 1 addition & 1 deletion plugins/MissingStars/src/MissingStars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class MissingStarsStelPluginInterface : public QObject, public StelPluginInterfa
public:
virtual StelModule* getStelModule() const override;
virtual StelPluginInfo getPluginInfo() const override;
virtual QObjectList getExtensionList() const override { return QObjectList(); }
//virtual QObjectList getExtensionList() const override { return QObjectList(); }
};

#endif /* MISSINGSTARS_HPP */
2 changes: 1 addition & 1 deletion plugins/NavStars/src/NavStars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class NavStarsStelPluginInterface : public QObject, public StelPluginInterface
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif // NAVSTARS_HPP
2 changes: 1 addition & 1 deletion plugins/Novae/src/Novae.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class NovaeStelPluginInterface : public QObject, public StelPluginInterface
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /*NOVAE_HPP*/
2 changes: 1 addition & 1 deletion plugins/Observability/src/Observability.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ class ObservabilityStelPluginInterface : public QObject, public StelPluginInterf
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /*OBSERVABILITY_HPP*/
2 changes: 1 addition & 1 deletion plugins/Oculars/src/Oculars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ class OcularsStelPluginInterface : public QObject, public StelPluginInterface
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /* OCULARS_HPP */
2 changes: 1 addition & 1 deletion plugins/OnlineQueries/src/OnlineQueries.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class OnlineQueriesPluginInterface : public QObject, public StelPluginInterface
public:
StelModule* getStelModule() const override;
StelPluginInfo getPluginInfo() const override;
QObjectList getExtensionList() const override { return QObjectList(); }
//QObjectList getExtensionList() const override { return QObjectList(); }
};

#endif /* ONLINEQUERIES_HPP */
2 changes: 1 addition & 1 deletion plugins/PointerCoordinates/src/PointerCoordinates.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class PointerCoordinatesStelPluginInterface : public QObject, public StelPluginI
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /* POINTERCOORDINATES_HPP */
2 changes: 1 addition & 1 deletion plugins/Pulsars/src/Pulsars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class PulsarsStelPluginInterface : public QObject, public StelPluginInterface
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /* PULSARS_HPP */
2 changes: 1 addition & 1 deletion plugins/Quasars/src/Quasars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class QuasarsStelPluginInterface : public QObject, public StelPluginInterface
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /* QUASARS_HPP */
2 changes: 1 addition & 1 deletion plugins/RemoteControl/src/RemoteControl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class RemoteControlStelPluginInterface : public QObject, public StelPluginInterf
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /*REMOTECONTROL_HPP*/
Expand Down
2 changes: 1 addition & 1 deletion plugins/RemoteSync/src/RemoteSync.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class RemoteSyncStelPluginInterface : public QObject, public StelPluginInterface
public:
StelModule* getStelModule() const override;
StelPluginInfo getPluginInfo() const override;
QObjectList getExtensionList() const override { return QObjectList(); }
//QObjectList getExtensionList() const override { return QObjectList(); }
};

#endif /*REMOTESYNC_HPP*/
Expand Down
2 changes: 1 addition & 1 deletion plugins/Satellites/src/Satellites.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ class SatellitesStelPluginInterface : public QObject, public StelPluginInterface
public:
StelModule* getStelModule() const override;
StelPluginInfo getPluginInfo() const override;
QObjectList getExtensionList() const override { return QObjectList(); }
//QObjectList getExtensionList() const override { return QObjectList(); }
};

#endif /* SATELLITES_HPP */
Expand Down
2 changes: 2 additions & 0 deletions plugins/SimpleDrawLine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This is the cmake config file for the SimpleDrawLine
SET(SIMPLEDRAWLINE_VERSION "0.1.0")
ADD_DEFINITIONS(-DBUILD_DYNAMIC_PLUGIN=0)
ADD_DEFINITIONS(-DSIMPLEDRAWLINE_PLUGIN_VERSION="${SIMPLEDRAWLINE_VERSION}")
ADD_DEFINITIONS(-DSIMPLEDRAWLINE_PLUGIN_LICENSE="GNU GPLv2 or later")

ADD_SUBDIRECTORY( src )

Expand Down
2 changes: 1 addition & 1 deletion plugins/SimpleDrawLine/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SET(SimpleDrawLine_SRCS
SimpleDrawLine.cpp
)

SET(SimpleDrawLine_Qt_Libraries Qt5::Core Qt5::Gui)
SET(SimpleDrawLine_Qt_Libraries Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui)

############### For building the dynamic library ######################
IF(BUILD_DYNAMIC_PLUGIN)
Expand Down
2 changes: 2 additions & 0 deletions plugins/SimpleDrawLine/src/SimpleDrawLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ StelPluginInfo SimpleDrawLineStelPluginInterface::getPluginInfo() const
info.authors = "Stellarium team";
info.contact = "www.stellarium.org";
info.description = "An minimal plugin example for drawing lines.";
info.version = SIMPLEDRAWLINE_PLUGIN_VERSION;
info.license = SIMPLEDRAWLINE_PLUGIN_LICENSE;
return info;
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/SimpleDrawLine/src/SimpleDrawLine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SimpleDrawLineStelPluginInterface : public QObject, public StelPluginInter
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /* SIMPLEDRAWLINE_HPP */
2 changes: 1 addition & 1 deletion plugins/SolarSystemEditor/src/SolarSystemEditor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class SolarSystemEditorStelPluginInterface : public QObject, public StelPluginIn
public:
StelModule* getStelModule() const override;
StelPluginInfo getPluginInfo() const override;
QObjectList getExtensionList() const override { return QObjectList(); }
//QObjectList getExtensionList() const override { return QObjectList(); }
};

#endif // SOLARSYSTEMEDITOR_HPP
2 changes: 1 addition & 1 deletion plugins/Supernovae/src/Supernovae.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class SupernovaeStelPluginInterface : public QObject, public StelPluginInterface
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /* SUPERNOVAE_HPP */
2 changes: 1 addition & 1 deletion plugins/TelescopeControl/src/TelescopeControl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ class TelescopeControlStelPluginInterface : public QObject, public StelPluginInt
public:
StelModule* getStelModule() const override;
StelPluginInfo getPluginInfo() const override;
QObjectList getExtensionList() const override { return QObjectList(); }
//QObjectList getExtensionList() const override { return QObjectList(); }
};

#endif /* TELESCOPECONTROL_HPP */
2 changes: 1 addition & 1 deletion plugins/TextUserInterface/src/TextUserInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class TextUserInterfaceStelPluginInterface : public QObject, public StelPluginIn
public:
virtual StelModule* getStelModule() const Q_DECL_OVERRIDE;
virtual StelPluginInfo getPluginInfo() const Q_DECL_OVERRIDE;
virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
//virtual QObjectList getExtensionList() const Q_DECL_OVERRIDE { return QObjectList(); }
};

#endif /* TEXTUSERINTERFACE_HPP*/
2 changes: 1 addition & 1 deletion src/core/StelPluginInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class StelPluginInterface
//! The StelModuleMgr remembers all loaded extensions and provides
//! methods to access them. You should use qobject_cast to try to
//! cast each object to a specific interface in which you are interested in.
virtual QObjectList getExtensionList() const = 0;
virtual QObjectList getExtensionList() const { return QObjectList(); };
};

#define StelPluginInterface_iid "org.stellarium.StelPluginInterface/2.0"
Expand Down

0 comments on commit dec1204

Please sign in to comment.