Trolltech Home | Qt-solutions Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-solutions Archive, April 2006
Not clear on the capabilities of QtLockedFile


Message 1 in thread

The documentation of QtLockedFile is a bit thin. It doesn't even mention 
that it is inherited from QFile!

I want to be able to prevent 2 clients on separate machines writing to a 
file on a shared drive. Is that possible? If so, how does one deal with 
the fact that the file may have a different path (and therefore a 
different semaphone name) when accessed from different machines?

thanks in advance

Andy Brice
http://www.perfecttableplan.com



--
 [ signature omitted ] 

Message 2 in thread

Hi,

> The documentation of QtLockedFile is a bit thin. It doesn't even mention 
> that it is inherited from QFile!

The documentation starts with:
	The QtLockedFile class extends QFile with advisory locking
	functions.
	#include <QtLockedFile>
	Inherits QFile.

http://doc.trolltech.com/solutions/4/qtlockedfile/qtlockedfile.html


--
 [ signature omitted ] 

Message 3 in thread

Dimitri wrote:
> Hi,
> 
>> The documentation of QtLockedFile is a bit thin. It doesn't even 
>> mention that it is inherited from QFile!
> 
> 
> The documentation starts with:
>     The QtLockedFile class extends QFile with advisory locking
>     functions.
>     #include <QtLockedFile>
>     Inherits QFile.
> 
> http://doc.trolltech.com/solutions/4/qtlockedfile/qtlockedfile.html

I was looking at:
http://doc.trolltech.com/solutions/3/qtlockedfile/qtlockedfile.html
where the inheritance doesn't seem to get a mention.

best regards

Andy Brice
http://www.perfecttableplan.com

--
 [ signature omitted ] 

Message 4 in thread

Andy Brice <andy@xxxxxxxxxxxxxxx>
>
> I was looking at:
> http://doc.trolltech.com/solutions/3/qtlockedfile/qtlockedfile.html
> where the inheritance doesn't seem to get a mention.


Unfortunately, the doc system of Qt 3 (in contrast to Qt 4's) doesn't
easily let us generate inheritance pointers and other crosslinks into
the Qt doc from the Solutions documentation.

> I want to be able to prevent 2 clients on separate machines writing to
> a file on a shared drive. Is that possible? If so, how does one deal
> with the fact that the file may have a different path (and therefore a
> different semaphone name) when accessed from different machines?

I'm afraid QtLockedFile does not support the situation of accessing
the same file from different machines.


- Eirik Aa.

--
 [ signature omitted ]