Skip to content

Commit 9de95ab

Browse files
committed
Code cleanup
1 parent 16aa724 commit 9de95ab

20 files changed

Lines changed: 40 additions & 150 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
.vscode/
2222
.idea/
2323
.zed/
24+
.opencode/
2425

2526
# Python cache directories from project scripts (e.g. scripts/l10n-report.py)
2627
**/__pycache__/

apps/linsync-gui/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ path = "src/main.rs"
1717
default = []
1818
cxxqt = ["dep:cxx", "dep:cxx-qt", "dep:cxx-qt-build", "dep:cxx-qt-lib", "dep:qt-build-utils"]
1919
cxxqt-app = ["cxxqt", "cxx-qt-lib/qt_gui", "cxx-qt-lib/qt_qml"]
20-
cxxqt-smoke = ["cxxqt"]
2120
test-support = []
2221
web-engine = ["linsync-core/web-engine"]
2322

@@ -73,6 +72,5 @@ cxx-qt-build = { version = "0.8.1", optional = true }
7372
qt-build-utils = { version = "0.8.1", optional = true }
7473

7574
[dev-dependencies]
76-
image = { workspace = true }
7775
sha2 = { workspace = true }
7876
tempfile = "3"

apps/linsync-gui/build.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@ fn main() {
2828
"qml/SessionsPage.qml",
2929
"qml/SettingsPage.qml",
3030
]);
31-
rust_sources.push("src/cxxqt_session.rs");
32-
}
33-
34-
if cfg!(feature = "cxxqt-smoke") {
35-
module = module.qml_file("qml/CxxQtSmoke.qml");
36-
rust_sources.push("src/cxxqt_smoke.rs");
31+
rust_sources.push("src/cxxqt_translator.rs");
3732
}
3833

3934
let mut builder = CxxQtBuilder::new_qml_module(module);

apps/linsync-gui/qml/CxxQtSmoke.qml

Lines changed: 0 additions & 8 deletions
This file was deleted.

apps/linsync-gui/src/bridge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4709,7 +4709,7 @@ pub(crate) fn run_cxxqt_host(
47094709
// No-op when no catalog matches the locale, so the English source strings
47104710
// remain. Must run before the engine loads QML so qsTr() resolves.
47114711
if let Some(i18n_dir) = qml_root.parent().map(|p| p.join("i18n")) {
4712-
let loaded = crate::cxxqt_session::ffi::linsync_install_translator(&QString::from(
4712+
let loaded = crate::cxxqt_translator::ffi::linsync_install_translator(&QString::from(
47134713
i18n_dir.to_string_lossy().as_ref(),
47144714
));
47154715
if loaded {

apps/linsync-gui/src/cxxqt_smoke.rs

Lines changed: 0 additions & 52 deletions
This file was deleted.

apps/linsync-gui/src/main.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ const GUI_TAB_SNAPSHOT_SCHEMA_VERSION: u32 = 1;
4040
const GUI_TABS_SNAPSHOT_KEY: &str = "gui_tabs_snapshot";
4141

4242
#[cfg(feature = "cxxqt-app")]
43-
mod cxxqt_session;
44-
#[cfg(feature = "cxxqt-smoke")]
45-
mod cxxqt_smoke;
43+
mod cxxqt_translator;
4644
#[cfg(feature = "cxxqt-app")]
4745
mod icon_theme;
4846

@@ -3919,7 +3917,6 @@ fn summary_item_string(label: &str, value: String) -> GuiSummaryItem {
39193917
}
39203918

39213919
mod bridge;
3922-
#[allow(unused_imports)]
39233920
pub(crate) use bridge::*;
39243921

39253922
#[cfg(test)]

crates/linsync-cli/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ serde_json.workspace = true
1616
[dev-dependencies]
1717
image = { workspace = true }
1818
tempfile = "3"
19-
serde_json = { workspace = true }

crates/linsync-core/src/archive.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ pub fn compare_builtin_archives_with_dirs<
9292
/// the folder compare engine over the extracted trees.
9393
///
9494
/// `TempDir` handles cleanup automatically when the returned result is dropped.
95+
#[cfg(test)]
9596
pub fn compare_builtin_archives<P: AsRef<Path>>(
9697
left: P,
9798
right: P,

0 commit comments

Comments
 (0)