From 55c191b7dad5a4c3b3cd4ec2b937f62b40887268 Mon Sep 17 00:00:00 2001 From: xavier Date: Fri, 23 Dec 2011 17:41:16 +0000 Subject: [PATCH] Made the NameList class usable with QVariant. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1401 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/nameslist.cpp | 2 ++ sources/nameslist.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/sources/nameslist.cpp b/sources/nameslist.cpp index e1def936c..b02a3fcf8 100644 --- a/sources/nameslist.cpp +++ b/sources/nameslist.cpp @@ -16,6 +16,8 @@ along with QElectroTech. If not, see . */ #include "nameslist.h" +// make this class usable with QVariant +int NamesList::MetaTypeId = qRegisterMetaType("NamesList"); /** Constructeur diff --git a/sources/nameslist.h b/sources/nameslist.h index 2f748ef2b..7f00056c6 100644 --- a/sources/nameslist.h +++ b/sources/nameslist.h @@ -37,6 +37,9 @@ class NamesList { private: QHash hash_names; + public: + static int MetaTypeId; + // methodes public: // methodes relatives a la gestion de la liste @@ -59,4 +62,5 @@ class NamesList { protected: QHash getXmlOptions(const QHash & = QHash()) const; }; +Q_DECLARE_METATYPE(NamesList); #endif