diff --git a/src/lay/laySalt.cc b/src/lay/laySalt.cc index 7ef818c5b..c327062ff 100644 --- a/src/lay/laySalt.cc +++ b/src/lay/laySalt.cc @@ -366,7 +366,7 @@ public: bool Salt::create_grain (const SaltGrain &templ, SaltGrain &target) { - tl_assert (!m_root.is_empty ()); + tl_assert (m_root.begin_collections () != m_root.end_collections ()); const SaltGrains *coll = m_root.begin_collections ().operator-> (); @@ -407,8 +407,8 @@ Salt::create_grain (const SaltGrain &templ, SaltGrain &target) if (subdir.exists () && ! subdir.isDir ()) { throw tl::Exception (tl::to_string (tr ("Unable to create target directory '%1' for installing package - is already a file").arg (subdir.path ()))); } else if (! subdir.exists ()) { - if (! target_dir.mkdir (tl::to_qstring (*n))) { - throw tl::Exception (tl::to_string (tr ("Unable to create target directory '%1' for installing package").arg (subdir.path ()))); + if (! target_dir.mkpath (tl::to_qstring (*n))) { + throw tl::Exception (tl::to_string (tr ("Unable to create target directory '%1' for installing package").arg (subdir.filePath ()))); } if (! target_dir.cd (tl::to_qstring (*n))) { throw tl::Exception (tl::to_string (tr ("Unable to change to target directory '%1' for installing package").arg (subdir.path ()))); diff --git a/src/lay/laySaltManagerDialog.cc b/src/lay/laySaltManagerDialog.cc index d16ee2b37..7c2cf6fd1 100644 --- a/src/lay/laySaltManagerDialog.cc +++ b/src/lay/laySaltManagerDialog.cc @@ -454,7 +454,7 @@ SaltManagerDialog::update_apply_state () apply_new_button->setEnabled (marked > 0); if (marked == 0) { - apply_label_new->setText (QString ()); + apply_label_new->setText (tr ("Select at least one package for installation (check button)")); } else if (marked == 1) { apply_label_new->setText (tr ("One package selected")); } else if (marked > 1) { diff --git a/src/unit_tests/dbCIFReader.cc b/src/unit_tests/dbCIFReader.cc index 051c65c03..129617cfb 100644 --- a/src/unit_tests/dbCIFReader.cc +++ b/src/unit_tests/dbCIFReader.cc @@ -128,12 +128,12 @@ static void run_test (ut::TestBase *_this, const char *file, const char *file_au reader.read (layout_au); } - bool equal = db::compare_layouts (layout2, layout_au, db::layout_diff::f_boxes_as_polygons | db::layout_diff::f_verbose | db::layout_diff::f_flatten_array_insts, 0); + bool equal = db::compare_layouts (layout2, layout_au, db::layout_diff::f_boxes_as_polygons | db::layout_diff::f_verbose | db::layout_diff::f_flatten_array_insts, 1); if (! equal) { _this->raise (tl::sprintf ("Compare failed after reading - see %s vs %s\n", tmp_gds_file, file_au)); } - equal = db::compare_layouts (layout, layout2_cif, db::layout_diff::f_boxes_as_polygons | db::layout_diff::f_verbose | db::layout_diff::f_flatten_array_insts, 0); + equal = db::compare_layouts (layout, layout2_cif, db::layout_diff::f_boxes_as_polygons | db::layout_diff::f_verbose | db::layout_diff::f_flatten_array_insts, 1); if (! equal) { _this->raise (tl::sprintf ("Compare failed after writing - see %s vs %s\n", file, tmp_cif_file)); } diff --git a/src/unit_tests/dbDXFReader.cc b/src/unit_tests/dbDXFReader.cc index ba19ae868..4feff8080 100644 --- a/src/unit_tests/dbDXFReader.cc +++ b/src/unit_tests/dbDXFReader.cc @@ -67,7 +67,7 @@ static void run_test (ut::TestBase *_this, const char *file, const char *file_au reader.read (layout, options); } - _this->compare_layouts (layout, ut::testsrc_private () + std::string ("/testdata/dxf/") + file_au); + _this->compare_layouts (layout, ut::testsrc_private () + std::string ("/testdata/dxf/") + file_au, ut::WriteGDS2, 1); } TEST(1a) diff --git a/src/unit_tests/extGerberImport.cc b/src/unit_tests/extGerberImport.cc index 0e05a3dab..49d7ddb36 100644 --- a/src/unit_tests/extGerberImport.cc +++ b/src/unit_tests/extGerberImport.cc @@ -47,7 +47,7 @@ static void run_test (ut::TestBase *_this, const char *dir) reader.read (layout, options); } - _this->compare_layouts (layout, ut::testsrc_private () + "/testdata/pcb/" + dir + "/au.oas.gz", ut::WriteOAS); + _this->compare_layouts (layout, ut::testsrc_private () + "/testdata/pcb/" + dir + "/au.oas.gz", ut::WriteOAS, 1); } TEST(1) diff --git a/src/ut/utMain.cc b/src/ut/utMain.cc index e9eaeb286..059c1ee83 100644 --- a/src/ut/utMain.cc +++ b/src/ut/utMain.cc @@ -879,13 +879,15 @@ main_cont (int argc, char **argv) // there is no "dlopen" on mingw, so we need to emulate it. HINSTANCE handle = LoadLibraryW ((const wchar_t *) tl::to_qstring (pp).constData ()); if (! handle) { - throw tl::Exception (tl::to_string (QObject::tr ("Unable to load plugin tests: %s with error message: %s ")), pp, GetLastError ()); + std::cerr << tl::sprintf ("Unable to load plugin tests: %s with error message: %s", pp.c_str (), GetLastError ()) << std::endl; + exit (1); } #else void *handle; handle = dlopen (tl::string_to_system (pp).c_str (), RTLD_LAZY); if (! handle) { - throw tl::Exception (tl::to_string (QObject::tr ("Unable to load plugin tests: %s")), pp); + std::cerr << tl::sprintf ("Unable to load plugin tests: %s", pp.c_str ()) << std::endl; + exit (1); } #endif