Closed ghost closed 1 year ago
Yes, Qt does not provide a mechanism for this. GTK provides GApplication, which I believe uses dbus for single-instance functionality. I did write a Windows implementation of single-instance using named pipes because Windows doesn't have dbus, but I don't want to do this for the other platforms.
Yes, Qt does not provide a mechanism for this. GTK provides GApplication, which I believe uses dbus for single-instance functionality. I did write a Windows implementation of single-instance using named pipes because Windows doesn't have dbus, but I don't want to do this for the other platforms.
A quick Google searched showed me many examples of single instance applications in Qt. Where did you get the information that it doesn't provide a mechanism for this?
Alongside TextAdept, I also use KDE's Kate editor (Windows version). It's single instance by default.
If you dig into those applications, how are they doing it? What Qt class are they using? I couldn't find one.
If you dig into those applications, how are they doing it? What Qt class are they using? I couldn't find one.
I'm not a programmer. But I find them easily with just a Google search. Maybe QtSingleApplication or https://github.com/itay-grudev/SingleApplication?
Thanks for sharing. I am reluctant to add yet another dependency for such a critical component that ideally would be in Qt itself.
@orbitalquark avoiding dependencies is fine.
I cannot code, but how about https://stackoverflow.com/q/5006547?
At least for the ignorant, it might contain a sensible approach.
Sorry, I forgot: many thanks for your help.
I believe the link posted earlier is the solution. I just have to get around to implementing it.
Many thanks for your reply, @orbitalquark.
Until single instance is implemented, I‘m afraid I have to stick to version 11.4 (to avoid data loss).
Many thanks for your help.
I've implemented single-instance functionality on Qt here: https://github.com/orbitalquark/textadept/commit/703ab3f6e679c0fd0aab2d69627d6e86dcb521b1. It should be in the next nightly build.
Many thanks for the implementation, @orbitalquark.
I wonder whether a new stable release (in a not so distant future) could include this feature.
I think this will require a beta release so a stable 12.2 probably won’t come earlier than 1 Nov.
https://github.com/orbitalquark/textadept/releases/tag/textadept_12.0_alpha
Why? Is there any technical issues @orbitalquark?