[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [PATCH] KSaveFile::abort() on win32
From: Jaroslaw Staniek <js () iidea ! pl>
Date: 2005-03-30 20:31:56
Message-ID: 424B1B17.2020909 () iidea ! pl
[Download RAW message or body]
> On Wednesday 30 March 2005 08:58, Jarosław Staniek wrote:
>
>>For win32: close is required _before_ unlinking.
>>
>>ok?
>
>
> IMHO this is exactly the style of patch that should be avoided while porting
> to a platform. doubly so for one that does things as differently as win32
> from the rest of our target platforms.
>
> instead of creating a mess of #if's that turn a clear two line method into 11
> lines of spaghetti, can we instead just have two separate code paths? e.g.:
>
> KSaveFile::abort()
> {
> #ifdef Q_WS_WIN
> //for win32: close before unlinking
> mTempFile.close();
> if (!mTempFile.name().isEmpty())
> QFile::remove(mTempFile.name());
> #else
> mTempFile.unlink();
> mTempFile.close();
> #endif
> }
ok, why not
--
regards / pozdrawiam,
Jaroslaw Staniek / OpenOffice Polska / Kexi Team
http://www.openoffice.com.pl | http://www.kexi-project.org
KDElibs/Windows: http://wiki.kde.org/tiki-index.php?page=KDElibs+for+win32
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic