diff options
| author | Marcus Tillmanns <marcus.tillmanns@qt.io> | 2024-03-12 14:24:06 +0100 |
|---|---|---|
| committer | Marcus Tillmanns <marcus.tillmanns@qt.io> | 2024-03-12 14:24:05 +0000 |
| commit | 4e8bdd610b5899c83b75cebeeafcf82b6bec79f8 (patch) | |
| tree | 97fbec65ca420ad284e3496ef57748972a182d99 /src/plugins/python/pythonutils.cpp | |
| parent | 07399dfb0c4c294e51323b94cdfea85d6e1b029d (diff) | |
Utils: Remove PresistentStoreCache
It turns out caching the information is unreliable due to a variety of reasons.
We remove the cache for now as its less dangerous than trying to fix each
use case.
Change-Id: I8238166486a2fb29c101f700af1c8d7e4ad7a172
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
| -rw-r--r-- | src/plugins/python/pythonutils.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 2ecfe495bcd..0e0d66f6389 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -19,7 +19,6 @@ #include <utils/algorithm.h> #include <utils/mimeutils.h> -#include <utils/persistentcachestore.h> #include <utils/process.h> #include <QReadLocker> @@ -201,20 +200,10 @@ static bool isUsableHelper(QHash<FilePath, bool> *cache, const QString &keyStrin auto it = cache->find(python); if (it == cache->end()) { const Key key = keyFromString(keyString); - const auto store = PersistentCacheStore::byKey(key); - if (store && store->value(keyFromString(python.toString())).toBool()) { - cache->insert(python, true); - return true; - } Process process; process.setCommand({python, QStringList{"-m", commandArg, "-h"}}); process.runBlocking(); const bool usable = process.result() == ProcessResult::FinishedWithSuccess; - if (usable) { - Store newStore = store.value_or(Store{}); - newStore.insert(keyFromString(python.toString()), true); - PersistentCacheStore::write(key, newStore); - } it = cache->insert(python, usable); } return *it; |
