Skip to content

Add gio::FileMonitor subclass #1725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2025

Conversation

fbrouille
Copy link
Contributor

Allow custom implementation of gio::FileMonitor

@fbrouille fbrouille force-pushed the gio_file_monitor_subclass branch from 8832317 to 1eeecbb Compare May 22, 2025 16:08
@@ -0,0 +1,162 @@
// Take a look at the license at the top of the repository in the LICENSE file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and elsewhere, why do you provide these tests as external integration tests instead of just as part of the implementation? The latter is faster compilation-wise

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because in #1676, tests for File and for FileEnumerator share some test utilities... Do you have an idea to do it within unit tests ?
Anyway tests for FileMonitor and for Vfs does not share test utilities so I'll move them as unit tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add a src/test_utils.rs module or so that is only included with #[cfg(test)]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do for other types (File, FileEnumerator)

@fbrouille fbrouille force-pushed the gio_file_monitor_subclass branch 3 times, most recently from 99e752d to 19dca51 Compare May 23, 2025 20:33
@sdroege
Copy link
Member

sdroege commented May 25, 2025

Also looks good to me except for the two open discussions

@fbrouille fbrouille force-pushed the gio_file_monitor_subclass branch from 49acacd to e361652 Compare May 28, 2025 17:58
Signed-off-by: fbrouille <fbrouille@users.noreply.github.com>
@fbrouille fbrouille force-pushed the gio_file_monitor_subclass branch from e361652 to a34c1c4 Compare May 28, 2025 18:37
@sdroege sdroege merged commit 63875ab into gtk-rs:main May 29, 2025
48 checks passed
@fbrouille fbrouille deleted the gio_file_monitor_subclass branch May 29, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants