1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

style(constructors): Constructors are explicit now

This commit is contained in:
Polshakov Dmitry 2016-04-19 12:56:21 +03:00 committed by Diadlo
parent 904a1d4909
commit 343568339f
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
26 changed files with 26 additions and 26 deletions

View File

@ -31,7 +31,7 @@ class NotificationIcon : public QObject, public ChatLineContent
{
Q_OBJECT
public:
NotificationIcon(QSize size);
explicit NotificationIcon(QSize size);
virtual QRectF boundingRect() const override;
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;

View File

@ -45,7 +45,7 @@ class CoreAV : public QObject
Q_OBJECT
public:
CoreAV(Tox* tox);
explicit CoreAV(Tox* tox);
~CoreAV();
const ToxAV* getToxAv() const;

View File

@ -18,7 +18,7 @@ struct ToxCall
{
protected:
ToxCall() = default;
ToxCall(uint32_t CallId);
explicit ToxCall(uint32_t CallId);
~ToxCall();
public:
ToxCall(const ToxCall& other) = delete;

View File

@ -69,7 +69,7 @@ public:
QList<HistMessage> exportMessages();
private:
HistoryKeeper(GenericDdInterface *db_);
explicit HistoryKeeper(GenericDdInterface *db_);
HistoryKeeper(HistoryKeeper &hk) = delete;
HistoryKeeper& operator=(const HistoryKeeper&) = delete;
QString unWrapMessage(const QString &str);

View File

@ -34,7 +34,7 @@ class OfflineMsgEngine : public QObject
{
Q_OBJECT
public:
OfflineMsgEngine(Friend *);
explicit OfflineMsgEngine(Friend *);
virtual ~OfflineMsgEngine();
static QMutex globalMutex;

View File

@ -30,7 +30,7 @@ class GenericNetCamView : public QWidget
{
Q_OBJECT
public:
GenericNetCamView(QWidget* parent);
explicit GenericNetCamView(QWidget* parent);
signals:
void showMessageClicked();

View File

@ -37,7 +37,7 @@ struct vpx_image;
class VideoFrame
{
public:
VideoFrame(AVFrame* frame);
explicit VideoFrame(AVFrame* frame);
VideoFrame(AVFrame* frame, std::function<void()> freelistCallback);
VideoFrame(AVFrame* frame, int w, int h, int fmt, std::function<void()> freelistCallback);
~VideoFrame();

View File

@ -33,7 +33,7 @@ class CategoryWidget : public GenericChatItemWidget
{
Q_OBJECT
public:
CategoryWidget(QWidget* parent = 0);
explicit CategoryWidget(QWidget* parent = 0);
bool isExpanded() const;
void setExpanded(bool isExpanded, bool save = true);

View File

@ -27,7 +27,7 @@ class ContentLayout : public QVBoxLayout
{
public:
ContentLayout();
ContentLayout(QWidget* parent);
explicit ContentLayout(QWidget* parent);
~ContentLayout();
void clear();

View File

@ -40,7 +40,7 @@ class ChatForm : public GenericChatForm
{
Q_OBJECT
public:
ChatForm(Friend* chatFriend);
explicit ChatForm(Friend* chatFriend);
~ChatForm();
void setStatusMessage(QString newMessage);
void loadHistory(QDateTime since, bool processUndelivered = false);

View File

@ -52,7 +52,7 @@ class GenericChatForm : public QWidget
{
Q_OBJECT
public:
GenericChatForm(QWidget *parent = 0);
explicit GenericChatForm(QWidget *parent = 0);
~GenericChatForm();
void setName(const QString &newName);

View File

@ -33,7 +33,7 @@ class GroupChatForm : public GenericChatForm
{
Q_OBJECT
public:
GroupChatForm(Group* chatGroup);
explicit GroupChatForm(Group* chatGroup);
~GroupChatForm();
void onUserListChanged();

View File

@ -52,7 +52,7 @@ class ProfileForm : public QWidget
{
Q_OBJECT
public:
ProfileForm(QWidget *parent = nullptr);
explicit ProfileForm(QWidget *parent = nullptr);
~ProfileForm();
virtual void show() final{}
void show(ContentLayout* contentLayout);

View File

@ -32,7 +32,7 @@ class GeneralForm : public GenericForm
{
Q_OBJECT
public:
GeneralForm(SettingsWidget *parent);
explicit GeneralForm(SettingsWidget *parent);
~GeneralForm();
virtual QString getFormName() final override {return tr("General");}

View File

@ -24,7 +24,7 @@ class GenericForm : public QWidget
{
Q_OBJECT
public:
GenericForm(const QPixmap &icon) : formIcon(icon) {;}
explicit GenericForm(const QPixmap &icon) : formIcon(icon) {;}
virtual ~GenericForm() {}
virtual QString getFormName() = 0;

View File

@ -38,7 +38,7 @@ class SettingsWidget : public QWidget
{
Q_OBJECT
public:
SettingsWidget(QWidget* parent = nullptr);
explicit SettingsWidget(QWidget* parent = nullptr);
~SettingsWidget();
bool isShown() const;

View File

@ -37,7 +37,7 @@ class TabCompleter : public QObject
{
Q_OBJECT
public:
explicit TabCompleter(ChatTextEdit* msgEdit, Group* group);
TabCompleter(ChatTextEdit* msgEdit, Group* group);
public slots:
void complete();

View File

@ -36,7 +36,7 @@ public:
FriendOnlineItem
};
GenericChatItemWidget(QWidget *parent = 0);
explicit GenericChatItemWidget(QWidget *parent = 0);
bool isCompact() const;
void setCompact(bool compact);

View File

@ -34,7 +34,7 @@ class GenericChatroomWidget : public GenericChatItemWidget
{
Q_OBJECT
public:
GenericChatroomWidget(QWidget *parent = 0);
explicit GenericChatroomWidget(QWidget *parent = 0);
virtual void setAsActiveChatroom() = 0;
virtual void setAsInactiveChatroom() = 0;

View File

@ -29,7 +29,7 @@ class NotificationEdgeWidget;
class NotificationScrollArea final : public AdjustingScrollArea
{
public:
NotificationScrollArea(QWidget* parent = 0);
explicit NotificationScrollArea(QWidget* parent = 0);
public slots:
void trackWidget(GenericChatroomWidget* widget);

View File

@ -34,7 +34,7 @@ CroppingLabel::CroppingLabel(QWidget* parent)
class LineEdit : public QLineEdit
{
public:
LineEdit(QWidget* parent = 0) :
explicit LineEdit(QWidget* parent = 0) :
QLineEdit(parent)
{}

View File

@ -25,7 +25,7 @@
class MovableWidget : public QWidget
{
public:
MovableWidget(QWidget* parent);
explicit MovableWidget(QWidget* parent);
void resetBoundary(QRect newBoundary);
void setBoundary(QRect newBoundary);
float getRatio() const;

View File

@ -26,7 +26,7 @@ class ScreenGrabberChooserRectItem final : public QObject, public QGraphicsItemG
{
Q_OBJECT
public:
ScreenGrabberChooserRectItem(QGraphicsScene* scene);
explicit ScreenGrabberChooserRectItem(QGraphicsScene* scene);
~ScreenGrabberChooserRectItem();
virtual QRectF boundingRect() const final override;

View File

@ -28,7 +28,7 @@ class ScreenGrabberOverlayItem final : public QObject, public QGraphicsRectItem
{
Q_OBJECT
public:
ScreenGrabberOverlayItem(ScreenshotGrabber* grabber);
explicit ScreenGrabberOverlayItem(ScreenshotGrabber* grabber);
~ScreenGrabberOverlayItem();
void setChosenRect(QRect rect);

View File

@ -39,7 +39,7 @@ class ScreenshotGrabber : public QObject
Q_OBJECT
public:
ScreenshotGrabber(QObject* parent);
explicit ScreenshotGrabber(QObject* parent);
~ScreenshotGrabber() override;
bool eventFilter(QObject* object, QEvent* event) override;

View File

@ -1404,7 +1404,7 @@ ContentLayout* Widget::createContentDialog(DialogType type)
class Dialog : public ActivateDialog
{
public:
Dialog(DialogType type)
explicit Dialog(DialogType type)
: ActivateDialog()
, type(type)
{