qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ui: Mark the '-no-quit' option as deprecated
@ 2021-06-30  9:21 Thomas Huth
  2021-06-30  9:24 ` Daniel P. Berrangé
  2021-06-30 10:01 ` Peter Maydell
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Huth @ 2021-06-30  9:21 UTC (permalink / raw)
  To: qemu-devel, kraxel; +Cc: libvir-list, Paolo Bonzini, berrange

It's just a cumbersome wrapper around the -display ...,window_close=off
parameter, so we should rather tell our users to use that instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 docs/system/deprecated.rst | 6 ++++++
 qemu-options.hx            | 5 +++--
 softmmu/vl.c               | 2 ++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index e2e0090878..c76da98761 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -126,6 +126,12 @@ other options have been processed.  This will either have no effect (if
 if they were not given.  The property is therefore useless and should not be
 specified.
 
+``-no-quit`` (since 6.1.0)
+''''''''''''''''''''''''''
+
+The ``-no-quit`` is a synonym for ``-display ...,window_close=off`` which
+should be used instead.
+
 
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
diff --git a/qemu-options.hx b/qemu-options.hx
index ba3ca9da1d..9fdd823c1b 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1910,10 +1910,11 @@ SRST
 ERST
 
 DEF("no-quit", 0, QEMU_OPTION_no_quit,
-    "-no-quit        disable SDL window close capability\n", QEMU_ARCH_ALL)
+    "-no-quit        disable SDL window close capability (deprecated)\n", QEMU_ARCH_ALL)
 SRST
 ``-no-quit``
-    Disable SDL window close capability.
+    Disable SDL window close capability. This option is deprecated, please
+    use ``-display ...,window_close=off`` instead.
 ERST
 
 DEF("sdl", 0, QEMU_OPTION_sdl,
diff --git a/softmmu/vl.c b/softmmu/vl.c
index cee6339580..3f79b9c8a3 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3232,6 +3232,8 @@ void qemu_init(int argc, char **argv, char **envp)
             case QEMU_OPTION_no_quit:
                 dpy.has_window_close = true;
                 dpy.window_close = false;
+                warn_report("-no-quit is deprecated, please use "
+                            "-display ...,window_close=off instead.");
                 break;
             case QEMU_OPTION_sdl:
 #ifdef CONFIG_SDL
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ui: Mark the '-no-quit' option as deprecated
  2021-06-30  9:21 [PATCH] ui: Mark the '-no-quit' option as deprecated Thomas Huth
@ 2021-06-30  9:24 ` Daniel P. Berrangé
  2021-06-30 10:01 ` Peter Maydell
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2021-06-30  9:24 UTC (permalink / raw)
  To: Thomas Huth; +Cc: libvir-list, Paolo Bonzini, qemu-devel, kraxel

On Wed, Jun 30, 2021 at 11:21:27AM +0200, Thomas Huth wrote:
> It's just a cumbersome wrapper around the -display ...,window_close=off
> parameter, so we should rather tell our users to use that instead.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  docs/system/deprecated.rst | 6 ++++++
>  qemu-options.hx            | 5 +++--
>  softmmu/vl.c               | 2 ++
>  3 files changed, 11 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

libvirt does not use this option


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ui: Mark the '-no-quit' option as deprecated
  2021-06-30  9:21 [PATCH] ui: Mark the '-no-quit' option as deprecated Thomas Huth
  2021-06-30  9:24 ` Daniel P. Berrangé
@ 2021-06-30 10:01 ` Peter Maydell
  2021-06-30 10:07   ` Daniel P. Berrangé
  2021-06-30 10:16   ` Thomas Huth
  1 sibling, 2 replies; 6+ messages in thread
From: Peter Maydell @ 2021-06-30 10:01 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Libvirt, Paolo Bonzini, Daniel P. Berrange, QEMU Developers,
	Gerd Hoffmann

On Wed, 30 Jun 2021 at 10:22, Thomas Huth <thuth@redhat.com> wrote:
>
> It's just a cumbersome wrapper around the -display ...,window_close=off
> parameter, so we should rather tell our users to use that instead.

This is an interesting definition of "cumbersome" -- personally
I would say the long -display option is the cumbersome one :-)

-- PMM


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ui: Mark the '-no-quit' option as deprecated
  2021-06-30 10:01 ` Peter Maydell
@ 2021-06-30 10:07   ` Daniel P. Berrangé
  2021-06-30 10:16   ` Thomas Huth
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2021-06-30 10:07 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Libvirt, Paolo Bonzini, Thomas Huth, QEMU Developers, Gerd Hoffmann

On Wed, Jun 30, 2021 at 11:01:06AM +0100, Peter Maydell wrote:
> On Wed, 30 Jun 2021 at 10:22, Thomas Huth <thuth@redhat.com> wrote:
> >
> > It's just a cumbersome wrapper around the -display ...,window_close=off
> > parameter, so we should rather tell our users to use that instead.
> 
> This is an interesting definition of "cumbersome" -- personally
> I would say the long -display option is the cumbersome one :-)

I'd say the primary benefit of the new syntax is that it is obvious
that it only applies when using the SDL option. The '-no-quit' option
sonds like it ought to be applicable to any use of qemu, but isn't
actually once you read its description.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ui: Mark the '-no-quit' option as deprecated
  2021-06-30 10:01 ` Peter Maydell
  2021-06-30 10:07   ` Daniel P. Berrangé
@ 2021-06-30 10:16   ` Thomas Huth
  2021-06-30 10:45     ` Thomas Huth
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Huth @ 2021-06-30 10:16 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Libvirt, Paolo Bonzini, Daniel P. Berrange, QEMU Developers,
	Gerd Hoffmann

On 30/06/2021 12.01, Peter Maydell wrote:
> On Wed, 30 Jun 2021 at 10:22, Thomas Huth <thuth@redhat.com> wrote:
>>
>> It's just a cumbersome wrapper around the -display ...,window_close=off
>> parameter, so we should rather tell our users to use that instead.
> 
> This is an interesting definition of "cumbersome" -- personally
> I would say the long -display option is the cumbersome one :-)

The cumbersome was rather meant from a code / maintenance side of view. But 
I think the naming of this parameter is also quite misleading. It really 
just blocks the closing button of the window, you can still quit QEMU by 
other means (e.g. with the "Quit" menu item in the GTK menu or by shutting 
down the guest), so the "window_close=off" wording is certainly more 
understandable.

... and by the way, I think the documentation in qemu-options.hx is 
inaccurate, too, it only talks about SDL, but it seems like this option is 
also available with GTK. So this -no-quit option really seems like old cruft 
to me which we should try to get rid of...

  Thomas



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ui: Mark the '-no-quit' option as deprecated
  2021-06-30 10:16   ` Thomas Huth
@ 2021-06-30 10:45     ` Thomas Huth
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2021-06-30 10:45 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Libvirt, Paolo Bonzini, Daniel P. Berrange, QEMU Developers,
	Gerd Hoffmann

On 30/06/2021 12.16, Thomas Huth wrote:
> On 30/06/2021 12.01, Peter Maydell wrote:
>> On Wed, 30 Jun 2021 at 10:22, Thomas Huth <thuth@redhat.com> wrote:
>>>
>>> It's just a cumbersome wrapper around the -display ...,window_close=off
>>> parameter, so we should rather tell our users to use that instead.
>>
>> This is an interesting definition of "cumbersome" -- personally
>> I would say the long -display option is the cumbersome one :-)
> 
> The cumbersome was rather meant from a code / maintenance side of view. But 
> I think the naming of this parameter is also quite misleading. It really 
> just blocks the closing button of the window, you can still quit QEMU by 
> other means (e.g. with the "Quit" menu item in the GTK menu or by shutting 
> down the guest), so the "window_close=off" wording is certainly more 
> understandable.
> 
> ... and by the way, I think the documentation in qemu-options.hx is 
> inaccurate, too, it only talks about SDL, but it seems like this option is 
> also available with GTK. So this -no-quit option really seems like old cruft 
> to me which we should try to get rid of...

Drat. It's either "-display sdl,window_close=off" or
"-display gtk,window-close=off" (note the underscore vs. minus between 
"window" and "close"). Please disregard this patch, that "underscore vs. 
minus" problem should get fixed first, so we can point the users to the 
parameter with the right syntax. I'll try to come up with some patches...

  Thomas



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-30 10:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30  9:21 [PATCH] ui: Mark the '-no-quit' option as deprecated Thomas Huth
2021-06-30  9:24 ` Daniel P. Berrangé
2021-06-30 10:01 ` Peter Maydell
2021-06-30 10:07   ` Daniel P. Berrangé
2021-06-30 10:16   ` Thomas Huth
2021-06-30 10:45     ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).