mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Re-add new
constructor functions for ComponentCompiler and CompilerConfiguration
Amends commit dc51d4ccda
As discussed in #310
This commit is contained in:
parent
dc51d4ccda
commit
6e12b00b3f
2 changed files with 10 additions and 0 deletions
|
@ -72,6 +72,11 @@ impl Default for CompilerConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CompilerConfiguration {
|
impl CompilerConfiguration {
|
||||||
|
/// Creates a new default configuration.
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Self::default()
|
||||||
|
}
|
||||||
|
|
||||||
/// Create a new configuration that includes sets the include paths used for looking up
|
/// Create a new configuration that includes sets the include paths used for looking up
|
||||||
/// `.60` imports to the specified vector of paths.
|
/// `.60` imports to the specified vector of paths.
|
||||||
pub fn with_include_paths(self, include_paths: Vec<std::path::PathBuf>) -> Self {
|
pub fn with_include_paths(self, include_paths: Vec<std::path::PathBuf>) -> Self {
|
||||||
|
|
|
@ -430,6 +430,11 @@ impl Default for ComponentCompiler {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ComponentCompiler {
|
impl ComponentCompiler {
|
||||||
|
/// Returns a new ComponentCompiler.
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Self::default()
|
||||||
|
}
|
||||||
|
|
||||||
/// Sets the include paths used for looking up `.60` imports to the specified vector of paths.
|
/// Sets the include paths used for looking up `.60` imports to the specified vector of paths.
|
||||||
pub fn set_include_paths(&mut self, include_paths: Vec<std::path::PathBuf>) {
|
pub fn set_include_paths(&mut self, include_paths: Vec<std::path::PathBuf>) {
|
||||||
self.config.include_paths = include_paths;
|
self.config.include_paths = include_paths;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue