QFileSystemWatcher couldn't addPath

Hey guys,.

I know there are some other threads on this problem, but nothing has solved my problem:

I want to develop an existing application on a user interface and some headless.

I use QSettings communication.

A few days ago everything worked pretty well, but now the IDE say "make failure to add the path."

I use the same code in the user interface and the part without head

QSettings settings(author, appName);
settings.sync();

settingsWatcher = new QFileSystemWatcher(this);
settingsWatcher->addPath(settings.fileName());
qDebug() << "fileName(): " << settings.fileName();
qDebug() << "settingsWatcher: " << settingsWatcher->files();

In the user interface, I get ' name(): "/ accounts/1000/appdata/.../Roaming.conf"

in the part without a head, I get the exact same message.

In the interface of the settingsWatcher user can add the path / file-> I get "settingsWatcher:" / accounts/1000/.../Roaming.conf "

but in the part without a head, I settingsWatcher:)

I get: QFileSystemWatcher: cannot add paths: /accounts/1000/appdata/.../Roaming.conf

I gave the shared_permission, in fact I think that Yes:

My barFile

(RoamingService is the project without head)

    
        Roaming Service
        Qnx/Elf
        
        _sys_run_headless
        _sys_headless_nostop
        access_shared
    

I also tried settings.isWritable () in the part without head to check if the file really exists. -> 'true '.

Any idea?

During this time, I tried a few things.

My code in a simple way:

{Constructor()}

....

}

{handleInvoke()}

...

Notify();

...

}

Notify() {}

....

}

I tried to do a. addPath() in constructor() - does not work

Also tried. addPath() in handleInvoke() - work

I tried. addPath() in notify() - does not work - fixed: works

I also tried a QTimer::singleshot (1000, this, myAddPath())

with myAddPath() {}

. addPath()

}

doesn't work too

I thought that maybe the settingsWatcher or the .config is not "ready".

If someone has some advice, please let me now. Otherwise, I'll use my workaround.

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for