Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Thiago Macieira
On sexta-feira, 3 de junho de 2016 15:49:29 BRT Etienne Sandré-Chardonnal wrote: > The issue with file locking, is every OS does not have a system-wide > user-writable standard folder. There is /tmp on linux/unix which is > standard, but AFAIK windows only has per-user temporary file, and system >

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Thiago Macieira
On sexta-feira, 3 de junho de 2016 15:52:47 BRT Etienne Sandré-Chardonnal wrote: > By the way, is there any reason not having a kind of tryLock in > QSystemSemaphore? It's barely usable with an infinite lock One of two options: a) not possible to implement with all backends; or b) no one thoug

Re: [Interest] Animate rotation at given speed, how to set direction?

2016-06-03 Thread Elvis Stansvik
2016-05-15 15:08 GMT+02:00 Elvis Stansvik : > Hi folks, > > With RotationAnimation I can control the direction of the rotation > (cw/ccw). But I'd like to animate rotation at a certain speed, using > SmoothedAnimation: > > Behavior on rotation { > SmoothedAnimation { >

Re: [Interest] Define map of static items in QML

2016-06-03 Thread Elvis Stansvik
2016-06-03 17:55 GMT+02:00 Elvis Stansvik : > Hi Alejandro, > > I realized I never got back to this and answered you, sorry about that. > > 2016-04-02 17:02 GMT+02:00 Alejandro Exojo : >> El Wednesday 30 March 2016, Elvis Stansvik escribió: >>> > not at all if that suit you for your key, it's all g

Re: [Interest] Define map of static items in QML

2016-06-03 Thread Elvis Stansvik
Hi Alejandro, I realized I never got back to this and answered you, sorry about that. 2016-04-02 17:02 GMT+02:00 Alejandro Exojo : > El Wednesday 30 March 2016, Elvis Stansvik escribió: >> > not at all if that suit you for your key, it's all good. objectname is >> > just a string property after a

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Murphy, Sean
> Thanks for all those suggestions. Of course there are platform specific > solutions, > but I'd like to keep the code 100% cross platform everywhere it's possible. > > The issue with file locking, is every OS does not have a system-wide > user-writable standard folder. > There is /tmp on linux/u

Re: [Interest] [Qt3D] Troubles to migrate to Qt5.7rc

2016-06-03 Thread Xavier Bigand
I finally found that the QFrameGraph class was renamed as QRenderSettings. And now I have the following error : No render surface selector found in frame graph I suspect that I need few new initialisation steps with Qt 5.7 2016-06-03 15:21 GMT+02:00 Xavier Bigand : > There is no more the class Q

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Etienne Sandré-Chardonnal
By the way, is there any reason not having a kind of tryLock in QSystemSemaphore? It's barely usable with an infinite lock 2016-06-03 15:49 GMT+02:00 André Somers : > > > Op 03/06/2016 om 15:26 schreef Nye: > > > > On Fri, Jun 3, 2016 at 4:23 PM, André Somers > wrote: > >> Windows tends to mess

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Etienne Sandré-Chardonnal
Dear all, Thanks for all those suggestions. Of course there are platform specific solutions, but I'd like to keep the code 100% cross platform everywhere it's possible. The issue with file locking, is every OS does not have a system-wide user-writable standard folder. There is /tmp on linux/unix

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread André Somers
Op 03/06/2016 om 15:26 schreef Nye: On Fri, Jun 3, 2016 at 4:23 PM, André Somers > wrote: Windows tends to mess with you here, applying the same kinds of tricks they introduced for the registry long ago to the file system now too. What tricks do

[Interest] qmake replace functions

2016-06-03 Thread Igor Mironchik
Hi, with Qt5 I can do like this: $$shell_path( $$absolute_path( $${OUT_PWD}/../../executable ) ) but in Qt4 there is no shell_path() and absolute_path() functions. So my question is it possible to do something similar with Qt4? Thank you. ___ Intere

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Nye
On Fri, Jun 3, 2016 at 4:23 PM, André Somers wrote: > Windows tends to mess with you here, applying the same kinds of tricks > they introduced for the registry long ago to the file system now too. What tricks do you mean? Perhaps I'm not up to date with the win API, but I don't remember somethi

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread André Somers
Op 03/06/2016 om 15:08 schreef Thiago Macieira: On sexta-feira, 3 de junho de 2016 11:40:31 BRT Etienne Sandré-Chardonnal wrote: Hi, I would like to detect if my application is already running from another user account and warn the user. Create a file in a public place (like /tmp) that indic

[Interest] [Qt3D] Troubles to migrate to Qt5.7rc

2016-06-03 Thread Xavier Bigand
There is no more the class QFrameGraph and I don't understand how I associate my techniqueFilter to the scene. I used to add the frameGraph as component to the rootEntity. I also have a segfault in textureimage.cpp and the following error in the application output : No renderer settings componen

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Jérôme Godbout
What about a pid file, check if process still alive, no matter the user that should work. On Fri, Jun 3, 2016 at 9:14 AM, Nye wrote: > Hello, > Yes, you are correct, I forgot all about that although I was thinking more > of a platform-specific solution. Also the class is somewhat inconvenient as

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Thiago Macieira
On sexta-feira, 3 de junho de 2016 16:05:29 BRT Igor Mironchik wrote: > I think that better to solve this task with shared memory... You can > look at the example in QtCreator sources (qtsingleapplication.cpp) singleapp applies only to one user. DO NOT use shared memory across users. You don't w

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Thiago Macieira
On sexta-feira, 3 de junho de 2016 11:40:31 BRT Etienne Sandré-Chardonnal wrote: > Hi, > > I would like to detect if my application is already running from another > user account and warn the user. Create a file in a public place (like /tmp) that indicates it's running. You can use a QLockFile,

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Nye
Hello, Yes, you are correct, I forgot all about that although I was thinking more of a platform-specific solution. Also the class is somewhat inconvenient as the behaviour is a bit different on Windows and *nix. You could try some platform-specific code handling it (e.g. Windows does allow for glo

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Igor Mironchik
Hi, I think that better to solve this task with shared memory... You can look at the example in QtCreator sources (qtsingleapplication.cpp) On 03.06.2016 15:54, Etienne Sandré-Chardonnal wrote: But how can I test if another app is already running with QSystemSemaphore? I can set a semaphore w

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Etienne Sandré-Chardonnal
But how can I test if another app is already running with QSystemSemaphore? I can set a semaphore with a single ressource (initial value = 1) and lock it, but there is a single method aquire() which blocks forever if the value is 0. So I can just make the second process freeze forever until the fir

Re: [Interest] Help parsing output of "mksquashfs" command

2016-06-03 Thread Elvis Stansvik
2016-06-03 12:32 GMT+02:00 Juan Navarro : > Hey Elvis, thank you for the tip. I'm convinced that this is the source of > the problem: the "output device" to which "mksquashfs" is writing, doesn't > show any number of "available columns" in my C++ code, thus it is probably > generating a progress ba

Re: [Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Nye
Hello, Have you tried a system semaphore? It should work in this case as far as I know. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest

Re: [Interest] Help parsing output of "mksquashfs" command

2016-06-03 Thread Juan Navarro
Hey Elvis, thank you for the tip. I'm convinced that this is the source of the problem: the "output device" to which "mksquashfs" is writing, doesn't show any number of "available columns" in my C++ code, thus it is probably generating a progress bar of length 0. With a pseudo terminal as you descr

[Interest] Detecting if the application is already running from another user account

2016-06-03 Thread Etienne Sandré-Chardonnal
Hi, I would like to detect if my application is already running from another user account and warn the user. I have tried QSharedMemory, but it seems that by design it is restricted to a user namespace. I can create two shared memory segments with the same key on the two user accounts and they wo