Hi,
You can use QDir::exists() to check if removable storage drive is available. Typically the memory card (or flash drive) is E:\ on Symbian/S60 devices, but there may be some exceptions. If you want to play it safe then consider using QSystemStorageInfo from Qt Mobility.
Deleting application-created files on uninstall: Easy if the exact path of the file is already known at install-time. Add a 'filenull' deployment as follows:
Code:
uid3 = $$lower($${TARGET.UID3})
dbfile.pkg_postrules = "\"\" - \"e:/private/$$replace(uid3, 0x, "")/$$DBFILENAME\", FN"
DEPLOYMENT += dbfile
- This will generate something like this into the pkg file:
Code:
"" - "e:/private/e12c410e/mydata.db", FN
This will mark the file to be removed during uninstall, if it exists. Repeat for any other drive(s) that the db file can be potentially created in, c:/ at least.
Edit: Actually the above is not even needed, if you create your db file in the application's private directory since it's removed at uninstall regardless if it's empty or not.. Anyway, the key is the FN (FILENULL) option, use it if you have the database in some other (unprotected) folder.