Make class constructors with required args explicit [krazy 45/46] by Mikko Rapeli

parent f4177065
......@@ -43,7 +43,7 @@ Q_OBJECT public:
* @param name A unique identifier for this renderer
* @param winid The parent widget identifier (required for SDL display). Set to 0 for OpenGL rendering
* @param profile The MLT profile used for the renderer (default one will be used if empty). */
AbstractRender(Kdenlive::MONITORID name, QWidget *parent = 0):QObject(parent), sendFrameForAnalysis(false), m_name(name) {};
explicit AbstractRender(Kdenlive::MONITORID name, QWidget *parent = 0):QObject(parent), sendFrameForAnalysis(false), m_name(name) {};
/** @brief Destroy the MLT Renderer. */
virtual ~AbstractRender() {};
......@@ -117,7 +117,7 @@ class VideoContainer : public QFrame
{
Q_OBJECT
public:
VideoContainer(AbstractMonitor *monitor, QWidget *parent = 0);
explicit VideoContainer(AbstractMonitor *monitor, QWidget *parent = 0);
void switchFullScreen();
protected:
......
......@@ -55,7 +55,7 @@ class ArchiveWidget : public QDialog, public Ui::ArchiveWidget_UI
public:
ArchiveWidget(QString projectName, QDomDocument doc, QList <DocClipBase*> list, QStringList luma_list, QWidget * parent = 0);
// Constructor for extracting widget
ArchiveWidget(const KUrl &url, QWidget * parent = 0);
explicit ArchiveWidget(const KUrl &url, QWidget * parent = 0);
~ArchiveWidget();
QString extractedProjectFile();
......
......@@ -34,7 +34,7 @@ class BezierSplineWidget : public QWidget
public:
/** @brief Sets up the UI and sets the spline to @param spline. */
BezierSplineWidget(const QString &spline, QWidget* parent = 0);
explicit BezierSplineWidget(const QString &spline, QWidget* parent = 0);
/** @brief Returns the current spline. */
QString spline();
......
......@@ -40,7 +40,7 @@ public:
* @param text (optional) What the color will be used for
* @param color (optional) initial color
* @param alphaEnabled (optional) Should transparent colors be enabled */
ChooseColorWidget(QString text = QString(), QString color = "0xffffffff", bool alphaEnabled = false, QWidget* parent = 0);
explicit ChooseColorWidget(QString text = QString(), QString color = "0xffffffff", bool alphaEnabled = false, QWidget* parent = 0);
/** @brief Gets the choosen color. */
QString getColor();
......
......@@ -38,7 +38,7 @@ class CustomLabel : public QProgressBar
{
Q_OBJECT
public:
CustomLabel(const QString &label, bool showSlider = true, int range = 1000, QWidget *parent = 0);
explicit CustomLabel(const QString &label, bool showSlider = true, int range = 1000, QWidget *parent = 0);
void setProgressValue(double value);
void setStep(double step);
......
......@@ -34,7 +34,7 @@ class DvdWizardVob : public QWizardPage
Q_OBJECT
public:
DvdWizardVob(const QString &profile, QWidget * parent = 0);
explicit DvdWizardVob(const QString &profile, QWidget * parent = 0);
virtual ~DvdWizardVob();
virtual bool isComplete() const;
QStringList selectedUrls() const;
......
......@@ -39,7 +39,7 @@ class EffectStackView2 : public QWidget
Q_OBJECT
public:
EffectStackView2(Monitor *monitor, QWidget *parent = 0);
explicit EffectStackView2(Monitor *monitor, QWidget *parent = 0);
virtual ~EffectStackView2();
/** @brief Raises @param dock if a clip is loaded. */
......
......@@ -38,7 +38,7 @@ class EffectStackEdit : public QScrollArea
{
Q_OBJECT
public:
EffectStackEdit(Monitor *monitor, QWidget *parent = 0);
explicit EffectStackEdit(Monitor *monitor, QWidget *parent = 0);
~EffectStackEdit();
void updateProjectFormat(MltVideoProfile profile, Timecode t);
static QMap<QString, QImage> iconCache;
......
......@@ -30,7 +30,7 @@ class EncodingProfilesDialog : public QDialog, Ui::ManageEncodingProfile_UI
Q_OBJECT
public:
EncodingProfilesDialog(int profileType, QWidget * parent = 0);
explicit EncodingProfilesDialog(int profileType, QWidget * parent = 0);
~EncodingProfilesDialog();
protected:
......
......@@ -56,7 +56,7 @@ public:
* Create a new curve widget with a default curve, that is a straight
* line from bottom-left to top-right.
*/
KisCurveWidget(QWidget *parent = 0, Qt::WFlags f = 0);
explicit KisCurveWidget(QWidget *parent = 0, Qt::WFlags f = 0);
virtual ~KisCurveWidget();
......
......@@ -26,7 +26,7 @@ class QImage;
class AudioEnvelope
{
public:
AudioEnvelope(Mlt::Producer *producer, int offset = 0, int length = 0);
explicit AudioEnvelope(Mlt::Producer *producer, int offset = 0, int length = 0);
~AudioEnvelope();
/// Returns the envelope, calculates it if necessary.
......
......@@ -37,7 +37,7 @@ class MonitorEditWidget : public QWidget
Q_OBJECT
public:
MonitorEditWidget(Render *renderer, QWidget* parent = 0);
explicit MonitorEditWidget(Render *renderer, QWidget* parent = 0);
virtual ~MonitorEditWidget();
/** @brief Updates the necessary settings on a profile change. */
......
......@@ -31,7 +31,7 @@ class MonitorScene : public QGraphicsScene
{
Q_OBJECT
public:
MonitorScene(Render *renderer, QObject* parent = 0);
explicit MonitorScene(Render *renderer, QObject* parent = 0);
/** @brief Sets m_view to this scenes view. */
void setUp();
......
......@@ -29,7 +29,7 @@ class QGraphicsView;
class BPointItem : public QAbstractGraphicsShapeItem
{
public:
BPointItem(BPoint point, QGraphicsItem* parent = 0);
explicit BPointItem(BPoint point, QGraphicsItem* parent = 0);
BPoint getPoint();
void setPoint(BPoint point);
......
......@@ -30,7 +30,7 @@ class SplineItem : public QObject, public QGraphicsPathItem
Q_OBJECT
public:
SplineItem(const QList <BPoint> &points, QGraphicsItem* parent = 0, QGraphicsScene *scene = 0);
explicit SplineItem(const QList <BPoint> &points, QGraphicsItem* parent = 0, QGraphicsScene *scene = 0);
enum { Type = UserType + 10 };
......
......@@ -32,7 +32,7 @@ class ProfilesDialog : public QDialog
public:
ProfilesDialog(QWidget * parent = 0);
/** @brief Using this constructor, the dialog only allows editing one profile. */
ProfilesDialog(QString profilePath, QWidget * parent = 0);
explicit ProfilesDialog(QString profilePath, QWidget * parent = 0);
void fillList(const QString selectedProfile = QString());
static QMap< QString, QString > getSettingsForProfile(const QString profileName);
......
......@@ -67,7 +67,7 @@ public:
if mouse tracking is enabled.
\see signalMousePositionChanged(): Emitted when mouse tracking is enabled
*/
AbstractScopeWidget(bool trackMouse = false, QWidget *parent = 0);
explicit AbstractScopeWidget(bool trackMouse = false, QWidget *parent = 0);
virtual ~AbstractScopeWidget(); // Must be virtual because of inheritance, to avoid memory leaks
......
......@@ -31,7 +31,7 @@ class AbstractAudioScopeWidget : public AbstractScopeWidget
{
Q_OBJECT
public:
AbstractAudioScopeWidget(bool trackMouse = false, QWidget *parent = 0);
explicit AbstractAudioScopeWidget(bool trackMouse = false, QWidget *parent = 0);
virtual ~AbstractAudioScopeWidget();
public slots:
......
......@@ -28,7 +28,7 @@ class AbstractGfxScopeWidget : public AbstractScopeWidget
Q_OBJECT
public:
AbstractGfxScopeWidget(bool trackMouse = false, QWidget *parent = 0);
explicit AbstractGfxScopeWidget(bool trackMouse = false, QWidget *parent = 0);
virtual ~AbstractGfxScopeWidget(); // Must be virtual because of inheritance, to avoid memory leaks
protected:
......
......@@ -34,7 +34,7 @@ class SlideshowClip : public QDialog
Q_OBJECT
public:
SlideshowClip(Timecode tc, QWidget * parent = 0);
explicit SlideshowClip(Timecode tc, QWidget * parent = 0);
virtual ~ SlideshowClip();
/** return selected path for slideshow in MLT format */
QString selectedPath();
......
......@@ -32,7 +32,7 @@ class SmallRuler : public QWidget
Q_OBJECT
public:
SmallRuler(MonitorManager *manager, QWidget *parent = 0);
explicit SmallRuler(MonitorManager *manager, QWidget *parent = 0);
virtual void mousePressEvent(QMouseEvent * event);
virtual void mouseMoveEvent(QMouseEvent * event);
virtual void leaveEvent( QEvent * event );
......
......@@ -28,7 +28,7 @@ class CaptureHandler : public QObject
{
Q_OBJECT
public:
CaptureHandler(QVBoxLayout *lay, QWidget *parent = 0);
explicit CaptureHandler(QVBoxLayout *lay, QWidget *parent = 0);
~CaptureHandler();
virtual void startPreview(int deviceId, int captureMode, bool audio = true) = 0;
virtual void stopPreview() = 0;
......
......@@ -41,7 +41,7 @@ public:
/** @brief Constructor for the widget, sets value to 0.
* @param t Timecode object used to setup correct input (frames or HH:MM:SS:FF)
* @param parent parent Widget */
TimecodeDisplay(Timecode t, QWidget *parent = 0);
explicit TimecodeDisplay(Timecode t, QWidget *parent = 0);
/** @brief Returns the minimum value, which can be entered.
* default is 0 */
......
......@@ -31,7 +31,7 @@ class TrackDialog : public QDialog, public Ui::AddTrack_UI
Q_OBJECT
public:
TrackDialog(KdenliveDoc *doc, QWidget * parent = 0);
explicit TrackDialog(KdenliveDoc *doc, QWidget * parent = 0);
};
......
......@@ -55,7 +55,7 @@ public:
* @param doc the kdenlive document whose tracks to use
* @param selected the track which should be selected by default
* @param parent the parent widget */
TracksConfigDialog(KdenliveDoc * doc, int selected = -1, QWidget * parent = 0);
explicit TracksConfigDialog(KdenliveDoc * doc, int selected = -1, QWidget * parent = 0);
/** @brief Returns the new list of tracks created from the table. */
const QList <TrackInfo> tracksList();
......
......@@ -33,7 +33,7 @@ class TransitionSettings : public QWidget, public Ui::TransitionSettings_UI
Q_OBJECT
public:
TransitionSettings(Monitor *monitor, QWidget* parent = 0);
explicit TransitionSettings(Monitor *monitor, QWidget* parent = 0);
void raiseWindow(QWidget*);
void updateProjectFormat(MltVideoProfile profile, Timecode t, const QList <TrackInfo> info);
void updateTimecodeFormat();
......
......@@ -58,7 +58,7 @@ class AbstractService : public QObject
Q_OBJECT
public:
AbstractService(QListWidget *listWidget, QObject * parent = 0);
explicit AbstractService(QListWidget *listWidget, QObject * parent = 0);
~AbstractService();
/** @brief Get file extension for currently selected item. */
virtual QString getExtension(QListWidgetItem *item);
......
......@@ -34,7 +34,7 @@ class ArchiveOrg : public AbstractService
Q_OBJECT
public:
ArchiveOrg(QListWidget *listWidget, QObject * parent = 0);
explicit ArchiveOrg(QListWidget *listWidget, QObject * parent = 0);
~ArchiveOrg();
virtual QString getExtension(QListWidgetItem *item);
virtual QString getDefaultDownloadName(QListWidgetItem *item);
......
......@@ -34,7 +34,7 @@ class FreeSound : public AbstractService
Q_OBJECT
public:
FreeSound(QListWidget *listWidget, QObject * parent = 0);
explicit FreeSound(QListWidget *listWidget, QObject * parent = 0);
~FreeSound();
virtual QString getExtension(QListWidgetItem *item);
virtual QString getDefaultDownloadName(QListWidgetItem *item);
......
......@@ -34,7 +34,7 @@ class OpenClipArt : public AbstractService
Q_OBJECT
public:
OpenClipArt(QListWidget *listWidget, QObject * parent = 0);
explicit OpenClipArt(QListWidget *listWidget, QObject * parent = 0);
~OpenClipArt();
virtual QString getExtension(QListWidgetItem *item);
virtual QString getDefaultDownloadName(QListWidgetItem *item);
......
......@@ -42,7 +42,7 @@ class ResourceWidget : public QDialog, public Ui::FreeSound_UI
Q_OBJECT
public:
ResourceWidget(const QString & folder, QWidget * parent = 0);
explicit ResourceWidget(const QString & folder, QWidget * parent = 0);
~ResourceWidget();
......
......@@ -76,7 +76,7 @@ class Wizard : public QWizard
{
Q_OBJECT
public:
Wizard(bool upgrade, QWidget * parent = 0);
explicit Wizard(bool upgrade, QWidget * parent = 0);
void installExtraMimes(QString baseName, QStringList globs);
void runUpdateMimeDatabase();
void adjustSettings();
......
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