Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.1.0 #5

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open

v1.1.0 #5

wants to merge 49 commits into from

Conversation

nfette
Copy link

@nfette nfette commented Jan 24, 2018

  • Fixed a few bugs causing crashes
  • Removed memory leaks in GUI
  • Miscellaneous memory leaks in array variables
  • Fence-post error in loop over units
  • Fixed unfinished code for Analyzer type 103
  • Code style changes to avoid some global variables
  • Make compatible with MSVC compiler
  • Convert serialization encoding to v1.1 to avoid loading invalid XML
  • Added some documentation in source code
  • and (little) more!

You may want to edit the README.md afterwards; I indicated that I was going to duplicate the repository without the binary files inside.

Due to type mismatch, MSVC cannot find the symbol for theTablewindow as
declared in adrowdialog.cpp and altverdialog.cpp. Change tabledialog.cpp
to match.
1. Document intent and make functions return as declared.
2. Correctly declare and instantiate array of pointers.
3. Redefine arrays as vectors for C++ compatibility.
Overlaysetting has button to add loop. The event handler had assumed
that some item was selected, leading to null pointer problems.
Use the QWTPATH environment variable instead of hard-coded path. Also,
`make install` now copies XML files to build folder.
I'm planning to replace a bunch of objects created by the keyword new
with objects created as local variables, to help with memory leaks. Also
commenting closer to class declarations.
TableWindow never resets values for "Add/remove runs" dialog, and
adRowDialog nevers sets a flag for rejecting the changes. So they always
get applied even upon "Cancel". Fixed: changed from global to local and
member variables.
Found many instances of dialog boxes allocated with keyword *new* that
were never closed. In all cases where exec() was called, replaced these
with a local (stack) variable or static function.
* Remove duplicated code for sysSettingDialog setup
* Convert more pointers to stack variables
* Remove warning messages that were never shown
* Add flow control to export file handler
* Many dialog boxes cleaned up, using deleteLater or stack variables
instead of new allocated.
* Notes about other potential memory leaks
* Make this input dialog box store results in member field instead of
returning through global variables
* Initialize int argc = 0 where previously uninitialized (resolves crash
with MSVC)
* Clean up many warning dialogs
* Corrected improper conversion from int to QString
* Corrected uninitialized variables
Start doing useful things:
* Document main data classes
* Remove unused variables and fields
* Move local variables to within local scope
* Remove duplicate block at mainwindow.cpp:401 (should it be fcgroup
instead of cGroup?)
* Annotate possible problems
* Add comments to document headers
* Remove unused function declarations
* Queue unused local variable tNode for removal
* Add placeholder function to consolidate temporary file calls
* In class calculate and tabledialog, move dummy as argument from member
functions to constructor. Also remove from class scope some variables
used as locals. In MainWindow, move calculate member field to local
variable.
* Work on bug related to plot windows and XML. When curve name includes
bad characters like #, XML may not save or load properly. Change
plotsDialog to write and read valid XML that resolves the bug. Also
check XML load behavior for debugging.
* Related to plots also, identified incomplete behavior in curvesetting
that modifies curve names. To be continued...
Plus other minor stuff, including changes to titles of curves
Was accessing a list index that was never created (only applies in
special cases). Should subclass those cases...
* Since typical usage of plotsDialog is to close but not delete it,
force delete on close.
* For all dialog boxes, use Qt::Dialog window flag instead of Tool to
grab focus on show. Don't allow plot window to be modeless.
* Start removing event() functions.
* Clean up my own irrelevant comments about memory management.
* Refactor a QList<addvalue *> into QList<addvalue> to avoid need to
delete items.
* Delete items removed from a QListWidget (no longer owned) in
curvesetting.
* Refactor a couple variables from float to double to avoid compiler
warnings.
* Make one more dialog box local (deleted automatically on passing out
of scope).
* Extra debug output for curvesetting
* Fix bug where user selects multiple items to delete, and only one gets
deleted
* Fix bug where user edits table, closes it, and loses changes
* Clean more dialog box usage for consistency and proper memory
management
Remove event(), adjust comments
* Memory issues - proper initialization and deletion
* In sorpsimEngine.cpp, qheat(): found that loop was accessing uninitialized dummy unit, so started loop at first real unit
* Match case of header names for linux compatibility
Somewhere around commit ea45f44, any warning message also caused the whole
spDialog box to close. Turns out, a modal Dialog mode and hide() are incompatible.
Plot constructor for parametric plots was allocating only 4 symbols and
sharing them between curves that expected sole ownership. Thus
closing such a plot caused double delete and crashed the program.
I had changed some dialogs to local scoping for sake of memory management,
but that broke the feature for hide and select from MainWindow.
Re-implemented that using a signal/slot pair for control flow.
* Begin adding signal/slots for dialogs with mouse select
* Mark uses of <plotData>
* Include a "blank" xml file as a guide for coding valid sorpsim XML
* Corresponding to revised sorpsim XML, update all code for <plotData>
* Diagnose a bug related to re-selecting data for parametric plot
Also remove unused file pixmap.h from other sources
Also avoid problem in curvesetting. When list item is deleted, the
currentRowChanged signal is fired and received before the row is gone.
So need to double check if the curve still exists.
Fixed copy-paste problem that had resulted in accessing nodes that don't
exist
And remove unused pixmap.h from project file
If deployed with MSVC compiler without CONFIG += console, solver does
not work, and other issues may arise.
* Cleaned up plotselect to be consistent with sceneActionIndex pattern,
  and add necessary signals/slots
* Streamline loops and access for lists in XML
* Convert tags like <table_1> to <table title="table_1"> for valid XML
  (and fix usage)
* Stop neglecting to write custom curve data in property plot
Try to be a little more object-oriented, and add a bit documentation
@nfette
Copy link
Author

nfette commented Jan 24, 2018

Just as a warning, the new code will not be able to read tables and plots created with the previous code due to a change in XML usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant