Qt4 GUI: timetoolbar is invisible on OpenSuse fixed

Report bugs, bug fixes and workarounds here.
Topic author
refsteff
Posts: 17
Joined: 30.07.2011
With us: 13 years 2 months

Qt4 GUI: timetoolbar is invisible on OpenSuse fixed

Post #1by refsteff » 20.08.2011, 15:10

Hello,
my system:
OS: modified OpenSuse 11.2, KDE 4.6.3, Qt 4.7.3, Xorg 1.9.3, Celestia trunk 5166, libPNG12 and libPNG14 (tried both)
HW: CPU Intel E7500, 8GB ram, Nvidia Geoforce 9400 GT

If I select the timetoolbar, I can't see the Icons. only the tooltips are displayed.
If I change the icon path in qttimetoolbar.cpp to an absolute path, it works (but I have to install the icons somewhere).

So far I can see, the icons should be loaded from a compiled-in resource.
Maybe Linux doesn't support compiled-in resources or is some extra initialization needed?

Regards,
refsteff
Last edited by refsteff on 21.08.2011, 14:39, edited 1 time in total.
Specs: OpenSUSE 11.2 (modified), nVidia Geforce 9400 GT, Intel E7500, celestia svn 5166 Qt4

Topic author
refsteff
Posts: 17
Joined: 30.07.2011
With us: 13 years 2 months

Re: Qt4 GUI: timetoolbar is invisible on OpenSuse

Post #2by refsteff » 21.08.2011, 14:37

refsteff wrote:Maybe Linux doesn't support compiled-in resources or is some extra initialization needed?

Indeed I need some extra initialization and because I use the autoconf tools to build celestia, there is also a little change in the build system necessary.

Code: Select all

diff -urN celestia.org/src/celestia/qt/Makefile.am celestia/src/celestia/qt/Makefile.am
--- celestia.org/src/celestia/qt/Makefile.am   2011-08-19 16:04:59.000000000 +0200
+++ celestia/src/celestia/qt/Makefile.am   2011-08-21 15:30:54.388752873 +0200
@@ -99,4 +99,4 @@
    $(MOC) $< -o $@
 
 qrc_%.cpp: %.qrc
-   $(RCC) $< -o $@
+   $(RCC) -name $(patsubst %.qrc,%,$<) $< -o $@

This does the whole thing:

Code: Select all

diff -urN celestia.org/src/celestia/qt/qtmain.cpp celestia/src/celestia/qt/qtmain.cpp
--- celestia.org/src/celestia/qt/qtmain.cpp   2011-08-21 15:28:32.000000000 +0200
+++ celestia/src/celestia/qt/qtmain.cpp   2011-08-21 15:32:30.445753651 +0200
@@ -47,6 +47,10 @@
 { 
     QApplication app(argc, argv);
 
+#ifdef __linux
+    Q_INIT_RESOURCE(icons);
+#endif
+
     QCoreApplication::setOrganizationName("Celestia Development Team");
     QCoreApplication::setApplicationName("Celestia");
 


After this I can see the timetoolbar :D

The enclosing "#ifdef __linux " is only for the developers sake, I don't know if it is necessary.
Specs: OpenSUSE 11.2 (modified), nVidia Geforce 9400 GT, Intel E7500, celestia svn 5166 Qt4

Avatar
John Van Vliet
Posts: 2941
Joined: 28.08.2002
With us: 22 years 1 month

Re: Qt4 GUI: timetoolbar is invisible on OpenSuse fixed

Post #3by John Van Vliet » 21.08.2011, 19:52

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 07:09, edited 1 time in total.

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 1 month

Re: Qt4 GUI: timetoolbar is invisible on OpenSuse fixed

Post #4by ajtribick » 21.08.2011, 20:28

Ah great, I was also having this issue on Ubuntu, this fixes it.

Any Mac users seeing this? (From what I remember this does not affect Windows, but I might be mistaken there)

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 1 month

Re: Qt4 GUI: timetoolbar is invisible on OpenSuse fixed

Post #5by ajtribick » 22.08.2011, 21:12

Also working on Windows using qt creator, with or without the #ifdef.

ni1s
Posts: 14
Joined: 01.03.2007
With us: 17 years 7 months

Re: Qt4 GUI: timetoolbar is invisible on OpenSuse fixed

Post #6by ni1s » 15.09.2011, 01:12

Nice. But I have to say, these icons(resources) should automatically loaded. If they didn't the build system missed something.

Avatar
John Van Vliet
Posts: 2941
Joined: 28.08.2002
With us: 22 years 1 month

Re: Qt4 GUI: timetoolbar is invisible on OpenSuse fixed

Post #7by John Van Vliet » 15.09.2011, 02:05

--- edit ---


Return to “Bugs”