mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Merge branch 'branch-qt-5.15' into dev
This commit is contained in:
commit
5b16f1f5b9
|
@ -41,7 +41,6 @@
|
|||
#endif
|
||||
|
||||
#include "globalbroadcaster.h"
|
||||
#include "articleviewagent.hh"
|
||||
using std::map;
|
||||
using std::list;
|
||||
|
||||
|
@ -1078,7 +1077,7 @@ void ArticleView::attachToJavaScript() {
|
|||
ui.definition->page()->setWebChannel(channel, QWebEngineScript::MainWorld);
|
||||
|
||||
// register QObjects to be exposed to JavaScript
|
||||
channel->registerObject(QStringLiteral("articleview"), new ArticleViewAgent(this));
|
||||
channel->registerObject(QStringLiteral("articleview"), this);
|
||||
}
|
||||
|
||||
void ArticleView::linkClicked( QUrl const & url_ )
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#include "articleviewagent.hh"
|
||||
|
||||
ArticleViewAgent::ArticleViewAgent(QObject *parent)
|
||||
: QObject{parent}
|
||||
{
|
||||
|
||||
}
|
||||
ArticleViewAgent::ArticleViewAgent(ArticleView *articleView)
|
||||
: articleView(articleView)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ArticleViewAgent::onJsActiveArticleChanged(QString const & id){
|
||||
articleView->onJsActiveArticleChanged(id);
|
||||
}
|
||||
|
||||
void ArticleViewAgent::linkClickedInHtml(QUrl const & url){
|
||||
articleView->linkClickedInHtml(url);
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
#ifndef ARTICLEVIEWAGENT_HH
|
||||
#define ARTICLEVIEWAGENT_HH
|
||||
|
||||
#include <QObject>
|
||||
#include "articleview.hh"
|
||||
|
||||
class ArticleViewAgent : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
ArticleView* articleView;
|
||||
public:
|
||||
explicit ArticleViewAgent(QObject *parent = nullptr);
|
||||
ArticleViewAgent(ArticleView* articleView);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
Q_INVOKABLE void onJsActiveArticleChanged(QString const & id);
|
||||
Q_INVOKABLE void linkClickedInHtml( QUrl const & );
|
||||
|
||||
};
|
||||
|
||||
#endif // ARTICLEVIEWAGENT_HH
|
|
@ -239,7 +239,6 @@ DEFINES += PROGRAM_VERSION=\\\"$$VERSION\\\"
|
|||
|
||||
# Input
|
||||
HEADERS += folding.hh \
|
||||
articleviewagent.hh \
|
||||
globalbroadcaster.h \
|
||||
inc_case_folding.hh \
|
||||
inc_diacritic_folding.hh \
|
||||
|
@ -381,7 +380,6 @@ FORMS += groups.ui \
|
|||
fulltextsearch.ui
|
||||
|
||||
SOURCES += folding.cc \
|
||||
articleviewagent.cc \
|
||||
globalbroadcaster.cpp \
|
||||
main.cc \
|
||||
dictionary.cc \
|
||||
|
|
Loading…
Reference in a new issue