Commit 70ebf67b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify. Fix indent. if (foo) delete foo -> delete foo directly

parent 845a9839
......@@ -539,7 +539,7 @@ ClipProperties::ClipProperties(DocClipBase *clip, const Timecode &tc, double fps
// Used for multiple clips editing
ClipProperties::ClipProperties(QList <DocClipBase *>cliplist, const Timecode &tc, QMap <QString, QString> commonproperties, QWidget * parent) :
ClipProperties::ClipProperties(const QList <DocClipBase *> &cliplist, const Timecode &tc, const QMap <QString, QString> &commonproperties, QWidget * parent) :
QDialog(parent),
m_clip(NULL),
m_tc(tc),
......@@ -683,13 +683,13 @@ ClipProperties::ClipProperties(QList <DocClipBase *>cliplist, const Timecode &tc
ClipProperties::~ClipProperties()
{
QAbstractItemDelegate *del1 = m_view.clip_vproperties->itemDelegate();
if (del1) delete del1;
delete del1;
QAbstractItemDelegate *del2 = m_view.clip_aproperties->itemDelegate();
if (del2) delete del2;
delete del2;
}
void ClipProperties::loadVideoProperties(QMap <QString, QString> props)
void ClipProperties::loadVideoProperties(const QMap <QString, QString> &props)
{
m_view.clip_vproperties->clear();
if (props.contains("videocodec"))
......@@ -721,7 +721,7 @@ void ClipProperties::loadVideoProperties(QMap <QString, QString> props)
new QTreeWidgetItem(m_view.clip_vproperties, QStringList() << i18n("Colorspace") << ProfilesDialog::getColorspaceDescription(props.value("colorspace").toInt()));
}
void ClipProperties::slotGotThumbnail(const QString &id, QImage img)
void ClipProperties::slotGotThumbnail(const QString &id, const QImage &img)
{
if (id != m_clip->getId()) return;
QPixmap framedPix(img.width(), img.height());
......@@ -742,7 +742,8 @@ void ClipProperties::slotApplyProperties()
QMap <QString, QString> props = properties();
emit applyNewClipProperties(m_clip->getId(), m_clip->currentProperties(props), props, needsTimelineRefresh(), needsTimelineReload());
QTimer::singleShot(1000, this, SLOT(slotReloadVideoProperties()));
if (props.contains("force_aspect_num")) QTimer::singleShot(1000, this, SLOT(slotReloadVideoThumb()));
if (props.contains("force_aspect_num"))
QTimer::singleShot(1000, this, SLOT(slotReloadVideoThumb()));
}
m_view.buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
}
......@@ -913,7 +914,6 @@ const QString &ClipProperties::clipId() const
return m_clip->getId();
}
QMap <QString, QString> ClipProperties::properties()
{
QMap <QString, QString> props;
......
......@@ -48,7 +48,7 @@ class ClipProperties : public QDialog
public:
ClipProperties(DocClipBase *clip, const Timecode &tc, double fps, QWidget * parent = 0);
ClipProperties(QList <DocClipBase *>cliplist, const Timecode &tc, QMap <QString, QString> commonproperties, QWidget * parent);
ClipProperties(const QList<DocClipBase *> &cliplist, const Timecode &tc, const QMap<QString, QString> &commonproperties, QWidget * parent);
virtual ~ClipProperties();
QMap <QString, QString> properties();
const QString &clipId() const;
......@@ -76,7 +76,7 @@ private slots:
void slotSaveMarkers();
void slotLoadMarkers();
void slotDeleteAnalysis();
void slotGotThumbnail(const QString &id, QImage img);
void slotGotThumbnail(const QString &id, const QImage &img);
void slotSaveAnalysis();
void slotLoadAnalysis();
void slotReloadVideoProperties();
......@@ -96,7 +96,7 @@ private:
bool m_clipNeedsReLoad;
/** Frame with proxy info / delete button */
QFrame* m_proxyContainer;
void loadVideoProperties(QMap <QString, QString> props);
void loadVideoProperties(const QMap<QString, QString> &props);
signals:
void addMarkers(const QString &, QList <CommentedTime>);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment