diff options
author | Christian Stenger <christian.stenger@qt.io> | 2019-10-30 07:47:19 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2019-10-30 13:21:29 +0000 |
commit | b2ede6ff5191c1b39a625f3047c07e7365a7ab56 (patch) | |
tree | ed4331933b8e82a11c48a50b4e4dd53062005d7d /src/plugins/python/pythonsettings.h | |
parent | aad5fb339d8774ecbd8b51d762f7428de61fa8db (diff) | |
download | qt-creator-b2ede6ff5191c1b39a625f3047c07e7365a7ab56.tar.gz |
Python: Check for changes before applying
Storing the python settings seems to be rather costly
and may take some time.
Perform an early return if nothing has changed.
Change-Id: I509e83f503d2af31a7464df893e0e4e69e99a277
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/python/pythonsettings.h')
-rw-r--r-- | src/plugins/python/pythonsettings.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/python/pythonsettings.h b/src/plugins/python/pythonsettings.h index 02c62ab65f..0ef6c62a0f 100644 --- a/src/plugins/python/pythonsettings.h +++ b/src/plugins/python/pythonsettings.h @@ -44,6 +44,11 @@ public: const QString &name, const Utils::FilePath &command); + inline bool operator==(const Interpreter &other) const + { + return id == other.id && name == other.name && command == other.command; + } + QString id = QUuid::createUuid().toString(); QString name; Utils::FilePath command; |