Skip to content
Snippets Groups Projects
Commit 5651d161 authored by Emmanuel Lepage Vallée's avatar Emmanuel Lepage Vallée Committed by Nicolas Jager
Browse files

namedirectory: Add missing Qt macros and introspection support


Allows accounts to be created using bindings other than C++ and
also allow the "GammaRay" introspection debugger to work.

Change-Id: I8fe0235e99896699da05bc9f9b0e168dc33fe2af
Reviewed-by: default avatarNicolas Jäger <nicolas.jager@savoirfairelinux.com>
parent a92f3288
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,6 @@ class Account; ...@@ -26,7 +26,6 @@ class Account;
class LIB_EXPORT NameDirectory : public QObject class LIB_EXPORT NameDirectory : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
//Register name status //Register name status
...@@ -52,9 +51,9 @@ public: ...@@ -52,9 +51,9 @@ public:
static NameDirectory& instance(); static NameDirectory& instance();
//Lookup //Lookup
bool lookupName (const Account* account, const QString& nameServiceURL, const QString& name ) const; Q_INVOKABLE bool lookupName (const Account* account, const QString& nameServiceURL, const QString& name ) const;
bool lookupAddress (const Account* account, const QString& nameServiceURL, const QString& address ) const; Q_INVOKABLE bool lookupAddress (const Account* account, const QString& nameServiceURL, const QString& address ) const;
bool registerName (const Account* account, const QString& password, const QString& name ) const; Q_INVOKABLE bool registerName (const Account* account, const QString& password, const QString& name ) const;
private: private:
//Constructors & Destructors //Constructors & Destructors
...@@ -63,6 +62,7 @@ private: ...@@ -63,6 +62,7 @@ private:
NameDirectoryPrivate* d_ptr; NameDirectoryPrivate* d_ptr;
Q_DECLARE_PRIVATE(NameDirectory) Q_DECLARE_PRIVATE(NameDirectory)
Q_DISABLE_COPY(NameDirectory)
Q_SIGNALS: Q_SIGNALS:
///RegisterName has ended ///RegisterName has ended
...@@ -71,3 +71,7 @@ Q_SIGNALS: ...@@ -71,3 +71,7 @@ Q_SIGNALS:
///Name or address lookup has completed ///Name or address lookup has completed
void registeredNameFound(Account* account, NameDirectory::LookupStatus status, const QString& address, const QString& name); void registeredNameFound(Account* account, NameDirectory::LookupStatus status, const QString& address, const QString& name);
}; };
Q_DECLARE_METATYPE(NameDirectory*)
Q_DECLARE_METATYPE(NameDirectory::RegisterNameStatus)
Q_DECLARE_METATYPE(NameDirectory::LookupStatus)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment