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:
parent
904a1d4909
commit
343568339f
|
@ -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;
|
||||
|
|
|
@ -45,7 +45,7 @@ class CoreAV : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CoreAV(Tox* tox);
|
||||
explicit CoreAV(Tox* tox);
|
||||
~CoreAV();
|
||||
|
||||
const ToxAV* getToxAv() const;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -34,7 +34,7 @@ class OfflineMsgEngine : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
OfflineMsgEngine(Friend *);
|
||||
explicit OfflineMsgEngine(Friend *);
|
||||
virtual ~OfflineMsgEngine();
|
||||
static QMutex globalMutex;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class GenericNetCamView : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GenericNetCamView(QWidget* parent);
|
||||
explicit GenericNetCamView(QWidget* parent);
|
||||
|
||||
signals:
|
||||
void showMessageClicked();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -27,7 +27,7 @@ class ContentLayout : public QVBoxLayout
|
|||
{
|
||||
public:
|
||||
ContentLayout();
|
||||
ContentLayout(QWidget* parent);
|
||||
explicit ContentLayout(QWidget* parent);
|
||||
~ContentLayout();
|
||||
|
||||
void clear();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -33,7 +33,7 @@ class GroupChatForm : public GenericChatForm
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GroupChatForm(Group* chatGroup);
|
||||
explicit GroupChatForm(Group* chatGroup);
|
||||
~GroupChatForm();
|
||||
|
||||
void onUserListChanged();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -38,7 +38,7 @@ class SettingsWidget : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SettingsWidget(QWidget* parent = nullptr);
|
||||
explicit SettingsWidget(QWidget* parent = nullptr);
|
||||
~SettingsWidget();
|
||||
|
||||
bool isShown() const;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
FriendOnlineItem
|
||||
};
|
||||
|
||||
GenericChatItemWidget(QWidget *parent = 0);
|
||||
explicit GenericChatItemWidget(QWidget *parent = 0);
|
||||
|
||||
bool isCompact() const;
|
||||
void setCompact(bool compact);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -34,7 +34,7 @@ CroppingLabel::CroppingLabel(QWidget* parent)
|
|||
class LineEdit : public QLineEdit
|
||||
{
|
||||
public:
|
||||
LineEdit(QWidget* parent = 0) :
|
||||
explicit LineEdit(QWidget* parent = 0) :
|
||||
QLineEdit(parent)
|
||||
{}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1404,7 +1404,7 @@ ContentLayout* Widget::createContentDialog(DialogType type)
|
|||
class Dialog : public ActivateDialog
|
||||
{
|
||||
public:
|
||||
Dialog(DialogType type)
|
||||
explicit Dialog(DialogType type)
|
||||
: ActivateDialog()
|
||||
, type(type)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user