Merge remote-tracking branch 'origin/13.0'

Conflicts:
	src/plugins/cmakeprojectmanager/cmaketool.cpp
	src/plugins/python/pythonutils.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: Ia3e35c763ff9475d17ad922718b54152209893b8
This commit is contained in:
Eike Ziller
2024-03-14 11:35:07 +01:00
97 changed files with 699 additions and 671 deletions

View File

@@ -419,6 +419,7 @@ public:
, m_mainGroup(new QGroupBox(Tr::tr("Use Python Language Server")))
{
m_editor->setParent(this);
m_mainGroup->setCheckable(true);
auto mainGroupLayout = new QVBoxLayout;

View File

@@ -19,7 +19,6 @@
#include <utils/algorithm.h>
#include <utils/mimeutils.h>
#include <utils/persistentcachestore.h>
#include <utils/qtcprocess.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;