File tree 2 files changed +25
-0
lines changed
crates/qt-build-utils/src
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
18
19
19
- ` QDateTime ` API to use ` current_date_time ` rather than ` current_date `
20
20
21
+ ### Fixed
22
+
23
+ - ` qrc ` resources added to ` CxxQtBuilder ` or ` QtBuild ` now trigger ` cargo:rerun-if-changed ` for file entries
24
+
21
25
## [ 0.5.0] ( https://github.com/KDAB/cxx-qt/compare/v0.4.1...v0.5.0 ) - 2023-03-08
22
26
23
27
## Added
Original file line number Diff line number Diff line change @@ -630,6 +630,27 @@ Q_IMPORT_PLUGIN({plugin_class_name});
630
630
) ;
631
631
}
632
632
633
+ // Add the qrc file contents to the cargo rerun list
634
+ let cmd_list = Command :: new ( self . rcc_executable . as_ref ( ) . unwrap ( ) )
635
+ . args ( [ "--list" , input_path. to_str ( ) . unwrap ( ) ] )
636
+ . output ( )
637
+ . unwrap_or_else ( |_| panic ! ( "rcc --list failed for {}" , input_path. display( ) ) ) ;
638
+
639
+ if !cmd_list. status . success ( ) {
640
+ panic ! (
641
+ "rcc --list failed for {}:\n {}" ,
642
+ input_path. display( ) ,
643
+ String :: from_utf8_lossy( & cmd. stderr)
644
+ ) ;
645
+ }
646
+
647
+ for path in String :: from_utf8_lossy ( & cmd_list. stdout )
648
+ . split ( '\n' )
649
+ . map ( PathBuf :: from)
650
+ {
651
+ println ! ( "cargo:rerun-if-changed={}" , path. display( ) ) ;
652
+ }
653
+
633
654
output_path
634
655
}
635
656
}
You can’t perform that action at this time.
0 commit comments