From 2db2de4c278d33a2da8c8d63287af2c88ece2d02 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Thu, 15 Oct 2015 16:54:13 +0300 Subject: [PATCH] * try to drop text update to main thread instead of concurrent run * update contributing.md --- CONTRIBUTING.md | 5 +++++ sources/awesome-widget/plugin/awkeys.cpp | 10 +--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6e87b08..0a7808a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -119,6 +119,7 @@ Development * Any project specific build variable should be mentioned inside `version.h` as well. +* Recommended compiler is `clang`. HIG --- @@ -211,3 +212,7 @@ Tools // declare with default value 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. diff --git a/sources/awesome-widget/plugin/awkeys.cpp b/sources/awesome-widget/plugin/awkeys.cpp index 857a4a7..0499e5a 100644 --- a/sources/awesome-widget/plugin/awkeys.cpp +++ b/sources/awesome-widget/plugin/awkeys.cpp @@ -523,16 +523,8 @@ void AWKeys::updateTextData() { qCDebug(LOG_AW); -#ifdef BUILD_FUTURE - QFuture text = QtConcurrent::run(m_threadPool, [this]() { - calculateValues(); - return parsePattern(m_pattern); - }); -#else /* BUILD_FUTURE */ calculateValues(); - QString text = parsePattern(m_pattern); -#endif /* BUILD_FUTURE */ - emit(needTextToBeUpdated(text)); + emit(needTextToBeUpdated(parsePattern(m_pattern))); emit(dataAggregator->updateData(values)); }