Commit 66477ff3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

USe const'ref

parent 8ad7ae95
......@@ -588,7 +588,7 @@ QString TitleWidget::getTitleResourceFromName(const KUrl &projectUrl, const QStr
}
// static
QStringList TitleWidget::extractImageList(QString xml)
QStringList TitleWidget::extractImageList(const QString& xml)
{
QStringList result;
if (xml.isEmpty()) return result;
......@@ -603,7 +603,7 @@ QStringList TitleWidget::extractImageList(QString xml)
}
// static
QStringList TitleWidget::extractFontList(QString xml)
QStringList TitleWidget::extractFontList(const QString& xml)
{
QStringList result;
if (xml.isEmpty()) return result;
......@@ -1900,7 +1900,7 @@ int TitleWidget::duration() const
return m_tc.getFrameCount(title_duration->text());
}
void TitleWidget::setXml(QDomDocument doc)
void TitleWidget::setXml(const QDomDocument &doc)
{
int duration;
m_count = m_titledocument.loadFromXml(doc, m_startViewport, m_endViewport, &duration, m_projectTitlePath);
......
......@@ -63,10 +63,10 @@ public:
* @param projectPath default path to save to or load from title documents
* @param render project renderer
* @param parent (optional) parent widget */
TitleWidget(const KUrl &url, Timecode tc, const QString &projectTitlePath, Render *render, QWidget *parent = 0);
explicit TitleWidget(const KUrl &url, Timecode tc, const QString &projectTitlePath, Render *render, QWidget *parent = 0);
virtual ~TitleWidget();
QDomDocument xml();
void setXml(QDomDocument doc);
void setXml(const QDomDocument& doc);
/** @brief Finds the first available file name for a title document.
* @deprecated With the titler module there's no need to save titles as images.
......@@ -80,12 +80,12 @@ public:
/** @brief Checks for the images referenced by a title clip.
* @param xml XML data representing the title
* @return list of the image files */
static QStringList extractImageList(QString xml);
static QStringList extractImageList(const QString &xml);
/** @brief Checks for the fonts referenced by a title clip.
* @param xml XML data representing the title
* @return list of the fonts */
static QStringList extractFontList(QString xml);
static QStringList extractFontList(const QString &xml);
/** @brief Builds a file name for a title document.
* @deprecated With the titler module there's no need to save titles as images.
......
......@@ -191,7 +191,7 @@ void TrackView::setDuration(int dur)
m_ruler->setDuration(dur);
}
void TrackView::parseDocument(QDomDocument doc)
void TrackView::parseDocument(const QDomDocument &doc)
{
//int cursorPos = 0;
m_documentErrors.clear();
......
......@@ -105,7 +105,7 @@ private:
QString m_documentErrors;
QList <QAction *> m_trackActions;
void parseDocument(QDomDocument doc);
void parseDocument(const QDomDocument &doc);
int slotAddProjectTrack(int ix, QDomElement xml, bool locked, QDomNodeList producers);
DocClipBase *getMissingProducer(const QString id) const;
void adjustTrackHeaders();
......
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