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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library editor: Refactor all table widgets using Qt's model/view framework #456

Merged
merged 13 commits into from Jun 6, 2019

Conversation

@ubruhin
Copy link
Member

@ubruhin ubruhin commented May 26, 2019

In the library editor there are many table widgets, and most of them have several issues (missing sort functionality, not updated when underlying data changed, buggy, ...). This PR completely refactors all these tables by using Qt's model/view framework. This way the code is much more clean and less error prone, and features like sorted tables are much easier to implement.

In particular, this change improves following things:

  • Fix application crashes with newer Qt versions when editing table content
  • Fix possibly outdated table content when underlying data changes (e.g. on undo/redo)
  • Sort tables where reasonable (some tables even allow the user to sort by specific column)
  • Slightly improved error handling when entering invalid data into table cells
  • In some tables, allow inserting multiple rows at once (e.g. the term "1..5" creates 5 rows, from "1" to "5")
  • Various other small improvements

Due to the huge refactoring, of course there is a small risk that it introduces new issues, so testers would be very welcome 馃槈

Fixes #225
Fixes #275
Fixes #446

@ubruhin ubruhin added this to the 0.1.2 milestone May 26, 2019
@ubruhin ubruhin self-assigned this May 26, 2019
@ubruhin ubruhin changed the title Library editor: Refactor all table widgets using Qt's mode/view framework Library editor: Refactor all table widgets using Qt's model/view framework May 26, 2019
@ubruhin ubruhin force-pushed the use-model-view-for-tables branch from 24b4896 to 5f88510 May 27, 2019
@ubruhin ubruhin added this to In Progress in Improve software architecture May 27, 2019
@ubruhin ubruhin added this to In Progress in Improve user experience of GUI May 27, 2019
@ubruhin
Copy link
Member Author

@ubruhin ubruhin commented May 28, 2019

F*ck, the macOS jobs reached the maximum build time on Travis-CI 馃槶

The job exceeded the maximum time limit for jobs, and has been terminated.

EDIT: Fixed in #458

@ubruhin ubruhin force-pushed the use-model-view-for-tables branch from 5f88510 to 7465840 Jun 6, 2019
@ubruhin ubruhin merged commit 1ed0826 into master Jun 6, 2019
10 checks passed
@ubruhin ubruhin deleted the use-model-view-for-tables branch Jun 6, 2019
@ubruhin ubruhin moved this from In Progress to Done in Improve user experience of GUI Jun 6, 2019
@ubruhin ubruhin moved this from In Progress to Done in Improve software architecture Jun 6, 2019
ubruhin added a commit that referenced this issue Jul 8, 2019
Library editor: Refactor all table widgets using Qt's model/view framework
(cherry picked from commit 1ed0826)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment