From 96ffbe351befc9f6a4a0d2c0cce391d09790c683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20L=C3=A1ska?= Date: Wed, 13 Mar 2024 22:50:40 +0800 Subject: [PATCH 1/2] Separated makeBoundaryIcon to its own file to fix UNITY build. --- CMakeLists.txt | 2 ++ src/PaintStyle/PaintStyleEditor.cpp | 12 +----------- src/Preferences/PreferencesDialog.cpp | 13 +------------ src/Utils/BoundaryIcon.cpp | 19 +++++++++++++++++++ src/Utils/BoundaryIcon.h | 9 +++++++++ 5 files changed, 32 insertions(+), 23 deletions(-) create mode 100644 src/Utils/BoundaryIcon.cpp create mode 100644 src/Utils/BoundaryIcon.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 1aa5955b2..ad59e8b69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -286,6 +286,8 @@ src/Utils/PixmapWidget.cpp src/Utils/TagSelector.cpp src/Utils/SvgCache.h src/Utils/RemoteControlServer.cpp +src/Utils/BoundaryIcon.cpp +src/Utils/BoundaryIcon.h src/QToolBarDialog/qttoolbardialog.h src/QToolBarDialog/qttoolbardialog.cpp src/QToolBarDialog/qttoolbardialog.ui diff --git a/src/PaintStyle/PaintStyleEditor.cpp b/src/PaintStyle/PaintStyleEditor.cpp index b6cb0ed53..4246c3094 100644 --- a/src/PaintStyle/PaintStyleEditor.cpp +++ b/src/PaintStyle/PaintStyleEditor.cpp @@ -4,6 +4,7 @@ #include "Painter.h" #include "MainWindow.h" #include "Document.h" +#include "BoundaryIcon.h" #include "SelectionDialog.h" @@ -16,17 +17,6 @@ #include #include -static void makeBoundaryIcon(QToolButton* bt, QColor C) -{ - QPixmap pm(36, 18); - pm.fill(QColor(255, 255, 255)); - QPainter p(&pm); - p.setPen(C); - p.setBrush(C); - p.drawRect(0, 6, 36, 6); - bt->setIcon(pm); -} - PaintStyleEditor::PaintStyleEditor(QWidget *aParent, const GlobalPainter& aGlobalPainter, const QList& aPainters) : QDialog(aParent), theGlobalPainter(aGlobalPainter), thePainters(aPainters), FreezeUpdate(true) { diff --git a/src/Preferences/PreferencesDialog.cpp b/src/Preferences/PreferencesDialog.cpp index 4e7d97c95..cb061fd7c 100644 --- a/src/Preferences/PreferencesDialog.cpp +++ b/src/Preferences/PreferencesDialog.cpp @@ -16,6 +16,7 @@ #include "Document.h" #include "Feature.h" #include "PropertiesDock.h" +#include "BoundaryIcon.h" #include #include @@ -24,18 +25,6 @@ #include #include - -static void makeBoundaryIcon(QToolButton* bt, QColor C) -{ - QPixmap pm(36, 18); - pm.fill(QColor(255, 255, 255)); - QPainter p(&pm); - p.setPen(C); - p.setBrush(C); - p.drawRect(0, 6, 36, 6); - bt->setIcon(pm); -} - OsmServerWidget::OsmServerWidget(QWidget * parent, Qt::WindowFlags f) : QWidget(parent, f) { diff --git a/src/Utils/BoundaryIcon.cpp b/src/Utils/BoundaryIcon.cpp new file mode 100644 index 000000000..38bad1390 --- /dev/null +++ b/src/Utils/BoundaryIcon.cpp @@ -0,0 +1,19 @@ +#ifndef BOUNDARYICON_H +#define BOUNDARYICON_H + +#include "BoundaryIcon.h" + +#include + +void makeBoundaryIcon(QToolButton* bt, QColor C) +{ + QPixmap pm(36, 18); + pm.fill(QColor(255, 255, 255)); + QPainter p(&pm); + p.setPen(C); + p.setBrush(C); + p.drawRect(0, 6, 36, 6); + bt->setIcon(pm); +} + +#endif // BOUNDARYICON_H diff --git a/src/Utils/BoundaryIcon.h b/src/Utils/BoundaryIcon.h new file mode 100644 index 000000000..c8a37b664 --- /dev/null +++ b/src/Utils/BoundaryIcon.h @@ -0,0 +1,9 @@ +#ifndef __BOUNDARYICON_H__ +#define __BOUNDARYICON_H__ + +#include +#include + +void makeBoundaryIcon(QToolButton* bt, QColor C); + +#endif From 819cc7ce0b9f55ff851172dea1b134e1847aaf00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20L=C3=A1ska?= Date: Thu, 14 Mar 2024 07:20:55 +0800 Subject: [PATCH 2/2] Fixed appimage generation. Latest version of the tooling introduced new field in AppImageBuilder.yml that wasn't present. --- cmake/AppImageBuilder.yml.in | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/AppImageBuilder.yml.in b/cmake/AppImageBuilder.yml.in index 334136a51..40b68199e 100644 --- a/cmake/AppImageBuilder.yml.in +++ b/cmake/AppImageBuilder.yml.in @@ -50,3 +50,4 @@ AppImage: update-information: None sign-key: None arch: x86_64 + comp: xz