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
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
NotificationIcon(QSize size);
|
explicit NotificationIcon(QSize size);
|
||||||
|
|
||||||
virtual QRectF boundingRect() const override;
|
virtual QRectF boundingRect() const override;
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||||
|
@ -45,7 +45,7 @@ class CoreAV : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CoreAV(Tox* tox);
|
explicit CoreAV(Tox* tox);
|
||||||
~CoreAV();
|
~CoreAV();
|
||||||
|
|
||||||
const ToxAV* getToxAv() const;
|
const ToxAV* getToxAv() const;
|
||||||
|
@ -18,7 +18,7 @@ struct ToxCall
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
ToxCall() = default;
|
ToxCall() = default;
|
||||||
ToxCall(uint32_t CallId);
|
explicit ToxCall(uint32_t CallId);
|
||||||
~ToxCall();
|
~ToxCall();
|
||||||
public:
|
public:
|
||||||
ToxCall(const ToxCall& other) = delete;
|
ToxCall(const ToxCall& other) = delete;
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
QList<HistMessage> exportMessages();
|
QList<HistMessage> exportMessages();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HistoryKeeper(GenericDdInterface *db_);
|
explicit HistoryKeeper(GenericDdInterface *db_);
|
||||||
HistoryKeeper(HistoryKeeper &hk) = delete;
|
HistoryKeeper(HistoryKeeper &hk) = delete;
|
||||||
HistoryKeeper& operator=(const HistoryKeeper&) = delete;
|
HistoryKeeper& operator=(const HistoryKeeper&) = delete;
|
||||||
QString unWrapMessage(const QString &str);
|
QString unWrapMessage(const QString &str);
|
||||||
|
@ -34,7 +34,7 @@ class OfflineMsgEngine : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
OfflineMsgEngine(Friend *);
|
explicit OfflineMsgEngine(Friend *);
|
||||||
virtual ~OfflineMsgEngine();
|
virtual ~OfflineMsgEngine();
|
||||||
static QMutex globalMutex;
|
static QMutex globalMutex;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class GenericNetCamView : public QWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GenericNetCamView(QWidget* parent);
|
explicit GenericNetCamView(QWidget* parent);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void showMessageClicked();
|
void showMessageClicked();
|
||||||
|
@ -37,7 +37,7 @@ struct vpx_image;
|
|||||||
class VideoFrame
|
class VideoFrame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VideoFrame(AVFrame* frame);
|
explicit VideoFrame(AVFrame* frame);
|
||||||
VideoFrame(AVFrame* frame, std::function<void()> freelistCallback);
|
VideoFrame(AVFrame* frame, std::function<void()> freelistCallback);
|
||||||
VideoFrame(AVFrame* frame, int w, int h, int fmt, std::function<void()> freelistCallback);
|
VideoFrame(AVFrame* frame, int w, int h, int fmt, std::function<void()> freelistCallback);
|
||||||
~VideoFrame();
|
~VideoFrame();
|
||||||
|
@ -33,7 +33,7 @@ class CategoryWidget : public GenericChatItemWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
CategoryWidget(QWidget* parent = 0);
|
explicit CategoryWidget(QWidget* parent = 0);
|
||||||
|
|
||||||
bool isExpanded() const;
|
bool isExpanded() const;
|
||||||
void setExpanded(bool isExpanded, bool save = true);
|
void setExpanded(bool isExpanded, bool save = true);
|
||||||
|
@ -27,7 +27,7 @@ class ContentLayout : public QVBoxLayout
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ContentLayout();
|
ContentLayout();
|
||||||
ContentLayout(QWidget* parent);
|
explicit ContentLayout(QWidget* parent);
|
||||||
~ContentLayout();
|
~ContentLayout();
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
@ -40,7 +40,7 @@ class ChatForm : public GenericChatForm
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ChatForm(Friend* chatFriend);
|
explicit ChatForm(Friend* chatFriend);
|
||||||
~ChatForm();
|
~ChatForm();
|
||||||
void setStatusMessage(QString newMessage);
|
void setStatusMessage(QString newMessage);
|
||||||
void loadHistory(QDateTime since, bool processUndelivered = false);
|
void loadHistory(QDateTime since, bool processUndelivered = false);
|
||||||
|
@ -52,7 +52,7 @@ class GenericChatForm : public QWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GenericChatForm(QWidget *parent = 0);
|
explicit GenericChatForm(QWidget *parent = 0);
|
||||||
~GenericChatForm();
|
~GenericChatForm();
|
||||||
|
|
||||||
void setName(const QString &newName);
|
void setName(const QString &newName);
|
||||||
|
@ -33,7 +33,7 @@ class GroupChatForm : public GenericChatForm
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GroupChatForm(Group* chatGroup);
|
explicit GroupChatForm(Group* chatGroup);
|
||||||
~GroupChatForm();
|
~GroupChatForm();
|
||||||
|
|
||||||
void onUserListChanged();
|
void onUserListChanged();
|
||||||
|
@ -52,7 +52,7 @@ class ProfileForm : public QWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ProfileForm(QWidget *parent = nullptr);
|
explicit ProfileForm(QWidget *parent = nullptr);
|
||||||
~ProfileForm();
|
~ProfileForm();
|
||||||
virtual void show() final{}
|
virtual void show() final{}
|
||||||
void show(ContentLayout* contentLayout);
|
void show(ContentLayout* contentLayout);
|
||||||
|
@ -32,7 +32,7 @@ class GeneralForm : public GenericForm
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GeneralForm(SettingsWidget *parent);
|
explicit GeneralForm(SettingsWidget *parent);
|
||||||
~GeneralForm();
|
~GeneralForm();
|
||||||
virtual QString getFormName() final override {return tr("General");}
|
virtual QString getFormName() final override {return tr("General");}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class GenericForm : public QWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GenericForm(const QPixmap &icon) : formIcon(icon) {;}
|
explicit GenericForm(const QPixmap &icon) : formIcon(icon) {;}
|
||||||
virtual ~GenericForm() {}
|
virtual ~GenericForm() {}
|
||||||
|
|
||||||
virtual QString getFormName() = 0;
|
virtual QString getFormName() = 0;
|
||||||
|
@ -38,7 +38,7 @@ class SettingsWidget : public QWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SettingsWidget(QWidget* parent = nullptr);
|
explicit SettingsWidget(QWidget* parent = nullptr);
|
||||||
~SettingsWidget();
|
~SettingsWidget();
|
||||||
|
|
||||||
bool isShown() const;
|
bool isShown() const;
|
||||||
|
@ -37,7 +37,7 @@ class TabCompleter : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit TabCompleter(ChatTextEdit* msgEdit, Group* group);
|
TabCompleter(ChatTextEdit* msgEdit, Group* group);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void complete();
|
void complete();
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
FriendOnlineItem
|
FriendOnlineItem
|
||||||
};
|
};
|
||||||
|
|
||||||
GenericChatItemWidget(QWidget *parent = 0);
|
explicit GenericChatItemWidget(QWidget *parent = 0);
|
||||||
|
|
||||||
bool isCompact() const;
|
bool isCompact() const;
|
||||||
void setCompact(bool compact);
|
void setCompact(bool compact);
|
||||||
|
@ -34,7 +34,7 @@ class GenericChatroomWidget : public GenericChatItemWidget
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GenericChatroomWidget(QWidget *parent = 0);
|
explicit GenericChatroomWidget(QWidget *parent = 0);
|
||||||
|
|
||||||
virtual void setAsActiveChatroom() = 0;
|
virtual void setAsActiveChatroom() = 0;
|
||||||
virtual void setAsInactiveChatroom() = 0;
|
virtual void setAsInactiveChatroom() = 0;
|
||||||
|
@ -29,7 +29,7 @@ class NotificationEdgeWidget;
|
|||||||
class NotificationScrollArea final : public AdjustingScrollArea
|
class NotificationScrollArea final : public AdjustingScrollArea
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NotificationScrollArea(QWidget* parent = 0);
|
explicit NotificationScrollArea(QWidget* parent = 0);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void trackWidget(GenericChatroomWidget* widget);
|
void trackWidget(GenericChatroomWidget* widget);
|
||||||
|
@ -34,7 +34,7 @@ CroppingLabel::CroppingLabel(QWidget* parent)
|
|||||||
class LineEdit : public QLineEdit
|
class LineEdit : public QLineEdit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LineEdit(QWidget* parent = 0) :
|
explicit LineEdit(QWidget* parent = 0) :
|
||||||
QLineEdit(parent)
|
QLineEdit(parent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
class MovableWidget : public QWidget
|
class MovableWidget : public QWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MovableWidget(QWidget* parent);
|
explicit MovableWidget(QWidget* parent);
|
||||||
void resetBoundary(QRect newBoundary);
|
void resetBoundary(QRect newBoundary);
|
||||||
void setBoundary(QRect newBoundary);
|
void setBoundary(QRect newBoundary);
|
||||||
float getRatio() const;
|
float getRatio() const;
|
||||||
|
@ -26,7 +26,7 @@ class ScreenGrabberChooserRectItem final : public QObject, public QGraphicsItemG
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ScreenGrabberChooserRectItem(QGraphicsScene* scene);
|
explicit ScreenGrabberChooserRectItem(QGraphicsScene* scene);
|
||||||
~ScreenGrabberChooserRectItem();
|
~ScreenGrabberChooserRectItem();
|
||||||
|
|
||||||
virtual QRectF boundingRect() const final override;
|
virtual QRectF boundingRect() const final override;
|
||||||
|
@ -28,7 +28,7 @@ class ScreenGrabberOverlayItem final : public QObject, public QGraphicsRectItem
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ScreenGrabberOverlayItem(ScreenshotGrabber* grabber);
|
explicit ScreenGrabberOverlayItem(ScreenshotGrabber* grabber);
|
||||||
~ScreenGrabberOverlayItem();
|
~ScreenGrabberOverlayItem();
|
||||||
|
|
||||||
void setChosenRect(QRect rect);
|
void setChosenRect(QRect rect);
|
||||||
|
@ -39,7 +39,7 @@ class ScreenshotGrabber : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ScreenshotGrabber(QObject* parent);
|
explicit ScreenshotGrabber(QObject* parent);
|
||||||
~ScreenshotGrabber() override;
|
~ScreenshotGrabber() override;
|
||||||
|
|
||||||
bool eventFilter(QObject* object, QEvent* event) override;
|
bool eventFilter(QObject* object, QEvent* event) override;
|
||||||
|
@ -1404,7 +1404,7 @@ ContentLayout* Widget::createContentDialog(DialogType type)
|
|||||||
class Dialog : public ActivateDialog
|
class Dialog : public ActivateDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Dialog(DialogType type)
|
explicit Dialog(DialogType type)
|
||||||
: ActivateDialog()
|
: ActivateDialog()
|
||||||
, type(type)
|
, type(type)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user