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

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;
......
......@@ -25,7 +25,7 @@ class PlaybackAnimatedUpdateItem : public PlaybackItem
{
Q_OBJECT
public:
PlaybackAnimatedUpdateItem( GeoDataAnimatedUpdate *animatedUpdate );
explicit PlaybackAnimatedUpdateItem( GeoDataAnimatedUpdate *animatedUpdate );
const GeoDataAnimatedUpdate* animatedUpdate() const;
double duration() const;
void play();
......
......@@ -21,7 +21,7 @@ class PlaybackFlyToItem : public PlaybackItem
{
Q_OBJECT
public:
PlaybackFlyToItem( const GeoDataFlyTo* flyTo );
explicit PlaybackFlyToItem( const GeoDataFlyTo* flyTo );
const GeoDataFlyTo* flyTo() const;
double duration() const;
void play();
......
......@@ -28,7 +28,7 @@ class PlaybackSoundCueItem : public PlaybackItem
{
Q_OBJECT
public:
PlaybackSoundCueItem( const GeoDataSoundCue* soundCue );
explicit PlaybackSoundCueItem( const GeoDataSoundCue* soundCue );
const GeoDataSoundCue* soundCue() const;
double duration() const;
void play();
......
......@@ -21,7 +21,7 @@ class GeoDataTourControl;
class PlaybackTourControlItem : public PlaybackItem
{
public:
PlaybackTourControlItem( const GeoDataTourControl* tourControl );
explicit PlaybackTourControlItem( const GeoDataTourControl* tourControl );
const GeoDataTourControl* tourControl() const;
double duration() const;
void play();
......
......@@ -21,7 +21,7 @@ class PlaybackWaitItem : public PlaybackItem
{
Q_OBJECT
public:
PlaybackWaitItem( const GeoDataWait* wait );
explicit PlaybackWaitItem( const GeoDataWait* wait );
const GeoDataWait* wait() const;
double duration() const;
void play();
......
......@@ -30,7 +30,7 @@ class RouteSimulationPositionProviderPlugin: public PositionProviderPlugin
Q_INTERFACES( Marble::PositionProviderPluginInterface )
public:
RouteSimulationPositionProviderPlugin( MarbleModel *marbleModel );
explicit RouteSimulationPositionProviderPlugin( MarbleModel *marbleModel );
virtual ~RouteSimulationPositionProviderPlugin();
// Implementing PluginInterface
......
......@@ -24,7 +24,7 @@ class SoundTrack : public QObject
Q_OBJECT
public:
SoundTrack( PlaybackSoundCueItem* item );
explicit SoundTrack( PlaybackSoundCueItem* item );
void setDelayBeforeTrackStarts( double delay );
double delayBeforeTrackStarts() const;
void play();
......
......@@ -43,7 +43,7 @@ namespace Marble
class StackedTileLoaderPrivate
{
public:
StackedTileLoaderPrivate( MergedLayerDecorator *mergedLayerDecorator )
explicit StackedTileLoaderPrivate( MergedLayerDecorator *mergedLayerDecorator )
: m_layerDecorator( mergedLayerDecorator )
{
m_tileCache.setMaxCost( 20000 * 1024 ); // Cache size measured in bytes
......
......@@ -71,7 +71,7 @@ class TileCreatorPrivate
class TileCreatorSourceImage : public TileCreatorSource
{
public:
TileCreatorSourceImage( const QString &sourcePath )
explicit TileCreatorSourceImage( const QString &sourcePath )
: m_sourceImage( QImage( sourcePath ) ),
m_cachedRowNum( -1 )
{
......
......@@ -70,7 +70,7 @@ class TourWidgetPrivate
{
public:
TourWidgetPrivate( TourWidget *parent );
explicit TourWidgetPrivate( TourWidget *parent );
GeoDataFeature *getPlaylistFeature() const;
void updateRootIndex();
......
......@@ -45,7 +45,7 @@ public:
static int m_global_counter;
int m_counter;
DeclarativeDataPluginPrivate( DeclarativeDataPlugin* q );
explicit DeclarativeDataPluginPrivate( DeclarativeDataPlugin* q );
static void parseChunk( DeclarativeDataPluginItem * item, GeoDataCoordinates &coordinates, const QString &key, const QVariant &value );
......
......@@ -134,7 +134,7 @@ namespace Marble
class MarbleQuickItemPrivate
{
public:
MarbleQuickItemPrivate(MarbleQuickItem *marble) :
explicit MarbleQuickItemPrivate(MarbleQuickItem *marble) :
m_marble(marble),
m_model(),
m_map(&m_model),
......
......@@ -59,7 +59,7 @@ namespace Marble
Q_PROPERTY(bool inertialGlobeRotation READ inertialGlobeRotation WRITE setInertialGlobeRotation NOTIFY inertialGlobeRotationChanged)
public:
MarbleQuickItem(QQuickItem *parent = 0);
explicit MarbleQuickItem(QQuickItem *parent = 0);
enum Projection{
Spherical = Marble::Spherical,
......
......@@ -33,7 +33,7 @@ namespace Marble {
class RoutingPrivate
{
public:
RoutingPrivate(QObject * parent = nullptr);
explicit RoutingPrivate(QObject * parent = nullptr);
MarbleMap* m_marbleMap;
QMap<QString, Marble::RoutingProfile> m_profiles;
......
......@@ -32,7 +32,7 @@ class SearchBackend : public QObject
Q_PROPERTY(Placemark* selectedPlacemark READ selectedPlacemark NOTIFY selectedPlacemarkChanged)
public:
SearchBackend(QObject *parent = 0);
explicit SearchBackend(QObject *parent = 0);
Q_INVOKABLE void search(const QString &place);
Q_INVOKABLE void setCompletionPrefix(const QString &prefix);
QObject *marbleQuickItem();
......
......@@ -634,7 +634,7 @@ class GEODATA_EXPORT GeoDataFeature : public GeoDataObject
protected:
// the d-pointer needs to be protected to be accessible from derived classes
GeoDataFeaturePrivate* d;
GeoDataFeature( GeoDataFeaturePrivate* priv );
explicit GeoDataFeature( GeoDataFeaturePrivate* priv );
bool equals( const GeoDataFeature &other ) const;
using GeoDataObject::equals;
......
......@@ -374,7 +374,7 @@ class GEODATA_EXPORT GeoDataLineString : public GeoDataGeometry
virtual void unpack( QDataStream& stream );
protected:
GeoDataLineString(GeoDataLineStringPrivate* priv);
explicit GeoDataLineString(GeoDataLineStringPrivate* priv);
private:
GeoDataLineStringPrivate *p();
......
......@@ -31,7 +31,7 @@ class GEODATA_EXPORT GeoDataSchema : public GeoDataObject
{
public:
GeoDataSchema();
GeoDataSchema( const QHash<QString, GeoDataSimpleField>& simpleFields );
explicit GeoDataSchema( const QHash<QString, GeoDataSimpleField>& simpleFields );
GeoDataSchema( const GeoDataSchema& other );
GeoDataSchema& operator=( const GeoDataSchema& other );
bool operator==( const GeoDataSchema& other ) const;
......
......@@ -58,7 +58,7 @@ class GeometryLayerPrivate
public:
typedef QList<GeoDataPlacemark const *> OsmQueue;
GeometryLayerPrivate( const QAbstractItemModel *model );
explicit GeometryLayerPrivate( const QAbstractItemModel *model );
void createGraphicsItems( const GeoDataObject *object );
void createGraphicsItemFromGeometry( const GeoDataGeometry *object, const GeoDataPlacemark *placemark, bool avoidOsmDuplicates );
......
......@@ -216,7 +216,7 @@ class MARBLE_EXPORT AbstractProjection
protected:
const QScopedPointer<AbstractProjectionPrivate> d_ptr;
AbstractProjection( AbstractProjectionPrivate* dd );
explicit AbstractProjection( AbstractProjectionPrivate* dd );
private:
Q_DECLARE_PRIVATE(AbstractProjection)
......
......@@ -92,7 +92,7 @@ class AzimuthalEquidistantProjection : public AzimuthalProjection
GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree ) const;
protected:
AzimuthalEquidistantProjection(AzimuthalEquidistantProjectionPrivate *dd );
explicit AzimuthalEquidistantProjection(AzimuthalEquidistantProjectionPrivate *dd );
private:
Q_DECLARE_PRIVATE(AzimuthalEquidistantProjection)
......
......@@ -65,7 +65,7 @@ class AzimuthalProjection : public AbstractProjection
const ViewportParams *viewport ) const;
protected:
AzimuthalProjection( AzimuthalProjectionPrivate* dd );
explicit AzimuthalProjection( AzimuthalProjectionPrivate* dd );
private:
Q_DECLARE_PRIVATE( AzimuthalProjection )
......
......@@ -55,7 +55,7 @@ class CylindricalProjection : public AbstractProjection
virtual QPainterPath mapShape( const ViewportParams *viewport ) const;
protected:
CylindricalProjection( CylindricalProjectionPrivate* dd );
explicit CylindricalProjection( CylindricalProjectionPrivate* dd );
private:
Q_DECLARE_PRIVATE( CylindricalProjection )
......
......@@ -91,7 +91,7 @@ class GnomonicProjection : public AzimuthalProjection
GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree ) const;
protected:
GnomonicProjection(GnomonicProjectionPrivate *dd );
explicit GnomonicProjection(GnomonicProjectionPrivate *dd );
private:
Q_DECLARE_PRIVATE(GnomonicProjection)
......
......@@ -91,7 +91,7 @@ class LambertAzimuthalProjection : public AzimuthalProjection
GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree ) const;
protected:
LambertAzimuthalProjection(LambertAzimuthalProjectionPrivate *dd );
explicit LambertAzimuthalProjection(LambertAzimuthalProjectionPrivate *dd );
private:
Q_DECLARE_PRIVATE(LambertAzimuthalProjection)
......
......@@ -98,7 +98,7 @@ class SphericalProjection : public AzimuthalProjection
GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree ) const;
protected:
SphericalProjection(SphericalProjectionPrivate *dd );
explicit SphericalProjection(SphericalProjectionPrivate *dd );
private:
Q_DECLARE_PRIVATE(SphericalProjection)
......
......@@ -91,7 +91,7 @@ class StereographicProjection : public AzimuthalProjection
GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree ) const;
protected:
StereographicProjection(StereographicProjectionPrivate *dd );
explicit StereographicProjection(StereographicProjectionPrivate *dd );
private:
Q_DECLARE_PRIVATE(StereographicProjection)
......
......@@ -91,7 +91,7 @@ class VerticalPerspectiveProjection : public AzimuthalProjection
GeoDataCoordinates::Unit unit = GeoDataCoordinates::Degree ) const;
protected:
VerticalPerspectiveProjection(VerticalPerspectiveProjectionPrivate *dd );
explicit VerticalPerspectiveProjection(VerticalPerspectiveProjectionPrivate *dd );
private:
Q_DECLARE_PRIVATE(VerticalPerspectiveProjection)
......
......@@ -54,7 +54,7 @@ namespace Marble
class RoutingInputLineEdit : public MarbleLineEdit
{
public:
RoutingInputLineEdit( QWidget *parent = 0 );
explicit RoutingInputLineEdit( QWidget *parent = 0 );
protected:
virtual void keyPressEvent(QKeyEvent *);
......
......@@ -33,7 +33,7 @@ public:
OffRoute
};
RoutingModelPrivate( RouteRequest* request );
explicit RoutingModelPrivate( RouteRequest* request );
MarbleModel *m_marbleModel;
Route m_route;
......
......@@ -37,7 +37,7 @@ public:
NewstuffModel m_newstuffModel;
SpeakersModelPrivate( SpeakersModel* parent );
explicit SpeakersModelPrivate( SpeakersModel* parent );
void fillModel();
......
......@@ -43,7 +43,7 @@ public:
bool m_deviated;
VoiceNavigationModelPrivate( VoiceNavigationModel* parent );
explicit VoiceNavigationModelPrivate( VoiceNavigationModel* parent );
void reset();
......
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