Gui: Single arg ctors must be explicit (PR #7369)

This commit is contained in:
berniev
2022-08-15 12:24:41 +10:00
committed by wmayer
parent c429473a4a
commit 3877fc62c3
122 changed files with 237 additions and 237 deletions

View File

@@ -36,7 +36,7 @@ namespace Gui
{
Q_OBJECT
public:
GuiAbstractNativeEvent(GUIApplicationNativeEventAware *app);
explicit GuiAbstractNativeEvent(GUIApplicationNativeEventAware *app);
~GuiAbstractNativeEvent() override =0;
virtual void initSpaceball(QMainWindow *window)=0;
private:

View File

@@ -61,7 +61,7 @@ namespace Gui
{
Q_OBJECT
public:
GuiNativeEvent(GUIApplicationNativeEventAware *app);
explicit GuiNativeEvent(GUIApplicationNativeEventAware *app);
~GuiNativeEvent() override;
void initSpaceball(QMainWindow *window) final;
private:

View File

@@ -384,7 +384,7 @@ namespace Gui {
class WorkbenchActionEvent : public QEvent
{
public:
WorkbenchActionEvent(QAction* a)
explicit WorkbenchActionEvent(QAction* a)
: QEvent(QEvent::User), act(a)
{ }
~WorkbenchActionEvent() override

View File

@@ -51,7 +51,7 @@ namespace Gui
class GuiExport ActiveObjectList
{
public:
ActiveObjectList(Document *doc)
explicit ActiveObjectList(Document *doc)
:_Doc(doc)
{}

View File

@@ -160,7 +160,7 @@ public:
// Pimpl class
struct ApplicationP
{
ApplicationP(bool GUIenabled) :
explicit ApplicationP(bool GUIenabled) :
activeDocument(nullptr),
editDocument(nullptr),
isClosing(false),

View File

@@ -55,7 +55,7 @@ class GuiExport Application
{
public:
/// construction
Application(bool GUIenabled);
explicit Application(bool GUIenabled);
/// destruction
~Application();

View File

@@ -232,7 +232,7 @@ void CreateLinkCommands();
class GuiExport CommandBase
{
protected:
CommandBase(const char* sMenu, const char* sToolTip=nullptr, const char* sWhat=nullptr,
explicit CommandBase(const char* sMenu, const char* sToolTip=nullptr, const char* sWhat=nullptr,
const char* sStatus=nullptr, const char* sPixmap=nullptr, const char* sAccel=nullptr);
virtual ~CommandBase();
@@ -313,7 +313,7 @@ protected:
class GuiExport Command : public CommandBase
{
protected:
Command(const char* name);
explicit Command(const char* name);
~Command() override;
protected:
@@ -627,7 +627,7 @@ private:
class GuiExport GroupCommand : public Command {
public:
/// Constructor
GroupCommand(const char *name);
explicit GroupCommand(const char *name);
/** Add child command
* @param cmd: child command. Pass null pointer to add a separator.
@@ -770,7 +770,7 @@ protected:
class MacroCommand: public Command
{
public:
MacroCommand(const char* name, bool system = false);
explicit MacroCommand(const char* name, bool system = false);
~MacroCommand() override;
protected:

View File

@@ -564,7 +564,7 @@ CmdTestProgress5::CmdTestProgress5()
class BarThread : public QThread
{
public:
BarThread(unsigned long s) : steps(s)
explicit BarThread(unsigned long s) : steps(s)
{
}
~BarThread() override

View File

@@ -52,7 +52,7 @@ namespace Gui
{
Q_OBJECT
public:
LineEdit(QWidget *parentIn = nullptr);
explicit LineEdit(QWidget *parentIn = nullptr);
Q_SIGNALS:
void acceptedSignal();
void rejectedSignal();

View File

@@ -134,7 +134,7 @@ namespace Gui
template <class GraphEW>
class Edge_writer {
public:
Edge_writer(const GraphEW &graphEWIn) : graphEW(graphEWIn) {}
explicit Edge_writer(const GraphEW &graphEWIn) : graphEW(graphEWIn) {}
template <class EdgeW>
void operator()(std::ostream& out, const EdgeW& /*edgeW*/) const
{
@@ -149,7 +149,7 @@ namespace Gui
template <class GraphVW>
class Vertex_writer {
public:
Vertex_writer(const GraphVW &graphVWIn) : graphVW(graphVWIn) {}
explicit Vertex_writer(const GraphVW &graphVWIn) : graphVW(graphVWIn) {}
template <class VertexW>
void operator()(std::ostream& out, const VertexW& vertexW) const
{
@@ -176,7 +176,7 @@ namespace Gui
typedef boost::graph_traits<Graph>::vertex_descriptor GraphInVertex;
typedef std::vector<GraphInVertex> GraphInVertices;
public:
RakeLeaves(const GraphIn &graphIn) : graph(graphIn) {}
explicit RakeLeaves(const GraphIn &graphIn) : graph(graphIn) {}
GraphInVertices operator()() const
{
GraphInVertices out;
@@ -198,7 +198,7 @@ namespace Gui
typedef boost::graph_traits<Graph>::vertex_descriptor GraphInVertex;
typedef std::vector<GraphInVertex> GraphInVertices;
public:
DigRoots(const GraphIn &graphIn) : graph(graphIn) {}
explicit DigRoots(const GraphIn &graphIn) : graph(graphIn) {}
GraphInVertices operator()() const
{
GraphInVertices out;
@@ -218,7 +218,7 @@ namespace Gui
class ConnectionVisitor : public boost::default_bfs_visitor
{
public:
ConnectionVisitor(std::vector<Vertex> &verticesIn) : vertices(verticesIn){}
explicit ConnectionVisitor(std::vector<Vertex> &verticesIn) : vertices(verticesIn){}
template<typename TVertex, typename TGraph>
void discover_vertex(TVertex vertex, TGraph &graph)

View File

@@ -37,7 +37,7 @@ namespace Gui
class RectItem : public QGraphicsRectItem
{
public:
RectItem(QGraphicsItem* parent = nullptr);
explicit RectItem(QGraphicsItem* parent = nullptr);
void setBackgroundBrush(const QBrush &brushIn){backgroundBrush = brushIn;}
void setEditingBrush(const QBrush &brushIn){editBrush = brushIn;}
void preHighlightOn(){preSelected = true;}

View File

@@ -43,7 +43,7 @@ namespace Gui
{
Q_OBJECT
public:
View(QWidget *parentIn = nullptr);
explicit View(QWidget *parentIn = nullptr);
~View() override;
public Q_SLOTS:
@@ -66,7 +66,7 @@ namespace Gui
{
Q_OBJECT
public:
DockWindow(Gui::Document* gDocumentIn = nullptr, QWidget *parent = nullptr);
explicit DockWindow(Gui::Document* gDocumentIn = nullptr, QWidget *parent = nullptr);
~DockWindow() override{}
private:

View File

@@ -53,7 +53,7 @@ class DlgCustomActionsImp : public CustomizeActionPage
Q_OBJECT
public:
DlgCustomActionsImp( QWidget* parent = nullptr );
explicit DlgCustomActionsImp( QWidget* parent = nullptr );
~DlgCustomActionsImp() override;
Q_SIGNALS:
@@ -96,7 +96,7 @@ class IconDialog : public QDialog
Q_OBJECT
public:
IconDialog(QWidget* parent);
explicit IconDialog(QWidget* parent);
~IconDialog() override;
void resizeEvent(QResizeEvent*) override;
QListWidgetItem* currentItem() const;

View File

@@ -40,7 +40,7 @@ class DlgActivateWindowImp : public QDialog
Q_OBJECT
public:
DlgActivateWindowImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
explicit DlgActivateWindowImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgActivateWindowImp() override;
protected:

View File

@@ -43,7 +43,7 @@ typedef std::vector< std::pair<QLatin1String, QString> > GroupMap;
struct GroupMap_find {
const QLatin1String& item;
GroupMap_find(const QLatin1String& item) : item(item) {}
explicit GroupMap_find(const QLatin1String& item) : item(item) {}
bool operator () (const std::pair<QLatin1String, QString>& elem) const
{
return elem.first == item;

View File

@@ -46,7 +46,7 @@ class DlgCustomCommandsImp : public CustomizeActionPage
Q_OBJECT
public:
DlgCustomCommandsImp(QWidget* parent = nullptr);
explicit DlgCustomCommandsImp(QWidget* parent = nullptr);
~DlgCustomCommandsImp() override;
protected Q_SLOTS:

View File

@@ -51,7 +51,7 @@ class GuiExport DlgCreateNewPreferencePackImp : public QDialog
public:
DlgCreateNewPreferencePackImp(QWidget* parent = nullptr);
explicit DlgCreateNewPreferencePackImp(QWidget* parent = nullptr);
~DlgCreateNewPreferencePackImp() override;
void setPreferencePackTemplates(const std::vector<PreferencePackManager::TemplateFile> &availableTemplates);

View File

@@ -51,7 +51,7 @@ class DlgCustomizeImp : public QDialog
Q_OBJECT
public:
DlgCustomizeImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
explicit DlgCustomizeImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgCustomizeImp() override;
static void addPage(const char* className);

View File

@@ -44,7 +44,7 @@ namespace Gui
{
Q_OBJECT
public:
ButtonView(QWidget *parent = nullptr);
explicit ButtonView(QWidget *parent = nullptr);
void selectButton(int number);
Q_SIGNALS:
void changeCommandSelection(const QString& commandName);
@@ -59,7 +59,7 @@ namespace Gui
{
Q_OBJECT
public:
ButtonModel(QObject *parent);
explicit ButtonModel(QObject *parent);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
void insertButtonRows(int number);
@@ -79,7 +79,7 @@ namespace Gui
{
Q_OBJECT
public:
CommandView(QWidget *parent = nullptr);
explicit CommandView(QWidget *parent = nullptr);
public Q_SLOTS:
void goChangeCommandSelection(const QString& commandName);
private Q_SLOTS:
@@ -93,7 +93,7 @@ namespace Gui
public:
enum NodeType {RootType, GroupType, CommandType};
CommandNode(NodeType typeIn);
explicit CommandNode(NodeType typeIn);
~CommandNode();
NodeType nodeType;
@@ -107,7 +107,7 @@ namespace Gui
{
Q_OBJECT
public:
CommandModel(QObject *parent = nullptr);
explicit CommandModel(QObject *parent = nullptr);
~CommandModel() override;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &index) const override;
@@ -144,7 +144,7 @@ namespace Gui
{
Q_OBJECT
public:
DlgCustomizeSpaceball(QWidget *parent = nullptr);
explicit DlgCustomizeSpaceball(QWidget *parent = nullptr);
~DlgCustomizeSpaceball() override;
protected:
void changeEvent(QEvent *e) override;

View File

@@ -56,7 +56,7 @@ class DlgDisplayPropertiesImp : public QDialog,
Q_OBJECT
public:
DlgDisplayPropertiesImp(bool floating, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
explicit DlgDisplayPropertiesImp(bool floating, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgDisplayPropertiesImp() override;
/// Observer message from the Selection
void OnChange(Gui::SelectionSingleton::SubjectType &rCaller,

View File

@@ -45,7 +45,7 @@ class DlgSettingsEditorImp : public PreferencePage
Q_OBJECT
public:
DlgSettingsEditorImp( QWidget* parent = nullptr );
explicit DlgSettingsEditorImp( QWidget* parent = nullptr );
~DlgSettingsEditorImp() override;
public:

View File

@@ -46,7 +46,7 @@ typedef std::vector< std::pair<QLatin1String, QString> > GroupMap;
struct GroupMap_find {
const QLatin1String& item;
GroupMap_find(const QLatin1String& item) : item(item) {}
explicit GroupMap_find(const QLatin1String& item) : item(item) {}
bool operator () (const std::pair<QLatin1String, QString>& elem) const
{
return elem.first == item;

View File

@@ -45,7 +45,7 @@ class DlgCustomKeyboardImp : public CustomizeActionPage
Q_OBJECT
public:
DlgCustomKeyboardImp( QWidget* parent = nullptr );
explicit DlgCustomKeyboardImp( QWidget* parent = nullptr );
~DlgCustomKeyboardImp() override;
protected:

View File

@@ -44,7 +44,7 @@ class DlgMacroExecuteImp : public QDialog, public Gui::WindowParameter
Q_OBJECT
public:
DlgMacroExecuteImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
explicit DlgMacroExecuteImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgMacroExecuteImp() override;
void accept() override;

View File

@@ -42,7 +42,7 @@ class DlgMacroRecordImp : public QDialog, public Gui::WindowParameter
Q_OBJECT
public:
DlgMacroRecordImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
explicit DlgMacroRecordImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
~DlgMacroRecordImp() override;
protected Q_SLOTS:

View File

@@ -39,7 +39,7 @@ class DlgMaterialPropertiesImp : public QDialog
Q_OBJECT
public:
DlgMaterialPropertiesImp(const std::string& mat, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
explicit DlgMaterialPropertiesImp(const std::string& mat, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgMaterialPropertiesImp() override;
void setViewProviders(const std::vector<Gui::ViewProvider*>&);
QColor diffuseColor() const;

View File

@@ -47,7 +47,7 @@ class GuiExport DlgParameterImp : public QDialog
Q_OBJECT
public:
DlgParameterImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
explicit DlgParameterImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
~DlgParameterImp() override;
void accept() override;
@@ -95,7 +95,7 @@ class ParameterGroup : public QTreeWidget
Q_OBJECT
public:
ParameterGroup( QWidget * parent = nullptr );
explicit ParameterGroup( QWidget * parent = nullptr );
~ParameterGroup() override;
protected:
@@ -147,7 +147,7 @@ class ParameterValue : public QTreeWidget
Q_OBJECT
public:
ParameterValue( QWidget * parent = nullptr );
explicit ParameterValue( QWidget * parent = nullptr );
~ParameterValue() override;
/** Sets the current parameter group that is displayed. */

View File

@@ -118,7 +118,7 @@ public:
static void getGroupData(const std::string& group, std::string& icon, QString& tip);
static void reloadSettings();
DlgPreferencesImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
explicit DlgPreferencesImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgPreferencesImp() override;
void accept() override;

View File

@@ -52,7 +52,7 @@ using namespace Gui::Dialog;
class ItemDelegate: public QStyledItemDelegate {
public:
ItemDelegate(QObject* parent=nullptr): QStyledItemDelegate(parent) {}
explicit ItemDelegate(QObject* parent=nullptr): QStyledItemDelegate(parent) {}
QWidget* createEditor(QWidget *parent,
const QStyleOptionViewItem &option, const QModelIndex &index) const override

View File

@@ -40,7 +40,7 @@ class DlgReportViewImp : public PreferencePage
Q_OBJECT
public:
DlgReportViewImp( QWidget* parent = nullptr );
explicit DlgReportViewImp( QWidget* parent = nullptr );
~DlgReportViewImp() override;
void saveSettings() override;

View File

@@ -39,7 +39,7 @@ class DlgRevertToBackupConfigImp : public QDialog
Q_OBJECT
public:
DlgRevertToBackupConfigImp( QWidget* parent = nullptr );
explicit DlgRevertToBackupConfigImp( QWidget* parent = nullptr );
~DlgRevertToBackupConfigImp() override;
public Q_SLOTS:

View File

@@ -41,7 +41,7 @@ class GuiExport DlgRunExternal : public QDialog
Q_OBJECT
public:
DlgRunExternal(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
explicit DlgRunExternal(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgRunExternal() override;
int Do();

View File

@@ -43,7 +43,7 @@ class DlgSettings3DViewImp : public PreferencePage
Q_OBJECT
public:
DlgSettings3DViewImp(QWidget* parent = nullptr);
explicit DlgSettings3DViewImp(QWidget* parent = nullptr);
~DlgSettings3DViewImp() override;
void saveSettings() override;

View File

@@ -41,7 +41,7 @@ class DlgSettingsCacheDirectory : public PreferencePage
Q_OBJECT
public:
DlgSettingsCacheDirectory(QWidget* parent = nullptr);
explicit DlgSettingsCacheDirectory(QWidget* parent = nullptr);
~DlgSettingsCacheDirectory() override;
void saveSettings() override;

View File

@@ -44,7 +44,7 @@ class DlgSettingsColorGradientImp : public QDialog
Q_OBJECT
public:
DlgSettingsColorGradientImp(const App::ColorGradient& cg,
explicit DlgSettingsColorGradientImp(const App::ColorGradient& cg,
QWidget* parent = nullptr,
Qt::WindowFlags fl = Qt::WindowFlags());
~DlgSettingsColorGradientImp() override;

View File

@@ -41,7 +41,7 @@ class DlgSettingsDocumentImp : public PreferencePage
Q_OBJECT
public:
DlgSettingsDocumentImp( QWidget* parent = nullptr );
explicit DlgSettingsDocumentImp( QWidget* parent = nullptr );
~DlgSettingsDocumentImp() override;
void saveSettings() override;

View File

@@ -43,7 +43,7 @@ class DlgSettingsImageImp : public QWidget
Q_OBJECT
public:
DlgSettingsImageImp( QWidget* parent = nullptr );
explicit DlgSettingsImageImp( QWidget* parent = nullptr );
~DlgSettingsImageImp() override;
/** @name Image dimensions */

View File

@@ -44,7 +44,7 @@ class DlgSettingsLazyLoadedImp : public PreferencePage
Q_OBJECT
public:
DlgSettingsLazyLoadedImp( QWidget* parent = nullptr );
explicit DlgSettingsLazyLoadedImp( QWidget* parent = nullptr );
~DlgSettingsLazyLoadedImp() override;
void saveSettings() override;

View File

@@ -41,7 +41,7 @@ class DlgSettingsMacroImp : public PreferencePage
Q_OBJECT
public:
DlgSettingsMacroImp( QWidget* parent = nullptr );
explicit DlgSettingsMacroImp( QWidget* parent = nullptr );
~DlgSettingsMacroImp() override;
void saveSettings() override;

View File

@@ -44,7 +44,7 @@ class DlgSettingsNavigation : public PreferencePage
Q_OBJECT
public:
DlgSettingsNavigation(QWidget* parent = nullptr);
explicit DlgSettingsNavigation(QWidget* parent = nullptr);
~DlgSettingsNavigation() override;
void saveSettings() override;
@@ -68,7 +68,7 @@ class CameraDialog : public QDialog
Q_OBJECT
public:
CameraDialog(QWidget* parent=nullptr);
explicit CameraDialog(QWidget* parent=nullptr);
~CameraDialog() override;
void setValues(double q0, double q1, double q2, double q3);
void getValues(double& q0, double& q1, double& q2, double& q3) const;

View File

@@ -41,7 +41,7 @@ class DlgSettingsPythonConsole : public PreferencePage
Q_OBJECT
public:
DlgSettingsPythonConsole(QWidget* parent = nullptr);
explicit DlgSettingsPythonConsole(QWidget* parent = nullptr);
~DlgSettingsPythonConsole() override;
void saveSettings() override;

View File

@@ -40,7 +40,7 @@ class DlgSettingsUnitsImp : public PreferencePage
Q_OBJECT
public:
DlgSettingsUnitsImp(QWidget* parent = nullptr);
explicit DlgSettingsUnitsImp(QWidget* parent = nullptr);
~DlgSettingsUnitsImp() override;
void saveSettings() override;

View File

@@ -41,7 +41,7 @@ class DlgSettingsViewColor : public PreferencePage
Q_OBJECT
public:
DlgSettingsViewColor(QWidget* parent = nullptr);
explicit DlgSettingsViewColor(QWidget* parent = nullptr);
~DlgSettingsViewColor() override;
void saveSettings() override;

View File

@@ -49,7 +49,7 @@ typedef std::vector< std::pair<QLatin1String, QString> > GroupMap;
struct GroupMap_find {
const QLatin1String& item;
GroupMap_find(const QLatin1String& item) : item(item) {}
explicit GroupMap_find(const QLatin1String& item) : item(item) {}
bool operator () (const std::pair<QLatin1String, QString>& elem) const
{
return elem.first == item;

View File

@@ -46,7 +46,7 @@ class DlgCustomToolbars : public CustomizeActionPage
protected:
enum Type { Toolbar, Toolboxbar };
DlgCustomToolbars(Type, QWidget* parent = nullptr);
explicit DlgCustomToolbars(Type, QWidget* parent = nullptr);
~DlgCustomToolbars() override;
protected Q_SLOTS:
@@ -94,7 +94,7 @@ class DlgCustomToolbarsImp : public DlgCustomToolbars
Q_OBJECT
public:
DlgCustomToolbarsImp(QWidget* parent = nullptr);
explicit DlgCustomToolbarsImp(QWidget* parent = nullptr);
~DlgCustomToolbarsImp() override;
protected:
@@ -126,7 +126,7 @@ class DlgCustomToolBoxbarsImp : public DlgCustomToolbars
Q_OBJECT
public:
DlgCustomToolBoxbarsImp(QWidget* parent = nullptr);
explicit DlgCustomToolBoxbarsImp(QWidget* parent = nullptr);
~DlgCustomToolBoxbarsImp() override;
protected:

View File

@@ -37,7 +37,7 @@ class UndoDialog : public QMenu
Q_OBJECT
public:
UndoDialog( QWidget* parent = nullptr );
explicit UndoDialog( QWidget* parent = nullptr );
~UndoDialog() override;
protected Q_SLOTS:
@@ -53,7 +53,7 @@ class RedoDialog : public QMenu
Q_OBJECT
public:
RedoDialog( QWidget* parent = nullptr );
explicit RedoDialog( QWidget* parent = nullptr );
~RedoDialog() override;
protected Q_SLOTS:

View File

@@ -42,7 +42,7 @@ class DlgUnitsCalculator : public QDialog
Q_OBJECT
public:
DlgUnitsCalculator(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
explicit DlgUnitsCalculator(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DlgUnitsCalculator() override;
protected:

View File

@@ -40,7 +40,7 @@ class DlgWorkbenchesImp : public CustomizeActionPage
Q_OBJECT
public:
DlgWorkbenchesImp(QWidget* parent = nullptr);
explicit DlgWorkbenchesImp(QWidget* parent = nullptr);
~DlgWorkbenchesImp() override;
static QStringList load_enabled_workbenches();
static QStringList load_disabled_workbenches();

View File

@@ -53,7 +53,7 @@ public:
* the view will attach to the active document. Be aware there isn't
* always an active document available!
*/
DockWindow ( Gui::Document* pcDocument=nullptr, QWidget *parent=nullptr );
explicit DockWindow ( Gui::Document* pcDocument=nullptr, QWidget *parent=nullptr );
/** View destructor
* Detach the view from the document, if attached.
*/

View File

@@ -137,7 +137,7 @@ namespace Gui {
public:
const Gui::Document& d;
DocumentIndex(const Gui::Document& d) : d(d)
explicit DocumentIndex(const Gui::Document& d) : d(d)
{
if (!documentIcon)
documentIcon = new QIcon(Gui::BitmapFactory().pixmap("Document"));

View File

@@ -38,7 +38,7 @@ class ViewProviderDocumentObject;
class DocumentModel : public QAbstractItemModel
{
public:
DocumentModel(QObject* parent);
explicit DocumentModel(QObject* parent);
~DocumentModel() override;
int columnCount (const QModelIndex & parent = QModelIndex()) const override;

View File

@@ -46,9 +46,9 @@ public:
/*! Constructor */
DocumentT();
/*! Constructor */
DocumentT(Document*);
explicit DocumentT(Document*);
/*! Constructor */
DocumentT(const std::string&);
explicit DocumentT(const std::string&);
/*! Constructor */
DocumentT(const DocumentT&);
/*! Destructor */
@@ -90,7 +90,7 @@ public:
/*! Constructor */
ViewProviderT(ViewProviderT &&);
/*! Constructor */
ViewProviderT(const ViewProviderDocumentObject*);
explicit ViewProviderT(const ViewProviderDocumentObject*);
/*! Destructor */
~ViewProviderT();
/*! Assignment operator */
@@ -134,7 +134,7 @@ private:
class GuiExport DocumentWeakPtrT
{
public:
DocumentWeakPtrT(Gui::Document*) noexcept;
explicit DocumentWeakPtrT(Gui::Document*) noexcept;
~DocumentWeakPtrT();
/*!
@@ -173,7 +173,7 @@ private:
class GuiExport ViewProviderWeakPtrT
{
public:
ViewProviderWeakPtrT(ViewProviderDocumentObject*);
explicit ViewProviderWeakPtrT(ViewProviderDocumentObject*);
~ViewProviderWeakPtrT();
/*!
@@ -236,7 +236,7 @@ template <class T>
class WeakPtrT
{
public:
WeakPtrT(T* t) : ptr(t) {
explicit WeakPtrT(T* t) : ptr(t) {
}
~WeakPtrT() {
}
@@ -319,7 +319,7 @@ class GuiExport DocumentObserver
public:
/// Constructor
DocumentObserver();
DocumentObserver(Document*);
explicit DocumentObserver(Document*);
virtual ~DocumentObserver();
/** Attaches to another document, the old document

View File

@@ -43,7 +43,7 @@ class DocumentRecovery : public QDialog
Q_OBJECT
public:
DocumentRecovery(const QList<QFileInfo>&, QWidget* parent = nullptr);
explicit DocumentRecovery(const QList<QFileInfo>&, QWidget* parent = nullptr);
~DocumentRecovery() override;
void accept() override;

View File

@@ -42,7 +42,7 @@ class EditTableView : public QTableView
Q_OBJECT
public:
EditTableView(QWidget *parent = nullptr);
explicit EditTableView(QWidget *parent = nullptr);
void keyPressEvent(QKeyEvent *event) override;
public Q_SLOTS:
@@ -55,7 +55,7 @@ class SqueezeLabel : public QLabel
Q_OBJECT
public:
SqueezeLabel(QWidget *parent = nullptr);
explicit SqueezeLabel(QWidget *parent = nullptr);
protected:
void paintEvent(QPaintEvent *event) override;
@@ -72,7 +72,7 @@ class AutoSaver : public QObject {
Q_OBJECT
public:
AutoSaver(QObject *parent);
explicit AutoSaver(QObject *parent);
~AutoSaver() override;
void saveIfNecessary();
@@ -93,7 +93,7 @@ class NetworkAccessManager : public QNetworkAccessManager
Q_OBJECT
public:
NetworkAccessManager(QObject *parent = nullptr);
explicit NetworkAccessManager(QObject *parent = nullptr);
private Q_SLOTS:
void authenticationRequired(QNetworkReply *reply, QAuthenticator *auth); // clazy:exclude=overridden-signal
@@ -114,7 +114,7 @@ Q_SIGNALS:
void statusChanged();
public:
DownloadItem(QNetworkReply *reply = nullptr, bool requestFileName = false, QWidget *parent = nullptr);
explicit DownloadItem(QNetworkReply *reply = nullptr, bool requestFileName = false, QWidget *parent = nullptr);
bool downloading() const;
bool downloadedSuccessfully() const;

View File

@@ -59,7 +59,7 @@ public:
static DownloadManager* getInstance();
private:
DownloadManager(QWidget *parent = nullptr);
explicit DownloadManager(QWidget *parent = nullptr);
~DownloadManager() override;
public:
@@ -107,7 +107,7 @@ class DownloadModel : public QAbstractListModel
Q_OBJECT
public:
DownloadModel(DownloadManager *downloadManager, QObject *parent = nullptr);
explicit DownloadModel(DownloadManager *downloadManager, QObject *parent = nullptr);
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;

View File

@@ -146,7 +146,7 @@ class SearchBar : public QWidget
Q_OBJECT
public:
SearchBar(QWidget* parent = nullptr);
explicit SearchBar(QWidget* parent = nullptr);
void setEditor(QPlainTextEdit *textEdit);

View File

@@ -33,7 +33,7 @@ class ExpressionBindingPy : public Py::PythonExtension<ExpressionBindingPy>
public:
static void init_type(); // announce properties and methods
ExpressionBindingPy(ExpressionBinding*);
explicit ExpressionBindingPy(ExpressionBinding*);
~ExpressionBindingPy() override;
Py::Object repr() override;

View File

@@ -76,7 +76,7 @@ public:
static QString restoreLocation();
static void saveLocation(const QString&);
FileDialog(QWidget * parent = nullptr);
explicit FileDialog(QWidget * parent = nullptr);
~FileDialog() override;
void accept() override;
@@ -166,7 +166,7 @@ public:
Q_PROPERTY(QString buttonText READ buttonText WRITE setButtonText NOTIFY buttonTextChanged)
public:
FileChooser ( QWidget * parent = nullptr );
explicit FileChooser ( QWidget * parent = nullptr );
~FileChooser() override;
/**

View File

@@ -105,7 +105,7 @@ class GuiExport Rubberband : public Gui::GLGraphicsItem
bool working, stipple;
public:
Rubberband(View3DInventorViewer* v);
explicit Rubberband(View3DInventorViewer* v);
Rubberband();
~Rubberband() override;
void setWorking(bool on);
@@ -127,7 +127,7 @@ class GuiExport Polyline : public Gui::GLGraphicsItem
GLPainter p;
public:
Polyline(View3DInventorViewer* v);
explicit Polyline(View3DInventorViewer* v);
Polyline();
~Polyline() override;
void setWorking(bool on);

View File

@@ -222,7 +222,7 @@ class NS::NaviMachine : public sc::state_machine<NS::NaviMachine, NS::IdleState>
public:
typedef sc::state_machine<NS::NaviMachine, NS::IdleState> superclass;
NaviMachine(NS& ns) : ns(ns) {}
explicit NaviMachine(NS& ns) : ns(ns) {}
NS& ns;
public:
@@ -238,7 +238,7 @@ class NS::IdleState : public sc::state<NS::IdleState, NS::NaviMachine>
public:
typedef sc::custom_reaction<NS::Event> reactions;
IdleState(my_context ctx):my_base(ctx)
explicit IdleState(my_context ctx):my_base(ctx)
{
auto &ns = this->outermost_context().ns;
ns.setViewingMode(NavigationStyle::IDLE);
@@ -347,7 +347,7 @@ private:
int hold_timeout; //in milliseconds
public:
AwaitingMoveState(my_context ctx):my_base(ctx)
explicit AwaitingMoveState(my_context ctx):my_base(ctx)
{
auto &ns = this->outermost_context().ns;
if (ns.logging)
@@ -486,7 +486,7 @@ private:
SbVec2s base_pos;
public:
RotateState(my_context ctx):my_base(ctx)
explicit RotateState(my_context ctx):my_base(ctx)
{
auto &ns = this->outermost_context().ns;
ns.setViewingMode(NavigationStyle::DRAGGING);
@@ -529,7 +529,7 @@ private:
float ratio;
public:
PanState(my_context ctx):my_base(ctx)
explicit PanState(my_context ctx):my_base(ctx)
{
auto &ns = this->outermost_context().ns;
ns.setViewingMode(NavigationStyle::PANNING);
@@ -576,7 +576,7 @@ private:
float ratio;
public:
StickyPanState(my_context ctx):my_base(ctx)
explicit StickyPanState(my_context ctx):my_base(ctx)
{
auto &ns = this->outermost_context().ns;
ns.setViewingMode(NavigationStyle::PANNING);
@@ -622,7 +622,7 @@ private:
SbVec2s base_pos;
public:
TiltState(my_context ctx):my_base(ctx)
explicit TiltState(my_context ctx):my_base(ctx)
{
auto &ns = this->outermost_context().ns;
ns.setViewingMode(NavigationStyle::DRAGGING);
@@ -672,7 +672,7 @@ private:
bool enableTilt = false;
public:
GestureState(my_context ctx):my_base(ctx)
explicit GestureState(my_context ctx):my_base(ctx)
{
auto &ns = this->outermost_context().ns;
ns.setViewingMode(NavigationStyle::PANNING);
@@ -753,7 +753,7 @@ public:
typedef sc::custom_reaction<NS::Event> reactions;
public:
AwaitingReleaseState(my_context ctx):my_base(ctx)
explicit AwaitingReleaseState(my_context ctx):my_base(ctx)
{
auto &ns = this->outermost_context().ns;
if (ns.logging)
@@ -803,7 +803,7 @@ public:
typedef sc::custom_reaction<NS::Event> reactions;
public:
InteractState(my_context ctx):my_base(ctx)
explicit InteractState(my_context ctx):my_base(ctx)
{
auto &ns = this->outermost_context().ns;
ns.setViewingMode(NavigationStyle::INTERACT);

View File

@@ -64,7 +64,7 @@ namespace Gui {
class GraphvizWorker : public QThread {
Q_OBJECT
public:
GraphvizWorker(QObject * parent = nullptr)
explicit GraphvizWorker(QObject * parent = nullptr)
: QThread(parent)
{
}

View File

@@ -42,7 +42,7 @@ class GuiExport GraphvizView : public MDIView
Q_OBJECT
public:
GraphvizView(App::Document &_doc, QWidget* parent=nullptr);
explicit GraphvizView(App::Document &_doc, QWidget* parent=nullptr);
~GraphvizView() override;
QByteArray exportGraph(const QString& filter);

View File

@@ -165,7 +165,7 @@ bool GUIApplication::event(QEvent * ev)
class GUISingleApplication::Private {
public:
Private(GUISingleApplication *q_ptr)
explicit Private(GUISingleApplication *q_ptr)
: q_ptr(q_ptr)
, timer(new QTimer(q_ptr))
, server(nullptr)

View File

@@ -88,7 +88,7 @@ class WheelEventFilter : public QObject
Q_OBJECT
public:
WheelEventFilter(QObject* parent);
explicit WheelEventFilter(QObject* parent);
bool eventFilter(QObject* obj, QEvent* ev) override;
};
@@ -97,7 +97,7 @@ class KeyboardFilter : public QObject
Q_OBJECT
public:
KeyboardFilter(QObject* parent);
explicit KeyboardFilter(QObject* parent);
bool eventFilter(QObject* obj, QEvent* ev) override;
};

View File

@@ -52,7 +52,7 @@ namespace Gui {
class InputValidator : public QValidator
{
public:
InputValidator(InputField* parent);
explicit InputValidator(InputField* parent);
~InputValidator() override;
void fixup(QString& input) const override;

View File

@@ -41,7 +41,7 @@ public:
static Py::Object type();
static Py::ExtensionObject<MDIViewPy> create(MDIView *mdi);
MDIViewPy(MDIView *mdi);
explicit MDIViewPy(MDIView *mdi);
~MDIViewPy() override;
Py::Object repr() override;

View File

@@ -165,7 +165,7 @@ struct MainWindowP
class MDITabbar : public QTabBar
{
public:
MDITabbar( QWidget * parent = nullptr ) : QTabBar(parent)
explicit MDITabbar( QWidget * parent = nullptr ) : QTabBar(parent)
{
menu = new QMenu(this);
setDrawBase(false);

View File

@@ -55,7 +55,7 @@ class GuiExport UrlHandler : public QObject
Q_OBJECT
public:
UrlHandler(QObject* parent = nullptr)
explicit UrlHandler(QObject* parent = nullptr)
: QObject(parent){
}
~UrlHandler() override {
@@ -85,7 +85,7 @@ public:
* Constructs an empty main window. For default \a parent is 0, as there usually is
* no toplevel window there.
*/
MainWindow(QWidget * parent = nullptr, Qt::WindowFlags f = Qt::Window);
explicit MainWindow(QWidget * parent = nullptr, Qt::WindowFlags f = Qt::Window);
/** Destroys the object and frees any allocated resources. */
~MainWindow() override;
/**
@@ -375,7 +375,7 @@ public:
static int EventType;
enum Style {Restore, Clear};
ActionStyleEvent(Style type);
explicit ActionStyleEvent(Style type);
Style getType() const;
private:

View File

@@ -42,7 +42,7 @@ public:
static Py::Object type();
static Py::ExtensionObject<MainWindowPy> create(MainWindow *mw);
MainWindowPy(MainWindow *mw);
explicit MainWindowPy(MainWindow *mw);
~MainWindowPy() override;
Py::Object repr() override;

View File

@@ -38,7 +38,7 @@ class GuiExport MenuItem
{
public:
MenuItem();
MenuItem(MenuItem*);
explicit MenuItem(MenuItem*);
~MenuItem();
void setCommand(const std::string&);

View File

@@ -39,7 +39,7 @@ class Document;
class GuiExport MergeDocuments : public Base::Persistence
{
public:
MergeDocuments(App::Document* doc);
explicit MergeDocuments(App::Document* doc);
~MergeDocuments() override;
unsigned int getMemSize () const override;
std::vector<App::DocumentObject*> importObjects(std::istream&);

View File

@@ -112,7 +112,7 @@ public:
class NaviCubeImplementation : public ParameterGrp::ObserverType {
public:
NaviCubeImplementation(Gui::View3DInventorViewer*);
explicit NaviCubeImplementation(Gui::View3DInventorViewer*);
~NaviCubeImplementation() override;
void drawNaviCube();
void createContextMenu(const std::vector<std::string>& cmd);

View File

@@ -60,7 +60,7 @@ class AbstractMouseSelection;
class GuiExport NavigationStyleEvent : public QEvent
{
public:
NavigationStyleEvent(const Base::Type& s);
explicit NavigationStyleEvent(const Base::Type& s);
~NavigationStyleEvent() override;
const Base::Type& style() const;
private:

View File

@@ -60,7 +60,7 @@ class HttpServer : public QTcpServer
Q_OBJECT
public:
HttpServer(QObject* parent = nullptr);
explicit HttpServer(QObject* parent = nullptr);
void incomingConnection(qintptr socket) override;
void pause();

View File

@@ -53,7 +53,7 @@ namespace Gui { namespace Dialog {
class find_placement
{
public:
find_placement(const std::string& name) : propertyname(name)
explicit find_placement(const std::string& name) : propertyname(name)
{
}
bool operator () (const std::pair<std::string, App::Property*>& elem) const

View File

@@ -43,7 +43,7 @@ class GuiExport Placement : public Gui::LocationDialog
Q_OBJECT
public:
Placement(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
explicit Placement(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~Placement() override;
void accept() override;
void reject() override;
@@ -114,7 +114,7 @@ class GuiExport DockablePlacement : public Placement
Q_OBJECT
public:
DockablePlacement(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
explicit DockablePlacement(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
~DockablePlacement() override;
void accept() override;

View File

@@ -117,7 +117,7 @@ class GuiExport PrefSpinBox : public QSpinBox, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefSpinBox ( QWidget * parent = nullptr );
explicit PrefSpinBox ( QWidget * parent = nullptr );
~PrefSpinBox() override;
protected:
@@ -137,7 +137,7 @@ class GuiExport PrefDoubleSpinBox : public QDoubleSpinBox, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefDoubleSpinBox ( QWidget * parent = nullptr );
explicit PrefDoubleSpinBox ( QWidget * parent = nullptr );
~PrefDoubleSpinBox() override;
protected:
@@ -158,7 +158,7 @@ class GuiExport PrefLineEdit : public QLineEdit, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefLineEdit ( QWidget * parent = nullptr );
explicit PrefLineEdit ( QWidget * parent = nullptr );
~PrefLineEdit() override;
protected:
@@ -179,7 +179,7 @@ class GuiExport PrefTextEdit : public QTextEdit, public PrefWidget
Q_PROPERTY(QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath) // clazy:exclude=qproperty-without-notify
public:
PrefTextEdit(QWidget* parent = nullptr);
explicit PrefTextEdit(QWidget* parent = nullptr);
~PrefTextEdit() override;
protected:
@@ -200,7 +200,7 @@ class GuiExport PrefFileChooser : public FileChooser, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefFileChooser ( QWidget * parent = nullptr );
explicit PrefFileChooser ( QWidget * parent = nullptr );
~PrefFileChooser() override;
protected:
@@ -221,7 +221,7 @@ class GuiExport PrefComboBox : public QComboBox, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefComboBox ( QWidget * parent = nullptr );
explicit PrefComboBox ( QWidget * parent = nullptr );
~PrefComboBox() override;
protected:
@@ -242,7 +242,7 @@ class GuiExport PrefCheckBox : public QCheckBox, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefCheckBox ( QWidget * parent = nullptr );
explicit PrefCheckBox ( QWidget * parent = nullptr );
~PrefCheckBox() override;
protected:
@@ -263,7 +263,7 @@ class GuiExport PrefRadioButton : public QRadioButton, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefRadioButton ( QWidget * parent = nullptr );
explicit PrefRadioButton ( QWidget * parent = nullptr );
~PrefRadioButton() override;
protected:
@@ -284,7 +284,7 @@ class GuiExport PrefSlider : public QSlider, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefSlider ( QWidget * parent = nullptr );
explicit PrefSlider ( QWidget * parent = nullptr );
~PrefSlider() override;
protected:
@@ -305,7 +305,7 @@ class GuiExport PrefColorButton : public ColorButton, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefColorButton ( QWidget * parent = nullptr );
explicit PrefColorButton ( QWidget * parent = nullptr );
~PrefColorButton() override;
protected:
@@ -327,7 +327,7 @@ class GuiExport PrefUnitSpinBox : public QuantitySpinBox, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefUnitSpinBox ( QWidget * parent = nullptr );
explicit PrefUnitSpinBox ( QWidget * parent = nullptr );
~PrefUnitSpinBox() override;
protected:
@@ -351,7 +351,7 @@ class GuiExport PrefQuantitySpinBox : public QuantitySpinBox, public PrefWidget
Q_PROPERTY(int historySize READ historySize WRITE setHistorySize) // clazy:exclude=qproperty-without-notify
public:
PrefQuantitySpinBox (QWidget * parent = nullptr);
explicit PrefQuantitySpinBox (QWidget * parent = nullptr);
~PrefQuantitySpinBox() override;
/// set the input field to the last used value (works only if the setParamGrpPath() was called)
@@ -392,7 +392,7 @@ class GuiExport PrefFontBox : public QFontComboBox, public PrefWidget
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
public:
PrefFontBox ( QWidget * parent = nullptr );
explicit PrefFontBox ( QWidget * parent = nullptr );
~PrefFontBox() override;
protected:

View File

@@ -83,7 +83,7 @@ class ProgressDialog : public QProgressDialog
public:
/** Construction */
ProgressDialog (SequencerDialog* s, QWidget * parent=nullptr);
explicit ProgressDialog (SequencerDialog* s, QWidget * parent=nullptr);
/** Destruction */
~ProgressDialog () override;

View File

@@ -39,7 +39,7 @@ class ProjectWidget : public QTreeView
Q_OBJECT
public:
ProjectWidget(QWidget* parent=nullptr);
explicit ProjectWidget(QWidget* parent=nullptr);
~ProjectWidget() override;
private:

View File

@@ -38,7 +38,7 @@ class GuiExport PropertyPage : public QWidget
Q_OBJECT
public:
PropertyPage(QWidget* parent = nullptr);
explicit PropertyPage(QWidget* parent = nullptr);
~PropertyPage() override;
bool isModified();
@@ -68,7 +68,7 @@ class GuiExport PreferencePage : public QWidget
Q_OBJECT
public:
PreferencePage(QWidget* parent = nullptr);
explicit PreferencePage(QWidget* parent = nullptr);
~PreferencePage() override;
public Q_SLOTS:
@@ -87,7 +87,7 @@ class GuiExport PreferenceUiForm : public PreferencePage
Q_OBJECT
public:
PreferenceUiForm(const QString& fn, QWidget* parent = nullptr);
explicit PreferenceUiForm(const QString& fn, QWidget* parent = nullptr);
~PreferenceUiForm() override;
void loadSettings() override;
@@ -114,7 +114,7 @@ class GuiExport CustomizeActionPage : public QWidget
Q_OBJECT
public:
CustomizeActionPage(QWidget* parent = nullptr);
explicit CustomizeActionPage(QWidget* parent = nullptr);
~CustomizeActionPage() override;
protected:

View File

@@ -311,7 +311,7 @@ struct PropertyView::PropInfo
struct PropertyView::PropFind {
const PropInfo& item;
PropFind(const PropInfo& item) : item(item) {}
explicit PropFind(const PropInfo& item) : item(item) {}
bool operator () (const PropInfo& elem) const
{
return (elem.propId == item.propId) &&

View File

@@ -56,7 +56,7 @@ class PropertyView : public QWidget, public Gui::SelectionObserver
Q_OBJECT
public:
PropertyView(QWidget *parent=nullptr);
explicit PropertyView(QWidget *parent=nullptr);
~PropertyView() override;
Gui::PropertyEditor::PropertyEditor* propertyEditorView;
@@ -120,7 +120,7 @@ class PropertyDockView : public Gui::DockWindow
Q_OBJECT
public:
PropertyDockView(Gui::Document* pcDocument, QWidget *parent=nullptr);
explicit PropertyDockView(Gui::Document* pcDocument, QWidget *parent=nullptr);
~PropertyDockView() override;
};

View File

@@ -105,7 +105,7 @@ public:
Special = 3
};
PythonConsole(QWidget *parent = nullptr);
explicit PythonConsole(QWidget *parent = nullptr);
~PythonConsole() override;
void OnChange( Base::Subject<const char*> &rCaller,const char* rcReason ) override;
@@ -174,7 +174,7 @@ private:
class GuiExport PythonConsoleHighlighter : public PythonSyntaxHighlighter
{
public:
PythonConsoleHighlighter(QObject* parent);
explicit PythonConsoleHighlighter(QObject* parent);
~PythonConsoleHighlighter() override;
void highlightBlock (const QString & text) override;

View File

@@ -47,7 +47,7 @@ private:
public:
static void init_type(); // announce properties and methods
PythonStdout(PythonConsole *pc);
explicit PythonStdout(PythonConsole *pc);
~PythonStdout() override;
Py::Object getattr(const char *name) override;
@@ -73,7 +73,7 @@ private:
public:
static void init_type(); // announce properties and methods
PythonStderr(PythonConsole *pc);
explicit PythonStderr(PythonConsole *pc);
~PythonStderr() override;
Py::Object getattr(const char *name) override;
@@ -141,7 +141,7 @@ private:
public:
static void init_type(); // announce properties and methods
PythonStdin(PythonConsole *pc);
explicit PythonStdin(PythonConsole *pc);
~PythonStdin() override;
Py::Object repr() override;

View File

@@ -41,7 +41,7 @@ class GuiExport PythonEditor : public TextEditor
Q_OBJECT
public:
PythonEditor(QWidget *parent = nullptr);
explicit PythonEditor(QWidget *parent = nullptr);
~PythonEditor() override;
void toggleBreakpoint();
@@ -79,7 +79,7 @@ private:
class GuiExport PythonSyntaxHighlighter : public SyntaxHighlighter
{
public:
PythonSyntaxHighlighter(QObject* parent);
explicit PythonSyntaxHighlighter(QObject* parent);
virtual ~PythonSyntaxHighlighter();
void highlightBlock (const QString & text);

View File

@@ -51,7 +51,7 @@ class ReportView : public QWidget
Q_OBJECT
public:
ReportView( QWidget* parent = nullptr);
explicit ReportView( QWidget* parent = nullptr);
~ReportView() override;
protected:
@@ -77,7 +77,7 @@ public:
};
public:
ReportHighlighter(QTextEdit* );
explicit ReportHighlighter(QTextEdit* );
~ReportHighlighter() override;
/** Parses the given text and highlight it in the right colors. */
@@ -128,7 +128,7 @@ class GuiExport ReportOutput : public QTextEdit, public WindowParameter, public
Q_OBJECT
public:
ReportOutput(QWidget* parent=nullptr);
explicit ReportOutput(QWidget* parent=nullptr);
~ReportOutput() override;
/** Observes its parameter group. */
@@ -207,7 +207,7 @@ class ReportOutputObserver : public QObject
Q_OBJECT
public:
ReportOutputObserver (ReportOutput* view);
explicit ReportOutputObserver (ReportOutput* view);
bool eventFilter(QObject *obj, QEvent *event) override;
protected:

View File

@@ -105,7 +105,7 @@ public:
if (typeName)
TypeName = typeName;
pTypeName = TypeName.c_str();
}
}//explicit bombs
SelectionChanges(MsgType type,
const std::string &docName,
@@ -230,7 +230,7 @@ public:
* 1 resolve sub-object with old style element name
* 2 resolve sub-object with new style element name
*/
SelectionObserver(bool attach = true, ResolveMode resolve = ResolveMode::OldStyleElement);
explicit SelectionObserver(bool attach = true, ResolveMode resolve = ResolveMode::OldStyleElement);
/** Constructor
*
* @param vp: filtering view object.
@@ -243,7 +243,7 @@ public:
* Constructs an selection observer that receives only selection event of
* objects within the same document as the input view object.
*/
SelectionObserver(const Gui::ViewProviderDocumentObject *vp, bool attach=true, ResolveMode resolve = ResolveMode::OldStyleElement);
explicit SelectionObserver(const Gui::ViewProviderDocumentObject *vp, bool attach=true, ResolveMode resolve = ResolveMode::OldStyleElement);
virtual ~SelectionObserver();
bool blockSelection(bool block);
@@ -280,7 +280,7 @@ class GuiExport SelectionObserverPython : public SelectionObserver
public:
/// Constructor
SelectionObserverPython(const Py::Object& obj, ResolveMode resolve = ResolveMode::OldStyleElement);
explicit SelectionObserverPython(const Py::Object& obj, ResolveMode resolve = ResolveMode::OldStyleElement);
~SelectionObserverPython() override;
static void addObserver(const Py::Object& obj, ResolveMode resolve = ResolveMode::OldStyleElement);
@@ -342,7 +342,7 @@ public:
class GuiExport SelectionGateFilterExternal: public SelectionGate
{
public:
SelectionGateFilterExternal(const char *docName, const char *objName=nullptr);
explicit SelectionGateFilterExternal(const char *docName, const char *objName=nullptr);
bool allow(App::Document*,App::DocumentObject*, const char*) override;
private:
std::string DocName;
@@ -771,7 +771,7 @@ inline SelectionSingleton& Selection()
*/
class GuiExport SelectionLogDisabler {
public:
SelectionLogDisabler(bool silent=false) :silent(silent) {
explicit SelectionLogDisabler(bool silent=false) :silent(silent) {
Selection().disableCommandLog();
}
~SelectionLogDisabler() {

View File

@@ -52,8 +52,8 @@ class GuiExport SelectionFilter
public:
/** Constructs a SelectionFilter object. */
SelectionFilter(const char* filter);
SelectionFilter(const std::string& filter);
explicit SelectionFilter(const char* filter);
explicit SelectionFilter(const std::string& filter);
virtual ~SelectionFilter();
/// Set a new filter string
@@ -103,8 +103,8 @@ class GuiExport SelectionFilterGate: public SelectionGate
{
public:
/// construct with the filter string
SelectionFilterGate(const char* filter);
SelectionFilterGate(SelectionFilter* filter);
explicit SelectionFilterGate(const char* filter);
explicit SelectionFilterGate(SelectionFilter* filter);
~SelectionFilterGate() override;
bool allow(App::Document*,App::DocumentObject*, const char*) override;
@@ -130,7 +130,7 @@ class SelectionGatePython : public SelectionGate
{
public:
/// Constructor
SelectionGatePython(const Py::Object& obj);
explicit SelectionGatePython(const Py::Object& obj);
~SelectionGatePython() override;
bool allow(App::Document*, App::DocumentObject*, const char*) override;
@@ -156,7 +156,7 @@ public:
public:
static void init_type(); // announce properties and methods
SelectionFilterPy(const std::string&);
explicit SelectionFilterPy(const std::string&);
~SelectionFilterPy() override;
Py::Object repr() override;
@@ -189,7 +189,7 @@ class SelectionFilterGatePython : public SelectionGate
{
public:
/// Constructor
SelectionFilterGatePython(SelectionFilterPy* obj);
explicit SelectionFilterGatePython(SelectionFilterPy* obj);
~SelectionFilterGatePython() override;
bool allow(App::Document*, App::DocumentObject*, const char*) override;
@@ -202,7 +202,7 @@ private:
struct Node_Slice
{
Node_Slice(int min=1,int max=INT_MAX):Min(min),Max(max){}
explicit Node_Slice(int min=1,int max=INT_MAX):Min(min),Max(max){}
int Min,Max;
};
@@ -229,7 +229,7 @@ typedef std::shared_ptr<Node_Object> Node_ObjectPtr;
struct Node_Block
{
Node_Block(Node_Object* obj){
explicit Node_Block(Node_Object* obj){
Objects.emplace_back(obj);
}
std::vector<Node_ObjectPtr> Objects;

View File

@@ -49,7 +49,7 @@ public:
SelectionObject();
/*! Constructs a SelectionObject from the SelectionChanges structure.
*/
SelectionObject(const SelectionChanges& msg);
explicit SelectionObject(const SelectionChanges& msg);
explicit SelectionObject(App::DocumentObject*);
~SelectionObject() override;
/**

View File

@@ -51,7 +51,7 @@ public:
* A constructor.
* A more elaborate description of the constructor.
*/
SelectionView(Gui::Document* pcDocument, QWidget *parent=nullptr);
explicit SelectionView(Gui::Document* pcDocument, QWidget *parent=nullptr);
/**
* A destructor.

View File

@@ -153,7 +153,7 @@ class SoQtOffscreenRendererPy : public Py::PythonExtension<SoQtOffscreenRenderer
public:
static void init_type();
SoQtOffscreenRendererPy(const SbViewportRegion&);
explicit SoQtOffscreenRendererPy(const SbViewportRegion&);
~SoQtOffscreenRendererPy() override;
Py::Object repr() override;

View File

@@ -167,7 +167,7 @@ class GuiExport SoFCSeparator : public SoSeparator {
public:
static void initClass();
static void finish();
SoFCSeparator(bool trackCacheMode=true);
explicit SoFCSeparator(bool trackCacheMode=true);
void GLRenderBelowPath(SoGLRenderAction * action) override;
@@ -191,7 +191,7 @@ class GuiExport SoFCSelectionRoot : public SoFCSeparator {
public:
static void initClass();
static void finish();
SoFCSelectionRoot(bool trackCacheMode=false);
explicit SoFCSelectionRoot(bool trackCacheMode=false);
void GLRenderBelowPath(SoGLRenderAction * action) override;
void GLRenderInPath(SoGLRenderAction * action) override;
@@ -418,7 +418,7 @@ class GuiExport SoSelectionElementAction : public SoAction
public:
enum Type {None, Append, Remove, All, Color, Hide, Show};
SoSelectionElementAction (Type=None, bool secondary = false);
explicit SoSelectionElementAction (Type=None, bool secondary = false);
~SoSelectionElementAction() override;
Type getType() const;

View File

@@ -176,7 +176,7 @@ namespace Gui {
class SoFCVectorizeU3DActionP
{
public:
SoFCVectorizeU3DActionP(SoFCVectorizeU3DAction * p) {
explicit SoFCVectorizeU3DActionP(SoFCVectorizeU3DAction * p) {
this->publ = p;
}

View File

@@ -115,7 +115,7 @@ public:
class GesturesDevice : public Quarter::InputDevice {
public:
GesturesDevice(QWidget* widget);//it needs to know the widget to do coordinate translation
explicit GesturesDevice(QWidget* widget);//it needs to know the widget to do coordinate translation
~GesturesDevice() override {}
const SoEvent* translateEvent(QEvent* event) override;

View File

@@ -36,7 +36,7 @@ namespace Spaceball
void setHandled(bool sig){handled = sig;}
protected:
EventBase(QEvent::Type event);
explicit EventBase(QEvent::Type event);
bool handled;
};

View File

@@ -39,7 +39,7 @@ namespace Gui {
class GuiExport ExpressionSpinBox : public ExpressionBinding
{
public:
ExpressionSpinBox(QAbstractSpinBox*);
explicit ExpressionSpinBox(QAbstractSpinBox*);
~ExpressionSpinBox() override;
void bind(const App::ObjectIdentifier &_path) override;
@@ -83,7 +83,7 @@ class GuiExport UnsignedValidator : public QValidator
Q_PROPERTY( uint top READ top WRITE setTop ) // clazy:exclude=qproperty-without-notify
public:
UnsignedValidator( QObject * parent );
explicit UnsignedValidator( QObject * parent );
UnsignedValidator( uint bottom, uint top, QObject * parent );
~UnsignedValidator() override;
@@ -115,7 +115,7 @@ class GuiExport UIntSpinBox : public QSpinBox, public ExpressionSpinBox
Q_OVERRIDE( uint value READ value WRITE setValue )
public:
UIntSpinBox ( QWidget* parent=nullptr );
explicit UIntSpinBox ( QWidget* parent=nullptr );
~UIntSpinBox() override;
void setRange( uint minVal, uint maxVal );
@@ -162,7 +162,7 @@ class GuiExport IntSpinBox : public QSpinBox, public ExpressionSpinBox
Q_OBJECT
public:
IntSpinBox ( QWidget* parent=nullptr );
explicit IntSpinBox ( QWidget* parent=nullptr );
~IntSpinBox() override;
bool apply(const std::string &propName) override;
@@ -184,7 +184,7 @@ class GuiExport DoubleSpinBox : public QDoubleSpinBox, public ExpressionSpinBox
Q_OBJECT
public:
DoubleSpinBox ( QWidget* parent=nullptr );
explicit DoubleSpinBox ( QWidget* parent=nullptr );
~DoubleSpinBox() override;
bool apply(const std::string &propName) override;

View File

@@ -41,7 +41,7 @@ class SplashScreen : public QSplashScreen
Q_OBJECT
public:
SplashScreen( const QPixmap & pixmap = QPixmap ( ), Qt::WindowFlags f = Qt::WindowFlags() );
explicit SplashScreen( const QPixmap & pixmap = QPixmap ( ), Qt::WindowFlags f = Qt::WindowFlags() );
~SplashScreen() override;
protected:
@@ -74,7 +74,7 @@ class GuiExport LicenseView : public Gui::MDIView
Q_OBJECT
public:
LicenseView(QWidget* parent=nullptr);
explicit LicenseView(QWidget* parent=nullptr);
~LicenseView() override;
void setSource(const QUrl & url);
@@ -95,7 +95,7 @@ class GuiExport AboutDialog : public QDialog
Q_OBJECT
public:
AboutDialog(bool showLic, QWidget* parent = nullptr);
explicit AboutDialog(bool showLic, QWidget* parent = nullptr);
~AboutDialog() override;
protected:

View File

@@ -38,7 +38,7 @@ class TaskBoxPosition : public Gui::TaskView::TaskBox
Q_OBJECT
public:
TaskBoxPosition(QWidget *parent = nullptr);
explicit TaskBoxPosition(QWidget *parent = nullptr);
~TaskBoxPosition() override;
@@ -56,7 +56,7 @@ class TaskBoxAngle : public Gui::TaskView::TaskBox
Q_OBJECT
public:
TaskBoxAngle(QWidget *parent = nullptr);
explicit TaskBoxAngle(QWidget *parent = nullptr);
~TaskBoxAngle() override;

View File

@@ -72,7 +72,7 @@ public:
std::string editSub;
std::string editElement;
Private(ViewProviderDocumentObject* vp, const char *element="")
explicit Private(ViewProviderDocumentObject* vp, const char *element="")
: ui(new Ui_TaskElementColors()), vp(vp),editElement(element)
{
vpDoc = vp->getDocument();

View File

@@ -38,7 +38,7 @@ class GuiExport ElementColors : public QWidget, public SelectionObserver
Q_OBJECT
public:
ElementColors(ViewProviderDocumentObject* vp, bool noHide=false);
explicit ElementColors(ViewProviderDocumentObject* vp, bool noHide=false);
~ElementColors() override;
bool accept();
@@ -72,7 +72,7 @@ class GuiExport TaskElementColors : public TaskView::TaskDialog
Q_OBJECT
public:
TaskElementColors(ViewProviderDocumentObject* vp, bool noHide=false);
explicit TaskElementColors(ViewProviderDocumentObject* vp, bool noHide=false);
~TaskElementColors() override;
public:

Some files were not shown because too many files have changed in this diff Show More