Bug 1212588 - Only english GUI and examples not found
Summary: Only english GUI and examples not found
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: qt-creator
Version: 21
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Itamar Reis Peixoto
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-16 17:45 UTC by Sven Anders
Modified: 2015-04-17 11:06 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-04-17 09:47:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sven Anders 2015-04-16 17:45:00 UTC
Description of problem:

I have two problems:

 1. The GUI is only available in "english".
 2. The page with examples is empty.

Version-Release number of selected component (if applicable):

 qt-creator.x86_64 3.3.2-2.fc21

How reproducible:

 Always.
 Tried it with a fresh user too.

Steps to Reproduce:
 1. Under Tools->Options->Environment->UserInterface->Language
    the preselected language setting is "<System Language>", but the
    GUI is always in english.

 2. Select Welcome->Examples.

Actual results:

 1. Cannot change language. Only entries are "<System Language>" and "English".

 2. Empty page.

Expected results:

 1. The GUI should use the selected system language and I should be able to
    change the language from a list of all available languages.

 2. List of all available examples.

Additional info:

 I installed the binary package from Qt's webpage and there I have the german
 translations and all examples.

 I installed all additional sub-packages.


 1. I looked, if the translations are available:

#> ll /usr/share/qtcreator/translations/
insgesamt 10000
-rw-r--r--. 1 root root 1534335  9. Mär 23:41 qtcreator_cs.qm
-rw-r--r--. 1 root root 1348835  9. Mär 23:41 qtcreator_de.qm
-rw-r--r--. 1 root root 1451032  9. Mär 23:41 qtcreator_fr.qm
-rw-r--r--. 1 root root 1111087  9. Mär 23:41 qtcreator_ja.qm
-rw-r--r--. 1 root root 1195874  9. Mär 23:41 qtcreator_pl.qm
-rw-r--r--. 1 root root 1278242  9. Mär 23:41 qtcreator_ru.qm
-rw-r--r--. 1 root root  890696  9. Mär 23:41 qtcreator_sl.qm
-rw-r--r--. 1 root root  765591  9. Mär 23:41 qtcreator_zh_CN.qm
-rw-r--r--. 1 root root  646886  9. Mär 23:41 qtcreator_zh_TW.qm

And I do not understand the reason, because it seems, that the binary finds the translation file:

24286 access("/usr/bin/../share/qtcreator/translations/qtcreator_de_DE.qm", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/bin/../share/qtcreator/translations/qtcreator_de_DE", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/bin/../share/qtcreator/translations/qtcreator_de.qm", R_OK) = 0
24286 stat("/usr/bin/../share/qtcreator/translations/qtcreator_de.qm", {st_mode=S_IFREG|0644, st_size=1348835, ...}) = 0
24286 open("/usr/bin/../share/qtcreator/translations/qtcreator_de.qm", O_RDONLY|O_CLOEXEC) = 11
24286 fcntl(11, F_SETFD, FD_CLOEXEC)    = 0
24286 fstat(11, {st_mode=S_IFREG|0644, st_size=1348835, ...}) = 0
24286 fstat(11, {st_mode=S_IFREG|0644, st_size=1348835, ...}) = 0
24286 read(11, "<\270d\30\312\357\234\225\315!\34\277`\241\275\335", 16) = 16
24286 mmap(NULL, 1348835, PROT_READ, MAP_PRIVATE, 11, 0) = 0x7f651b935000
24286 close(11)                         = 0
24286 access("/usr/share/qt5/translations/qt_de_DE.qm", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/share/qt5/translations/qt_de_DE", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/share/qt5/translations/qt_de.qm", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/share/qt5/translations/qt_de", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/share/qt5/translations/qt.qm", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/share/qt5/translations/qt", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/bin/../share/qtcreator/translations/qt_de_DE.qm", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/bin/../share/qtcreator/translations/qt_de_DE", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/bin/../share/qtcreator/translations/qt_de.qm", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/bin/../share/qtcreator/translations/qt_de", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/bin/../share/qtcreator/translations/qt.qm", R_OK) = -1 ENOENT (No such file or directory)
24286 access("/usr/bin/../share/qtcreator/translations/qt", R_OK) = -1 ENOENT (No such file or directory)
24286 munmap(0x7f651b935000, 1348835)   = 0


2. The binary also access the "examples.qml" file (and others), but the list stays empty:

24508 open("/usr/share/qtcreator/welcomescreen/examples.qml", O_RDONLY|O_CLOEXEC) = 23
24508 fcntl(23, F_SETFD, FD_CLOEXEC)    = 0
24508 fstat(23, {st_mode=S_IFREG|0644, st_size=2884, ...}) = 0
24508 fstat(23, {st_mode=S_IFREG|0644, st_size=2884, ...}) = 0
24508 fstat(23, {st_mode=S_IFREG|0644, st_size=2884, ...}) = 0
24508 read(23, "/*******************************"..., 16384) = 2884
24508 read(23, "", 13500)               = 0
24508 close(23)                         = 0
24508 open("/usr/share/qtcreator/welcomescreen/widgets/CustomizedGridView.qml", O_RDONLY|O_CLOEXEC) = 23
24508 fcntl(23, F_SETFD, FD_CLOEXEC)    = 0


I think this is a problem with the packaging (or patches) and not a bug in the qtcreator itself. The maintainer should test these two points and maybe should compare the package with the pre-packaged QtCreator from the Qt Website.

Comment 1 Sandro Mani 2015-04-16 23:48:56 UTC
Concerning the examples: a search through the qt-creator source code shows that examples to list are retreived from "examples-manifest.xml" files in various locations.

For Qt4, such a file exists (/usr/lib64/qt4/examples/examples-manifest.xml), and indeed installing qt-examples results in the Qt4 examples being visible in the Examples section of the welcome screen.

For Qt5, there does not appear to be any /usr/lib64/qt5/examples/examples-manifest.xml (and I don't see it in the respective qt5-examples packages of other distros also), so I'm not sure how exactly they are supposed to be loaded.

FWIW, the relevant code for loading the examples is in src/plugins/qtsupport/exampleslistmodel.cpp in the qt-creator sources. If you can also take a minute for further investigations, it would be appreciated.


For the locale: scanning at the code in src/plugins/coreplugin/generalsettings.cpp in the qt-creator sources (in particular GeneralSettings::fillLanguageBox() and hasQmFilesForLocale()), it seems that unless the qt translations for a specific language are installed, the respective qt-creator translations also aren't made available. So make sure you have installed qt5-qttranslations, from the strace you posted it does not appear to be the case.

Comment 2 Sven Anders 2015-04-17 07:10:37 UTC
Thanks for your quick answers.

1. Regarding the localization problem:

Installing the "qt5-qttranslations" package fixed my problem.
It would be nice, if the qt-creator package would add this package as a "recommends" or "suggests".

2. The problem with the examples seems to be a little bit harder..

Running the qtcreator in "examples debug mode" shows the following:

#> QTC_DEBUG_EXAMPLESMODEL=1 qtcreator
Reading Help/InstalledExamples from settings: ()
"Reading file "/usr/share/qtcreator/welcomescreen/qtcreator_tutorials.xml"..."

It doesn't even try to read any examples manifest?! And strace does not show any try to access it too...

When I install the precompiled QTCreator I see the following:

QTC_DEBUG_EXAMPLESMODEL=1 ./qtcreator.sh
"Reading file '/home/anders/work/Qt5.2.1/Tools/QtCreator/share/qtcreator/welcomescreen/qtcreator_tutorials.xml'..." 
"Reading file '/home/anders/work/Qt5.2.1/5.2.1/gcc_64/doc/activeqt/examples-manifest.xml'..." 
"Reading file '/home/anders/work/Qt5.2.1/5.2.1/gcc_64/doc/activeqt/demos-manifest.xml'..." 
"Reading file '/home/anders/work/Qt5.2.1/5.2.1/gcc_64/doc/qdoc/examples-manifest.xml'..." 
"Reading file '/home/anders/work/Qt5.2.1/5.2.1/gcc_64/doc/qdoc/demos-manifest.xml'..." 

The documentation on this webpage did not help either:
https://wiki.qt.io/Qt-Creator-Qt-Examples

I think I need some more time to test it...

Comment 3 Sven Anders 2015-04-17 07:28:18 UTC
Hmmm.
I think I solved this problem too.
I had to install the packages:
 qt5-qtbase-doc
 qt5-qtbase-examples
So maybe two additional package to add as a recommendation.

Thanks for your time!

Comment 4 Sandro Mani 2015-04-17 09:47:00 UTC
Oh, qt5-qtbase-doc is not being built in rawhide, so missed that package in my debugging effort. Filed as #1212750.

Concerning soft dependencies (aka Suggests), yum does not handle those, you'll need dnf which is default in F22+. But I'd wait for some guidelines on their use appearing before adding them in the spec.

Thanks for your debugging!

Comment 5 Sandro Mani 2015-04-17 11:06:14 UTC
I've also suggested in #1212750 to put 

/usr/share/doc/qt5/qdoc/examples-manifest.xml

in qt5-qtbase-examples, so that installing qt5-qtbase-examples alone is sufficient to get the examples appearing.


Note You need to log in before you can comment on or make changes to this bug.