Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b182bd66 authored by Nicolas Carion's avatar Nicolas Carion

fix format of constructor initializers

parent 23f3d6bc
......@@ -35,7 +35,7 @@ BraceWrapping:
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializersBeforeComma: true
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 160
......
......@@ -34,8 +34,21 @@ public:
RenderJob::RenderJob(bool erase, bool usekuiserver, int pid, const QString &renderer, const QString &profile, const QString &rendermodule,
const QString &player, const QString &scenelist, const QString &dest, const QStringList &preargs, const QStringList &args, int in, int out)
: QObject(), m_scenelist(scenelist), m_dest(dest), m_progress(0), m_prog(renderer), m_player(player), m_jobUiserver(nullptr), m_kdenliveinterface(nullptr),
m_usekuiserver(usekuiserver), m_logfile(dest + QStringLiteral(".txt")), m_erase(erase), m_seconds(0), m_frame(0), m_pid(pid), m_dualpass(false)
: QObject()
, m_scenelist(scenelist)
, m_dest(dest)
, m_progress(0)
, m_prog(renderer)
, m_player(player)
, m_jobUiserver(nullptr)
, m_kdenliveinterface(nullptr)
, m_usekuiserver(usekuiserver)
, m_logfile(dest + QStringLiteral(".txt"))
, m_erase(erase)
, m_seconds(0)
, m_frame(0)
, m_pid(pid)
, m_dualpass(false)
{
m_renderProcess = new QProcess;
m_renderProcess->setReadChannel(QProcess::StandardError);
......
......@@ -22,7 +22,8 @@
#include "abstracttreemodel.hpp"
#include "treeitem.hpp"
AbstractTreeModel::AbstractTreeModel(QObject *parent) : QAbstractItemModel(parent)
AbstractTreeModel::AbstractTreeModel(QObject *parent)
: QAbstractItemModel(parent)
{
rootItem = new TreeItem(QList<QVariant>(), this);
}
......
......@@ -23,7 +23,9 @@
#include "abstractmodel/treeitem.hpp"
#include "assettreemodel.hpp"
AssetFilter::AssetFilter(QObject *parent) : QSortFilterProxyModel(parent), m_name_enabled(false)
AssetFilter::AssetFilter(QObject *parent)
: QSortFilterProxyModel(parent)
, m_name_enabled(false)
{
}
......
......@@ -29,7 +29,8 @@ int AssetTreeModel::idCol = 1;
int AssetTreeModel::typeCol = 2;
int AssetTreeModel::favCol = 3;
AssetTreeModel::AssetTreeModel(QObject *parent) : AbstractTreeModel(parent)
AssetTreeModel::AssetTreeModel(QObject *parent)
: AbstractTreeModel(parent)
{
}
......
......@@ -27,7 +27,8 @@
#include <QQuickItem>
#include <QStandardPaths>
AssetListWidget::AssetListWidget(QWidget *parent) : QQuickWidget(parent)
AssetListWidget::AssetListWidget(QWidget *parent)
: QQuickWidget(parent)
{
}
......
......@@ -28,7 +28,8 @@
#include <QIcon>
#include <QPainter>
AssetIconProvider::AssetIconProvider(bool effect) : QQuickImageProvider(QQmlImageProviderBase::Image, QQmlImageProviderBase::ForceAsynchronousImageLoading)
AssetIconProvider::AssetIconProvider(bool effect)
: QQuickImageProvider(QQmlImageProviderBase::Image, QQmlImageProviderBase::ForceAsynchronousImageLoading)
{
m_effect = effect;
}
......
......@@ -27,7 +27,10 @@
#include <QString>
AssetParameterModel::AssetParameterModel(Mlt::Properties *asset, const QDomElement &assetXml, const QString &assetId, QObject *parent)
: QAbstractListModel(parent), m_xml(assetXml), m_assetId(assetId), m_asset(asset)
: QAbstractListModel(parent)
, m_xml(assetXml)
, m_assetId(assetId)
, m_asset(asset)
{
Q_ASSERT(asset->is_valid());
QDomNodeList nodeList = m_xml.elementsByTagName(QStringLiteral("parameter"));
......
......@@ -24,7 +24,8 @@
#include <QDebug>
#include <utility>
AssetParameterView::AssetParameterView(QWidget *parent) : QWidget(parent)
AssetParameterView::AssetParameterView(QWidget *parent)
: QWidget(parent)
{
m_transitionProperties = new TransitionParameterView(this);
m_transitionProperties->setVisible(false);
......
......@@ -29,15 +29,34 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QVariant>
AbstractProjectItem::AbstractProjectItem(PROJECTITEMTYPE type, const QString &id, ProjectItemModel *model, AbstractProjectItem *parent)
: TreeItem(QList<QVariant>(), static_cast<AbstractTreeModel *>(model), (TreeItem *)parent), m_name(), m_description(), m_thumbnail(QIcon()), m_date(),
m_id(id), m_usage(0), m_clipStatus(StatusReady), m_jobType(AbstractClipJob::NOJOBTYPE), m_jobProgress(0), m_itemType(type), m_isCurrent(false)
: TreeItem(QList<QVariant>(), static_cast<AbstractTreeModel *>(model), (TreeItem *)parent)
, m_name()
, m_description()
, m_thumbnail(QIcon())
, m_date()
, m_id(id)
, m_usage(0)
, m_clipStatus(StatusReady)
, m_jobType(AbstractClipJob::NOJOBTYPE)
, m_jobProgress(0)
, m_itemType(type)
, m_isCurrent(false)
{
}
AbstractProjectItem::AbstractProjectItem(PROJECTITEMTYPE type, const QDomElement &description, ProjectItemModel *model, AbstractProjectItem *parent)
: TreeItem(QList<QVariant>(), static_cast<AbstractTreeModel *>(model), (TreeItem *)parent), m_name(), m_description(), m_thumbnail(QIcon()), m_date(),
m_id(description.attribute(QStringLiteral("id"))), m_usage(0), m_clipStatus(StatusReady), m_jobType(AbstractClipJob::NOJOBTYPE), m_jobProgress(0),
m_itemType(type), m_isCurrent(false)
: TreeItem(QList<QVariant>(), static_cast<AbstractTreeModel *>(model), (TreeItem *)parent)
, m_name()
, m_description()
, m_thumbnail(QIcon())
, m_date()
, m_id(description.attribute(QStringLiteral("id")))
, m_usage(0)
, m_clipStatus(StatusReady)
, m_jobType(AbstractClipJob::NOJOBTYPE)
, m_jobProgress(0)
, m_itemType(type)
, m_isCurrent(false)
{
}
......
......@@ -69,7 +69,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QVBoxLayout>
#include <QtConcurrent>
MyListView::MyListView(QWidget *parent) : QListView(parent)
MyListView::MyListView(QWidget *parent)
: QListView(parent)
{
setViewMode(QListView::IconMode);
setMovement(QListView::Static);
......@@ -89,7 +90,8 @@ void MyListView::focusInEvent(QFocusEvent *event)
}
}
MyTreeView::MyTreeView(QWidget *parent) : QTreeView(parent)
MyTreeView::MyTreeView(QWidget *parent)
: QTreeView(parent)
{
setEditing(false);
}
......@@ -203,10 +205,12 @@ bool MyTreeView::performDrag()
return true;
}
BinMessageWidget::BinMessageWidget(QWidget *parent) : KMessageWidget(parent)
BinMessageWidget::BinMessageWidget(QWidget *parent)
: KMessageWidget(parent)
{
}
BinMessageWidget::BinMessageWidget(const QString &text, QWidget *parent) : KMessageWidget(text, parent)
BinMessageWidget::BinMessageWidget(const QString &text, QWidget *parent)
: KMessageWidget(text, parent)
{
}
......@@ -218,7 +222,9 @@ bool BinMessageWidget::event(QEvent *ev)
return KMessageWidget::event(ev);
}
SmallJobLabel::SmallJobLabel(QWidget *parent) : QPushButton(parent), m_action(nullptr)
SmallJobLabel::SmallJobLabel(QWidget *parent)
: QPushButton(parent)
, m_action(nullptr)
{
setFixedWidth(0);
setFlat(true);
......@@ -328,7 +334,10 @@ void SmallJobLabel::slotSetJobCount(int jobCount)
class BinItemDelegate : public QStyledItemDelegate
{
public:
explicit BinItemDelegate(QObject *parent = nullptr) : QStyledItemDelegate(parent) {}
explicit BinItemDelegate(QObject *parent = nullptr)
: QStyledItemDelegate(parent)
{
}
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
{
......@@ -507,7 +516,8 @@ public:
}
};
LineEventEater::LineEventEater(QObject *parent) : QObject(parent)
LineEventEater::LineEventEater(QObject *parent)
: QObject(parent)
{
}
......@@ -530,10 +540,25 @@ bool LineEventEater::eventFilter(QObject *obj, QEvent *event)
}
Bin::Bin(QWidget *parent)
: QWidget(parent), isLoading(false), m_itemModel(nullptr), m_itemView(nullptr), m_folderUp(nullptr), m_jobManager(nullptr), m_doc(nullptr),
m_extractAudioAction(nullptr), m_transcodeAction(nullptr), m_clipsActionsMenu(nullptr), m_inTimelineAction(nullptr),
m_listType((BinViewType)KdenliveSettings::binMode()), m_iconSize(160, 90), m_propertiesPanel(nullptr), m_blankThumb(), m_invalidClipDialog(nullptr),
m_gainedFocus(false), m_audioDuration(0), m_processedAudio(0)
: QWidget(parent)
, isLoading(false)
, m_itemModel(nullptr)
, m_itemView(nullptr)
, m_folderUp(nullptr)
, m_jobManager(nullptr)
, m_doc(nullptr)
, m_extractAudioAction(nullptr)
, m_transcodeAction(nullptr)
, m_clipsActionsMenu(nullptr)
, m_inTimelineAction(nullptr)
, m_listType((BinViewType)KdenliveSettings::binMode())
, m_iconSize(160, 90)
, m_propertiesPanel(nullptr)
, m_blankThumb()
, m_invalidClipDialog(nullptr)
, m_gainedFocus(false)
, m_audioDuration(0)
, m_processedAudio(0)
{
m_layout = new QVBoxLayout(this);
......
......@@ -24,7 +24,12 @@
#include <klocalizedstring.h>
AddBinFolderCommand::AddBinFolderCommand(Bin *bin, const QString &id, const QString &name, const QString &parentId, bool remove, QUndoCommand *parent)
: QUndoCommand(parent), m_bin(bin), m_id(id), m_name(name), m_parentId(parentId), m_remove(remove)
: QUndoCommand(parent)
, m_bin(bin)
, m_id(id)
, m_name(name)
, m_parentId(parentId)
, m_remove(remove)
{
if (remove) {
setText(i18n("Remove Folder"));
......@@ -52,7 +57,11 @@ void AddBinFolderCommand::redo()
}
MoveBinClipCommand::MoveBinClipCommand(Bin *bin, const QString &clipId, const QString &oldParentId, const QString &newParentId, QUndoCommand *parent)
: QUndoCommand(parent), m_bin(bin), m_clipId(clipId), m_oldParentId(oldParentId), m_newParentId(newParentId)
: QUndoCommand(parent)
, m_bin(bin)
, m_clipId(clipId)
, m_oldParentId(oldParentId)
, m_newParentId(newParentId)
{
setText(i18n("Move Clip"));
}
......@@ -68,7 +77,11 @@ void MoveBinClipCommand::redo()
}
MoveBinFolderCommand::MoveBinFolderCommand(Bin *bin, const QString &clipId, const QString &oldParentId, const QString &newParentId, QUndoCommand *parent)
: QUndoCommand(parent), m_bin(bin), m_clipId(clipId), m_oldParentId(oldParentId), m_newParentId(newParentId)
: QUndoCommand(parent)
, m_bin(bin)
, m_clipId(clipId)
, m_oldParentId(oldParentId)
, m_newParentId(newParentId)
{
setText(i18n("Move Clip"));
}
......@@ -84,7 +97,11 @@ void MoveBinFolderCommand::redo()
}
RenameBinFolderCommand::RenameBinFolderCommand(Bin *bin, const QString &folderId, const QString &newName, const QString &oldName, QUndoCommand *parent)
: QUndoCommand(parent), m_bin(bin), m_clipId(folderId), m_oldName(oldName), m_newName(newName)
: QUndoCommand(parent)
, m_bin(bin)
, m_clipId(folderId)
, m_oldName(oldName)
, m_newName(newName)
{
setText(i18n("Rename Folder"));
}
......@@ -101,7 +118,13 @@ void RenameBinFolderCommand::redo()
RenameBinSubClipCommand::RenameBinSubClipCommand(Bin *bin, const QString &clipId, const QString &newName, const QString &oldName, int in, int out,
QUndoCommand *parent)
: QUndoCommand(parent), m_bin(bin), m_clipId(clipId), m_oldName(oldName), m_newName(newName), m_in(in), m_out(out)
: QUndoCommand(parent)
, m_bin(bin)
, m_clipId(clipId)
, m_oldName(oldName)
, m_newName(newName)
, m_in(in)
, m_out(out)
{
setText(i18n("Rename Zone"));
}
......@@ -117,7 +140,12 @@ void RenameBinSubClipCommand::redo()
}
AddBinClipCutCommand::AddBinClipCutCommand(Bin *bin, const QString &clipId, int in, int out, bool add, QUndoCommand *parent)
: QUndoCommand(parent), m_bin(bin), m_clipId(clipId), m_in(in), m_out(out), m_addCut(add)
: QUndoCommand(parent)
, m_bin(bin)
, m_clipId(clipId)
, m_in(in)
, m_out(out)
, m_addCut(add)
{
setText(i18n("Add Sub Clip"));
}
......@@ -143,7 +171,13 @@ void AddBinClipCutCommand::redo()
EditClipCommand::EditClipCommand(Bin *bin, const QString &id, const QMap<QString, QString> &oldparams, const QMap<QString, QString> &newparams, bool doIt,
QUndoCommand *parent)
: QUndoCommand(parent), m_bin(bin), m_oldparams(oldparams), m_newparams(newparams), m_id(id), m_doIt(doIt), m_firstExec(true)
: QUndoCommand(parent)
, m_bin(bin)
, m_oldparams(oldparams)
, m_newparams(newparams)
, m_id(id)
, m_doIt(doIt)
, m_firstExec(true)
{
setText(i18n("Edit clip"));
}
......@@ -163,7 +197,11 @@ void EditClipCommand::redo()
}
AddClipCommand::AddClipCommand(Bin *bin, const QDomElement &xml, const QString &id, bool doIt, QUndoCommand *parent)
: QUndoCommand(parent), m_bin(bin), m_xml(xml), m_id(id), m_doIt(doIt)
: QUndoCommand(parent)
, m_bin(bin)
, m_xml(xml)
, m_id(id)
, m_doIt(doIt)
{
if (doIt) {
setText(i18n("Add clip"));
......
......@@ -37,7 +37,11 @@
#include <KRecentDirs>
Generators::Generators(Monitor *monitor, const QString &path, QWidget *parent)
: QDialog(parent), m_producer(nullptr), m_timePos(nullptr), m_container(nullptr), m_preview(nullptr)
: QDialog(parent)
, m_producer(nullptr)
, m_timePos(nullptr)
, m_container(nullptr)
, m_preview(nullptr)
{
QFile file(path);
QDomDocument doc;
......
......@@ -49,8 +49,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <utility>
ProjectClip::ProjectClip(const QString &id, const QIcon &thumb, ProjectItemModel *model, std::shared_ptr<Mlt::Producer> producer, ProjectFolder *parent)
: AbstractProjectItem(AbstractProjectItem::ClipItem, id, model, parent), ClipController(pCore->binController(), producer), m_abortAudioThumb(false),
m_thumbsProducer(nullptr)
: AbstractProjectItem(AbstractProjectItem::ClipItem, id, model, parent)
, ClipController(pCore->binController(), producer)
, m_abortAudioThumb(false)
, m_thumbsProducer(nullptr)
{
m_clipStatus = StatusReady;
m_name = clipName();
......@@ -72,8 +74,11 @@ ProjectClip::ProjectClip(const QString &id, const QIcon &thumb, ProjectItemModel
}
ProjectClip::ProjectClip(const QDomElement &description, const QIcon &thumb, ProjectItemModel *model, ProjectFolder *parent)
: AbstractProjectItem(AbstractProjectItem::ClipItem, description, model, parent), ClipController(pCore->binController(), ClipController::mediaUnavailable),
m_abortAudioThumb(false), m_type(Unknown), m_thumbsProducer(nullptr)
: AbstractProjectItem(AbstractProjectItem::ClipItem, description, model, parent)
, ClipController(pCore->binController(), ClipController::mediaUnavailable)
, m_abortAudioThumb(false)
, m_type(Unknown)
, m_thumbsProducer(nullptr)
{
Q_ASSERT(description.hasAttribute(QStringLiteral("id")));
m_clipStatus = StatusWaiting;
......
......@@ -38,7 +38,8 @@ ProjectFolder::ProjectFolder(const QString &id, const QString &name, ProjectItem
changeParent(parent);
}
ProjectFolder::ProjectFolder(ProjectItemModel *model) : AbstractProjectItem(AbstractProjectItem::FolderItem, QString::number(-1), model)
ProjectFolder::ProjectFolder(ProjectItemModel *model)
: AbstractProjectItem(AbstractProjectItem::FolderItem, QString::number(-1), model)
{
m_name = QStringLiteral("root");
changeParent(nullptr);
......
......@@ -31,7 +31,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QMimeData>
#include <qvarlengtharray.h>
ProjectItemModel::ProjectItemModel(Bin *bin, QObject *parent) : AbstractTreeModel(parent), m_bin(bin)
ProjectItemModel::ProjectItemModel(Bin *bin, QObject *parent)
: AbstractTreeModel(parent)
, m_bin(bin)
{
rootItem = new ProjectFolder(this);
}
......
......@@ -24,7 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QItemSelectionModel>
ProjectSortProxyModel::ProjectSortProxyModel(QObject *parent) : QSortFilterProxyModel(parent)
ProjectSortProxyModel::ProjectSortProxyModel(QObject *parent)
: QSortFilterProxyModel(parent)
{
m_collator.setNumericMode(true);
m_selection = new QItemSelectionModel(this);
......
......@@ -30,7 +30,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
class ClipController;
ProjectSubClip::ProjectSubClip(ProjectClip *parent, ProjectItemModel *model, int in, int out, const QString &timecode, const QString &name)
: AbstractProjectItem(AbstractProjectItem::SubClipItem, parent->AbstractProjectItem::clipId(), model, parent), m_masterClip(parent), m_in(in), m_out(out)
: AbstractProjectItem(AbstractProjectItem::SubClipItem, parent->AbstractProjectItem::clipId(), model, parent)
, m_masterClip(parent)
, m_in(in)
, m_out(out)
{
QPixmap pix(64, 36);
pix.fill(Qt::lightGray);
......
......@@ -31,7 +31,8 @@
#include <QTimer>
#include <QTreeWidgetItem>
ManageCapturesDialog::ManageCapturesDialog(const QList<QUrl> &files, QWidget *parent) : QDialog(parent)
ManageCapturesDialog::ManageCapturesDialog(const QList<QUrl> &files, QWidget *parent)
: QDialog(parent)
{
setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
m_view.setupUi(this);
......
......@@ -39,8 +39,15 @@ static void consumer_gl_frame_show(mlt_consumer, MltDeviceCapture *self, mlt_fra
}
MltDeviceCapture::MltDeviceCapture(QString profile, /*VideoSurface *surface, */ QWidget *parent)
: AbstractRender(Kdenlive::RecordMonitor, parent), doCapture(0), processingImage(false), m_mltConsumer(nullptr), m_mltProducer(nullptr),
m_mltProfile(nullptr), m_showFrameEvent(nullptr), m_droppedFrames(0), m_livePreview(KdenliveSettings::enable_recording_preview())
: AbstractRender(Kdenlive::RecordMonitor, parent)
, doCapture(0)
, processingImage(false)
, m_mltConsumer(nullptr)
, m_mltProducer(nullptr)
, m_mltProfile(nullptr)
, m_showFrameEvent(nullptr)
, m_droppedFrames(0)
, m_livePreview(KdenliveSettings::enable_recording_preview())
{
analyseAudio = KdenliveSettings::monitor_audio();
if (profile.isEmpty()) {
......
......@@ -18,7 +18,8 @@
#include "kdenlive_debug.h"
#endif
ColorTools::ColorTools(QObject *parent) : QObject(parent)
ColorTools::ColorTools(QObject *parent)
: QObject(parent)
{
}
......
......@@ -38,7 +38,13 @@ the Free Software Foundation, either version 3 of the License, or
#endif
std::unique_ptr<Core> Core::m_self;
Core::Core() : m_mainWindow(nullptr), m_projectManager(nullptr), m_monitorManager(nullptr), m_producerQueue(nullptr), m_binWidget(nullptr), m_library(nullptr)
Core::Core()
: m_mainWindow(nullptr)
, m_projectManager(nullptr)
, m_monitorManager(nullptr)
, m_producerQueue(nullptr)
, m_binWidget(nullptr)
, m_library(nullptr)
{
}
......
......@@ -48,14 +48,30 @@ QDebug operator<<(QDebug qd, const MltVideoProfile &profile)
}
MltVideoProfile::MltVideoProfile()
: frame_rate_num(0), frame_rate_den(0), width(0), height(0), progressive(0), sample_aspect_num(0), sample_aspect_den(0), display_aspect_num(0),
display_aspect_den(0), colorspace(0)
: frame_rate_num(0)
, frame_rate_den(0)
, width(0)
, height(0)
, progressive(0)
, sample_aspect_num(0)
, sample_aspect_den(0)
, display_aspect_num(0)
, display_aspect_den(0)
, colorspace(0)
{
}
MltVideoProfile::MltVideoProfile(const QVariantList &params)
: frame_rate_num(0), frame_rate_den(0), width(0), height(0), progressive(0), sample_aspect_num(0), sample_aspect_den(0), display_aspect_num(0),
display_aspect_den(0), colorspace(0)
: frame_rate_num(0)
, frame_rate_den(0)
, width(0)
, height(0)
, progressive(0)
, sample_aspect_num(0)
, sample_aspect_den(0)
, display_aspect_num(0)
, display_aspect_den(0)
, colorspace(0)
{
if (params.count() != 12) {
qWarning("Trying to build a profile with incorrect param numbers");
......@@ -147,16 +163,23 @@ bool MltVideoProfile::operator!=(const MltVideoProfile &other) const
return !(*this == other);
}
CommentedTime::CommentedTime() : t(GenTime(0)), type(0)
CommentedTime::CommentedTime()
: t(GenTime(0))
, type(0)
{
}
CommentedTime::CommentedTime(const GenTime &time, const QString &comment, int markerType) : t(time), c(comment), type(markerType)
CommentedTime::CommentedTime(const GenTime &time, const QString &comment, int markerType)
: t(time)
, c(comment)
, type(markerType)
{
}
CommentedTime::CommentedTime(const QString &hash, const GenTime &time)
: t(time), c(hash.section(QLatin1Char(':'), 1)), type(hash.section(QLatin1Char(':'), 0, 0).toInt())
: t(time)
, c(hash.section(QLatin1Char(':'), 1))
, type(hash.section(QLatin1Char(':'), 0, 0).toInt())
{
}
......
......@@ -123,7 +123,15 @@ public:
bool isLocked;
int duration;
EffectsList effectsList;
TrackInfo() : type(VideoTrack), isMute(0), isBlind(0), isLocked(0), duration(0), effectsList(true) {}
TrackInfo()
: type(VideoTrack)
, isMute(0)
, isBlind(0)
, isLocked(0)
, duration(0)
, effectsList(true)
{
}
};