mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Reduce queries to python version
Instead of doing at least 2 queries for python infos, now requires only 1 query (in ideal condition), and the result is cached.
This commit is contained in:
@@ -31,15 +31,22 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "base/utils/version.h"
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
namespace ForeignApps
|
||||
{
|
||||
namespace Python
|
||||
struct PythonInfo
|
||||
{
|
||||
int pythonVersion();
|
||||
QString pythonExecutable();
|
||||
QString pythonVersionComplete();
|
||||
}
|
||||
using Version = Utils::Version<quint8, 3, 1>;
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
QString executableName;
|
||||
Version version;
|
||||
};
|
||||
|
||||
PythonInfo pythonInfo();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user