iOS: move infoPlistValue to qiosglobal
Change-Id: If237f08683290105413dc47923e23a496765bb22 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>bb10
parent
2e13285446
commit
6c5febd203
|
|
@ -206,13 +206,6 @@ namespace
|
|||
bool debugStackUsage = false;
|
||||
}
|
||||
|
||||
static int infoPlistValue(NSString* key, int defaultValue)
|
||||
{
|
||||
static NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSNumber* value = [bundle objectForInfoDictionaryKey:key];
|
||||
return value ? [value intValue] : defaultValue;
|
||||
}
|
||||
|
||||
extern "C" int __attribute__((weak)) main(int argc, char *argv[])
|
||||
{
|
||||
@autoreleasepool {
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ QPointF fromCGPoint(const CGPoint &point);
|
|||
Qt::ScreenOrientation toQtScreenOrientation(UIDeviceOrientation uiDeviceOrientation);
|
||||
UIDeviceOrientation fromQtScreenOrientation(Qt::ScreenOrientation qtOrientation);
|
||||
QRect fromPortraitToPrimary(const QRect &rect, QPlatformScreen *screen);
|
||||
int infoPlistValue(NSString* key, int defaultValue);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -134,5 +134,12 @@ QRect fromPortraitToPrimary(const QRect &rect, QPlatformScreen *screen)
|
|||
: QRect(rect.y(), geometry.height() - rect.width() - rect.x(), rect.height(), rect.width());
|
||||
}
|
||||
|
||||
int infoPlistValue(NSString* key, int defaultValue)
|
||||
{
|
||||
static NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSNumber* value = [bundle objectForInfoDictionaryKey:key];
|
||||
return value ? [value intValue] : defaultValue;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue