PDA

View Full Version : How can I watch for changing current directory?



UASlaX
6th September 2011, 10:45
Hello,

I need to watch for changing current directory, when someone changed current directory of application. I found QFileSystemWatcher, but it can only watch for changes in current directory.

Thanks in advance.

wysota
6th September 2011, 11:27
How can someone change the current directory behind your back? I don't think there are any facilities for monitoring the current working directory.

UASlaX
6th September 2011, 11:46
We write the plugin system. Any plug-in can execute Qt::setCurrent, and other plug-ins need to respond of this event.

wysota
6th September 2011, 13:48
Wrap the call into your own call and let the plugins only use your call instead of the one that directly changes the current directory.

UASlaX
6th September 2011, 15:05
Wrap the call into your own call and let the plugins only use your call instead of the one that directly changes the current directory.
I already have internal function for set current directory. Some developers, sometimes, use setCurrent from Qt. I would use qt events and convert them in our events, when someone use not my function for change directory. Thanks, I understood, It's impossible with Qt.