* try to drop text update to main thread instead of concurrent run

* update contributing.md
This commit is contained in:
arcan1s 2015-10-15 16:54:13 +03:00
parent af0dd25b86
commit 2db2de4c27
2 changed files with 6 additions and 9 deletions

View File

@ -119,6 +119,7 @@ Development
* Any project specific build variable should be mentioned inside `version.h` as * Any project specific build variable should be mentioned inside `version.h` as
well. well.
* Recommended compiler is `clang`.
HIG HIG
--- ---
@ -211,3 +212,7 @@ Tools
// declare with default value // declare with default value
bool m_prop = false; bool m_prop = false;
``` ```
* Use `cppcheck` to avoid common errors in the code. Refer to `utils` for more
details.
* Use `clang-format` to apply valid code format. Refer to `utils` for more
details.

View File

@ -523,16 +523,8 @@ void AWKeys::updateTextData()
{ {
qCDebug(LOG_AW); qCDebug(LOG_AW);
#ifdef BUILD_FUTURE
QFuture<QString> text = QtConcurrent::run(m_threadPool, [this]() {
calculateValues();
return parsePattern(m_pattern);
});
#else /* BUILD_FUTURE */
calculateValues(); calculateValues();
QString text = parsePattern(m_pattern); emit(needTextToBeUpdated(parsePattern(m_pattern)));
#endif /* BUILD_FUTURE */
emit(needTextToBeUpdated(text));
emit(dataAggregator->updateData(values)); emit(dataAggregator->updateData(values));
} }