fixed issue sankore 575

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 73f2d9a8e3
commit 38ff628f3d
  1. 11
      src/frameworks/UBPlatformUtils_mac.mm

@ -369,10 +369,10 @@ QPixmap qpixmapFromIconRef(IconRef iconRef, int size) {
HLock(hRawBitmapData);
unsigned long* data = (unsigned long*) *hRawBitmapData;
for (int posy=0; posy<iconSize; ++posy, data+=iconSize) {
#ifdef __BIG_ENDIAN__
#ifdef __BIG_ENDIAN__
uchar* line = image.scanLine(posy);
memcpy(line, data, iconSize * 4);
#else
#else
uchar* src = (uchar*) data;
uchar* dst = image.scanLine(posy);
for (int posx=0; posx<iconSize; src+=4, dst+=4, ++posx) {
@ -381,7 +381,7 @@ QPixmap qpixmapFromIconRef(IconRef iconRef, int size) {
dst[2] = src[1];
dst[3] = src[0];
}
#endif
#endif
}
HUnlock(hRawBitmapData);
DisposeHandle( hRawBitmapData );
@ -421,6 +421,7 @@ KEYBT* createKeyBt(const UCKeyboardLayout* keyLayout, int vkk)
void UBPlatformUtils::initializeKeyboardLayouts()
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
CFStringRef keys[] = { kTISPropertyInputSourceCategory, kTISPropertyInputSourceIsEnableCapable, kTISPropertyInputSourceIsSelectCapable };
const void* values[] = { kTISCategoryKeyboardInputSource, kCFBooleanTrue, kCFBooleanTrue };
CFDictionaryRef dict = CFDictionaryCreate(NULL, (const void **)keys, (const void **)values, 3, NULL, NULL);
@ -501,7 +502,7 @@ void UBPlatformUtils::initializeKeyboardLayouts()
QString ID = QStringFromStringRef(sr);
sr = (CFStringRef) TISGetInputSourceProperty(keyLayoutRef, kTISPropertyLocalizedName);
QString fullName = QStringFromStringRef(sr);
QString fullName = QString::fromUtf8([sr UTF8String], strlen([sr UTF8String]));
CFArrayRef langs = (CFArrayRef) TISGetInputSourceProperty(keyLayoutRef, kTISPropertyInputSourceLanguages);
@ -534,7 +535,7 @@ void UBPlatformUtils::initializeKeyboardLayouts()
for(int i=0; i<nKeyboardLayouts; i++)
keyboardLayouts[i] = result[i];
}
[pool drain];
}
void UBPlatformUtils::destroyKeyboardLayouts()

Loading…
Cancel
Save