From 3bc12489ac083172a4e55bd62e60932df327e7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 1 Jan 2012 14:16:07 +0100 Subject: [PATCH] Declare Metatype for KWin::Client* Allows to use it in property definitions. --- client.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.h b/client.h index f624ea0267..8f49c36204 100644 --- a/client.h +++ b/client.h @@ -172,9 +172,8 @@ class Client Q_PROPERTY(bool transient READ isTransient NOTIFY transientChanged) /** * The Client to which this Client is a transient if any. - * Property uses a QObject. If the property is needed as a Client, perform a qobject_cast. **/ - Q_PROPERTY(QObject *transientFor READ transientFor NOTIFY transientChanged) + Q_PROPERTY(KWin::Client *transientFor READ transientFor NOTIFY transientChanged) /** * By how much the window wishes to grow/shrink at least. Usually QSize(1,1). * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. @@ -1169,5 +1168,6 @@ KWIN_COMPARE_PREDICATE(WrapperIdMatchPredicate, Client, Window, cl->wrapperId() KWIN_COMPARE_PREDICATE(InputIdMatchPredicate, Client, Window, cl->inputId() == value); } // namespace +Q_DECLARE_METATYPE(KWin::Client*) #endif