X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsubprojectitem.cpp;h=ae6388b093a8eb9869b45ef1860b64295399c25a;hb=56aee6aedeeed3efd10ada8fe3c229eddc01ef05;hp=eba677b17c9ee9d974d101806fd6b219fba0a4f6;hpb=3b176bab2ad91159c0a4a7dbe5f278f646115218;p=kdenlive diff --git a/src/subprojectitem.cpp b/src/subprojectitem.cpp index eba677b1..ae6388b0 100644 --- a/src/subprojectitem.cpp +++ b/src/subprojectitem.cpp @@ -26,14 +26,14 @@ #include -#include +#include #include const int DurationRole = Qt::UserRole + 1; const int itemHeight = 30; -SubProjectItem::SubProjectItem(double display_ratio, QTreeWidgetItem * parent, int in, int out, QString description) : - QTreeWidgetItem(parent, PROJECTSUBCLIPTYPE), m_in(in), m_out(out), m_description(description) +SubProjectItem::SubProjectItem(double display_ratio, QTreeWidgetItem * parent, int in, int out, const QString &description) : + QTreeWidgetItem(parent, ProjectSubclipType), m_in(in), m_out(out), m_description(description) { setSizeHint(0, QSize((int) (itemHeight * display_ratio) + 2, itemHeight + 2)); setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsDropEnabled); @@ -77,7 +77,7 @@ QPoint SubProjectItem::zone() const return z; } -void SubProjectItem::setZone(QPoint p) +void SubProjectItem::setZone(const QPoint& p) { m_in = p.x(); m_out = p.y(); @@ -97,7 +97,7 @@ QString SubProjectItem::description() const return m_description; } -void SubProjectItem::setDescription(QString desc) +void SubProjectItem::setDescription(const QString &desc) { m_description = desc; setText(1, m_description);