Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package OpenBoard for openSUSE:Factory checked in at 2022-06-25 10:24:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/OpenBoard (Old) and /work/SRC/openSUSE:Factory/.OpenBoard.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "OpenBoard" Sat Jun 25 10:24:10 2022 rev:2 rq:984870 version:1.7.0~git20220608.47a96e1 Changes: -------- --- /work/SRC/openSUSE:Factory/OpenBoard/OpenBoard.changes 2022-06-21 16:32:19.119802958 +0200 +++ /work/SRC/openSUSE:Factory/.OpenBoard.new.1548/OpenBoard.changes 2022-06-25 10:24:20.762680934 +0200 @@ -1,0 +2,13 @@ +Fri Jun 24 09:56:26 UTC 2022 - Martin Winter <[email protected]> + +- minor changes in spec file + +------------------------------------------------------------------- +Fri Jun 24 09:13:52 UTC 2022 - Martin Winter <[email protected]> + +- fix several issues + - add 0008-install-fonts.patch + - add 0637-fix-pdf-background-export.patch + - add 0641-fix-font-handling.patch + +------------------------------------------------------------------- New: ---- 0008-install-fonts.patch 0637-fix-pdf-background-export.patch 0641-fix-font-handling.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ OpenBoard.spec ++++++ --- /var/tmp/diff_new_pack.vBi3eT/_old 2022-06-25 10:24:21.646682197 +0200 +++ /var/tmp/diff_new_pack.vBi3eT/_new 2022-06-25 10:24:21.650682202 +0200 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -25,11 +25,11 @@ %define gitdate 20220608 %define buildver 0608 Version: 1.7.0~git%{gitdate}.%{gitshort} -Release: 1 +Release: 0 Summary: Interactive whiteboard for schools and universities -License: GPL-3.0+ +License: GPL-3.0-or-later Group: Amusements/Teaching/Other -Url: http://openboard.ch +URL: http://openboard.ch Source0: https://github.com/OpenBoard-org/OpenBoard/archive/%{githash}.zip#/OpenBoard-%{githash}.zip Patch0: 0001-Rewrite-libs.pri.patch Patch1: 0002-Install-to-correct-directories-on-linux.patch @@ -38,6 +38,7 @@ Patch4: 0005-Add-svg-icon.patch Patch5: 0006-pro-Remove-UB_THIRDPARTY_INTERACTIVE.patch Patch6: 0007-Linux-Only-use-onboard-by-default-if-it-s-installed.patch +Patch7: 0008-install-fonts.patch # https://github.com/OpenBoard-org/OpenBoard/pull/551 Patch551: 0551-common-background-drawing.patch # https://github.com/OpenBoard-org/OpenBoard/pull/569 @@ -48,11 +49,16 @@ Patch629: 0629-bug-ruler.patch # https://github.com/OpenBoard-org/OpenBoard/pull/633 Patch633: 0633-improve-displaymanager.patch +# https://github.com/OpenBoard-org/OpenBoard/pull/637 +Patch637: 0637-fix-pdf-background-export.patch +# https://github.com/OpenBoard-org/OpenBoard/pull/641 +Patch641: 0641-fix-font-handling.patch -BuildRequires: unzip BuildRequires: desktop-file-utils BuildRequires: fdupes BuildRequires: ffmpeg-devel +BuildRequires: unzip +BuildRequires: unzip %if 0%{?sle_version} > 150200 || 0%{?suse_version} > 1520 BuildRequires: pkgconfig(quazip1-qt5) %else @@ -70,9 +76,9 @@ BuildRequires: pkgconfig(Qt5WebEngineWidgets) BuildRequires: pkgconfig(Qt5Xml) BuildRequires: pkgconfig(Qt5XmlPatterns) +BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(poppler) -BuildRequires: pkgconfig(freetype2) %description OpenBoard is an open source cross-platform interactive white board @@ -89,11 +95,14 @@ %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %patch551 -p1 %patch569 -p1 %patch604 -p1 %patch629 -p1 %patch633 -p1 +%patch637 -p1 +%patch641 -p1 # insert version sed -i 's/VERSION_BUILD = 0225/VERSION_BUILD = %{buildver}/g' OpenBoard.pro ++++++ 0008-install-fonts.patch ++++++ diff --git a/OpenBoard.pro b/OpenBoard.pro index b1c8ad72..877d3a2c 100644 --- a/OpenBoard.pro +++ b/OpenBoard.pro @@ -88,6 +88,7 @@ UB_ETC.files = resources/etc UB_I18N.files = resources/i18n/*.qm UB_LIBRARY.files = resources/library UB_FONTS.files = resources/fonts +UB_CUSTOM_FONTS.files = resources/customizations/fonts UB_DESKTOP.files = resources/ch.openboard.OpenBoard.desktop UB_ICON.files = resources/images/ch.openboard.OpenBoard.svg @@ -465,6 +466,8 @@ linux-g++* { UB_LIBRARY.path = $$INSTALL_ROOT/$$PREFIX/share/OpenBoard/ UB_I18N.path = $$INSTALL_ROOT/$$PREFIX/share/OpenBoard/i18n/ UB_ETC.path = $$INSTALL_ROOT/$$PREFIX/share/OpenBoard/ + UB_FONTS.path = $$INSTALL_ROOT/$$PREFIX/share/OpenBoard + UB_CUSTOM_FONTS.path = $$INSTALL_ROOT/$$PREFIX/share/OpenBoard/customizations UB_DESKTOP.path = $$INSTALL_ROOT/$$PREFIX/share/applications/ UB_ICON.path = $$INSTALL_ROOT/$$PREFIX/share/icons/hicolor/scalable/apps/ system(mkdir -p $$BUILD_DIR) @@ -511,6 +514,8 @@ TRANSLATIONS = resources/i18n/OpenBoard_en.ts \ INSTALLS = UB_BINARY \ UB_ETC \ + UB_FONTS \ + UB_CUSTOM_FONTS \ UB_I18N \ UB_LIBRARY \ UB_DESKTOP \ ++++++ 0637-fix-pdf-background-export.patch ++++++ >From e360c574f9a8ce73795d73c9f7431c6262e588aa Mon Sep 17 00:00:00 2001 From: letsfindaway <[email protected]> Date: Wed, 22 Jun 2022 09:30:31 +0200 Subject: [PATCH] fix: restore PDF background export - was not enabled with UBExportFullPDF --- src/adaptors/UBExportFullPDF.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/adaptors/UBExportFullPDF.cpp b/src/adaptors/UBExportFullPDF.cpp index baa38de4c..a3afc232d 100644 --- a/src/adaptors/UBExportFullPDF.cpp +++ b/src/adaptors/UBExportFullPDF.cpp @@ -142,7 +142,6 @@ void UBExportFullPDF::saveOverlayPdf(UBDocumentProxy* pDocumentProxy, const QStr if (pageIndex != 0) pdfPrinter.newPage(); //render to PDF - scene->setDrawingMode(true); scene->render(pdfPainter, QRectF(), scene->normalizedSceneRect()); //restore screen rendering quality @@ -150,7 +149,6 @@ void UBExportFullPDF::saveOverlayPdf(UBDocumentProxy* pDocumentProxy, const QStr scene->setRenderingQuality(UBItem::RenderingQualityNormal, UBItem::CacheAllowed); //restore background state - scene->setDrawingMode(false); scene->setBackground(isDark, pageBackground); } ++++++ 0641-fix-font-handling.patch ++++++ >From ee7d9dd4953a45b1eb7fed807bd900932e40d646 Mon Sep 17 00:00:00 2001 From: letsfindaway <[email protected]> Date: Fri, 24 Jun 2022 07:01:07 +0200 Subject: [PATCH 1/2] feat: add containsPrefix string utility - check if a string list contains a prefix to a given string - fix typo in nextDigitizedName function name --- src/frameworks/UBStringUtils.cpp | 15 ++++++++++++++- src/frameworks/UBStringUtils.h | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/frameworks/UBStringUtils.cpp b/src/frameworks/UBStringUtils.cpp index ce579d2d0..ac2a9395b 100644 --- a/src/frameworks/UBStringUtils.cpp +++ b/src/frameworks/UBStringUtils.cpp @@ -31,6 +31,19 @@ #include "core/memcheck.h" +bool UBStringUtils::containsPrefix(const QStringList &prefixes, const QString &string, Qt::CaseSensitivity cs) +{ + for (const QString& prefix : prefixes) + { + if (string.startsWith(prefix, cs)) + { + return true; + } + } + + return false; +} + QStringList UBStringUtils::sortByLastDigit(const QStringList& sourceList) { // we look for a set of digit after non digits and before a . @@ -72,7 +85,7 @@ QStringList UBStringUtils::sortByLastDigit(const QStringList& sourceList) } -QString UBStringUtils::netxDigitizedName(const QString& source) +QString UBStringUtils::nextDigitizedName(const QString& source) { // we look for a set of digit after non digits and at the end diff --git a/src/frameworks/UBStringUtils.h b/src/frameworks/UBStringUtils.h index 5844fdb5f..5d61728ac 100644 --- a/src/frameworks/UBStringUtils.h +++ b/src/frameworks/UBStringUtils.h @@ -41,9 +41,10 @@ class UBStringUtils ~UBStringUtils() {} public: + static bool containsPrefix(const QStringList& prefixes, const QString& string, Qt::CaseSensitivity cs); static QStringList sortByLastDigit(const QStringList& source); - static QString netxDigitizedName(const QString& source); + static QString nextDigitizedName(const QString& source); static QString toCanonicalUuid(const QUuid& uuid); >From 630cd0a11712b1cc92885b470fd60a260d00e007 Mon Sep 17 00:00:00 2001 From: letsfindaway <[email protected]> Date: Fri, 24 Jun 2022 07:08:57 +0200 Subject: [PATCH 2/2] perf: improve performance of building font model - remove duplicates from custom font list - remove font list entries in chunks from model --- src/domain/UBGraphicsTextItemDelegate.cpp | 18 +++++++++++++++--- src/gui/UBResources.cpp | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/domain/UBGraphicsTextItemDelegate.cpp b/src/domain/UBGraphicsTextItemDelegate.cpp index 8851cd604..6ccb2b7f2 100644 --- a/src/domain/UBGraphicsTextItemDelegate.cpp +++ b/src/domain/UBGraphicsTextItemDelegate.cpp @@ -263,12 +263,24 @@ void UBGraphicsTextItemDelegate::customize(QFontDialog &fontDialog) QStringList customFontList = UBResources::resources()->customFontList(); int index = 0; - foreach (QString dialogFontName, dialogFontNames){ - if (safeWebFontNames.contains(dialogFontName, Qt::CaseInsensitive) || customFontList.contains(dialogFontName, Qt::CaseSensitive)) + int remove = 0; + + for (const QString& dialogFontName : dialogFontNames) + { + if (UBStringUtils::containsPrefix(safeWebFontNames, dialogFontName, Qt::CaseInsensitive) || + UBStringUtils::containsPrefix(customFontList, dialogFontName, Qt::CaseSensitive)) + { + stringListModel->removeRows(index, remove); + remove = 0; index++; + } else - stringListModel->removeRow(index); + { + ++remove; + } } + + stringListModel->removeRows(index, remove); } } QList<QComboBox*> comboBoxes = fontDialog.findChildren<QComboBox*>(); diff --git a/src/gui/UBResources.cpp b/src/gui/UBResources.cpp index 10af5395b..7e4b2ffcc 100644 --- a/src/gui/UBResources.cpp +++ b/src/gui/UBResources.cpp @@ -88,4 +88,6 @@ void UBResources::buildFontList() int fontId = QFontDatabase::addApplicationFont(fontFile); mCustomFontList << QFontDatabase::applicationFontFamilies(fontId); } + + mCustomFontList.removeDuplicates(); }
