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 c888fa3c authored by Nicolas Carion's avatar Nicolas Carion

fix compilation on clang

parent f042777c
......@@ -36,7 +36,7 @@
#include <QJsonObject>
#include <klocalizedstring.h>
std::array<QColor, 5> MarkerListModel::markerTypes = {{Qt::red, Qt::blue, Qt::green, Qt::yellow, Qt::cyan}};
std::array<QColor, 5> MarkerListModel::markerTypes{{Qt::red, Qt::blue, Qt::green, Qt::yellow, Qt::cyan}};
MarkerListModel::MarkerListModel(const QString &clipId, std::weak_ptr<DocUndoStack> undo_stack, QObject *parent)
: QAbstractListModel(parent)
......
......@@ -29,6 +29,7 @@
#include <QAbstractListModel>
#include <QReadWriteLock>
#include <array>
#include <map>
#include <memory>
......@@ -119,7 +120,7 @@ public:
@param clip: pointer to the clip if we are editing a marker
@return true if dialog was accepted and modification successful
*/
bool editMarkerGui(const GenTime &pos, QWidget *parent, bool createIfNotFound, ClipController* clip = nullptr);
bool editMarkerGui(const GenTime &pos, QWidget *parent, bool createIfNotFound, ClipController *clip = nullptr);
// Mandatory overloads
QVariant data(const QModelIndex &index, int role) const override;
......@@ -127,14 +128,14 @@ public:
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
public slots:
/* @brief Imports a list of markers from json data
The data should be formated as follows:
[{"pos":0.2, "comment":"marker 1", "type":1}, {...}, ...]
return true on succes and logs undo object
@param ignoreConflicts: if set to false, it aborts if the data contains a marker with same position but different comment and/or type. If set to true,
such markers are overridden silently
@param pushUndo: if true, create an undo object
*/
/* @brief Imports a list of markers from json data
The data should be formated as follows:
[{"pos":0.2, "comment":"marker 1", "type":1}, {...}, ...]
return true on succes and logs undo object
@param ignoreConflicts: if set to false, it aborts if the data contains a marker with same position but different comment and/or type. If set to true,
such markers are overridden silently
@param pushUndo: if true, create an undo object
*/
bool importFromJson(const QString &data, bool ignoreConflicts, bool pushUndo = true);
protected:
......@@ -160,6 +161,7 @@ protected:
/* @brief Connects the signals of this object */
void setup();
private:
std::weak_ptr<DocUndoStack> m_undoStack;
......
......@@ -25,8 +25,9 @@
#include "abstractmodel/treeitem.hpp"
#include "utils/KoIconUtils.h"
#include <KLocalizedString>
#include <vector>
#include <array>
#include <functional>
#include <vector>
ProfileTreeModel::ProfileTreeModel(QObject *parent)
: AbstractTreeModel(parent)
......
......@@ -21,6 +21,7 @@
#include "snapmodel.hpp"
#include <QDebug>
#include <limits.h>
#include <cstdlib>
SnapModel::SnapModel() = default;
......@@ -57,7 +58,7 @@ int SnapModel::getClosestPoint(int position)
--it;
prev = (*it).first;
}
if (std::abs((long long)position - prev) < std::abs((long long)position - next)) {
if (std::llabs((long long)position - prev) < std::llabs((long long)position - next)) {
return (int)prev;
}
return (int)next;
......
......@@ -39,7 +39,9 @@ TimelineTabs::TimelineTabs(QWidget *parent)
connectTimeline(m_mainTimeline);
// Resize to 0 the size of the close button of the main timeline, so that the user cannnot close it.
tabBar()->tabButton(0, QTabBar::RightSide)->resize(0, 0);
if (tabBar()->tabButton(0, QTabBar::RightSide) != nullptr) {
tabBar()->tabButton(0, QTabBar::RightSide)->resize(0, 0);
}
connect(pCore->monitorManager()->projectMonitor(), &Monitor::zoneUpdated, m_mainTimeline, &TimelineWidget::zoneUpdated);
connect(m_mainTimeline, &TimelineWidget::zoneMoved, pCore->monitorManager()->projectMonitor(), &Monitor::slotLoadClipZone);
connect(pCore->monitorManager()->projectMonitor(), &Monitor::addEffect, m_mainTimeline->controller(), &TimelineController::addEffectToCurrentClip);
......
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