-
Notifications
You must be signed in to change notification settings - Fork 134
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
FancyMenu: support favorites reordening by drag drop #2013
FancyMenu: support favorites reordening by drag drop #2013
Conversation
24a1bda
to
4634f3f
Compare
Well actually we could reuse |
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.
Not sure if I missed something, but I can't DND favorites.
I haven't started to review this PR because I've found a serious issue with DNDing items from Fancy Menu into PCManFM-Qt under Wayland (haven't tried X11). As I should first see where the cause is (Qt5, Qt in general, or just Fancy Menu?), I have to delay the review for a while. I'll report it when I find the time to investigate it but, IMO, fixing it has priority. |
OK, I tested under X11: there's also a problem there, with the same cause but a slightly different effect. The cause is that Fancy Menu isn't closed on DNDing; the effect is that the focus is locked by Fancy Menu, until somewhere is clicked. I emphasize that this issue exits in the git source (and so, not related to the current PR). |
return mimeData; | ||
} | ||
|
||
bool LXQtFancyMenuAppModel::dropMimeData(const QMimeData *data_, Qt::DropAction action, | ||
int row, int column, const QModelIndex &p) |
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 comment out unused variables like this:
bool LXQtFancyMenuAppModel::dropMimeData(const QMimeData *data_, Qt::DropAction /*action*/,
int row, int /*column*/, const QModelIndex &p)
In addition to the above reviews, please make sure you've checked that old and new rows/positions are always valid, i.e., they are greater than -1 and less than the number of items. You could ignore this comment if you've already done it (I didn't check). |
Well I've read Qt default implementation and |
Yes, that's better;
I just meant safeguards against crashes. If no crash can happen, this is OK, especially after the removal of |
Looks working fine now at first test. |
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.
The PR looks OK to me.
The code has a minor problem that isn't related to this PR: the list of favorites in ~/.config/lxqt/panel.conf
may be much longer than their real size. This doesn't affect the user but, IMO, the list should be edited too. @gfgit, please fix it in another PR, after this is merged.
@stefonarch |
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.
Works without issues, thanks!
Closes #1988