Commit 343fa96a0d05e923393c3437519381ceaaffa35d

Authored by caotto
1 parent bb9702d2

Workaround for a mysterious visual studio debug mode issue.

The qPrintable macro was mangling a string in br::Context::contains (but only
when using visual studio debug mode), but expanding the macro into two lines
avoids the issue for some reason.

Signed-off-by: caotto <ottochar@gmail.com>
Showing 1 changed file with 3 additions and 1 deletions
sdk/openbr_plugin.cpp
... ... @@ -647,7 +647,9 @@ int br::Context::blocks(int size) const
647 647  
648 648 bool br::Context::contains(const QString &name)
649 649 {
650   - const char *c_name = qPrintable(name);
  650 + QByteArray bytes = name.toLocal8Bit
  651 + const char * c_name = bytes.constData();
  652 +
651 653 for (int i=0; i<metaObject()->propertyCount(); i++)
652 654 if (!strcmp(c_name, metaObject()->property(i).name()))
653 655 return true;
... ...