Commit 5eb4a507 authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Mark ctors that take one argument explicit (cppcheck)

parent 486f6181
......@@ -66,7 +66,7 @@ class ASTROLIB_EXPORT Mat3
public:
double m[3][3];
Mat3(double x=0);
explicit Mat3(double x=0);
Mat3 (const Mat3& c);
void assign (double x11, double x12, double x13, double x21, double x22,
double x23, double x31, double x32, double x33);
......
......@@ -24,7 +24,7 @@ const int WAIT_TIME = 100;
class AbstractWorkerThreadPrivate
{
public:
AbstractWorkerThreadPrivate( AbstractWorkerThread *parent )
explicit AbstractWorkerThreadPrivate( AbstractWorkerThread *parent )
: m_running( false ),
m_end( false ),
m_parent( parent )
......
......@@ -23,7 +23,7 @@ class MARBLE_EXPORT AddLinkDialog : public QDialog
Q_OBJECT
public:
AddLinkDialog(QWidget *parent = 0 );
explicit AddLinkDialog(QWidget *parent = 0 );
~AddLinkDialog();
QString name() const;
QString url() const;
......
......@@ -24,7 +24,7 @@ class AnimatedUpdateTrack : public QObject
Q_OBJECT
public:
AnimatedUpdateTrack( PlaybackAnimatedUpdateItem* item );
explicit AnimatedUpdateTrack( PlaybackAnimatedUpdateItem* item );
void setDelayBeforeTrackStarts( double delay );
double delayBeforeTrackStarts() const;
void play();
......
......@@ -24,7 +24,7 @@ namespace Marble
class ClipPainterPrivate
{
public:
ClipPainterPrivate( ClipPainter * parent );
explicit ClipPainterPrivate( ClipPainter * parent );
ClipPainter * q;
......
......@@ -40,7 +40,7 @@ class FileViewWidgetPrivate
{
public:
FileViewWidgetPrivate( FileViewWidget *parent );
explicit FileViewWidgetPrivate( FileViewWidget *parent );
void setTreeModel( GeoDataTreeModel *model );
void setFileManager( FileManager *manager );
......
......@@ -28,7 +28,7 @@ class StackedTileLoader;
class GenericScanlineTextureMapper : public TextureMapperInterface
{
public:
GenericScanlineTextureMapper( StackedTileLoader *tileLoader );
explicit GenericScanlineTextureMapper( StackedTileLoader *tileLoader );
virtual void mapTexture( GeoPainter *painter,
const ViewportParams *viewport,
......
......@@ -32,7 +32,7 @@ class GeoGraphicsScenePrivate
{
public:
GeoGraphicsScene *q;
GeoGraphicsScenePrivate(GeoGraphicsScene *parent) :
explicit GeoGraphicsScenePrivate(GeoGraphicsScene *parent) :
q(parent)
{
}
......
......@@ -40,7 +40,7 @@ class LatLonEditPrivate;
class AbstractInputHandler // TODO: better name
{
protected:
AbstractInputHandler(LatLonEditPrivate *ui) : m_ui(ui) {}
explicit AbstractInputHandler(LatLonEditPrivate *ui) : m_ui(ui) {}
public:
virtual ~AbstractInputHandler() {}
......@@ -60,7 +60,7 @@ protected:
class DecimalInputHandler : public AbstractInputHandler
{
public:
DecimalInputHandler(LatLonEditPrivate *ui) : AbstractInputHandler(ui) {}
explicit DecimalInputHandler(LatLonEditPrivate *ui) : AbstractInputHandler(ui) {}
public: // AbstractInputHandler API
virtual void setupUi();
virtual void setupMinMax(Dimension dimension);
......@@ -74,7 +74,7 @@ public: // AbstractInputHandler API
class DMSInputHandler : public AbstractInputHandler
{
public:
DMSInputHandler(LatLonEditPrivate *ui) : AbstractInputHandler(ui) {}
explicit DMSInputHandler(LatLonEditPrivate *ui) : AbstractInputHandler(ui) {}
public: // AbstractInputHandler API
virtual void setupUi();
virtual void setupMinMax(Dimension dimension);
......@@ -88,7 +88,7 @@ public: // AbstractInputHandler API
class DMInputHandler : public AbstractInputHandler
{
public:
DMInputHandler(LatLonEditPrivate *ui) : AbstractInputHandler(ui) {}
explicit DMInputHandler(LatLonEditPrivate *ui) : AbstractInputHandler(ui) {}
public: // AbstractInputHandler API
virtual void setupUi();
virtual void setupMinMax(Dimension dimension);
......
......@@ -31,7 +31,7 @@ class MapViewItemDelegate : public QStyledItemDelegate
Q_OBJECT
public:
MapViewItemDelegate( QListView* view );
explicit MapViewItemDelegate( QListView* view );
void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
QSize sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const;
......
......@@ -45,7 +45,7 @@ public:
int m_iconSize;
MarbleLineEditPrivate( MarbleLineEdit* parent );
explicit MarbleLineEditPrivate( MarbleLineEdit* parent );
void createProgressAnimation();
};
......
......@@ -79,7 +79,7 @@ namespace Marble
class MarbleMap::CustomPaintLayer : public LayerInterface
{
public:
CustomPaintLayer( MarbleMap *map )
explicit CustomPaintLayer( MarbleMap *map )
: m_map( map )
{
}
......
......@@ -35,7 +35,7 @@ public:
qreal m_planetRadius;
MarblePhysicsPrivate( MarbleAbstractPresenter *presenter )
explicit MarblePhysicsPrivate( MarbleAbstractPresenter *presenter )
: m_presenter( presenter ),
m_mode( Instant ),
m_planetRadius( EARTH_RADIUS )
......
......@@ -28,7 +28,7 @@ namespace Marble
class MarblePluginSettingsWidgetPrivate : public Ui::MarblePluginSettingsWidget
{
public:
MarblePluginSettingsWidgetPrivate( Marble::MarblePluginSettingsWidget *parent ) :
explicit MarblePluginSettingsWidgetPrivate( Marble::MarblePluginSettingsWidget *parent ) :
q( parent ),
m_itemDelegate( 0 )
{}
......
......@@ -53,7 +53,7 @@ namespace Marble
class MarbleWidget::CustomPaintLayer : public LayerInterface
{
public:
CustomPaintLayer( MarbleWidget *widget )
explicit CustomPaintLayer( MarbleWidget *widget )
: m_widget( widget )
{
}
......@@ -87,7 +87,7 @@ class MarbleWidget::CustomPaintLayer : public LayerInterface
class MarbleWidgetPrivate
{
public:
MarbleWidgetPrivate( MarbleWidget *parent ) :
explicit MarbleWidgetPrivate( MarbleWidget *parent ) :
m_widget( parent ),
m_model(),
m_map( &m_model ),
......
......@@ -33,7 +33,7 @@ class MarbleWidgetInputHandlerPrivate
class MarbleWidgetSelectionRubber : public AbstractSelectionRubber
{
public:
MarbleWidgetSelectionRubber(MarbleWidget *widget)
explicit MarbleWidgetSelectionRubber(MarbleWidget *widget)
: m_rubberBand(QRubberBand::Rectangle, widget)
{
m_rubberBand.hide();
......
......@@ -22,7 +22,7 @@ namespace Marble
class MovieCapturePrivate
{
public:
MovieCapturePrivate(MarbleWidget *widget) :
explicit MovieCapturePrivate(MarbleWidget *widget) :
marbleWidget(widget), method(MovieCapture::TimeDriven)
{}
......
......@@ -110,7 +110,7 @@ public:
QHash<int, QByteArray> m_roleNames;
NewstuffModelPrivate( NewstuffModel* parent );
explicit NewstuffModelPrivate( NewstuffModel* parent );
QIcon preview( int index );
void setPreview( int index, const QIcon &previewIcon );
......
......@@ -28,7 +28,7 @@ class PlacemarkEditHeaderPrivate : public Ui::PlacemarkEditHeaderPrivate
{
public:
PlacemarkEditHeaderPrivate(PlacemarkEditHeader *_q);
explicit PlacemarkEditHeaderPrivate(PlacemarkEditHeader *_q);
~PlacemarkEditHeaderPrivate();
void init(QWidget* parent);
void setNotation(GeoDataCoordinates::Notation notation);
......
......@@ -30,7 +30,7 @@ class PlacemarkPositionProviderPlugin: public PositionProviderPlugin
Q_INTERFACES( Marble::PositionProviderPluginInterface )
public:
PlacemarkPositionProviderPlugin( MarbleModel *marbleModel );
explicit PlacemarkPositionProviderPlugin( MarbleModel *marbleModel );
virtual QString name() const;
virtual QString nameId() const;
......
Supports Markdown
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