Created
February 14, 2017 08:01
-
-
Save yuriks/92b0ae4badab745eaffb39e6b8758b63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds the game list folder to the QFileSystemWatcher to check for updates. | |
* | |
* The file watcher will fire off an update to the game list when a change is detected in the | |
* game list folder. | |
* | |
* Notice: This method is run on the UI thread because QFileSystemWatcher is not thread safe | |
* and this function is fast enough to not stall the UI thread. If performance is an issue, it | |
* should be moved to another thread and properly locked to prevent concurrency issues. | |
* | |
* @param dir folder to check for changes in | |
* @param recursion 0 if recursion is disabled. Any positive number passed to this will add each | |
* directory recursively to the watcher and will update the file list if any of the folders | |
* change. The number determines how deep the recursion should traverse. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment