Commit 40a41665 authored by Vincent Pinon's avatar Vincent Pinon
Browse files

clang-tidy -fix: modernize-use-default-member-init

parent 78b6cf6c
......@@ -121,7 +121,6 @@ public:
explicit KisCubicSpline(const QList<T_point> &a)
: m_begin(0)
, m_end(0)
, m_intervals(0)
{
createSpline(a);
}
......
......@@ -26,9 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
ProjectSortProxyModel::ProjectSortProxyModel(QObject *parent)
: QSortFilterProxyModel(parent)
, m_searchType(0)
, m_searchRating(0)
, m_unusedFilter(false)
{
m_collator.setLocale(QLocale()); // Locale used for sorting → OK
m_collator.setCaseSensitivity(Qt::CaseInsensitive);
......
......@@ -69,9 +69,9 @@ private:
QItemSelectionModel *m_selection;
QString m_searchString;
QStringList m_searchTag;
int m_searchType;
int m_searchRating;
bool m_unusedFilter;
int m_searchType{0};
int m_searchRating{0};
bool m_unusedFilter{false};
QCollator m_collator;
signals:
......
......@@ -34,9 +34,7 @@
ProfilesDialog::ProfilesDialog(const QString &profileDescription, QWidget *parent)
: QDialog(parent)
{
// ask profile repository for a refresh
ProfileRepository::get()->refresh();
......@@ -96,10 +94,8 @@ void ProfilesDialog::connectDialog()
ProfilesDialog::ProfilesDialog(const QString &profilePath, bool, QWidget *parent)
: QDialog(parent)
, m_profileIsModified(false)
, m_isCustomProfile(true)
, m_customProfilePath(profilePath)
, m_profilesChanged(false)
{
m_view.setupUi(this);
......
......@@ -55,7 +55,6 @@ bool ShiftEnterFilter::eventFilter(QObject *obj, QEvent *event)
SubtitleEdit::SubtitleEdit(QWidget *parent)
: QWidget(parent)
, m_model(nullptr)
, m_activeSub(-1)
{
setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
setupUi(this);
......
......@@ -66,7 +66,7 @@ private slots:
private:
std::shared_ptr<SubtitleModel> m_model;
int m_activeSub;
int m_activeSub{-1};
TimecodeDisplay *m_position;
TimecodeDisplay *m_endPosition;
TimecodeDisplay *m_duration;
......
......@@ -44,8 +44,6 @@
VideoTextEdit::VideoTextEdit(QWidget *parent)
: QTextEdit(parent)
, m_hoveredBlock(-1)
, m_lastClickedBlock(-1)
{
setMouseTracking(true);
setReadOnly(true);
......@@ -568,8 +566,6 @@ void VideoTextEdit::mouseMoveEvent(QMouseEvent *e)
TextBasedEdit::TextBasedEdit(QWidget *parent)
: QWidget(parent)
, m_clipDuration(0.)
, m_currentMessageAction(nullptr)
{
setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
setupUi(this);
......
......@@ -88,8 +88,8 @@ private slots:
private:
QWidget *lineNumberArea;
int m_hoveredBlock;
int m_lastClickedBlock;
int m_hoveredBlock{-1};
int m_lastClickedBlock{-1};
QVector <int> m_selectedBlocks;
int getFirstVisibleBlockId();
};
......@@ -186,12 +186,12 @@ private:
/** @brief Id of the playlist which is processed from the master clip */
QString m_refId;
QString m_sourceUrl;
double m_clipDuration;
double m_clipDuration{0.};
int m_lastPosition;
QString m_errorString;
QAction *m_logAction;
QAction *m_voskConfig;
QAction *m_currentMessageAction;
QAction *m_currentMessageAction{nullptr};
VideoTextEdit *m_visualEditor;
QTextDocument m_document;
QString m_playlist;
......
......@@ -41,8 +41,8 @@ CacheJob::CacheJob(const QString &binId, int thumbsCount, int inPoint, int outPo
: AbstractClipJob(CACHEJOB, binId, {ObjectType::BinClip, binId.toInt()})
, m_fullWidth(qFuzzyCompare(pCore->getCurrentSar(), 1.0) ? 0 : pCore->thumbProfile()->height() * pCore->getCurrentDar() + 0.5)
, m_semaphore(1)
, m_done(false)
, m_thumbsCount(thumbsCount)
,
m_thumbsCount(thumbsCount)
, m_inPoint(inPoint)
, m_outPoint(outPoint)
......
......@@ -44,9 +44,6 @@ RecManager::RecManager(Monitor *parent)
: QObject(parent)
, m_monitor(parent)
, m_recToolbar(new QToolBar(parent))
, m_checkAudio(false)
, m_checkVideo(false)
, m_screenIndex(0)
{
m_playAction = m_recToolbar->addAction(QIcon::fromTheme(QStringLiteral("media-playback-start")), i18n("Preview"));
m_playAction->setCheckable(true);
......
......@@ -83,10 +83,10 @@ private:
QCheckBox *m_recVideo;
QCheckBox *m_recAudio;
QSlider *m_audioCaptureSlider;
bool m_checkAudio;
bool m_checkVideo;
bool m_checkAudio{false};
bool m_checkVideo{false};
Mlt::Producer *createV4lProducer();
int m_screenIndex;
int m_screenIndex{0};
private slots:
void slotSetScreen(int ScreenIndex);
......
......@@ -42,8 +42,6 @@
ResourceWidget::ResourceWidget(QWidget *parent)
: QWidget(parent)
, m_currentProvider(nullptr)
, m_currentItem(nullptr)
{
setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
setupUi(this);
......
......@@ -76,8 +76,8 @@ private slots:
void slotAccessTokenReceived(const QString &accessToken);
private:
std::unique_ptr<ProviderModel> *m_currentProvider;
QListWidgetItem *m_currentItem;
std::unique_ptr<ProviderModel> *m_currentProvider{nullptr};
QListWidgetItem *m_currentItem{nullptr};
QTemporaryFile *m_tmpThumbFile;
/** @brief Default icon size for the views. */
QSize m_iconSize;
......
......@@ -65,8 +65,6 @@ static QString getProjectNameFilters(bool ark=true) {
ProjectManager::ProjectManager(QObject *parent)
: QObject(parent)
, m_mainTimelineModel(nullptr)
, m_loading(false)
{
m_fileRevert = KStandardAction::revert(this, SLOT(slotRevert()), pCore->window()->actionCollection());
m_fileRevert->setIcon(QIcon::fromTheme(QStringLiteral("document-revert")));
......
......@@ -206,7 +206,7 @@ private:
NotesPlugin *m_notesPlugin;
QProgressDialog *m_progressDialog{nullptr};
/** @brief If true, means we are still opening Kdenlive, send messages to splash screen */
bool m_loading;
bool m_loading{false};
void saveRecentFiles();
};
......
......@@ -54,7 +54,6 @@ const int TimelineWidget::comboScale[] = {1, 2, 4, 8, 15, 30, 50, 75, 100, 150,
TimelineWidget::TimelineWidget(QWidget *parent)
: QQuickWidget(parent)
, m_targetsGroup(nullptr)
{
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(engine());
......
......@@ -97,7 +97,7 @@ private:
QMenu *m_guideMenu;
QMenu *m_headerMenu;
QMenu *m_targetsMenu;
QActionGroup *m_targetsGroup;
QActionGroup *m_targetsGroup{nullptr};
QMenu *m_thumbsMenu;
QMenu *m_favEffects;
QMenu *m_favCompositions;
......
......@@ -34,7 +34,6 @@
TransitionStackView::TransitionStackView(QWidget *parent)
: AssetParameterView(parent)
, m_trackBox(nullptr)
{
}
......
......@@ -46,7 +46,7 @@ signals:
void seekToTransPos(int pos);
private:
QComboBox *m_trackBox;
QComboBox *m_trackBox{nullptr};
};
#endif
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