Bug 364120 - Umbrello toolbar icons do not match diagram widgets and cursors running under "breeze" style
Summary: Umbrello toolbar icons do not match diagram widgets and cursors running under...
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.19.1 (KDE Applications 16.04.1)
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
: 365881 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-06-08 22:30 UTC by Ralf Habacker
Modified: 2016-09-19 22:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.20.1 (KDE Applications 16.08.1)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2016-06-08 22:30:55 UTC
When running umbrello under breeze style (for example on openSUSE Leap 42.1)  umbrello related toolbar icons does not match the (default) color and layout of related widgets on the diagram and related cursors.

People knowing umbrello told me that it is now hard to add new uml objects to a diagram using the toolbar.


Reproducible: Always

Steps to Reproduce:
1. start umbrello 
2.  add a class, interface, datatype to a diagram

Actual Results:  
The tools bar icons differs in color and look and feel 

Expected Results:  
The tool bar icons should match the cursor and widget style on diagrams.
Comment 1 Ralf Habacker 2016-06-08 22:51:45 UTC
Git commit 4bc648dbc006212ed1d6aa16295f03cce153327a by Ralf Habacker.
Committed on 08/06/2016 at 22:50.
Pushed by habacker into branch 'master'.

Fix 'Umbrello toolbar icons does not match diagram widgets and cursors running under "breeze" style'.

Icons are now integrated into umbrello binary by using a qrc file.
FIXED-IN:2.19.80 (KDE Applications 16.07.80)

M  +1    -0    CMakeLists.txt
M  +1    -0    umbrello/CMakeLists.txt
M  +29   -5    umbrello/icon_utils.cpp
A  +174  -0    umbrello/icons.qrc
M  +1    -0    umbrello/main.cpp

http://commits.kde.org/umbrello/4bc648dbc006212ed1d6aa16295f03cce153327a
Comment 2 Ralf Habacker 2016-06-09 06:25:12 UTC
Git commit 5ab1a84dd126425f30c3414b27a4125d3826a1b6 by Ralf Habacker.
Committed on 09/06/2016 at 06:22.
Pushed by habacker into branch 'master'.

Fix compile error 'undefined reference to `qInitResources_icons()' on KF5 builds.

M  +2    -1    CMakeLists.txt

http://commits.kde.org/umbrello/5ab1a84dd126425f30c3414b27a4125d3826a1b6
Comment 3 Ralf Habacker 2016-06-09 06:25:12 UTC
Git commit 792510763414d4cee23f9bca75c1bb23cffec41a by Ralf Habacker.
Committed on 09/06/2016 at 06:24.
Pushed by habacker into branch 'master'.

Fix 'warning: potential duplicate alias detected:' in icons.qrc.

M  +7    -8    umbrello/icons.qrc

http://commits.kde.org/umbrello/792510763414d4cee23f9bca75c1bb23cffec41a
Comment 4 Ralf Habacker 2016-06-09 06:35:12 UTC
Git commit efd232c051af949ed56806474b7fc187f8ff82b9 by Ralf Habacker.
Committed on 09/06/2016 at 06:34.
Pushed by habacker into branch 'master'.

Do not install icons which are embedded into the application.

M  +0    -34   umbrello/pics/CMakeLists.txt

http://commits.kde.org/umbrello/efd232c051af949ed56806474b7fc187f8ff82b9
Comment 5 Ralf Habacker 2016-06-09 23:16:47 UTC
Git commit fe42491cc3283e22c05f9acda58e8f4460c0e353 by Ralf Habacker.
Committed on 09/06/2016 at 21:39.
Pushed by habacker into branch 'master'.

Fix 'Umbrello toolbar icons does not match diagram widgets and cursors running under "breeze" style'.

Icons are now integrated into umbrello binary by using a qrc file.
FIXED-IN:2.19.80 (KDE Applications 16.07.80)

M  +1    -0    CMakeLists.txt
M  +1    -0    umbrello/CMakeLists.txt
M  +29   -5    umbrello/icon_utils.cpp
A  +174  -0    umbrello/icons.qrc
M  +1    -0    umbrello/main.cpp

http://commits.kde.org/umbrello/fe42491cc3283e22c05f9acda58e8f4460c0e353
Comment 6 Ralf Habacker 2016-06-09 23:16:47 UTC
Git commit 883bba505bf2e628c0ce696f4f4aef8331a1d49c by Ralf Habacker.
Committed on 09/06/2016 at 21:39.
Pushed by habacker into branch 'master'.

Fix 'warning: potential duplicate alias detected:' in icons.qrc.

M  +7    -8    umbrello/icons.qrc

http://commits.kde.org/umbrello/883bba505bf2e628c0ce696f4f4aef8331a1d49c
Comment 7 Ralf Habacker 2016-06-09 23:16:47 UTC
Git commit 04d61238d73b05cfb6c63fcdbcf16059c5633c67 by Ralf Habacker.
Committed on 09/06/2016 at 21:39.
Pushed by habacker into branch 'master'.

Fix compile error 'undefined reference to `qInitResources_icons()' on KF5 builds.

M  +2    -1    CMakeLists.txt

http://commits.kde.org/umbrello/04d61238d73b05cfb6c63fcdbcf16059c5633c67
Comment 8 Ralf Habacker 2016-06-09 23:17:23 UTC
Git commit 09f9b27ae179a7e7d58f856c3cd73372f0693a59 by Ralf Habacker.
Committed on 09/06/2016 at 21:39.
Pushed by habacker into branch 'master'.

Do not install icons which are embedded into the application.

M  +0    -34   umbrello/pics/CMakeLists.txt

http://commits.kde.org/umbrello/09f9b27ae179a7e7d58f856c3cd73372f0693a59
Comment 9 Oliver Kellogg 2016-07-09 18:25:37 UTC
(In reply to Ralf Habacker from comment #7)
> Git commit 04d61238d73b05cfb6c63fcdbcf16059c5633c67 by Ralf Habacker.
> Committed on 09/06/2016 at 21:39.
> Pushed by habacker into branch 'master'.
> 
> Fix compile error 'undefined reference to `qInitResources_icons()' on KF5
> builds.
> 
> M  +2    -1    CMakeLists.txt
> 
> http://commits.kde.org/umbrello/04d61238d73b05cfb6c63fcdbcf16059c5633c67

FYI: Using Qt 4.8.6, I also got this unresolved symbol error on linking.
The following patch fixed it for me:

diff --git a/umbrello/main.cpp b/umbrello/main.cpp
index 12ebd65..00da738 100644
--- a/umbrello/main.cpp
+++ b/umbrello/main.cpp
@@ -163,6 +163,7 @@ int main(int argc, char *argv[])
     args->process(app);
 
     aboutData.processCommandLine(args);
+    Q_INIT_RESOURCE(icons);
 #else
     KCmdLineArgs::init(argc, argv, &aboutData);
     KCmdLineOptions options;
@@ -175,8 +176,8 @@ int main(int argc, char *argv[])
     options.add("use-folders", ki18n("keep the tree structure used to store the views in the document in the target directory"));
     KCmdLineArgs::addCmdLineOptions(options); // Add our own options.
     KApplication app;
+    Q_INIT_RESOURCE_EXTERN(icons);
 #endif
-    Q_INIT_RESOURCE(icons);
 
     QPointer<UMLApp> uml;
     if (app.isSessionRestored()) {
Comment 10 Ralf Habacker 2016-07-11 07:49:06 UTC
(In reply to Oliver Kellogg from comment #9)
> FYI: Using Qt 4.8.6, I also got this unresolved symbol error on linking.
> The following patch fixed it for me:
I tried a KDE4/Qt 4.8 build of recent  umbrello master branch on jenkins without this patch and got no compile errors (see 
https://build.kde.org/job/umbrello%20master%20latest-qt4/PLATFORM=Linux,compiler=gcc/31/console)
Not sure how to reproduce this issue. Any hints welcome.
Comment 11 Oliver Kellogg 2016-07-11 16:46:45 UTC
(In reply to Ralf Habacker from comment #10)
> (In reply to Oliver Kellogg from comment #9)
> > FYI: Using Qt 4.8.6, I also got this unresolved symbol error on linking.
> > The following patch fixed it for me:
> I tried a KDE4/Qt 4.8 build of recent  umbrello master branch on jenkins
> without this patch and got no compile errors (see 
> https://build.kde.org/job/umbrello%20master%20latest-qt4/PLATFORM=Linux,
> compiler=gcc/31/console)
> Not sure how to reproduce this issue. Any hints welcome.

I am using gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) i686-linux-gnu
on a Ubuntu 14.04.4 (trusty).
IMHO I am experiencing a GCC related problem.
Looking at /usr/include/qt4/QtCore/qglobal.h , we have:

#define Q_INIT_RESOURCE_EXTERN(name) \
    extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) ();

#define Q_INIT_RESOURCE(name) \
    do { extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) ();       \
        QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); } while (0)

so basically they are the same except that Q_INIT_RESOURCE embeds the *extern* declaration in a do-while block.

What GCC version are you using?
Comment 12 Oliver Kellogg 2016-07-11 17:00:54 UTC
(In reply to Oliver Kellogg from comment #11)
> [...]
> Looking at /usr/include/qt4/QtCore/qglobal.h , we have:
> 
> #define Q_INIT_RESOURCE_EXTERN(name) \
>     extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) ();
> 
> #define Q_INIT_RESOURCE(name) \
>     do { extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) ();       \
>         QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); } while (0)
> 
> so basically they are the same except that Q_INIT_RESOURCE embeds the
> *extern* declaration in a do-while block.
> 

Sorry, that was incorrect - of course, Q_INIT_RESOURCE includes the call to
   QT_MANGLE_NAMESPACE(qInitResources_ ## name) ();
which Q_INIT_RESOURCE_EXTERN does not.
In which library should qInitResources_icons() be defined?
Comment 13 Ralf Habacker 2016-08-08 06:19:16 UTC
(In reply to Oliver Kellogg from comment #11)
> What GCC version are you using?
linux 
   4.8.3 https://build.opensuse.org/package/show/home:rhabacker:branches:KDE:Current/umbrello 
  4.8.1 local
windows cross compile 
  6.1.0 https://build.opensuse.org/package/show/windows:mingw:win32/mingw32-umbrello
Comment 14 Ralf Habacker 2016-08-08 06:48:45 UTC
(In reply to Oliver Kellogg from comment #11)
> I am using gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) i686-linux-gnu
> on a Ubuntu 14.04.4 (trusty).
Please provide dedicated build information for this platform.
Comment 15 Oliver Kellogg 2016-08-08 16:29:50 UTC
(In reply to Ralf Habacker from comment #14)
> (In reply to Oliver Kellogg from comment #11)
> > I am using gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) i686-linux-gnu
> > on a Ubuntu 14.04.4 (trusty).
> Please provide dedicated build information for this platform.

Hmm, coming to think, I was still using the KDE 4.x based build - which will go away shortly (cleanup done by Lays).
I think I will rest my case and get busy switching to KF5.
Comment 16 Ralf Habacker 2016-08-28 22:36:08 UTC
(In reply to Ralf Habacker from comment #14)
> (In reply to Oliver Kellogg from comment #11)
> > I am using gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) i686-linux-gnu
> > on a Ubuntu 14.04.4 (trusty).
> Please provide dedicated build information for this platform
Here is an example how to build:

vagrant init ubuntu/trusty64
vagrant up
vagrant ssh
sudo apt-get install kdelibs5-dev libxslt1-dev libxml2-dev git
git clone git://anongit.kde.org/umbrello
mkdir umbrello-build
cd umbrello-build
cmake ../umbrello
make
Comment 17 Ralf Habacker 2016-08-28 22:43:02 UTC
Git commit d07b449805b383e366d3f813e2462280cdc61596 by Ralf Habacker.
Committed on 28/08/2016 at 22:40.
Pushed by habacker into branch 'Applications/16.08'.

Fix compile issue on Ubuntu 14.04.4 (trusty).
FIXED-IN:2.20.1 (KDE Applications 16.08.1)

M  +2    -1    umbrello/main.cpp

http://commits.kde.org/umbrello/d07b449805b383e366d3f813e2462280cdc61596
Comment 18 Ralf Habacker 2016-08-28 23:06:53 UTC
(In reply to Oliver Kellogg from comment #12)
> In which library should qInitResources_icons() be defined?

on ubuntu/trusty and opensuse Leap there is only a symbol 
/usr/lib/x86_64-linux-gnu/libQtCore.so
(standard input):274:0000000000125ea0 T _Z15qInitResourceIOv [qInitResourceIO()]
Comment 19 Ralf Habacker 2016-08-28 23:12:13 UTC
(In reply to Ralf Habacker from comment #18)
> (In reply to Oliver Kellogg from comment #12)
> > In which library should qInitResources_icons() be defined?
It is defined in 
CMakeFiles/libumbrello.dir/qrc_icons.cpp:9388:int QT_MANGLE_NAMESPACE(qInitResources_icons)()
which is preprocessed with 
 ~/src/umbrello-16.08-build/umbrello> make CMakeFiles/libumbrello.dir/qrc_icons.i
to 
int qInitResources_icons()
{
    ::qRegisterResourceData
        (0x01, qt_resource_struct, qt_resource_name, qt_resource_data);
    return 1;
}

The curious thing is that it does not fail on opensuse Leap but on trusty.
Comment 20 Ralf Habacker 2016-08-28 23:21:14 UTC
(In reply to Ralf Habacker from comment #19)
> The curious thing is that it does not fail on opensuse Leap but on trusty.
This looks like a cmake issue. On opensuse Leap using cmake 3.3.2 I get 
[  0%] Automatic moc and rcc for target libumbrello

while on trusty using cmake 2.8.12 there is 
[  1%] Automoc for target libumbrello

no rcc run.
Comment 21 Ralf Habacker 2016-09-19 22:57:19 UTC
*** Bug 365881 has been marked as a duplicate of this bug. ***