Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
38ff628f
Commit
38ff628f
authored
Jun 08, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue sankore 575
parent
73f2d9a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
186 additions
and
185 deletions
+186
-185
UBPlatformUtils_mac.mm
src/frameworks/UBPlatformUtils_mac.mm
+186
-185
No files found.
src/frameworks/UBPlatformUtils_mac.mm
View file @
38ff628f
...
...
@@ -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()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment