Commit e7b35d9740c3d5fb31857f0cfaf63fd60b8c8eb9

Authored by Josh Klontz
1 parent a7712abb

fixed #149, Context::contains now works for dynamic properties

Showing 1 changed file with 1 additions and 7 deletions
openbr/openbr_plugin.cpp
@@ -848,13 +848,7 @@ int br::Context::blocks(int size) const @@ -848,13 +848,7 @@ int br::Context::blocks(int size) const
848 848
849 bool br::Context::contains(const QString &name) 849 bool br::Context::contains(const QString &name)
850 { 850 {
851 - QByteArray bytes = name.toLocal8Bit();  
852 - const char * c_name = bytes.constData();  
853 -  
854 - for (int i=0; i<metaObject()->propertyCount(); i++)  
855 - if (!strcmp(c_name, metaObject()->property(i).name()))  
856 - return true;  
857 - return false; 851 + return property(qPrintable(name)).isValid();
858 } 852 }
859 853
860 void br::Context::printStatus() 854 void br::Context::printStatus()