Commit 7eb7390b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ify

parent 054ff5c4
......@@ -270,7 +270,7 @@ QDomDocument TitleDocument::xml(QGraphicsRectItem* startv, QGraphicsRectItem* en
/** \brief Get the background color (incl. alpha) from the document, if possibly
* \returns The background color of the document, inclusive alpha. If none found, returns (0,0,0,0) */
QColor TitleDocument::getBackgroundColor()
QColor TitleDocument::getBackgroundColor() const
{
QColor color(0, 0, 0, 0);
if (m_scene) {
......@@ -312,7 +312,7 @@ bool TitleDocument::saveDocument(const KUrl& url, QGraphicsRectItem* startv, QGr
return KIO::NetAccess::upload(tmpfile.fileName(), url, 0);
}
int TitleDocument::loadFromXml(QDomDocument doc, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int *duration, const QString& projectpath)
int TitleDocument::loadFromXml(const QDomDocument& doc, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int *duration, const QString& projectpath)
{
m_projectPath = projectpath;
QDomNodeList titles = doc.elementsByTagName("kdenlivetitle");
......
......@@ -36,10 +36,10 @@ public:
void setScene(QGraphicsScene* scene, int width, int height);
bool saveDocument(const KUrl& url, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int duration, bool embed_images = false);
QDomDocument xml(QGraphicsRectItem* startv, QGraphicsRectItem* endv, bool embed_images = false);
int loadFromXml(QDomDocument doc, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int *duration, const QString& projectpath = QString());
int loadFromXml(const QDomDocument& doc, QGraphicsRectItem* startv, QGraphicsRectItem* endv, int *duration, const QString& projectpath = QString());
/** \brief Get the background color (incl. alpha) from the document, if possibly
* \returns The background color of the document, inclusive alpha. If none found, returns (0,0,0,0) */
QColor getBackgroundColor();
QColor getBackgroundColor() const;
int frameWidth() const;
int frameHeight() const;
/** \brief Extract embeded images in project titles folder. */
......
......@@ -123,7 +123,7 @@ const QList <TrackInfo> TracksConfigDialog::tracksList()
return tracks;
}
QList <int> TracksConfigDialog::deletedTracks()
QList <int> TracksConfigDialog::deletedTracks() const
{
return m_deletedRows;
}
......
......@@ -61,7 +61,7 @@ public:
const QList <TrackInfo> tracksList();
/** @brief A list of tracks, which sould be deleted. */
QList <int> deletedTracks();
QList <int> deletedTracks() const;
private slots:
/** @brief Updates the "hidden" checkbox if type was changed. */
......
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