Skip to content

Commit

Permalink
Merge pull request #295 from Krakonos/fix-unity-build
Browse files Browse the repository at this point in the history
Separated makeBoundaryIcon to its own file to fix UNITY build.
  • Loading branch information
Krakonos authored Mar 14, 2024
2 parents 56d2358 + 819cc7c commit dda2d64
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 23 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions cmake/AppImageBuilder.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ AppImage:
update-information: None
sign-key: None
arch: x86_64
comp: xz
12 changes: 1 addition & 11 deletions src/PaintStyle/PaintStyleEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "Painter.h"
#include "MainWindow.h"
#include "Document.h"
#include "BoundaryIcon.h"

#include "SelectionDialog.h"

Expand All @@ -16,17 +17,6 @@
#include <QPixmap>
#include <QToolButton>

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<Painter>& aPainters)
: QDialog(aParent), theGlobalPainter(aGlobalPainter), thePainters(aPainters), FreezeUpdate(true)
{
Expand Down
13 changes: 1 addition & 12 deletions src/Preferences/PreferencesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "Document.h"
#include "Feature.h"
#include "PropertiesDock.h"
#include "BoundaryIcon.h"

#include <QFileDialog>
#include <QColorDialog>
Expand All @@ -24,18 +25,6 @@
#include <QStyleFactory>
#include <QNetworkProxy>


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)
{
Expand Down
19 changes: 19 additions & 0 deletions src/Utils/BoundaryIcon.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef BOUNDARYICON_H
#define BOUNDARYICON_H

#include "BoundaryIcon.h"

#include <QPainter>

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
9 changes: 9 additions & 0 deletions src/Utils/BoundaryIcon.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef __BOUNDARYICON_H__
#define __BOUNDARYICON_H__

#include <QToolButton>
#include <QColor>

void makeBoundaryIcon(QToolButton* bt, QColor C);

#endif

0 comments on commit dda2d64

Please sign in to comment.