Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
96b938e3
Commit
96b938e3
authored
Sep 14, 2009
by
con
Browse files
Remove the "grab system language" hack for the Mac.
It's now fixed in Qt, adb6eea3a135707a220c0b1c1cf8266321af9309.
parent
1be85e1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
dist/changes-1.3.0
View file @
96b938e3
...
...
@@ -81,5 +81,10 @@ Wizards
* Added a wizard for Qt Designer custom widgets
* Added a gitorious clone wizard
Platform Specific
Mac
* Make use of system's language settings
Additional credits go to:
* Christian Hoenig (Locator filter for symbols in current document)
src/app/main.cpp
View file @
96b938e3
...
...
@@ -231,22 +231,6 @@ int main(int argc, char **argv)
QTranslator
translator
;
QTranslator
qtTranslator
;
QString
locale
=
QLocale
::
system
().
name
();
#ifdef Q_OS_MAC
// because QLocale's system locale is basically useless on the Mac.
// Try to get the real system setting via core foundation
CFArrayRef
languages
=
(
CFArrayRef
)
CFPreferencesCopyValue
(
CFSTR
(
"AppleLanguages"
),
kCFPreferencesAnyApplication
,
kCFPreferencesCurrentUser
,
kCFPreferencesAnyHost
);
// CFShow(languages);
if
(
CFArrayGetCount
(
languages
)
>
0
)
{
QString
preferredLanguage
=
stringFromCFString
(
CFStringRef
(
CFArrayGetValueAtIndex
(
languages
,
0
)));
if
(
!
preferredLanguage
.
isEmpty
())
locale
=
preferredLanguage
;
}
CFRelease
(
languages
);
#endif
const
QString
&
creatorTrPath
=
QCoreApplication
::
applicationDirPath
()
+
QLatin1String
(
SHARE_PATH
"/translations"
);
if
(
translator
.
load
(
QLatin1String
(
"qtcreator_"
)
+
locale
,
creatorTrPath
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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