diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-29 17:33:53 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-29 17:33:53 +0200 |
| commit | e2d677d82ee52f940fda018de9372330c87fb49a (patch) | |
| tree | 2159a3087794f5d19a860048e0039e800c56fba0 /tests/test_threadlistmodel.cpp | |
| parent | 4439dffbefcb4d2e3cff0c9e330effc47c6cb02a (diff) | |
| download | qtmaildir-e2d677d82ee52f940fda018de9372330c87fb49a.tar.gz qtmaildir-e2d677d82ee52f940fda018de9372330c87fb49a.zip | |
feat: accept the launch selectors on the command line
Connect first, become the server only if that fails. A live instance is handed
the selectors and this process exits without ever opening a database, so two
launches no longer mean two notmuch handles. When no instance answers and no
socket can be created either, the window still opens: losing single-instance
behaviour is a degradation, losing the mail client is not.
--version and --help stay hand-checked before QApplication exists: Qt's own
versions exit through QCoreApplication, and --version has to work where the
GUI cannot open. The selectors themselves are parsed after QApplication, from
app.arguments(), because the constructor strips Qt's standard options such as
-platform and -style; parsing the raw argv would reject them as unknown. An
unknown option prints the error on stderr and exits with status 2 before any
window is shown.
The socket's parent directory is created first, since the state directory does
not exist on a first run and listen() cannot create a socket inside a missing
directory.
Raising under Wayland is a request rather than a command. The compositor may
honour it as a focus hint or ignore it by policy; the selectors apply either
way, which is the half that has to work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_threadlistmodel.cpp')
0 files changed, 0 insertions, 0 deletions
