Skip to content

Commit

Permalink
[qtmozembed] Align to esr52
Browse files Browse the repository at this point in the history
  • Loading branch information
rainemak authored and abranson committed May 11, 2020
1 parent ca2656f commit d6ddaa8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
9 changes: 5 additions & 4 deletions src/qmozcontext.cpp
Expand Up @@ -176,11 +176,12 @@ bool QMozContextPrivate::IsInitialized()
return mApp && mInitialized;
}

uint32_t QMozContextPrivate::CreateNewWindowRequested(const uint32_t &chromeFlags, const char *uri, const uint32_t &contextFlags,
uint32_t QMozContextPrivate::CreateNewWindowRequested(const uint32_t &chromeFlags,
const uint32_t &contextFlags,
EmbedLiteView *aParentView)
{
qCDebug(lcEmbedLiteExt) << "QtMozEmbedContext new Window requested: parent:" << (void *)aParentView;
uint32_t viewId = QMozContext::instance()->createView(QString(uri), aParentView ? aParentView->GetUniqueID() : 0);
uint32_t viewId = QMozContext::instance()->createView(aParentView ? aParentView->GetUniqueID() : 0);
return viewId;
}

Expand Down Expand Up @@ -366,9 +367,9 @@ void QMozContext::stopEmbedding()
}

quint32
QMozContext::createView(const QString &url, const quint32 &parentId)
QMozContext::createView(const quint32 &parentId)
{
return d->mViewCreator ? d->mViewCreator->createView(url, parentId) : 0;
return d->mViewCreator ? d->mViewCreator->createView(parentId) : 0;
}

void
Expand Down
2 changes: 1 addition & 1 deletion src/qmozcontext.h
Expand Up @@ -74,7 +74,7 @@ public Q_SLOTS:
void setProfile(const QString &);

void setViewCreator(QMozViewCreator *viewCreator);
quint32 createView(const QString &url, const quint32 &parentId = 0);
quint32 createView(const quint32 &parentId = 0);

private:
QMozContextPrivate *d;
Expand Down
5 changes: 3 additions & 2 deletions src/qmozcontext_p.h
Expand Up @@ -50,8 +50,9 @@ class QMozContextPrivate : public QObject, public EmbedLiteAppListener
virtual void OnObserve(const char *aTopic, const char16_t *aData) override;
virtual void LastViewDestroyed() override;
virtual void LastWindowDestroyed() override;
virtual uint32_t CreateNewWindowRequested(const uint32_t &chromeFlags, const char *uri,
const uint32_t &contextFlags, EmbedLiteView *aParentView) override;
virtual uint32_t CreateNewWindowRequested(const uint32_t &chromeFlags,
const uint32_t &contextFlags,
EmbedLiteView *aParentView) override;

bool IsInitialized();
EmbedLiteMessagePump *EmbedLoop();
Expand Down
2 changes: 1 addition & 1 deletion src/qmozviewcreator.h
Expand Up @@ -23,7 +23,7 @@ class QMozViewCreator : public QObject
/*
* @returns ID of created web view
*/
virtual quint32 createView(const QString &url, const quint32 &parentId) = 0;
virtual quint32 createView(const quint32 &parentId) = 0;
};

#endif
4 changes: 2 additions & 2 deletions tests/qmlmoztestrunner/testviewcreator.cpp
Expand Up @@ -18,9 +18,9 @@ TestViewCreator::TestViewCreator(QObject *parent)
QMozContext::instance()->setViewCreator(this);
};

quint32 TestViewCreator::createView(const QString &url, const quint32 &parentId)
quint32 TestViewCreator::createView(const quint32 &parentId)
{
emit newWindowRequested(url, parentId);
emit newWindowRequested(parentId);
// NB: actual new ID is supposed to be set synchronously in the slot handling newWindowRequested signal
return 2;
};
4 changes: 2 additions & 2 deletions tests/qmlmoztestrunner/testviewcreator.h
Expand Up @@ -22,10 +22,10 @@ class TestViewCreator : public QMozViewCreator
explicit TestViewCreator(QObject *parent = 0);
~TestViewCreator() {}

virtual quint32 createView(const QString &url, const quint32 &parentId);
virtual quint32 createView(const quint32 &parentId);

signals:
void newWindowRequested(const QString &url, const quint32 &parentId);
void newWindowRequested(const quint32 &parentId);
};

#endif

0 comments on commit d6ddaa8

Please sign in to comment.