Only create first/last document hud dialog once

Review Request #128625 - Created Aug. 7, 2016 and updated

Information
Nicolas Frattaroli
gwenview
Reviewers
gwenview

Previously, hitting spacebar while the dialog was visible would result in more dialogs being created. With this patch, this will no longer be the case.


  

Issues

  • 4
  • 0
  • 0
  • 4
Description From Last Updated
Put that new member into MainWindow::Private Kai Uwe Broulik Kai Uwe Broulik
I don't know the internals and the old code looked the same but doesn't this leak, ie. the dialog is ... Kai Uwe Broulik Kai Uwe Broulik
You still always need to set the text Kai Uwe Broulik Kai Uwe Broulik
This also needs to be always called, no? Kai Uwe Broulik Kai Uwe Broulik
Kai Uwe Broulik

Thanks for your patch!

app/mainwindow.h (Diff revision 1)
 
 

Put that new member into MainWindow::Private

  1. I'm not really familiar with C++, so how would that be done? Putting a MainWindow::Private in front of the definition does not appear to be the correct way.

app/mainwindow.cpp (Diff revision 1)
 
 

I don't know the internals and the old code looked the same but doesn't this leak, ie. the dialog is never deleted again?

  1. Maybe, but I don't feel confident enough in my non-existent C++ skills and the gwenview codebase to chase after a possible memory leak that already was there anyway.

app/mainwindow.cpp (Diff revision 1)
 
 

You still always need to set the text

  1. What, why? Presumably, if the dialog is already created, the text is already there and it's also already visible.

app/mainwindow.cpp (Diff revision 1)
 
 

This also needs to be always called, no?

Loading...