m_view.guide_start->clear();
m_view.guide_end->clear();
QDomNodeList nodes = guidesxml.elementsByTagName("guide");
- if (nodes.count() > 0) {
+ if (!nodes.isEmpty()) {
m_view.guide_start->addItem(i18n("Beginning"), "0");
m_view.render_guide->setEnabled(true);
m_view.create_chapter->setEnabled(true);
m_view.guide_end->addItem(e.attribute("comment") + '/' + guidePos, e.attribute("time").toDouble());
}
}
- if (nodes.count() > 0)
+ if (!nodes.isEmpty())
m_view.guide_end->addItem(i18n("End"), QString::number(duration));
}
* Will be called when the user selects an output file via the file dialog.
* File extension will be added automatically.
*/
-void RenderWidget::slotUpdateButtons(KUrl url)
+void RenderWidget::slotUpdateButtons(const KUrl &url)
{
if (m_view.out_file->url().isEmpty()) {
m_view.buttonGenerateScript->setEnabled(false);
m_view.buttonGenerateScript->setEnabled(false);
return;
}
- QString extension = item->data(ExtensionRole).toString();
- url = filenameWithExtension(url, extension);
- m_view.out_file->setUrl(url);
+ const QString extension = item->data(ExtensionRole).toString();
+ m_view.out_file->setUrl(filenameWithExtension(url, extension));
}
}
void slotExport(bool scriptExport, int zoneIn, int zoneOut, const QMap <QString, QString> metadata, const QString &playlistPath, const QString &scriptPath, bool exportAudio);
private slots:
- void slotUpdateButtons(KUrl url);
+ void slotUpdateButtons(const KUrl &url);
void slotUpdateButtons();
void refreshView(const QString &profile = QString());
void refreshCategory(const QString &group = QString(), const QString &profile = QString());