core/generation: short circuit findObjectGeneration if only one exists

This commit is contained in:
outfoxxed 2024-11-17 01:46:49 -08:00
parent 29d31f5d3b
commit 7db3772641
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 7 additions and 5 deletions

View file

@ -45,8 +45,8 @@ public:
void registerExtension(const void* key, EngineGenerationExt* extension);
EngineGenerationExt* findExtension(const void* key);
static EngineGeneration* findEngineGeneration(QQmlEngine* engine);
static EngineGeneration* findObjectGeneration(QObject* object);
static EngineGeneration* findEngineGeneration(const QQmlEngine* engine);
static EngineGeneration* findObjectGeneration(const QObject* object);
// Returns the current generation if there is only one generation,
// otherwise null.