File tree Expand file tree Collapse file tree 5 files changed +22
-0
lines changed Expand file tree Collapse file tree 5 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,12 @@ target_sources(${QUOTIENT_LIB_NAME} PUBLIC FILE_SET HEADERS BASE_DIRS .
258258 libquotientemojis.qrc
259259)
260260
261+ include (ECMQmlModule)
262+ include (KDEInstallDirs)
263+
264+ ecm_add_qml_module(${QUOTIENT_LIB_NAME} URI com.github.quotient_im.libquotient GENERATE_PLUGIN_SOURCE)
265+ ecm_finalize_qml_module(${QUOTIENT_LIB_NAME} DESTINATION ${KDE_INSTALL_QMLDIR} )
266+
261267# Configure API files generation
262268
263269set (CSAPI_DIR csapi)
@@ -375,6 +381,8 @@ target_include_directories(${QUOTIENT_LIB_NAME} PUBLIC
375381 $<BUILD_INTERFACE:$<$<NOT :$<BOOL :${QUOTIENT_FORCE_NAMESPACED_INCLUDES} >>:${CMAKE_CURRENT_SOURCE_DIR} /Quotient>>
376382)
377383
384+ target_include_directories (${QUOTIENT_LIB_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /Quotient/e2ee)
385+
378386target_link_libraries (${QUOTIENT_LIB_NAME}
379387 PUBLIC ${Qt} ::Core ${Qt} ::Network ${Qt} ::Gui qt${${Qt} Core_VERSION_MAJOR}keychain Olm::Olm ${Qt} ::Sql
380388 PRIVATE OpenSSL::Crypto ${Qt} ::CorePrivate)
Original file line number Diff line number Diff line change 2424#include < QtCore/QObject>
2525#include < QtCore/QSize>
2626#include < QtCore/QUrl>
27+ #include < QtQmlIntegration/qqmlintegration.h>
2728
2829#include < functional>
2930
@@ -125,6 +126,8 @@ using IgnoredUsersList = IgnoredUsersEvent::value_type;
125126
126127class QUOTIENT_API Connection : public QObject {
127128 Q_OBJECT
129+ QML_ELEMENT
130+ QML_UNCREATABLE (" " )
128131
129132 Q_PROPERTY (User* localUser READ user NOTIFY stateChanged)
130133 Q_PROPERTY (QString localUserId READ userId NOTIFY stateChanged)
Original file line number Diff line number Diff line change 1010#include < QtCore/QObject>
1111#include < QtCore/QPointer>
1212
13+ #include < QtQmlIntegration/qqmlintegration.h>
14+
1315namespace Quotient {
1416class QUOTIENT_API SSSSHandler : public QObject
1517{
1618 Q_OBJECT
19+ QML_ELEMENT
20+
1721 Q_PROPERTY (Quotient::Connection* connection READ connection WRITE setConnection NOTIFY connectionChanged)
1822
1923public:
Original file line number Diff line number Diff line change 88#include " expected.h"
99#include " quotient_export.h"
1010
11+ #include < QtQmlIntegration/qqmlintegration.h>
12+
1113class TestKeyImport ;
1214
1315namespace Quotient
@@ -21,6 +23,7 @@ namespace Quotient
2123class QUOTIENT_API KeyImport : public QObject
2224{
2325 Q_OBJECT
26+ QML_ELEMENT
2427
2528public:
2629 enum Error {
Original file line number Diff line number Diff line change 2929
3030#include < QtCore/QJsonObject>
3131#include < QtGui/QImage>
32+ #include < QtQmlIntegration/qqmlintegration.h>
3233
3334#include < deque>
3435#include < utility>
@@ -118,6 +119,9 @@ struct Notification
118119
119120class QUOTIENT_API Room : public QObject {
120121 Q_OBJECT
122+ QML_ELEMENT
123+ QML_UNCREATABLE (" " )
124+
121125 Q_PROPERTY (Connection* connection READ connection CONSTANT)
122126 Q_PROPERTY (RoomMember localMember READ localMember CONSTANT)
123127 Q_PROPERTY (QString id READ id CONSTANT)
You can’t perform that action at this time.
0 commit comments