opt: format code and remove default constructor

This commit is contained in:
Xiao YiFang 2022-05-19 20:37:11 +08:00
parent 15d9104f2c
commit c0e3767f83
2 changed files with 15 additions and 21 deletions

View file

@ -2757,21 +2757,16 @@ void ResourceToSaveHandler::downloadFinished()
}
}
ArticleViewAgent::ArticleViewAgent(QObject *parent)
: QObject{parent}
ArticleViewAgent::ArticleViewAgent( ArticleView * articleView ) : QObject( articleView ), articleView( articleView )
{
}
ArticleViewAgent::ArticleViewAgent(ArticleView *articleView)
: articleView(articleView)
void ArticleViewAgent::onJsActiveArticleChanged( QString const & id )
{
articleView->onJsActiveArticleChanged( id );
}
void ArticleViewAgent::onJsActiveArticleChanged(QString const & id){
articleView->onJsActiveArticleChanged(id);
}
void ArticleViewAgent::linkClickedInHtml(QUrl const & url){
articleView->linkClickedInHtml(url);
void ArticleViewAgent::linkClickedInHtml( QUrl const & url )
{
articleView->linkClickedInHtml( url );
}

View file

@ -433,18 +433,17 @@ private:
class ArticleViewAgent : public QObject
{
Q_OBJECT
ArticleView* articleView;
public:
explicit ArticleViewAgent(QObject *parent = nullptr);
ArticleViewAgent(ArticleView* articleView);
Q_OBJECT
ArticleView * articleView;
signals:
public:
ArticleViewAgent( ArticleView * articleView );
public slots:
Q_INVOKABLE void onJsActiveArticleChanged(QString const & id);
Q_INVOKABLE void linkClickedInHtml( QUrl const & );
signals:
public slots:
Q_INVOKABLE void onJsActiveArticleChanged( QString const & id );
Q_INVOKABLE void linkClickedInHtml( QUrl const & );
};
#endif