Problem on saving the progress of a document

Bug #1015094 reported by Nikos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Notepadqq [MOVED TO GITHUB]
Fix Released
High
Justin Kinnaird

Bug Description

On version 0.13.10 when you save the progress of a document sometimes everything its ok(the red icon turns blue and the doc is been saved),but the most of the times after saving an alert box appears saying:
"The document "..." has ben modified.Do you want to reload it?etc...".
There is no need for alert box in this situation,but even if this is the policy,there is a problem too,as you have to push the button "reload" at least twice so you could continue your task.

Revision history for this message
Daniel Di Sarli (danieleds0) wrote :

That's a bug.
It should be absent in the complete rewrite of notepadqq (git).

The problem seems to be the QFileSystemWatcher, which somehow doesn't get disabled at the right time.

Changed in notepadqq:
status: New → Confirmed
Revision history for this message
Justin Kinnaird (teklad) wrote :

Apparently events are getting queued up in the background during the save process and firing upon the file watcher becoming re-enabled. There are a few ways to handle this, such as:
- Still emit signal from internFileChanged, but throw away when we reach mainWindow's fileChanged function.
- Remove the path being watched upon the file watcher becoming disabled and vice versa.
- Disconnect event/signal handles until saving is completed entirely.

I'm not 100% sure which one we would prefer here, but it is likely that disconnecting the signal all together might be the best approach, but I've been wrong before.

The other two options are just as effective, in either case.

Justin Kinnaird (teklad)
Changed in notepadqq:
status: Confirmed → Fix Committed
importance: Undecided → High
assignee: nobody → Justin Kinnaird (teklad)
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.