Date: Wed, 30 Dec 2020 21:07:10 +0000 (UTC) From: Adriaan de Groot <adridg@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r559684 - in head/graphics/ksnip: . files Message-ID: <202012302107.0BUL7AQg024313@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adridg Date: Wed Dec 30 21:07:09 2020 New Revision: 559684 URL: https://svnweb.freebsd.org/changeset/ports/559684 Log: Patch UB in graphics/ksnip Various functions did if-linux-else-windows-else-apple, leaving us behind; when those functions are supposed to return a value, but don't, that's Undefined Behavior. It's allowed to crash, or do something else. There were already patches adding the "other" case, here's a handful more of them. I chose to patch the existing port, rather than trying to chase an update to the recently-released 1.8.0, because that's a little less work *right now*. PR: 252229 Reported by: Guido Kollerie Added: head/graphics/ksnip/files/patch-src_common_adapter_fileDialog_FileDialogAdapterFactory.cpp (contents, props changed) head/graphics/ksnip/files/patch-src_common_adapter_fileDialog_FileDialogAdapterFactory.h (contents, props changed) head/graphics/ksnip/files/patch-src_common_platform_HdpiScaler.cpp (contents, props changed) head/graphics/ksnip/files/patch-src_gui_widgetHider_WidgetHiderFactory.cpp (contents, props changed) Modified: head/graphics/ksnip/Makefile Modified: head/graphics/ksnip/Makefile ============================================================================== --- head/graphics/ksnip/Makefile Wed Dec 30 21:01:49 2020 (r559683) +++ head/graphics/ksnip/Makefile Wed Dec 30 21:07:09 2020 (r559684) @@ -3,6 +3,7 @@ PORTNAME= ksnip DISTVERSIONPREFIX= v DISTVERSION= 1.7.3 +PORTREVISION= 1 CATEGORIES= graphics kde MAINTAINER= kde@FreeBSD.org Added: head/graphics/ksnip/files/patch-src_common_adapter_fileDialog_FileDialogAdapterFactory.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/ksnip/files/patch-src_common_adapter_fileDialog_FileDialogAdapterFactory.cpp Wed Dec 30 21:07:09 2020 (r559684) @@ -0,0 +1,11 @@ +--- src/common/adapter/fileDialog/FileDialogAdapterFactory.cpp.orig 2020-12-30 20:58:35 UTC ++++ src/common/adapter/fileDialog/FileDialogAdapterFactory.cpp +@@ -21,7 +21,7 @@ + + IFileDialogAdapter *FileDialogAdapterFactory::create() + { +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + CommandRunner commandRunner; + auto isSnap = commandRunner.isEnvironmentVariableSet(QStringLiteral("SNAP")); + if (isSnap) { Added: head/graphics/ksnip/files/patch-src_common_adapter_fileDialog_FileDialogAdapterFactory.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/ksnip/files/patch-src_common_adapter_fileDialog_FileDialogAdapterFactory.h Wed Dec 30 21:07:09 2020 (r559684) @@ -0,0 +1,11 @@ +--- src/common/adapter/fileDialog/FileDialogAdapterFactory.h.orig 2020-12-30 20:58:35 UTC ++++ src/common/adapter/fileDialog/FileDialogAdapterFactory.h +@@ -23,7 +23,7 @@ + #include "FileDialogAdapter.h" + #include "SnapFileDialogAdapter.h" + +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + #include "src/common/platform/CommandRunner.h" + #endif + Added: head/graphics/ksnip/files/patch-src_common_platform_HdpiScaler.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/ksnip/files/patch-src_common_platform_HdpiScaler.cpp Wed Dec 30 21:07:09 2020 (r559684) @@ -0,0 +1,11 @@ +--- src/common/platform/HdpiScaler.cpp.orig 2020-12-30 20:58:35 UTC ++++ src/common/platform/HdpiScaler.cpp +@@ -74,7 +74,7 @@ qreal HdpiScaler::scaleFactor() const + + #endif + +-#if defined(__linux__) || defined(_WIN32) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(_WIN32) + return desktopWidget->devicePixelRatioF(); + #endif + } Added: head/graphics/ksnip/files/patch-src_gui_widgetHider_WidgetHiderFactory.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/ksnip/files/patch-src_gui_widgetHider_WidgetHiderFactory.cpp Wed Dec 30 21:07:09 2020 (r559684) @@ -0,0 +1,11 @@ +--- src/gui/widgetHider/WidgetHiderFactory.cpp.orig 2020-12-30 20:52:24 UTC ++++ src/gui/widgetHider/WidgetHiderFactory.cpp +@@ -25,7 +25,7 @@ WidgetHider *WidgetHiderFactory::create(QWidget *widge + return new WidgetHider(widget); + #endif + +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + auto platformChecker = PlatformChecker::instance(); + if (platformChecker->isWayland() && platformChecker->isGnome()) { + return new GnomeWaylandWidgetHider(widget);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012302107.0BUL7AQg024313>