Commit 715796b4 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Fix krazy issues: Use explicit constructors

 * Fix all warnings about non-explicit constructors except for those
   in 3rdparty code.
parent 8d188d01
......@@ -9,7 +9,7 @@ class LoggerModeWidget : public QWidget
Q_OBJECT
public:
LoggerModeWidget(const QString projectName, QWidget* parent = 0);
explicit LoggerModeWidget(const QString projectName, QWidget* parent = 0);
~LoggerModeWidget();
public slots:
......
......@@ -9,7 +9,7 @@ class ModelClassWizard : public Core::BaseFileWizard
Q_OBJECT
public:
ModelClassWizard(const Core::BaseFileWizardParameters &parameters, QObject *parent = 0);
explicit ModelClassWizard(const Core::BaseFileWizardParameters &parameters, QObject *parent = 0);
~ModelClassWizard();
QWizard *createWizardDialog(QWidget *parent,
......
......@@ -42,7 +42,7 @@ class MyMain : public QWidget
Q_OBJECT
public:
MyMain(QWidget *parent = 0, Qt::WFlags flags = 0);
explicit MyMain(QWidget *parent = 0, Qt::WFlags flags = 0);
~MyMain();
void add(IComboEntry *obj);
......
......@@ -41,9 +41,9 @@ class CPLUSPLUS_EXPORT BackwardsScanner
enum { MAX_BLOCK_COUNT = 10 };
public:
BackwardsScanner(const QTextCursor &cursor,
int maxBlockCount = MAX_BLOCK_COUNT,
const QString &suffix = QString());
explicit BackwardsScanner(const QTextCursor &cursor,
int maxBlockCount = MAX_BLOCK_COUNT,
const QString &suffix = QString());
int startToken() const;
......
......@@ -48,7 +48,7 @@ class CPLUSPLUS_EXPORT MacroArgumentReference
unsigned _length;
public:
MacroArgumentReference(unsigned position = 0, unsigned length = 0)
explicit MacroArgumentReference(unsigned position = 0, unsigned length = 0)
: _position(position), _length(length)
{ }
......
......@@ -80,7 +80,7 @@ class MacroExpander
const QByteArray *resolve_formal(const QByteArray &name);
public:
MacroExpander(Environment *env, pp_frame *frame = 0, Client *client = 0, unsigned start_offset = 0);
explicit MacroExpander(Environment *env, pp_frame *frame = 0, Client *client = 0, unsigned start_offset = 0);
const char *operator()(const char *first, const char *last,
QByteArray *result);
......
......@@ -58,7 +58,7 @@ class EXTENSIONSYSTEM_EXPORT PluginView : public QWidget
Q_OBJECT
public:
PluginView(PluginManager *manager, QWidget *parent = 0);
explicit PluginView(PluginManager *manager, QWidget *parent = 0);
~PluginView();
PluginSpec *currentPlugin() const;
......
......@@ -272,7 +272,7 @@ class QML_PARSER_EXPORT UiFormal: public Node
public:
QMLJS_DECLARE_AST_NODE(UiFormal)
UiFormal(NameId *name, NameId *alias = 0)
explicit UiFormal(NameId *name, NameId *alias = 0)
: name(name), alias(alias)
{ }
......@@ -1762,7 +1762,7 @@ class QML_PARSER_EXPORT CaseBlock: public Node
public:
QMLJS_DECLARE_AST_NODE(CaseBlock)
CaseBlock(CaseClauses *c, DefaultClause *d = 0, CaseClauses *r = 0):
explicit CaseBlock(CaseClauses *c, DefaultClause *d = 0, CaseClauses *r = 0):
clauses (c), defaultClause (d), moreClauses (r)
{ kind = K; }
......
......@@ -64,7 +64,7 @@ namespace QmlJS { namespace AST {
class SourceLocation
{
public:
SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0)
explicit SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0)
: offset(offset), length(length),
startLine(line), startColumn(column)
{ }
......
......@@ -67,7 +67,7 @@ class NameId;
class QML_PARSER_EXPORT Lexer
{
public:
Lexer(Engine *eng, bool tokenizeComments = false);
explicit Lexer(Engine *eng, bool tokenizeComments = false);
~Lexer();
void setCode(const QString &c, int lineno);
......
......@@ -69,7 +69,7 @@ class QDeclarativeEngineDebug : public QObject
{
Q_OBJECT
public:
QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0);
explicit QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0);
~QDeclarativeEngineDebug();
QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &,
......
......@@ -48,7 +48,7 @@ public:
SymbolLocation();
//! Constructor
SymbolLocation(QString file, int lineNumber = 0, int columnNumber = 0);
explicit SymbolLocation(QString file, int lineNumber = 0, int columnNumber = 0);
inline const QString &fileName() const { return m_fileName; }
inline int line() const { return m_line; }
......
......@@ -108,7 +108,7 @@ class ShadowBuildPage : public QWizardPage
{
Q_OBJECT
public:
ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard, bool change = false);
explicit ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard, bool change = false);
private slots:
void buildDirectoryChanged();
private:
......@@ -121,7 +121,7 @@ class CMakeRunPage : public QWizardPage
Q_OBJECT
public:
enum Mode { Initial, Update, Recreate, Change };
CMakeRunPage(CMakeOpenProjectWizard *cmakeWizard, Mode mode = Initial, const QString &buildDirectory = QString());
explicit CMakeRunPage(CMakeOpenProjectWizard *cmakeWizard, Mode mode = Initial, const QString &buildDirectory = QString());
virtual void initializePage();
virtual void cleanupPage();
......
......@@ -128,7 +128,7 @@ class CMakeRunConfigurationWidget : public QWidget
{
Q_OBJECT
public:
CMakeRunConfigurationWidget(CMakeRunConfiguration *cmakeRunConfiguration, QWidget *parent = 0);
explicit CMakeRunConfigurationWidget(CMakeRunConfiguration *cmakeRunConfiguration, QWidget *parent = 0);
private slots:
void setArguments(const QString &args);
......
......@@ -81,7 +81,7 @@ class CORE_EXPORT EditorManagerPlaceHolder : public QWidget
{
Q_OBJECT
public:
EditorManagerPlaceHolder(Core::IMode *mode, QWidget *parent = 0);
explicit EditorManagerPlaceHolder(Core::IMode *mode, QWidget *parent = 0);
~EditorManagerPlaceHolder();
static EditorManagerPlaceHolder* current();
private slots:
......
......@@ -41,7 +41,7 @@ class CORE_EXPORT FindToolBarPlaceHolder : public QWidget
{
Q_OBJECT
public:
FindToolBarPlaceHolder(QWidget *owner, QWidget *parent = 0);
explicit FindToolBarPlaceHolder(QWidget *owner, QWidget *parent = 0);
~FindToolBarPlaceHolder();
QWidget *owner() const;
void setWidget(QWidget *widget);
......
......@@ -38,7 +38,7 @@ namespace Internal {
class FlowLayout : public QLayout
{
public:
FlowLayout(QWidget *parent, int margin = 0, int spacing = -1);
explicit FlowLayout(QWidget *parent, int margin = 0, int spacing = -1);
FlowLayout(int spacing = -1);
~FlowLayout();
......
......@@ -56,7 +56,7 @@ class CORE_EXPORT NavigationWidgetPlaceHolder : public QWidget
friend class Core::NavigationWidget;
Q_OBJECT
public:
NavigationWidgetPlaceHolder(Core::IMode *mode, QWidget *parent = 0);
explicit NavigationWidgetPlaceHolder(Core::IMode *mode, QWidget *parent = 0);
~NavigationWidgetPlaceHolder();
static NavigationWidgetPlaceHolder* current();
void applyStoredSize(int width);
......
......@@ -60,7 +60,7 @@ class CORE_EXPORT OutputPanePlaceHolder : public QWidget
friend class Core::Internal::OutputPaneManager; // needs to set m_visible and thus access m_current
Q_OBJECT
public:
OutputPanePlaceHolder(Core::IMode *mode, QSplitter *parent = 0);
explicit OutputPanePlaceHolder(Core::IMode *mode, QSplitter *parent = 0);
~OutputPanePlaceHolder();
void setCloseable(bool b);
bool closeable();
......
......@@ -56,7 +56,7 @@ class CORE_EXPORT RightPanePlaceHolder : public QWidget
Q_OBJECT
public:
RightPanePlaceHolder(Core::IMode *mode, QWidget *parent = 0);
explicit RightPanePlaceHolder(Core::IMode *mode, QWidget *parent = 0);
~RightPanePlaceHolder();
static RightPanePlaceHolder *current();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment