From e7b35d9740c3d5fb31857f0cfaf63fd60b8c8eb9 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Thu, 30 Jan 2014 11:30:57 -0500 Subject: [PATCH] fixed #149, Context::contains now works for dynamic properties --- openbr/openbr_plugin.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index d4df6d1..bbf29c7 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -848,13 +848,7 @@ int br::Context::blocks(int size) const bool br::Context::contains(const QString &name) { - QByteArray bytes = name.toLocal8Bit(); - const char * c_name = bytes.constData(); - - for (int i=0; ipropertyCount(); i++) - if (!strcmp(c_name, metaObject()->property(i).name())) - return true; - return false; + return property(qPrintable(name)).isValid(); } void br::Context::printStatus() -- libgit2 0.21.4