Add function to check whether or not we're part of an extension on Apple OSes
Change-Id: I308147c752ec9c869db87aa94ccf6c88e0999524 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>bb10
parent
ffc377a529
commit
6ada504475
|
|
@ -161,6 +161,12 @@ QDebug operator<<(QDebug debug, const QMacAutoReleasePool *pool)
|
|||
}
|
||||
#endif // !QT_NO_DEBUG_STREAM
|
||||
|
||||
bool qt_apple_isApplicationExtension()
|
||||
{
|
||||
static bool isExtension = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSExtension"];
|
||||
return isExtension;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
/*
|
||||
Ensure that Objective-C objects auto-released in main(), directly or indirectly,
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ QDebug operator<<(QDebug debug, const QMacAutoReleasePool *pool);
|
|||
#endif
|
||||
|
||||
Q_CORE_EXPORT void qt_apple_check_os_version();
|
||||
Q_CORE_EXPORT bool qt_apple_isApplicationExtension();
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue