Commit 3cec1c93 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 8cd7e7b5
......@@ -89,7 +89,7 @@ class AbstractMonitor : public QWidget
Q_OBJECT
public:
AbstractMonitor(Kdenlive::MONITORID id, MonitorManager *manager, QWidget *parent = 0);
Kdenlive::MONITORID id() {return m_id;};
Kdenlive::MONITORID id() {return m_id;}
virtual ~AbstractMonitor();
virtual AbstractRender *abstractRender() = 0;
bool isActive() const;
......
......@@ -70,7 +70,7 @@ ManageCapturesDialog::~ManageCapturesDialog() {}
void ManageCapturesDialog::slotCheckItemIcon()
{
int ct = 0;
int count = m_view.treeWidget->topLevelItemCount();
const int count = m_view.treeWidget->topLevelItemCount();
while (ct < count) {
QTreeWidgetItem *item = m_view.treeWidget->topLevelItem(ct);
//QTreeWidgetItem *item = m_view.treeWidget->currentItem();
......@@ -88,7 +88,7 @@ void ManageCapturesDialog::slotCheckItemIcon()
void ManageCapturesDialog::slotRefreshButtons()
{
int count = m_view.treeWidget->topLevelItemCount();
const int count = m_view.treeWidget->topLevelItemCount();
bool enabled = false;
for (int i = 0; i < count; ++i) {
QTreeWidgetItem *item = m_view.treeWidget->topLevelItem(i);
......@@ -104,7 +104,7 @@ void ManageCapturesDialog::slotDeleteCurrent()
{
QTreeWidgetItem *item = m_view.treeWidget->currentItem();
if (!item) return;
int i = m_view.treeWidget->indexOfTopLevelItem(item);
const int i = m_view.treeWidget->indexOfTopLevelItem(item);
m_view.treeWidget->takeTopLevelItem(i);
kDebug() << "DELETING FILE: " << item->text(0);
//KIO::NetAccess::del(KUrl(item->text(0)), this);
......@@ -116,7 +116,7 @@ void ManageCapturesDialog::slotDeleteCurrent()
void ManageCapturesDialog::slotToggle()
{
int count = m_view.treeWidget->topLevelItemCount();
const int count = m_view.treeWidget->topLevelItemCount();
for (int i = 0; i < count; ++i) {
QTreeWidgetItem *item = m_view.treeWidget->topLevelItem(i);
if (item) {
......@@ -130,7 +130,7 @@ KUrl::List ManageCapturesDialog::importFiles()
{
KUrl::List result;
int count = m_view.treeWidget->topLevelItemCount();
const int count = m_view.treeWidget->topLevelItemCount();
for (int i = 0; i < count; ++i) {
QTreeWidgetItem *item = m_view.treeWidget->topLevelItem(i);
if (item && item->checkState(0) == Qt::Checked)
......
......@@ -386,7 +386,7 @@ void Monitor::updateMarkers(DocClipBase *source)
}
}
void Monitor::setMarkers(QList <CommentedTime> markers)
void Monitor::setMarkers(const QList<CommentedTime> &markers)
{
m_ruler->setMarkers(markers);
}
......
......@@ -86,7 +86,7 @@ public:
void checkOverlay();
void updateTimecodeFormat();
void updateMarkers(DocClipBase *source);
void setMarkers(QList <CommentedTime> markers);
void setMarkers(const QList <CommentedTime> &markers);
MonitorEditWidget *getEffectEdit();
QWidget *container();
void reloadProducer(const QString &id);
......
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