Monday, January 21, 2013

Minor Fix

While testing the tagged download archive for release 0.3.1, a warning message from Qt occurred indicating that the window title did not contain a '[*]' placeholder.  This was caused by the application loading the last opened file, after which the window modified flag is cleared.  This triggers Qt to update the window title, which was not set yet, hence the warning message.

This warning did not occur if a file was specified on the command line.  If the application was started with no prior loaded file or recent list, this message also did not occur, but the window title was set to "MainWindow" instead of the correct "Untitled - IBCP" title.

The warning did not occur if the file was specified on the command line because the code called the set current program function with the file specified, which set the window title before the file was loaded.  The solution was to also call the set current program function if no file was specified on the command with the current program member variable value, which solved both the warning message problem and the "MainWindow" title problem.

[commit 6410a5318e]

No comments:

Post a Comment

All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)