-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Library-layout fix GUI lag #1740
Library-layout fix GUI lag #1740
Conversation
The build fails because it does not find the method |
It looks like Travis is using an ancient version of Ubuntu stuck on Qt 5.2. Edit Travis' macOS builds are using Qt 5.11. I am not sure why those are failing, but it is not related to this PR. I attempted to fix that in #1722. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for continuing to work on this.
Please move all SQL code into a separate class. There should be zero SQL in GUI classes. Refer to #1304 for an example.
However there's a problem when adding tracks as the signal tracksAdded(QSet) from TrackDAO does not provide all the ids for the new added tracks and only a small subsample.
I can confirm that adding tracks to the tree is not working. I tried rescanning my library to add new tracks. While they appeared in the track table, they did not appear in the tree.
src/library/treeitem.h
Outdated
@@ -86,8 +86,8 @@ class TreeItem final { | |||
m_label = label; | |||
} | |||
|
|||
inline const QString& getLabel() const { | |||
count = getTrackCount(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not make commits that do not compile. This makes it more cumbersome to use git bisect
later. If you realize after you make a commit that it does not compile, use git commit --amend
or git rebase -i
to fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry I won't do it again
src/library/treeitem.h
Outdated
@@ -86,8 +86,8 @@ class TreeItem final { | |||
m_label = label; | |||
} | |||
|
|||
inline const QString& getLabel() const { | |||
count = getTrackCount(); | |||
inline const QString getLabel() const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why doesn't this return a reference anymore?
@@ -102,6 +102,14 @@ TreeItem* TreeItem::appendChild( | |||
return pChild; | |||
} | |||
|
|||
TreeItem*TreeItem::insertChild(int row, const QString& label, const QVariant& data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"TreeItem*TreeItem::insertChild"? Does this commit compile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am amazed that this does compile in fact. I will check it again and "fix" it just to avoid possible problems.
Ubuntu Trusty, supported until April 2019 has Qt5.2. The libraryredesign release 2.3 is scheduled for 2019-03-31 so I am afraid we should head for a alternative solution. I propose to add a wrapper into util/compatibility.h and re-implement the function |
Supported by Canonical, which is a company that pays people to continue to backport critical fixes to old packages. Applications have zero obligation to ensure their new versions work on old operating systems, nor is this common practice. Qt 5.2 was released in December 2013. Following the logic that new versions of Mixxx must support the oldest OS supported by Canonical, Mixxx cannot use new Qt features until 6 years after they have been released! I find that ridiculous. This isn't even what Canonical does. They don't ship major new versions of applications for LTS releases; they only make minimal fixes. Ubuntu's Trusty repositories still ship Mixxx 1.10.1.
No. Qt has already implemented the function. We should not duplicate code. It is not applications' responsibility to overcompensate for a users' out of date system. |
From Ubuntu's LTS policy:
This is the opposite of new Mixxx releases, which are focused on providing new features for use on personal laptops. |
In the history of Mixxx we have always supported all supported Ubuntu version if possible with reasonable effort. |
Ok, I will move the code as soon as I can work on it again (until August) Regarding the Qt issue I think that we should discuss it in the mailing list or Zulip and decide in a Qt version for the next release. |
This might be get ripped off by the package maintainer. Here It is IMHO straight forward to backport the Qt 5.6 function. No need to ditch Xenial compatibility here. |
Zulip discussion: https://mixxx.zulipchat.com/#narrow/stream/109171-development/topic/minimum.20requirements.20policy
And here we are publishing our first Qt5 release as upstream is starting to plan for Qt6.
Okay thank you. I recognize that will take a lot of work. It doesn't necessarily have to be done in this pull request. We'll never get database transactions out of the GUI thread or move to QML with such tight coupling of GUI classes and SQL code.
Statically linking a small library may be reasonable, but Qt is huge. |
Did you |
FYI, because of this PR I built https://github.com/nikmartin/mixxxLibraryBuilder to build a large library of very small tagged, valid mp3 files to test this branch with. A 1,000,000 mp3 library is only .5gb |
This PR is marked as stale because it has been open 90 days with no activity. |
The minimum requirements issue should have fixed itself by now. This this PR still relevant or should we close this? |
The target branch is stale and unmergable IIRC due to major perfomrmance issues. |
Fix bug re-introduced in #1714
However there's a problem when adding tracks as the signal
tracksAdded(QSet<TrackId>)
fromTrackDAO
does not provide all the ids for the new added tracks and only a small subsample.Does anyone have an idea of why this may happen? Am I using the proper signal to see if new tracks have been added?