Commit c60be946 authored by Laurent Montel's avatar Laurent Montel 😁

add const/ref, Fix indent

parent 6f206f85
......@@ -26,7 +26,7 @@
#include <QHBoxLayout>
PositionEdit::PositionEdit(const QString &name, int pos, int min, int max, const Timecode&tc, QWidget* parent) :
QWidget(parent)
QWidget(parent)
{
QHBoxLayout *layout = new QHBoxLayout(this);
......@@ -84,11 +84,11 @@ void PositionEdit::slotUpdatePosition()
void PositionEdit::setRange(int min, int max, bool absolute)
{
if (absolute) {
m_slider->setRange(min, max);
m_display->setRange(min, max);
m_slider->setRange(min, max);
m_display->setRange(min, max);
} else {
m_slider->setRange(0, max - min);
m_display->setRange(0, max - min);
m_slider->setRange(0, max - min);
m_display->setRange(0, max - min);
}
}
......
......@@ -448,7 +448,7 @@ QMap< QString, QString > ProfilesDialog::getSettingsForProfile(const QString& pr
}
// static
bool ProfilesDialog::matchProfile(int width, int height, double fps, double par, bool isImage, MltVideoProfile profile)
bool ProfilesDialog::matchProfile(int width, int height, double fps, double par, bool isImage, const MltVideoProfile &profile)
{
int profileWidth;
if (isImage) {
......
......@@ -52,7 +52,7 @@ public:
* @param isImage If true, compare width with profile's display width ( = dar * height)
* @param profile The profile to match
* @return true if properties match profile */
static bool matchProfile(int width, int height, double fps, double par, bool isImage, MltVideoProfile profile);
static bool matchProfile(int width, int height, double fps, double par, bool isImage, const MltVideoProfile &profile);
/** @brief Find profiles that match parameter properties:
* @param width The profile frame width
......
......@@ -54,7 +54,7 @@ ProjectItem::ProjectItem(QTreeWidgetItem * parent, DocClipBase *clip, const QSiz
buildItem(pixmapSize);
}
void ProjectItem::buildItem(QSize pixmapSize)
void ProjectItem::buildItem(const QSize &pixmapSize)
{
setSizeHint(0, QSize(itemHeight * 3, itemHeight));
if (m_clip->isPlaceHolder()) setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDropEnabled);
......@@ -154,7 +154,7 @@ void ProjectItem::changeDuration(int frames)
setData(0, DurationRole, itemdata + Timecode::getEasyTimecode(GenTime(frames, KdenliveSettings::project_fps()), KdenliveSettings::project_fps()));
}
void ProjectItem::setProperties(QMap <QString, QString> props)
void ProjectItem::setProperties(const QMap<QString, QString> &props)
{
if (m_clip == NULL) return;
m_clip->setProperties(props);
......
......@@ -58,7 +58,7 @@ public:
CLIPTYPE clipType() const;
void changeDuration(int frames);
DocClipBase *referencedClip();
void setProperties(QMap <QString, QString> props);
void setProperties(const QMap <QString, QString> &props);
void setProperty(const QString &key, const QString &value);
void clearProperty(const QString &key);
QString getClipHash() const;
......@@ -94,7 +94,7 @@ private:
QString m_clipId;
bool m_pixmapSet;
/** @brief Setup basic properties */
void buildItem(QSize pixmapSize);
void buildItem(const QSize &pixmapSize);
/** @brief Check if an xml project file has proxies */
bool playlistHasProxies(const QString& path);
};
......
This diff is collapsed.
......@@ -116,13 +116,13 @@ private slots:
void slotTimeLineChanged(qreal value);
void slotTimeLineFinished();
};
class InvalidDialog: public KDialog
{
Q_OBJECT
public:
InvalidDialog(const QString &caption, const QString &message, bool infoOnly, QWidget *parent = 0);
virtual ~InvalidDialog();
explicit InvalidDialog(const QString &caption, const QString &message, bool infoOnly, QWidget *parent = 0);
~InvalidDialog();
void addClip(const QString &id, const QString &path);
QStringList getIds() const;
private:
......@@ -176,20 +176,20 @@ public:
if (jobProgress != JOBCRASHED) {
// Draw job progress bar
QColor color = option.palette.alternateBase().color();
color.setAlpha(150);
color.setAlpha(150);
painter->setPen(option.palette.link().color());
QRect progress(pixmapPoint.x() + 2, pixmapPoint.y() + pixmap.height() - 9, pixmap.width() - 4, 7);
painter->setBrush(QBrush(color));
painter->drawRect(progress);
painter->setBrush(option.palette.link());
progress.adjust(2, 2, -2, -2);
if (jobProgress == JOBWAITING) {
progress.setLeft(progress.right() - 2);
painter->drawRect(progress);
progress.moveLeft(progress.left() - 5);
painter->drawRect(progress);
}
else if (jobProgress > 0) {
painter->setBrush(QBrush(color));
painter->drawRect(progress);
painter->setBrush(option.palette.link());
progress.adjust(2, 2, -2, -2);
if (jobProgress == JOBWAITING) {
progress.setLeft(progress.right() - 2);
painter->drawRect(progress);
progress.moveLeft(progress.left() - 5);
painter->drawRect(progress);
}
else if (jobProgress > 0) {
progress.setWidth(progress.width() * jobProgress / 100);
painter->drawRect(progress);
}
......@@ -382,7 +382,7 @@ private:
QAction *m_logAction;
#endif
void requestClipThumbnail(const QString id);
void requestClipThumbnail(const QString &id);
/** @brief Creates an EditFolderCommand to change the name of an folder item. */
void editFolder(const QString folderName, const QString oldfolderName, const QString &clipId);
......@@ -402,9 +402,9 @@ private:
/** @brief Sets the buttons enabled/disabled according to selected item. */
void updateButtons() const;
/** @brief Set the Proxy status on a clip.
/** @brief Set the Proxy status on a clip.
* @param item The clip item to set status
* @param jobType The job type
* @param jobType The job type
* @param status The job status (see definitions.h)
* @param progress The job progress (in percents)
* @param statusMessage The job info message */
......@@ -501,21 +501,21 @@ private slots:
void slotGotFilterJobResults(QString ,int , int, stringMap, stringMap);
signals:
void clipSelected(DocClipBase *, QPoint zone = QPoint(), bool forceUpdate = false);
void clipSelected(DocClipBase *, const QPoint &zone = QPoint(), bool forceUpdate = false);
void receivedClipDuration(const QString &);
void showClipProperties(DocClipBase *);
void showClipProperties(QList <DocClipBase *>, QMap<QString, QString> commonproperties);
void projectModified();
void loadingIsOver();
void displayMessage(const QString, int progress, MessageType type = DefaultMessage);
void clipNameChanged(const QString, const QString);
void displayMessage(const QString&, int progress, MessageType type = DefaultMessage);
void clipNameChanged(const QString&, const QString&);
void clipNeedsReload(const QString&);
/** @brief A property affecting display was changed, so we need to update monitors and thumbnails
* @param id: The clip's id string
* @param resetThumbs Should we recreate the timeline thumbnails. */
void refreshClip(const QString &id, bool resetThumbs);
void updateRenderStatus();
void deleteProjectClips(QStringList ids, QMap <QString, QString> folderids);
void deleteProjectClips(const QStringList &ids, const QMap <QString, QString> &folderids);
void findInTimeline(const QString &clipId);
/** @brief Request a profile change for current document. */
void updateProfile(const QString &);
......
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