Bug 351621 - KF5 version can't be launched from the menu
Summary: KF5 version can't be launched from the menu
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-22 17:38 UTC by Antonio Rojas
Modified: 2015-12-16 18:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.17.1 (KDE Applications 15.08.1)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2015-08-22 17:38:32 UTC
The KF5 version doesn't launch from the kickoff menu or from krunner. This is due to the deprecated '-caption' argument in the Exec line of the .desktop file, it sould be replaced with -qwindowtitle

Reproducible: Always
Comment 1 Ralf Habacker 2015-08-22 17:58:30 UTC
> it should be replaced with -qwindowtitle
I tried this with recent kf5.12 based umbrello build. Any idea why using -qwindowtitle "MyCustomTitle" do not show the text in the application window title ?
Comment 2 Antonio Rojas 2015-08-22 18:23:45 UTC
No idea, but it works in all other KF5 apps, so it must be overridden somewhere in the Umbrello code.
Comment 3 Ralf Habacker 2015-08-23 08:20:13 UTC
(In reply to Antonio Rojas from comment #2)
> No idea, but it works in all other KF5 apps, so it must be overridden
> somewhere in the Umbrello code.

On my development system (opensuse 13.1 x86_64) I got the following results:

from libqt5-qttools-5.4.2-55.3.x86_64
/usr/lib64/qt5/bin/qdbusviewer-qt5 -qwindowtitle "MyTitle" -> "MyTitle" is shown in the app window title

khelpcenter5-5.3.2-8.1.x86_64
/usr/bin/khelpcenter5 -qwindowtitle "MyTitle" ->  "MyTitle" is shown in the app window title

from kate5-15.04.2-13.1.x86_64
/opt/kf5/bin/kate -qwindowtitle "MyTitle"  -> "MyTitle" is not shown
KDE frameworks version is 5.12.0-71.1.x86_64

It looks that not only umbrello is affected.
Comment 4 Antonio Rojas 2015-08-23 08:33:38 UTC
Could be because umbrello (and kate) creates a new document named "Untitled" by default when opened, and that overrides the window title. 
kwrite doesn't seem to do that, and if you launch it with 'kwrite -qwindowtitle foo' you get 'foo' in the titlebar. But when you run 'kwrite bar -qwindowtitle foo' (so that it creates a new document called bar) the title shows bar, and the -qwindowtitle parameter is ignored.
Comment 5 Ralf Habacker 2015-08-23 11:10:58 UTC
(In reply to Antonio Rojas from comment #4)
> Could be because umbrello (and kate) creates a new document named "Untitled"
> by default when opened, and that overrides the window title. 
There is nothing  special in Kf5 version of umbrello. It uses the same call to KMainWindow:setCaption() as the KDE4 version does.  
> kwrite doesn't seem to do that, and if you launch it with 'kwrite
> -qwindowtitle foo' you get 'foo' in the titlebar. 
Umbrello's Mainwindow class is derived from KXMLGui and all window title related stuff is handled there, so it looks not to be a bug in umbrello.
Comment 6 Ralf Habacker 2015-08-23 11:11:50 UTC
Git commit 123926d18f060a7ef86cee81909f175e47add6f9 by Ralf Habacker.
Committed on 23/08/2015 at 08:48.
Pushed by habacker into branch 'master'.

Fix 'KF5 version can't be launched from the menu'.

M  +1    -1    umbrello/umbrello.desktop

http://commits.kde.org/umbrello/123926d18f060a7ef86cee81909f175e47add6f9
Comment 7 Ralf Habacker 2015-08-23 11:17:12 UTC
Git commit 947d7f4651a8b2478435796795036fa3ec8f0b7f by Ralf Habacker.
Committed on 23/08/2015 at 11:16.
Pushed by habacker into branch 'frameworks'.

Fix 'KF5 version can't be launched from the menu'.

M  +1    -1    umbrello/umbrello.desktop

http://commits.kde.org/umbrello/947d7f4651a8b2478435796795036fa3ec8f0b7f
Comment 8 Ralf Habacker 2015-08-23 14:04:36 UTC
(In reply to Ralf Habacker from comment #5)
> (In reply to Antonio Rojas from comment #4)
> > Could be because umbrello (and kate) creates a new document named "Untitled"
> > by default when opened, and that overrides the window title. 
> There is nothing  special in Kf5 version of umbrello. It uses the same call
> to KMainWindow:setCaption() as the KDE4 version does.  
> > kwrite doesn't seem to do that, and if you launch it with 'kwrite
> > -qwindowtitle foo' you get 'foo' in the titlebar. 
> Umbrello's Mainwindow class is derived from KXMLGui and all window title
> related stuff is handled there, so it looks not to be a bug in umbrello.
For the record: The doc of  virtual void KMainWindow::setCaption(const QString &caption, bool modified); says:
    /**
     * Makes a KDE compliant caption.
     *
     * @param caption Your caption. @em Do @em not include the application name
     * in this string. It will be added automatically according to the KDE
     * standard.

which second my statement in comment 5.
Comment 9 Ralf Habacker 2015-08-23 19:15:14 UTC
Git commit d31cae83987600e16aa14c48e071a56fcd9c580e by Ralf Habacker.
Committed on 23/08/2015 at 19:13.
Pushed by habacker into branch 'master'.

Fix 'KF5 version can't be launched from the menu' in a frameworks independent way.

M  +4    -1    umbrello/CMakeLists.txt

http://commits.kde.org/umbrello/d31cae83987600e16aa14c48e071a56fcd9c580e
Comment 10 Ralf Habacker 2015-08-24 11:38:35 UTC
Git commit 2968078e03c9fa330a97bdeca0219e45d8dad2d8 by Ralf Habacker.
Committed on 24/08/2015 at 11:33.
Pushed by habacker into branch 'Applications/15.08'.

Fix 'KF5 version can't be launched from the menu' in a frameworks independent way.

FIXED-IN:2.17.1 (KDE Applications 15.08.1)
(cherry picked from commit d31cae83987600e16aa14c48e071a56fcd9c580e)

Conflicts:
	umbrello/CMakeLists.txt

M  +5    -1    umbrello/CMakeLists.txt

http://commits.kde.org/umbrello/2968078e03c9fa330a97bdeca0219e45d8dad2d8
Comment 11 Ralf Habacker 2015-12-16 18:29:56 UTC
Git commit bce6098a72d893a6dbd74c6f050faa5f8bf0288a by Ralf Habacker.
Committed on 16/12/2015 at 18:15.
Pushed by habacker into branch 'frameworks'.

Fix 'KF5 version can't be launched from the menu' in a frameworks independent way.

M  +4    -1    umbrello/CMakeLists.txt

http://commits.kde.org/umbrello/bce6098a72d893a6dbd74c6f050faa5f8bf0288a