|
From: | Daniel J Sebald |
Subject: | Re: eliminating GUI event listener class |
Date: | Tue, 09 Apr 2013 04:25:04 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 |
On 04/09/2013 03:52 AM, Daniel J Sebald wrote: main_window::prepare_to_exit (void) {+fprintf(stderr,"Need to save edited files here as well. Should be easy. Issue close to all the file_editor_tabs somehow.\n");
write_settings (); }Actually, that's not a good place for such a thing. (The "write_settings" that main_window does is just stuff related to the main window. So it makes sense to have that here.)
Instead, closing edited files should probably be done best inside the destructor for the file_editor_tabs. I.e., put a closeEvent or something more direct at the start of file_editor_tab::~file_editor_tab. When the application destruction is done, it should eventually get around to calling every file_editor_tab's destructor.
I'm going to create a bug report. Dan
[Prev in Thread] | Current Thread | [Next in Thread] |