<table><tr><td style="">poboiko added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29291">View Revision</a></tr></table><br /><div><div><p><a href="https://phabricator.kde.org/p/dvratil/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@dvratil</a>: actually, there is an issue with saving on exit. Inside <tt style="background: #ebebeb; font-size: 13px;">KJotsEdit::savePage</tt> we actually ask <tt style="background: #ebebeb; font-size: 13px;">ETM</tt> to do the saving, which starts an async job.<br />
However, if we do it when quitting, we tend to quit *before* the job dispatches, and lose unsaved changes :(</p>

<p>Is there a way to overcome this using <tt style="background: #ebebeb; font-size: 13px;">ETM</tt>? Or should I just start <tt style="background: #ebebeb; font-size: 13px;">ItemModifyJob</tt> by hand using non-async interface <tt style="background: #ebebeb; font-size: 13px;">job->exec()</tt> here? <br />
(actually, some feedback would probably be nice even when user presses <tt style="background: #ebebeb; font-size: 13px;">Ctrl+S</tt>. E.g. change the cursor to "busy" one, or notify if there was an error and suggest to save it as a local file somewhere, etc...)</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R573 KJots</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29291">https://phabricator.kde.org/D29291</a></div></div><br /><div><strong>To: </strong>poboiko, dvratil<br /><strong>Cc: </strong>kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>