Commit e94fcd2b413f9ad973f0e3395b8b89618ad415f6
1 parent
7dcdbe00
trying a C++11x feature
Showing
2 changed files
with
4 additions
and
4 deletions
CMakeLists.txt
| ... | ... | @@ -40,7 +40,7 @@ if(APPLE) |
| 40 | 40 | endif() |
| 41 | 41 | |
| 42 | 42 | if(UNIX) |
| 43 | - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fvisibility=hidden -fno-omit-frame-pointer") | |
| 43 | + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-c++11-extensions -fvisibility=hidden -fno-omit-frame-pointer") | |
| 44 | 44 | endif() |
| 45 | 45 | |
| 46 | 46 | if(CMAKE_COMPILER_IS_GNUXX) | ... | ... |
sdk/plugins/meta.cpp
| ... | ... | @@ -329,9 +329,8 @@ class LoadStoreTransform : public MetaTransform |
| 329 | 329 | { |
| 330 | 330 | Q_OBJECT |
| 331 | 331 | Q_PROPERTY(QString description READ get_description WRITE set_description RESET reset_description STORED false) |
| 332 | - Q_PROPERTY(br::Transform *transform READ get_transform WRITE set_transform RESET reset_transform STORED false) | |
| 333 | 332 | BR_PROPERTY(QString, description, "Identity") |
| 334 | - BR_PROPERTY(br::Transform*, transform, NULL) | |
| 333 | + Transform *transform = NULL; | |
| 335 | 334 | |
| 336 | 335 | QString baseName; |
| 337 | 336 | |
| ... | ... | @@ -354,7 +353,7 @@ class LoadStoreTransform : public MetaTransform |
| 354 | 353 | QDataStream stream(&byteArray, QFile::WriteOnly); |
| 355 | 354 | stream << description; |
| 356 | 355 | transform->store(stream); |
| 357 | - QtUtils::writeFile(getFileName(), byteArray); | |
| 356 | + QtUtils::writeFile(baseName, byteArray); | |
| 358 | 357 | } |
| 359 | 358 | |
| 360 | 359 | void project(const Template &src, Template &dst) const |
| ... | ... | @@ -369,6 +368,7 @@ class LoadStoreTransform : public MetaTransform |
| 369 | 368 | |
| 370 | 369 | QString getFileName() const |
| 371 | 370 | { |
| 371 | + if (QFileInfo(baseName).exists()) return baseName; | |
| 372 | 372 | const QString file = Globals->sdkPath + "/share/openbr/models/transforms/" + baseName; |
| 373 | 373 | return QFileInfo(file).exists() ? file : QString(); |
| 374 | 374 | } | ... | ... |