-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable app class independent usage #203
Conversation
I get it. It looks OK as a concept. Isn't there some extra work required for example calls like this one won't work when it doesn't inherit from SingleApplication/singleapplication.cpp Line 171 in 494772e
|
If you finish it and it is entirely backwards compatible I don't mind merging it as a |
Thanks for the fast review, sounds good!
If I understand this correctly you call the C standard library funktion To my knowledge, it makes no difference whether I call this from a |
2b9c101
to
09e4580
Compare
I've fixed the bug with the preprocessor string compartion. Looks like this is not possible. Instead I've added a new file In the new I've successfully tested all 5 examples locally on Windows with clang. I'm going to test with MSVC and on Linux with GCC as well. Please run the CI pipelines to validate that my changes didn't break anything. I'm going to add a new CI pipeline step for the new example and add documentation on how to use the free standing mode. |
I added CI steps for the new I added a CMake install in free standing mode that generates CMake config files and removes the A notable change is, that I added the library version (3.6.0!) to the From my side this is ready for merge now. Let me know I you want changes or more explenation 😉 |
This looks like a broken build environment to me. 🤔 |
I've changed the MacOS plattform from latest to 11. I don't know if this works, its just a try. This version did run on x86_64 instead of arm64. |
Okay, from what I've found MacOS runners are now arm64 only. X86_64 is no longer supported with macos-latest. According to an fmt issue macos-11 is also no longer supported. https://github.com/jurplel/install-qt-action If I understand the action file right, than this is the repo responsible for installing Qt. In this case it's probably a bug on their side with the Qt5 install on current (arm64) MacOS. Maybe it's the best to temporarily disable MacOS in the CI. What do you think? |
I've made a new PR #204 to fix the MacOS CI build. If that succeeds and got merged, I will rebase this PR and we can continue 😅 |
I rebased this on my CI-fix PR #204 and the CI succeeds now. https://github.com/bebuch/SingleApplication/actions/runs/12872062233/ This is ready for merge from my side. (If you accept #204 as well.) |
This is a pure extension and fully backwards compatible. (Unless I made a mistake. 😉)
I have two requirements for the library that are not currently possible:
QXxxApplication
class at build time.This PR allows both by making the
SingleApplication
class an object that is not derived fromQXxxApplication
. On the user side, you need to instantiate a separateSingleApplication
object after yourQXxxApplication
object. I've added a new exampleseparate_object
which mirrorssending_arguments
but usesSingleApplication
as a separate object.Of course, the better approach would be to put the implementation into a separate class with an appropriate name and then use that to implement
SingleApplication
as it currently is. I would be delighted if this were implemented for 4.x. Then you could also use the functionality with installed CMake Config and not just as a Git submodule.If you are willing to merge this, I would also create a PR with CMake install for CMake Config files in “FreeStanding” mode.
If you don't want to merge this, but are willing to merge the “better approach” mentioned, then I can also implement a corresponding PR for 3.x.
@itay-grudev What do you think?