aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/modelinglib/qmt/stereotype
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/modelinglib/qmt/stereotype')
-rw-r--r--src/libs/modelinglib/qmt/stereotype/stereotypecontroller.cpp12
-rw-r--r--src/libs/modelinglib/qmt/stereotype/stereotypecontroller.h12
2 files changed, 17 insertions, 7 deletions
diff --git a/src/libs/modelinglib/qmt/stereotype/stereotypecontroller.cpp b/src/libs/modelinglib/qmt/stereotype/stereotypecontroller.cpp
index f557e80c4b..2f679df117 100644
--- a/src/libs/modelinglib/qmt/stereotype/stereotypecontroller.cpp
+++ b/src/libs/modelinglib/qmt/stereotype/stereotypecontroller.cpp
@@ -10,6 +10,8 @@
#include "qmt/infrastructure/qmtassert.h"
#include "qmt/style/style.h"
+
+#include <utils/filepath.h>
#include <utils/algorithm.h>
#include <QHash>
@@ -19,12 +21,14 @@
#include <algorithm>
+using Utils::FilePath;
+
namespace qmt {
namespace {
struct IconKey {
- IconKey(StereotypeIcon::Element element, const QList<QString> &stereotypes, const QString &defaultIconPath,
+ IconKey(StereotypeIcon::Element element, const QList<QString> &stereotypes, const FilePath &defaultIconPath,
const Uid &styleUid, const QSize &size, const QMarginsF &margins, qreal lineWidth)
: m_element(element),
m_stereotypes(stereotypes),
@@ -53,7 +57,7 @@ struct IconKey {
const StereotypeIcon::Element m_element;
const QList<QString> m_stereotypes;
- const QString m_defaultIconPath;
+ const FilePath m_defaultIconPath;
const Uid m_styleUid;
const QSize m_size;
const QMarginsF m_margins;
@@ -157,7 +161,7 @@ CustomRelation StereotypeController::findCustomRelationByStereotype(const QStrin
}
QIcon StereotypeController::createIcon(StereotypeIcon::Element element, const QList<QString> &stereotypes,
- const QString &defaultIconPath, const Style *style, const QSize &size,
+ const FilePath &defaultIconPath, const Style *style, const QSize &size,
const QMarginsF &margins, qreal lineWidth)
{
IconKey key(element, stereotypes, defaultIconPath, style->uid(), size, margins, lineWidth);
@@ -231,7 +235,7 @@ QIcon StereotypeController::createIcon(StereotypeIcon::Element element, const QL
icon = QIcon(pixmap);
}
if (icon.isNull() && !defaultIconPath.isEmpty())
- icon = QIcon(defaultIconPath);
+ icon = QIcon(defaultIconPath.toFSPathString());
d->m_iconMap.insert(key, icon);
return icon;
diff --git a/src/libs/modelinglib/qmt/stereotype/stereotypecontroller.h b/src/libs/modelinglib/qmt/stereotype/stereotypecontroller.h
index 45bc3bbd18..49acc5f937 100644
--- a/src/libs/modelinglib/qmt/stereotype/stereotypecontroller.h
+++ b/src/libs/modelinglib/qmt/stereotype/stereotypecontroller.h
@@ -5,6 +5,8 @@
#include "stereotypeicon.h"
+#include <utils/filepath.h>
+
#include <QMarginsF>
#include <QObject>
@@ -34,9 +36,13 @@ public:
StereotypeIcon findStereotypeIcon(const QString &stereotypeIconId) const;
CustomRelation findCustomRelation(const QString &customRelationId) const;
CustomRelation findCustomRelationByStereotype(const QString &steoreotype) const;
- QIcon createIcon(StereotypeIcon::Element element, const QList<QString> &stereotypes,
- const QString &defaultIconPath, const Style *style,
- const QSize &size, const QMarginsF &margins, qreal lineWidth);
+ QIcon createIcon(StereotypeIcon::Element element,
+ const QList<QString> &stereotypes,
+ const Utils::FilePath &defaultIconPath,
+ const Style *style,
+ const QSize &size,
+ const QMarginsF &margins,
+ qreal lineWidth);
void addStereotypeIcon(const StereotypeIcon &stereotypeIcon);
void addCustomRelation(const CustomRelation &customRelation);