From 3831bf19e47ed1ee09b2f4eb0341f8e879194880 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 10 Dec 2023 11:45:35 -0800 Subject: [PATCH] remove Qt wrapper scripts (#30454) * remove Qt wrapper scripts * revert those --- .gitignore | 1 - release/files_common | 1 - selfdrive/test/test_onroad.py | 4 ++-- selfdrive/ui/.gitignore | 1 + selfdrive/ui/SConscript | 2 +- selfdrive/ui/qt/util.cc | 2 ++ selfdrive/ui/ui | 4 ---- 7 files changed, 6 insertions(+), 9 deletions(-) delete mode 100755 selfdrive/ui/ui diff --git a/.gitignore b/.gitignore index e414e4301a8d37..3e91531d0881bc 100644 --- a/.gitignore +++ b/.gitignore @@ -46,7 +46,6 @@ selfdrive/boardd/boardd selfdrive/logcatd/logcatd selfdrive/mapd/default_speeds_by_region.json system/proclogd/proclogd -selfdrive/ui/_ui selfdrive/ui/translations/alerts_generated.h selfdrive/ui/translations/tmp selfdrive/test/longitudinal_maneuvers/out diff --git a/release/files_common b/release/files_common index 637f8bd7d7d451..10bfe4e1f123ef 100644 --- a/release/files_common +++ b/release/files_common @@ -285,7 +285,6 @@ selfdrive/ui/.gitignore selfdrive/ui/SConscript selfdrive/ui/*.cc selfdrive/ui/*.h -selfdrive/ui/ui selfdrive/ui/text selfdrive/ui/spinner selfdrive/ui/soundd.py diff --git a/selfdrive/test/test_onroad.py b/selfdrive/test/test_onroad.py index b4121529d13e2b..3c8e848fda7c66 100755 --- a/selfdrive/test/test_onroad.py +++ b/selfdrive/test/test_onroad.py @@ -36,7 +36,7 @@ "./locationd": 11.0, "./mapsd": (1.0, 10.0), "selfdrive.controls.plannerd": 11.0, - "./_ui": 18.0, + "./ui": 18.0, "selfdrive.locationd.paramsd": 9.0, "./sensord": 7.0, "selfdrive.controls.radard": 4.5, @@ -303,7 +303,7 @@ def test_memory_usage(self): self.assertLessEqual(max(mems) - min(mems), 3.0) def test_gpu_usage(self): - self.assertEqual(self.gpu_procs, {"weston", "_ui", "camerad", "selfdrive.modeld.modeld"}) + self.assertEqual(self.gpu_procs, {"weston", "ui", "camerad", "selfdrive.modeld.modeld"}) def test_camera_processing_time(self): result = "\n" diff --git a/selfdrive/ui/.gitignore b/selfdrive/ui/.gitignore index 8ad5d394932bd7..99f9097905f66a 100644 --- a/selfdrive/ui/.gitignore +++ b/selfdrive/ui/.gitignore @@ -3,6 +3,7 @@ moc_* translations/main_test_en.* +ui watch3 installer/installers/* qt/text diff --git a/selfdrive/ui/SConscript b/selfdrive/ui/SConscript index f0db1f63a71dc0..b0f5a4f4a6acaa 100644 --- a/selfdrive/ui/SConscript +++ b/selfdrive/ui/SConscript @@ -77,7 +77,7 @@ qt_env.Program("qt/text", ["qt/text.cc"], LIBS=qt_libs) qt_env.Program("qt/spinner", ["qt/spinner.cc"], LIBS=qt_libs) # build main UI -qt_env.Program("_ui", qt_src + [asset_obj], LIBS=qt_libs) +qt_env.Program("ui", qt_src + [asset_obj], LIBS=qt_libs) if GetOption('extras'): qt_src.remove("main.cc") # replaced by test_runner qt_env.Program('tests/test_translations', [asset_obj, 'tests/test_runner.cc', 'tests/test_translations.cc'] + qt_src, LIBS=qt_libs) diff --git a/selfdrive/ui/qt/util.cc b/selfdrive/ui/qt/util.cc index 78da1835032454..c5222b865ff793 100644 --- a/selfdrive/ui/qt/util.cc +++ b/selfdrive/ui/qt/util.cc @@ -112,6 +112,8 @@ void initApp(int argc, char *argv[], bool disable_hidpi) { #endif } + qputenv("QT_DBL_CLICK_DIST", QByteArray::number(150)); + setQtSurfaceFormat(); } diff --git a/selfdrive/ui/ui b/selfdrive/ui/ui deleted file mode 100755 index acb2a705a8e9fc..00000000000000 --- a/selfdrive/ui/ui +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -cd "$(dirname "$0")" -export QT_DBL_CLICK_DIST=150 -exec ./_ui