Re: Create backup file when writing new xml file?

2014-02-17 Thread Lubomir I. Ivanov
On 17 February 2014 05:52, Thiago Macieira thi...@macieira.org wrote: Em dom 16 fev 2014, às 17:35:57, Thiago Macieira escreveu: Uh... I realise that the question might be about string comparisons. Since we're talking about filenames here, it actually bears the question of what the filesystem

Re: Add main menu recent files

2014-02-17 Thread Mcl
On 02/14/2014 05:32 PM, Dirk Hohndel wrote: That is a good idea, Joseph. I have included a patch to hide failed parses from the recent files list. -- Joshua Wambua From a4ead61d68f58f1be8ee44aaf174dab3aa727552 Mon Sep 17 00:00:00

Re: Create backup file when writing new xml file?

2014-02-17 Thread David Faure
On Sunday 16 February 2014 19:52:36 Thiago Macieira wrote: The simplest operation is to write to a temp file, then rename the original to the backup name, then rename the temp to the original name. However, what happens if the application crashes between renames? You've got a temp and a

fair warning - white space changes are coming

2014-02-17 Thread Dirk Hohndel
If you have any outstanding patches, those might become a little harder to apply as I will be running my coding style / whitespace tool over the sources in the next few hours. Please let me know if that's an issue for you. I'm reasonably certain that I can actually make it work if you send me

Re: Create backup file when writing new xml file?

2014-02-17 Thread Linus Torvalds
On Sun, Feb 16, 2014 at 5:35 PM, Thiago Macieira thi...@kde.org wrote: Instead, I'd recommend that save_backup not take as a parameter the recommended extension. Simply remove the part after the ending dot, whatever it might be, and replace it with .bak. I guess I would be ok with that, or

Re: Create backup file when writing new xml file?

2014-02-17 Thread Linus Torvalds
On Sun, Feb 16, 2014 at 7:52 PM, Thiago Macieira thi...@macieira.org wrote: So, my next attempt is to hardlink the original to the backup name, then rename the temp file to the original name. Since link(2) doesn't overwrite like rename(2) does, I'd need to unlink(2) the backup name before.

[PATCH] Fix missing air temp on divelogs.de export

2014-02-17 Thread Miika Turkia
Fixes #439 Signed-off-by: Miika Turkia miika.tur...@gmail.com --- xslt/divelogs-export.xslt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt index cbca51d..cfd0f4c 100644 --- a/xslt/divelogs-export.xslt +++

Beginning of the 'Context Menu' on the new profile

2014-02-17 Thread Tomaz Canabrava
With the Gas Change Event working, the rest's not yet. :) From 77de8cfef44038a122bd1bf72abefd2f8b6940df Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava tomaz.canabr...@intel.com Date: Mon, 17 Feb 2014 19:09:06 -0300 Subject: [PATCH] Make part of the Context Menu work ( Gas Change Event ) The code

Re: Create backup file when writing new xml file?

2014-02-17 Thread Thiago Macieira
Em seg 17 fev 2014, às 10:42:44, David Faure escreveu: On Sunday 16 February 2014 19:52:36 Thiago Macieira wrote: The simplest operation is to write to a temp file, then rename the original to the backup name, then rename the temp to the original name. However, what happens if the

Re: Create backup file when writing new xml file?

2014-02-17 Thread Thiago Macieira
Em seg 17 fev 2014, às 15:38:57, Lubomir I. Ivanov escreveu: can't comment much on the QSaveFile ideas, but MINGW / MSVRT doesn't have: - link() (it does have unlink(), though which is deprecated for _unlink() and _wunlink()) - linkat() - flock() as these are POSIX and technically Windows

latest master

2014-02-17 Thread Dirk Hohndel
This does not include the promised whitespace overhaul. Instead I added a few outstanding patches and went down the rabbit hole of trying to track down a crash with Robert's image shift patches. Here's how I can reliably reproduce this. Open a dive log in Subsurface - one of the test dives will

Re: Create backup file when writing new xml file?

2014-02-17 Thread Linus Torvalds
On Mon, Feb 17, 2014 at 2:54 PM, Thiago Macieira thi...@macieira.org wrote: Let me see if I understand: 1) create temp file 2) write data to it 3) fsync 4) link backup to backup^2 5) rename $ORIG to backup No. You can't do (5) as a rename. You need to do it as a link(), because the

Re: latest master

2014-02-17 Thread Tomaz Canabrava
On Mon, Feb 17, 2014 at 7:57 PM, Dirk Hohndel d...@hohndel.org wrote: This does not include the promised whitespace overhaul. Instead I added a few outstanding patches and went down the rabbit hole of trying to track down a crash with Robert's image shift patches. Here's how I can reliably

Re: latest master

2014-02-17 Thread Dirk Hohndel
On Mon, 2014-02-17 at 23:34 -0300, Tomaz Canabrava wrote: On Mon, Feb 17, 2014 at 7:57 PM, Dirk Hohndel d...@hohndel.org wrote: This does not include the promised whitespace overhaul. Instead I added a few outstanding patches and went down the rabbit

Re: latest master

2014-02-17 Thread Boris Barbulovski
I'll try to debug this too. On Tue, Feb 18, 2014 at 3:41 AM, Dirk Hohndel d...@hohndel.org wrote: On Mon, 2014-02-17 at 23:34 -0300, Tomaz Canabrava wrote: On Mon, Feb 17, 2014 at 7:57 PM, Dirk Hohndel d...@hohndel.org wrote: This does not include the promised whitespace

[PATCH 2/2] Use DateTimeOriginal on image import

2014-02-17 Thread Miika Turkia
Some digital cameras do not set the DateTime exif field bat use DateTimeOriginal. If the first option is not found, use the second one to try to detect the moment when the image was shot. Signed-off-by: Miika Turkia miika.tur...@gmail.com --- qt-ui/simplewidgets.cpp | 5 - 1 file changed, 4