FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.
C++ ai-agentsalgorithmic-tradingbloomberg-terminalcppfinancefinancial-marketsfintechgood-first-issueinvestmentinvestment-researchmachine-learningopensourcepythonqtquantitative-financestock-markettrading
fix: Bug3 news empty-feeds hang + Bug4 AngelOne depth &&->|| decoder
Abhi Kakadiya6eb680d0050c
diff --git a/fincept-qt/CMakeLists.txt b/fincept-qt/CMakeLists.txtindex ab84e2299..ab93aae9b 100644--- a/fincept-qt/CMakeLists.txt+++ b/fincept-qt/CMakeLists.txt@@ -564,6 +564,12 @@ FetchContent_Declare(GIT_SHALLOW TRUEUPDATE_DISCONNECTED TRUE)+set(ADS_VERSION "4.5.0" CACHE STRING "" FORCE) # skip git_describe() in qtads CMakeLists+# qtads src/CMakeLists.txt does include(Versioning) unconditionally but only adds+# cmake/modules to CMAKE_MODULE_PATH inside the if(NOT ADS_VERSION) branch.+# Pre-set the path so the include succeeds regardless of which branch ran.+# The _deps layout is stable: FetchContent always unpacks to <binary_dir>/_deps/<name_lower>-src.+list(APPEND CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}/_deps/qtads-src/cmake/modules")FetchContent_MakeAvailable(QtADS)# ADS target name is version-stamped: qtadvanceddocking-qt6# Disable unity build — ADS uses anonymous namespaces internallydiff --git a/fincept-qt/src/services/news/NewsService.cpp b/fincept-qt/src/services/news/NewsService.cppindex 787e3f577..95f05f825 100644--- a/fincept-qt/src/services/news/NewsService.cpp+++ b/fincept-qt/src/services/news/NewsService.cpp@@ -99,6 +99,14 @@ void NewsService::fetch_all_news(bool force, ArticlesCallback cb) {auto feeds = default_feeds();feed_count_ = feeds.size();+ if (feeds.isEmpty()) {+ LOG_WARN("NewsService", "No enabled feeds — returning empty result");+ cb(true, {});+ emit articles_updated({});+ publish_articles_to_hub({});+ return;+ }+// Shared state for collecting results from parallel requestsstruct FetchState {QMutex mutex;@@ -251,6 +259,14 @@ void NewsService::fetch_all_news_progressive(bool force, ArticlesCallback final_feed_count_ = feeds.size();const int total = feeds.size();+ if (feeds.isEmpty()) {+ LOG_WARN("NewsService", "No enabled feeds — returning empty result");+ final_cb(true, {});+ emit articles_partial({}, 0, 0);+ publish_articles_to_hub({});+ return;+ }+struct FetchState {QMutex mutex;QVector<NewsArticle> all_articles;diff --git a/fincept-qt/src/trading/websocket/AngelOneWebSocket.cpp b/fincept-qt/src/trading/websocket/AngelOneWebSocket.cppindex 96c6c2ae3..330d0d572 100644--- a/fincept-qt/src/trading/websocket/AngelOneWebSocket.cpp+++ b/fincept-qt/src/trading/websocket/AngelOneWebSocket.cpp@@ -385,7 +385,9 @@ AoTick AngelOneWebSocket::parse_tick(const QByteArray& data) const {// Each entry: flag(u16,2) qty(i64,8) price(i64,8) orders(u16,2)// flag==0 → buy, flag!=0 → sellint buy_idx = 0, sell_idx = 0;- for (int i = 0; i < 10 && buy_idx < 5 && sell_idx < 5; ++i) {+ // Continue while EITHER side still needs levels. && exits as soon as one+ // side fills (buys arrive first), dropping the opposite side of the book.+ for (int i = 0; i < 10 && (buy_idx < 5 || sell_idx < 5); ++i) {const uchar* entry = buf + 147 + i * 20;quint16 flag = read_u16_le(entry);qint64 qty = read_i64_le(entry + 2);