Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A lot of new logs in the code that seems to have no obvious errors #94

Closed
mchistovib opened this issue Oct 21, 2022 · 8 comments
Closed

Comments

@mchistovib
Copy link

Describe the bug
There are several logs printed now by qt that weren't there before.
Type 1:

QString::arg: Argument missing: QList<ibkr::model::NewsQListModel*>, ibkr::model::NewsQListModel*
QString::arg: Argument missing: QList<ibkr::model::GlobalAccountSelectorModel::AccountListItem*>,ibkr::model::GlobalAccountSelectorModel::AccountListItem*
QString::arg: Argument missing: QList<JObjectWrapper>, JObjectWrapper
QString::arg: Argument missing: QSet<QString>, QString
QString::arg: 2 argument(s) missing in QHash<int,jclient::ExchangeCurrency*>

Type 2:

QT_QUICK_CONTROLS_TEXT_SELECTION_BEHAVIOR ""
QT_QUICK_CONTROLS_TEXT_SELECTION_BEHAVIOR ""

Type 3:

QWebEngineCertificateError is neither a QObject, nor default- and copy-constructible. You should not use it as a QML type.
QWebEngineFullScreenRequest is neither a QObject, nor default- and copy-constructible. You should not use it as a QML type
QWebEngineLoadingInfo is neither a QObject, nor default- and copy-constructible. You should not use it as a QML type.

To Reproduce
Shows up every time.

Expected behavior
I believe type 1 is some error message missing parameters, type 2 is some debug loging, and type 3 could be some error

Screenshots
If applicable, add screenshots to help explain your problem.

System (please complete the following information):

  • OS: Windows
  • Java version 11
  • QtJambi version 6.4 (didn't test on other versions)
  • Qt version 6.4
@mchistovib mchistovib changed the title A lot of new logs in the code that seems to have no obious errors A lot of new logs in the code that seems to have no obvious errors Oct 21, 2022
@omix
Copy link
Contributor

omix commented Oct 25, 2022

Type 1 fixed

@omix
Copy link
Contributor

omix commented Oct 25, 2022

Type 2:
In QQuickTextField native code is a debug outprint

qDebug() << "QT_QUICK_CONTROLS_TEXT_SELECTION_BEHAVIOR" << qgetenv("QT_QUICK_CONTROLS_TEXT_SELECTION_BEHAVIOR");

That's not QtJambi-related.

@omix
Copy link
Contributor

omix commented Oct 25, 2022

I actually don't know why QWebEngineCertificateError and the other classes should cause the exceptions anyway.
What qml type registration method do you use when the error occurs?

@mchistovib
Copy link
Author

We only use QWebEngineCertificateError in QWidgets part of ui:

m_webEngineView = new QWebEngineView(this);
QWebEnginePage page = new QWebEnginePage(m_webEngineView);
// this is needed to make it load under work proxy, ignores all ssl errors
page.certificateError.connect(QWebEngineCertificateError::acceptCertificate);

We don't have any usages of QWebEngineFullScreenRequest and QWebEngineLoadingInfo anywhere in our code

@mchistovib
Copy link
Author

mchistovib commented Oct 25, 2022

@omix I can redpoduce it even in basic qml with QtWebEngine(more detailed erros mesages because I am running this with QtJambi debug version)

Oct 25, 2022 3:54:32 PM C:\Users\qt\work\install\include\QtQml/qqmlprivate.h void __cdecl QQmlPrivate::qmlRegisterTypeAndRevisions<class QWebEngineCertificateError,void>(const char *,int,const struct QMetaObject *,class QList<int> *,const struct QMetaObject *,bool)
WARNING: QWebEngineCertificateError is neither a QObject, nor default- and copy-constructible. You should not use it as a QML type.
Oct 25, 2022 3:54:32 PM C:\Users\qt\work\install\include\QtQml/qqmlprivate.h void __cdecl QQmlPrivate::qmlRegisterTypeAndRevisions<class QWebEngineFullScreenRequest,void>(const char *,int,const struct QMetaObject *,class QList<int> *,const struct QMetaObject *,bool)
WARNING: QWebEngineFullScreenRequest is neither a QObject, nor default- and copy-constructible. You should not use it as a QML type.
Oct 25, 2022 3:54:32 PM C:\Users\qt\work\install\include\QtQml/qqmlprivate.h void __cdecl QQmlPrivate::qmlRegisterTypeAndRevisions<class QWebEngineLoadingInfo,void>(const char *,int,const struct QMetaObject *,class QList<int> *,const struct QMetaObject *,bool)
WARNING: QWebEngineLoadingInfo is neither a QObject, nor default- and copy-constructible. You should not use it as a QML type.
Oct 25, 2022 3:54:32 PM C:/Users/qt/work/qt/qtwebengine/src/core/web_engine_context.cpp void __cdecl QtWebEngineCore::logContext(const char *,class base::CommandLine *)

Perhaps the difference is that we are calling these lines before creating QApplication?

QtWebEngineQuick.initialize();
QtUtilities.initializePackage("io.qt.webengine.widgets");

@omix
Copy link
Contributor

omix commented Oct 25, 2022

You don't need this line: QtUtilities.initializePackage("io.qt.webengine.widgets");
It's called by QWebEngineView class initializer anyway.

@omix
Copy link
Contributor

omix commented Oct 25, 2022

We only use QWebEngineCertificateError in QWidgets part of ui:

m_webEngineView = new QWebEngineView(this);
QWebEnginePage page = new QWebEnginePage(m_webEngineView);
// this is needed to make it load under work proxy, ignores all ssl errors
page.certificateError.connect(QWebEngineCertificateError::acceptCertificate);

We don't have any usages of QWebEngineFullScreenRequest and QWebEngineLoadingInfo anywhere in our code

The message is obviously not logged in QtJambi. Actually, in QtJambi, the message "Class is neither a QObject, nor default- and copy-constructible." only appears as an exception after calling QQml.register.

@omix
Copy link
Contributor

omix commented Oct 25, 2022

QtWebEngineQuick.initialize();

is necessarily called before application init. So far so good.

omix added a commit that referenced this issue Nov 10, 2022
Bugfix Issue #98
Bugfix Issue #92
Bugfix Issue #93
Bugfix Issue #94
@omix omix closed this as completed Nov 10, 2022
omix added a commit that referenced this issue Jul 25, 2023
Bugfix Issue #98
Bugfix Issue #92
Bugfix Issue #93
Bugfix Issue #94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants