Closed cyng93 closed 8 years ago
Notification::notifyImportCompleted
is signaled twice for unknown reason, maybe just add a blocking condition when result == 1 && imported == 0
is enough.DO provide screenshots for UI changes, before & after.
I remove all entries before import "chewing.json", and here's the screenshot after I imported.
- Before:
- After:
Not sure if this kind of screenshot are the one I should attached, let me know if it's not and I'll try to fix it.
It's 2016 already, who uses Qt built-in styles? this workaround is not preferable.
In the new commit, i use a counter to avoid double trigger, please check.
This issue is not in windows. I confirm in linux.
By linux, does it mean all linux distro are having this isuse, or particular on Ubuntu?
Notification::notifyImportCompleted is signaled twice for unknown reason, maybe just add a blocking condition when result == 1 && imported == 0 is enough.
Thanks for the advice! It's really useful.
In the new commit, i use a counter to avoid double trigger, please check.
still... a counter is too much IMO.
By linux, does it mean all linux distro are having this isuse, or particular on Ubuntu?
I only tested on my setup which is archLinux + cinnamon DE + Qt 5.5.1.
Thanks for the advice! It's really useful.
Really, it's more than just an advice, I hope you implement it (if it really works).
BTW, you use markdown quote mark in an exact inverse way...
please do a git rebase.
DO NOT commit .swp
files.
IMO, you can delete https://github.com/chewing/chewing-editor/pull/126/commits/56cd2e9ce41441c8cf52f402d204d66dc8fcc979 directly to avoid reverting it. @Chocobo1 did I say right?
@cyng93
at the time I typing this, I see this PR is messed up.
you'll have to know how to use git
effectively, especially these: branch, rebase, revert.
please take your time and fix it properly.
Please use git rebase -i
to rework your changes.
@cyng93 : Can you perform git rebase
?
Sorry guys for the messy PR as this was my first time handling with all these collaborating work. I am still confuse with some stuff and looking forward for some sort of explanation. First of all, is this PR still mess out in other stuff other than the swp files is included? If the problem is with the swp files, couldn't I just removed the files and push another commit?
DO NOT commit .swp files. IMO, you can delete 56cd2e9 directly to avoid reverting it. Chocobo1 did I say right?
@david50407 I could understand why deleting https://github.com/chewing/chewing-editor/pull/126/commits/56cd2e9ce41441c8cf52f402d204d66dc8fcc979 is an option, as those *swp files was added in https://github.com/chewing/chewing-editor/pull/126/commits/e50861f4450f086d80ba4d5f02156911ca0b4c54.
Please use git rebase -i to rework your changes.
@jserv I had done a git rebase before, so what is the purpose for doing it again? Am I doing it in the wrong way or you're expecting me to solve the *swp file problem using a git rebase?
Sorry again if stupid question was asked, thought asking you guys might be a better options instead of digging around in stackoverflow without understanding what the question I am facing.
@cyng93 : You have to rebase upon the latest GIT commit (so-called "HEAD") of master
branch.
Reference: https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request
@cyng93
Some short instructions, you were doing changes on your local master
branch, this increases the difficulty of rebasing operations (for git beginners):
master_tmp
to track upstream master branch (i.e. this repo master
branch).master
branch to just contain the changes/commits you intended.master
branch, run git rebase master_tmp
master
branch, git push -f
hope this is clear.
@david50407 I could understand why deleting 56cd2e9 is an option, as those *swp files was added in e50861f.
@cyng93 these are different things, in https://github.com/chewing/chewing-editor/pull/126/commits/56cd2e9ce41441c8cf52f402d204d66dc8fcc979 commited
fileDialog_->setOption(QFileDialog::DontUseNativeDialog, true);
for qt dialog, but immediately removed in https://github.com/chewing/chewing-editor/pull/126/commits/e50861f4450f086d80ba4d5f02156911ca0b4c54
I mean, https://github.com/chewing/chewing-editor/pull/126/commits/56cd2e9ce41441c8cf52f402d204d66dc8fcc979 can be removed to avoid reverting changes in https://github.com/chewing/chewing-editor/pull/126/commits/e50861f4450f086d80ba4d5f02156911ca0b4c54
First of all, is this PR still mess out in other stuff other than the swp files is included? If the problem is with the swp files, couldn't I just removed the files and push another commit?
*swp files usually used for vim (or other editor) temporary files, not related to this project. If you add these in a commit and remove them in another commit, they still in the history.
Before we merge into master
, we have to make sure this PR or changes are clean, or the history will be a mess.
@cyng93 : Alternately, you can switch to a new branch and re-do the changes
@cyng93 : I reworked your patch into file fix.zip. Here are the instructions:
$ cd /tmp
$ unzip fix.zip
$ git clone git@github.com:cyng93/chewing-editor.git
$ cd chewing-editor
$ git remote add upstream https://github.com/chewing/chewing-editor.git
$ git fetch upstream
$ git reset --hard 3fe8357c70e1632c1418e83f93fed7d6d4f3b799
$ git rebase upstream/master
$ git am -s /tmp/0001-fix-for-showing-correct-import-count-when-import-suc.patch
When the above is ready, use git commit --amend
to improve the git commit messages and git push --force
to override the submitted changes.
@cyng93 If this patch can fix #49 , you can append "Close #49" in the GIT commit messages.
@cyng93 You didn't rebase to latest upstream HEAD. You have to do again.
$ git fetch upstream
$ git rebase upstream/master
@jserv , noted ! I'll fixed them. Sorry for making all these notification, perhaps I should try all these things in a new branch first.
@cyng93 : The latest patch looks much better. However, can you improve the English expressions in GIT commit messages? Please read this article How to Write a Git Commit Message again.
@cyng93 : Limit the subject line to 50 characters! Subject line is the first one in GIT commit messages.
@cyng93 : Your GIT commit messages are less elastic. Please read How to Write a Git Commit Message. The subject should contain no issue number. Instead, put "Close #???" in the third line.
In addition, you should not mention "Linux" since chewing-editor is a portable program. Your changes are not platform-dependent.
@jserv noted, but how could I modify the commit message?
Should I use the trick git reset --hard 3fe8357c70e1632c1418e83f93fed7d6d4f3b799
you've mentioned previously again ?
I mentioned "Linux" because AFAIK, this bug only occur on Linux.
@cyng93 Use git commit --amend
to rework the commit messages.
You should analyze the issue and distinguish in order to verify that it is common for POSIX compatible platforms or just Linux specific.
@jserv, I spend some time trying to reproduce the bug on other platform, trying to figure out what really cause this bug. The answer is still remain unclear, but I thought someone might be able to come out with somethings so I decided to post the result out first.
For every platform below, I import chewing.json.zip directly after the program was built and check if the bug appeared. Below are the result:
Freebsd
Linux
As far as I could tell, I don't think that this bug is related to Linux as not every desktop environment of Debian (7-9) above has the bug appeared on them.
@cyng93 : Thanks for clarifying this issue. Appending to GIT commit messages, you can make a summary for known combination of software packages where this patch can resolve.
@cyng93 : I merged your contribution, then we can rework/refactor later.
fix, or probably workaround for issue #49. not sure if this happen only on Ubuntu or other distro are also having the same issue, but not using native file dialog seems to fix the problem in Ubuntu.
References: https://bugreports.qt.io/browse/QTBUG-38985, http://forum.qt.io/topic/41356/qfiledialog-signal-fileselected-is-triggered-twice-for-one-user-choice-changed-in-recent-qt/2