Bug 410742 - Externally-opened files no longer open in existing window
Summary: Externally-opened files no longer open in existing window
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 375795 412288 415099 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-08-08 20:33 UTC by Nate Graham
Modified: 2019-12-14 11:05 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2019-08-08 20:33:33 UTC
This is with Kate and KTexteditor and the rest of KDE software built from git master on top of Manjaro KDE with Qt 5.13


STEPS TO REPRODUCE
1. Open Kate
2. From within that Kate window, open several documents
3. Open another text document from an external method (e.g.double-clicking on it in Dolphin, opening it in KRunner or Konsole, etc)


OBSERVED RESULT
The file opens in a new window


EXPECTED RESULT
The file opens in an existing window


ADDITIONAL INFORMATION
If you open a file from Konsole, the following is printed:

$ kate ./src/filewidgets/kdiroperator.cpp
Failed to register /MainApplication on DBus

Seems related.
Comment 1 Christoph Cullmann 2019-08-09 18:59:36 UTC
Hmm, true, happens for me now, too.

That means 


    // application dbus interface
    if (QDBusConnection::sessionBus().interface()) {
        QDBusConnection::sessionBus().registerObject(QStringLiteral("/MainApplication"), this);
    }


fails now and we have no dbus communication anymore :/
Comment 2 Christoph Cullmann 2019-08-09 19:20:11 UTC
Git commit bf54ad697f3d8380bf9871cb73e928479b9476fb by Christoph Cullmann.
Committed on 09/08/2019 at 19:19.
Pushed by cullmann into branch 'master'.

fix dbus session registration

M  +0    -5    kate/kateapp.cpp
M  +7    -1    kate/kateappadaptor.cpp

https://commits.kde.org/kate/bf54ad697f3d8380bf9871cb73e928479b9476fb
Comment 3 Christoph Cullmann 2019-08-09 19:20:21 UTC
Please test this, this should perhaps be backported.
Comment 4 Nate Graham 2019-08-09 19:22:47 UTC
Fixed for me! +1 for backporting to stable branch. Might even be worth a re-spin so we don't ship Kate 19.04 like this.
Comment 5 Christoph Cullmann 2019-08-09 19:24:18 UTC
Git commit 636af882e3c936411f56069585940901b39628d1 by Christoph Cullmann.
Committed on 09/08/2019 at 19:24.
Pushed by cullmann into branch 'Applications/19.08'.

fix dbus session registration

M  +0    -5    kate/kateapp.cpp
M  +7    -1    kate/kateappadaptor.cpp

https://commits.kde.org/kate/636af882e3c936411f56069585940901b39628d1
Comment 6 Christoph Cullmann 2019-08-09 19:24:51 UTC
Backported to 19.08, should I do that for 19.04, too?
I am actually not sure why it no longer works, perhaps Qt 5.13 bug/regression or now correct behavior?
Comment 7 Nate Graham 2019-08-09 19:25:52 UTC
Er, yes, 19.08. :) 19.04 is not getting any new releases.
Comment 8 Dominik Haumann 2019-09-25 06:28:47 UTC
*** Bug 412288 has been marked as a duplicate of this bug. ***
Comment 9 Thomas Tanghus 2019-11-09 09:40:29 UTC
*** Bug 375795 has been marked as a duplicate of this bug. ***
Comment 10 Thomas Tanghus 2019-11-09 09:43:53 UTC
I retagged Bug #375795 as a duplicate, although it's technically this one, that's a duplicate. I hope that is OK?
Comment 11 Ken Fallon 2019-12-14 11:05:53 UTC
*** Bug 415099 has been marked as a duplicate of this bug. ***