mirror of
https://invent.kde.org/multimedia/kdenlive.git
synced 2025-07-17 03:20:07 +00:00
Cleanup unused code (mostly commented logging)
This commit is contained in:
parent
f4d371f2a5
commit
6a9fa83cbd
44 changed files with 7 additions and 293 deletions
|
@ -205,7 +205,7 @@ SPDX-FileCopyrightText = "2020 Kdenlive contributors"
|
|||
SPDX-License-Identifier = "CC-BY-SA-4.0"
|
||||
|
||||
[[annotations]]
|
||||
path = ["src/qml/qmldir", "src/kdenlivesettings.kcfgc"]
|
||||
path = ["src/qml/qmldir"]
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "None"
|
||||
SPDX-License-Identifier = "CC0-1.0"
|
||||
|
|
|
@ -83,14 +83,12 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat
|
|||
generatorProcess.start(renderer, args);
|
||||
if (generatorProcess.waitForFinished()) {
|
||||
if (generatorProcess.exitStatus() == QProcess::CrashExit) {
|
||||
// qDebug() << "/// Generator failed: ";
|
||||
QString error = QString::fromLocal8Bit(generatorProcess.readAllStandardError());
|
||||
KMessageBox::error(QApplication::activeWindow(), i18n("Failed to generate clip:\n%1", error), i18n("Generator Failed"));
|
||||
} else {
|
||||
result = view.path->url();
|
||||
}
|
||||
} else {
|
||||
// qDebug() << "/// Generator failed: ";
|
||||
QString error = QString::fromLocal8Bit(generatorProcess.readAllStandardError());
|
||||
KMessageBox::error(QApplication::activeWindow(), i18n("Failed to generate clip:\n%1", error), i18n("Generator Failed"));
|
||||
}
|
||||
|
|
|
@ -217,7 +217,6 @@ template <typename AssetType> bool AbstractAssetsRepository<AssetType>::parseInf
|
|||
paramlistdisplay_str += QLatin1String(";")+QLatin1String(param_list_values.get_name(jff));
|
||||
}
|
||||
|
||||
// qDebug() << " paramlist: " << paramlist_str << "\n";
|
||||
params.setAttribute(QStringLiteral("paramlist"), paramlistdisplay_str);
|
||||
|
||||
QDomElement pname = doc.createElement(QStringLiteral("paramlistdisplay"));
|
||||
|
|
|
@ -589,7 +589,6 @@ Fun KeyframeModel::updateKeyframe_lambda(GenTime pos, KeyframeType::KeyframeEnum
|
|||
{
|
||||
QWriteLocker locker(&m_lock);
|
||||
return [this, pos, type, value, notify]() {
|
||||
// qDebug() << "update lambda" << pos.frames(pCore->getCurrentFps()) << value << notify;
|
||||
Q_ASSERT(m_keyframeList.count(pos) > 0);
|
||||
int row = static_cast<int>(std::distance(m_keyframeList.begin(), m_keyframeList.find(pos)));
|
||||
m_keyframeList[pos].first = type;
|
||||
|
@ -1323,7 +1322,6 @@ void KeyframeModel::refresh(int in, int out)
|
|||
}
|
||||
if (animData == m_lastData) {
|
||||
// nothing to do
|
||||
// qDebug() << "// DATA WAS ALREADY PARSED, ABORTING REFRESH\n";
|
||||
return;
|
||||
}
|
||||
if (m_paramType == ParamType::Roto_spline) {
|
||||
|
|
|
@ -844,7 +844,6 @@ void KeyframeModelList::resizeKeyframes(int oldIn, int oldOut, int in, int out,
|
|||
break;
|
||||
}
|
||||
}
|
||||
// qDebug()<<"/// \n\nKEYS TO DELETE: "<<positions<<"\n------------------------";
|
||||
}
|
||||
} else {
|
||||
// Adjusting clip end
|
||||
|
|
|
@ -436,7 +436,6 @@ void AssetParameterModel::internalSetParameter(const QString name, const QString
|
|||
}
|
||||
}
|
||||
}
|
||||
// qDebug() << " = = SET EFFECT PARAM: " << name << " = " << m_asset->get(name.toLatin1().constData());
|
||||
}
|
||||
|
||||
const QChar AssetParameterModel::getKeyframeType(const QString keyframeString)
|
||||
|
@ -718,7 +717,6 @@ const QString AssetParameterModel::framesToTime(int t) const
|
|||
|
||||
int AssetParameterModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
// qDebug() << "===================================================== Requested rowCount" << parent << m_rows.size();
|
||||
if (parent.isValid()) return 0;
|
||||
return m_rows.size();
|
||||
}
|
||||
|
|
|
@ -752,7 +752,6 @@ QString KeyframeImport::selectedTarget() const
|
|||
|
||||
void KeyframeImport::drawKeyFrameChannels(QPixmap &pix, int in, int out, int limitKeyframes, const QColor &textColor)
|
||||
{
|
||||
// qDebug() << "============= DRAWING KFR CHANNS: " << m_dataCombo->currentData().toString();
|
||||
std::shared_ptr<Mlt::Properties> animData = KeyframeModel::getAnimation(m_model, m_dataCombo->currentData().toString());
|
||||
QRect br(0, 0, pix.width(), pix.height());
|
||||
double frameFactor = double(out - in) / br.width();
|
||||
|
@ -828,7 +827,6 @@ void KeyframeImport::drawKeyFrameChannels(QPixmap &pix, int in, int out, int lim
|
|||
if (xDist > 0) {
|
||||
painter.setPen(cX);
|
||||
int val = int((rect.x - xOffset) * maxHeight / xDist);
|
||||
// qDebug() << "// DRAWINC CURVE : " << rect.x << ", POS: " << (int(i * frameFactor) + in) << ", RESULT: " << val;
|
||||
painter.drawLine(i, maxHeight - val, i, maxHeight);
|
||||
}
|
||||
if (yDist > 0) {
|
||||
|
@ -839,7 +837,6 @@ void KeyframeImport::drawKeyFrameChannels(QPixmap &pix, int in, int out, int lim
|
|||
if (wDist > 0) {
|
||||
painter.setPen(cW);
|
||||
int val = int((rect.w - wOffset) * maxHeight / wDist);
|
||||
// qDebug() << "// OFFSET: " << wOffset << ", maxH: " << maxHeight << ", wDIst:" << wDist << " = " << val;
|
||||
painter.drawLine(i, maxHeight - val, i, maxHeight);
|
||||
}
|
||||
if (hDist > 0) {
|
||||
|
|
|
@ -313,7 +313,6 @@ KeyframeWidget::KeyframeWidget(std::shared_ptr<AssetParameterModel> model, QMode
|
|||
QList<QCheckBox *> cbs = d.findChildren<QCheckBox *>();
|
||||
QMap<QPersistentModelIndex, QStringList> params;
|
||||
for (auto c : std::as_const(cbs)) {
|
||||
// qDebug()<<"=== FOUND CBS: "<<KLocalizedString::removeAcceleratorMarker(c->text());
|
||||
if (c->isChecked()) {
|
||||
QPersistentModelIndex ix = c->property("index").toModelIndex();
|
||||
if (rectParams.contains(ix)) {
|
||||
|
|
143
src/bin/bin.cpp
143
src/bin/bin.cpp
|
@ -4704,149 +4704,6 @@ void Bin::slotOpenClipExtern()
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void Bin::slotGotFilterJobResults(const QString &id, int startPos, int track, const stringMap &results, const stringMap &filterInfo)
|
||||
{
|
||||
if (filterInfo.contains(QStringLiteral("finalfilter"))) {
|
||||
if (filterInfo.contains(QStringLiteral("storedata"))) {
|
||||
// Store returned data as clip extra data
|
||||
std::shared_ptr<ProjectClip> clip = getBinClip(id);
|
||||
if (clip) {
|
||||
QString key = filterInfo.value(QStringLiteral("key"));
|
||||
QStringList newValue = clip->updatedAnalysisData(key, results.value(key), filterInfo.value(QStringLiteral("offset")).toInt());
|
||||
slotAddClipExtraData(id, newValue.at(0), newValue.at(1));
|
||||
}
|
||||
}
|
||||
if (startPos == -1) {
|
||||
// Processing bin clip
|
||||
std::shared_ptr<ProjectClip> currentItem = m_itemModel->getClipByBinID(id);
|
||||
if (!currentItem) {
|
||||
return;
|
||||
}
|
||||
std::shared_ptr<ClipController> ctl = std::static_pointer_cast<ClipController>(currentItem);
|
||||
EffectsList list = ctl->effectList();
|
||||
QDomElement effect = list.effectById(filterInfo.value(QStringLiteral("finalfilter")));
|
||||
QDomDocument doc;
|
||||
QDomElement e = doc.createElement(QStringLiteral("test"));
|
||||
doc.appendChild(e);
|
||||
e.appendChild(doc.importNode(effect, true));
|
||||
if (!effect.isNull()) {
|
||||
QDomElement newEffect = effect.cloneNode().toElement();
|
||||
QMap<QString, QString>::const_iterator i = results.constBegin();
|
||||
while (i != results.constEnd()) {
|
||||
EffectsList::setParameter(newEffect, i.key(), i.value());
|
||||
++i;
|
||||
}
|
||||
ctl->updateEffect(newEffect, effect.attribute(QStringLiteral("kdenlive_ix")).toInt());
|
||||
Q_EMIT requestClipShow(currentItem);
|
||||
// TODO use undo / redo for bin clip edit effect
|
||||
//
|
||||
EditEffectCommand *command = new EditEffectCommand(this, clip->track(), clip->startPos(), effect, newEffect, clip->selectedEffectIndex(),
|
||||
true, true);
|
||||
m_commandStack->push(command);
|
||||
Q_EMIT clipItemSelected(clip);
|
||||
}
|
||||
|
||||
// Q_EMIT gotFilterJobResults(id, startPos, track, results, filterInfo);
|
||||
return;
|
||||
}
|
||||
// This is a timeline filter, forward results
|
||||
Q_EMIT gotFilterJobResults(id, startPos, track, results, filterInfo);
|
||||
return;
|
||||
}
|
||||
// Currently, only the first value of results is used
|
||||
std::shared_ptr<ProjectClip> clip = getBinClip(id);
|
||||
if (!clip) {
|
||||
return;
|
||||
}
|
||||
// Check for return value
|
||||
int markersType = -1;
|
||||
if (filterInfo.contains(QStringLiteral("addmarkers"))) {
|
||||
markersType = filterInfo.value(QStringLiteral("addmarkers")).toInt();
|
||||
}
|
||||
if (results.isEmpty()) {
|
||||
Q_EMIT displayBinMessage(i18n("No data returned from clip analysis"), KMessageWidget::Warning);
|
||||
return;
|
||||
}
|
||||
bool dataProcessed = false;
|
||||
QString label = filterInfo.value(QStringLiteral("label"));
|
||||
QString key = filterInfo.value(QStringLiteral("key"));
|
||||
int offset = filterInfo.value(QStringLiteral("offset")).toInt();
|
||||
QStringList value = results.value(key).split(QLatin1Char(';'), Qt::SkipEmptyParts);
|
||||
// qCDebug(KDENLIVE_LOG)<<"// RESULT; "<<key<<" = "<<value;
|
||||
if (filterInfo.contains(QStringLiteral("resultmessage"))) {
|
||||
QString mess = filterInfo.value(QStringLiteral("resultmessage"));
|
||||
mess.replace(QLatin1String("%count"), QString::number(value.count()));
|
||||
Q_EMIT displayBinMessage(mess, KMessageWidget::Information);
|
||||
} else {
|
||||
Q_EMIT displayBinMessage(i18n("Processing data analysis"), KMessageWidget::Information);
|
||||
}
|
||||
if (filterInfo.contains(QStringLiteral("cutscenes"))) {
|
||||
// Check if we want to cut scenes from returned data
|
||||
dataProcessed = true;
|
||||
int cutPos = 0;
|
||||
auto *command = new QUndoCommand();
|
||||
command->setText(i18n("Auto Split Clip"));
|
||||
for (const QString &pos : value) {
|
||||
if (!pos.contains(QLatin1Char('='))) {
|
||||
continue;
|
||||
}
|
||||
int newPos = pos.section(QLatin1Char('='), 0, 0).toInt();
|
||||
// Don't use scenes shorter than 1 second
|
||||
if (newPos - cutPos < 24) {
|
||||
continue;
|
||||
}
|
||||
new AddBinClipCutCommand(this, id, cutPos + offset, newPos + offset, true, command);
|
||||
cutPos = newPos;
|
||||
}
|
||||
if (command->childCount() == 0) {
|
||||
delete command;
|
||||
} else {
|
||||
m_doc->commandStack()->push(command);
|
||||
}
|
||||
}
|
||||
if (markersType >= 0) {
|
||||
// Add markers from returned data
|
||||
dataProcessed = true;
|
||||
int cutPos = 0;
|
||||
int index = 1;
|
||||
bool simpleList = false;
|
||||
double sourceFps = clip->getOriginalFps();
|
||||
if (qFuzzyIsNull(sourceFps)) {
|
||||
sourceFps = pCore->getCurrentFps();
|
||||
}
|
||||
if (filterInfo.contains(QStringLiteral("simplelist"))) {
|
||||
// simple list
|
||||
simpleList = true;
|
||||
}
|
||||
for (const QString &pos : value) {
|
||||
if (simpleList) {
|
||||
clip->getMarkerModel()->addMarker(GenTime((int)(pos.toInt() * pCore->getCurrentFps() / sourceFps), pCore->getCurrentFps()), label + pos,
|
||||
markersType);
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
if (!pos.contains(QLatin1Char('='))) {
|
||||
continue;
|
||||
}
|
||||
int newPos = pos.section(QLatin1Char('='), 0, 0).toInt();
|
||||
// Don't use scenes shorter than 1 second
|
||||
if (newPos - cutPos < 24) {
|
||||
continue;
|
||||
}
|
||||
clip->getMarkerModel()->addMarker(GenTime(newPos + offset, pCore->getCurrentFps()), label + QString::number(index), markersType);
|
||||
index++;
|
||||
cutPos = newPos;
|
||||
}
|
||||
}
|
||||
if (!dataProcessed || filterInfo.contains(QStringLiteral("storedata"))) {
|
||||
// Store returned data as clip extra data
|
||||
QStringList newValue = clip->updatedAnalysisData(key, results.value(key), offset);
|
||||
slotAddClipExtraData(id, newValue.at(0), newValue.at(1));
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// TODO: move title editing into a better place...
|
||||
void Bin::showTitleWidget(const std::shared_ptr<ProjectClip> &clip)
|
||||
{
|
||||
|
|
|
@ -274,7 +274,6 @@ void MediaBrowser::detectShortcutConflicts()
|
|||
a->setEnabled(false);
|
||||
}
|
||||
}
|
||||
// qDebug()<<"::: FOUND BROWSER SHORTCUTS: "<<shortcutsList<<"\n__________________________";
|
||||
QList<QAction *> appActions = pCore->window()->actionCollection()->actions();
|
||||
for (auto &a : appActions) {
|
||||
QKeySequence sh = a->shortcut();
|
||||
|
|
|
@ -242,8 +242,6 @@ void SubtitleModel::importSubtitle(const QString &filePath, int offset, bool ext
|
|||
QLatin1Char separator = filePath.endsWith(".sbv") ? QLatin1Char(',') : QLatin1Char(' ');
|
||||
while (stream.readLineInto(&line)) {
|
||||
line = line.trimmed();
|
||||
// qDebug()<<"Turn: "<<turn;
|
||||
// qDebug()<<"Line: "<<line;
|
||||
if (!line.isEmpty()) {
|
||||
if (!turn) {
|
||||
// index=atoi(line.toStdString().c_str());
|
||||
|
@ -275,7 +273,6 @@ void SubtitleModel::importSubtitle(const QString &filePath, int offset, bool ext
|
|||
if (endPos > startPos) {
|
||||
addSubtitle({0, startPos + subtitleOffset}, SubtitleEvent(true, endPos + subtitleOffset, "Default", "", 0, 0, 0, "", comment), undo, redo,
|
||||
false);
|
||||
// qDebug() << "Adding Subtitle: \n Start time: " << start << "\n End time: " << end << "\n Text: " << comment;
|
||||
} else {
|
||||
qDebug() << "===== INVALID SUBTITLE FOUND: " << start << "-" << end << ", " << comment;
|
||||
}
|
||||
|
@ -314,36 +311,27 @@ void SubtitleModel::importSubtitle(const QString &filePath, int offset, bool ext
|
|||
line = line.simplified();
|
||||
if (!line.isEmpty()) {
|
||||
if (!turn) {
|
||||
// qDebug() << " turn = 0 " << line;
|
||||
// check if it is script info, event,or v4+ style
|
||||
QString linespace = line;
|
||||
if (linespace.replace(" ", "").contains("ScriptInfo")) {
|
||||
// qDebug()<< "Script Info";
|
||||
section = "Script Info";
|
||||
turn++;
|
||||
// qDebug()<< "turn" << turn;
|
||||
continue;
|
||||
} else if (linespace.contains("KdenliveExtradata")) {
|
||||
// qDebug()<< "KdenliveExtradata";
|
||||
section = "Kdenlive Extradata";
|
||||
turn++;
|
||||
// qDebug()<< "turn" << turn;
|
||||
continue;
|
||||
} else if (line.contains("Styles")) {
|
||||
// qDebug()<< "V4+ Styles";
|
||||
section = "V4+ Styles";
|
||||
turn++;
|
||||
// qDebug()<< "turn" << turn;
|
||||
continue;
|
||||
} else if (line.contains("Fonts")) {
|
||||
section = "Fonts";
|
||||
turn++;
|
||||
// qDebug()<< "turn" << turn;
|
||||
continue;
|
||||
} else if (line.contains("Events")) {
|
||||
turn++;
|
||||
section = "Events";
|
||||
// qDebug()<< "turn" << turn;
|
||||
continue;
|
||||
} else {
|
||||
// unknown section
|
||||
|
@ -377,7 +365,6 @@ void SubtitleModel::importSubtitle(const QString &filePath, int offset, bool ext
|
|||
m_subtitleStyles[line.section(":", 1).trimmed().split(",").at(0)] = SubtitleStyle(line);
|
||||
}
|
||||
}
|
||||
// qDebug() << "\n turn != 0 " << turn<< line;
|
||||
if (section.contains("Fonts")) {
|
||||
fontSection += line + "\n";
|
||||
}
|
||||
|
@ -411,11 +398,6 @@ void SubtitleModel::importSubtitle(const QString &filePath, int offset, bool ext
|
|||
}
|
||||
assFile.close();
|
||||
} else {
|
||||
if (endPos > startPos) {
|
||||
// addSubtitle({0, startPos + subtitleOffset}, endPos + subtitleOffset, event, undo, redo, false);
|
||||
} else {
|
||||
// qDebug() << "===== INVALID VTT SUBTITLE FOUND: " << start << "-" << end << ", " << event;
|
||||
}
|
||||
// reinitialize for next comment:
|
||||
comment.clear();
|
||||
timeLine.clear();
|
||||
|
@ -515,7 +497,6 @@ bool SubtitleModel::addSubtitle(int id, std::pair<int, GenTime> start, const Sub
|
|||
if (!temporary && event.endTime().frames(pCore->getCurrentFps()) > m_timeline->duration()) {
|
||||
m_timeline->updateDuration();
|
||||
}
|
||||
// qDebug() << "Added to model";
|
||||
if (updateFilter) {
|
||||
Q_EMIT modelChanged();
|
||||
}
|
||||
|
@ -1188,14 +1169,12 @@ void SubtitleModel::subtitleFileFromZone(int in, int out, const QString &outFile
|
|||
currentSubtitle.insert(QLatin1String("startPos"), QJsonValue(inTime.seconds()));
|
||||
currentSubtitle.insert(QLatin1String("dialogue"), QJsonValue(subtitle.second.toString(layer, inTime)));
|
||||
list.push_back(currentSubtitle);
|
||||
// qDebug()<<subtitle.first.seconds();
|
||||
}
|
||||
saveSubtitleData(list, outFile);
|
||||
}
|
||||
|
||||
const QJsonArray SubtitleModel::toJson()
|
||||
{
|
||||
// qDebug()<< "to JSON";
|
||||
QJsonArray list;
|
||||
for (const auto &subtitle : m_subtitleList) {
|
||||
QJsonObject currentSubtitle;
|
||||
|
@ -1203,7 +1182,6 @@ const QJsonArray SubtitleModel::toJson()
|
|||
currentSubtitle.insert(QLatin1String("startPos"), QJsonValue(subtitle.first.second.seconds()));
|
||||
currentSubtitle.insert(QLatin1String("dialogue"), QJsonValue(subtitle.second.toString(subtitle.first.first, subtitle.first.second)));
|
||||
list.push_back(currentSubtitle);
|
||||
// qDebug()<<subtitle.first.seconds();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
@ -1264,7 +1242,6 @@ int SubtitleModel::saveSubtitleData(const QJsonArray &list, const QString &outFi
|
|||
}
|
||||
QFile outF(outFile);
|
||||
|
||||
// qDebug()<< "Import from JSON";
|
||||
QWriteLocker locker(&m_lock);
|
||||
if (list.isEmpty()) {
|
||||
qDebug() << "Error : Json file should be an array";
|
||||
|
@ -1331,7 +1308,6 @@ int SubtitleModel::saveSubtitleData(const QJsonArray &list, const QString &outFi
|
|||
qDebug() << sub.text() << '\n';
|
||||
}
|
||||
|
||||
// qDebug() << "ADDING SUBTITLE to FILE AT START POS: " << startPos <<" END POS: "<<endPos;//<< ", FPS: " << pCore->getCurrentFps();
|
||||
}
|
||||
outF.close();
|
||||
}
|
||||
|
|
|
@ -331,7 +331,6 @@ void MediaCapture::recordAudio(const QUuid &uuid, int tid, bool record)
|
|||
QtAudio::convertVolume(KdenliveSettings::audiocapturevolume() / 100.0, QtAudio::LogarithmicVolumeScale, QtAudio::LinearVolumeScale);
|
||||
#endif
|
||||
m_audioSource->setVolume(linearVolume);
|
||||
// qDebug()<<"START AREC: "<<m_path<<"\n; CODECS: "<<m_audioRecorder->supportedAudioCodecs();
|
||||
connect(m_mediaRecorder.get(), &QMediaRecorder::errorChanged, this, &MediaCapture::displayErrorMessage);
|
||||
|
||||
// audioSettings.setCodec("audio/x-flac");
|
||||
|
|
|
@ -263,7 +263,6 @@ bool MltDeviceCapture::slotStartPreview(const QString &producer, bool xmlFormat)
|
|||
delete m_mltProducer;
|
||||
m_mltProducer = nullptr;
|
||||
}
|
||||
// qCDebug(KDENLIVE_LOG)<<"//// ERROR CREATRING PROD";
|
||||
return false;
|
||||
}
|
||||
m_mltConsumer->connect(*m_mltProducer);
|
||||
|
@ -273,7 +272,6 @@ bool MltDeviceCapture::slotStartPreview(const QString &producer, bool xmlFormat)
|
|||
return false;
|
||||
}
|
||||
m_droppedFramesTimer.start();
|
||||
// connect(this, SIGNAL(imageReady(QImage)), this, SIGNAL(frameUpdated(QImage)));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -424,7 +422,6 @@ bool MltDeviceCapture::slotStartCapture(const QString ¶ms, const QString &pa
|
|||
lock.unlock();
|
||||
|
||||
if (m_mltProducer == nullptr || !m_mltProducer->is_valid()) {
|
||||
// qCDebug(KDENLIVE_LOG)<<"//// ERROR CREATRING PROD";
|
||||
delete m_mltConsumer;
|
||||
m_mltConsumer = nullptr;
|
||||
delete m_mltProducer;
|
||||
|
@ -451,7 +448,6 @@ void MltDeviceCapture::setOverlay(const QString &path)
|
|||
}
|
||||
Mlt::Producer parentProd(m_mltProducer->parent());
|
||||
if (parentProd.get_producer() == nullptr) {
|
||||
// qCDebug(KDENLIVE_LOG) << "PLAYLIST BROKEN, CANNOT INSERT CLIP //////";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -612,21 +612,15 @@ void KdenliveSettingsDialog::setupJogshuttleBtns(const QString &device)
|
|||
QMap<QString, QString> mappable_actions(m_mappable_actions);
|
||||
QList<QString> action_names = mappable_actions.keys();
|
||||
QList<QString>::Iterator iter = action_names.begin();
|
||||
// qCDebug(KDENLIVE_LOG) << "::::::::::::::::";
|
||||
while (iter != action_names.end()) {
|
||||
// qCDebug(KDENLIVE_LOG) << *iter;
|
||||
++iter;
|
||||
}
|
||||
|
||||
// qCDebug(KDENLIVE_LOG) << "::::::::::::::::";
|
||||
|
||||
std::sort(action_names.begin(), action_names.end());
|
||||
iter = action_names.begin();
|
||||
while (iter != action_names.end()) {
|
||||
// qCDebug(KDENLIVE_LOG) << *iter;
|
||||
++iter;
|
||||
}
|
||||
// qCDebug(KDENLIVE_LOG) << "::::::::::::::::";
|
||||
|
||||
// Here we need to compute the action_id -> index-in-action_names. We iterate over the
|
||||
// action_names, as the sorting may depend on the user-language.
|
||||
|
@ -821,11 +815,8 @@ void KdenliveSettingsDialog::fillMonitorData()
|
|||
void KdenliveSettingsDialog::slotReadAudioDevices()
|
||||
{
|
||||
QString result = QString(m_readProcess.readAllStandardOutput());
|
||||
// qCDebug(KDENLIVE_LOG) << "// / / / / / READING APLAY: ";
|
||||
// qCDebug(KDENLIVE_LOG) << result;
|
||||
const QStringList lines = result.split(QLatin1Char('\n'));
|
||||
for (const QString &devicestr : lines) {
|
||||
////qCDebug(KDENLIVE_LOG) << "// READING LINE: " << data;
|
||||
if (!devicestr.startsWith(QLatin1Char(' ')) && devicestr.count(QLatin1Char(':')) > 1) {
|
||||
QString card = devicestr.section(QLatin1Char(':'), 0, 0).section(QLatin1Char(' '), -1);
|
||||
QString device = devicestr.section(QLatin1Char(':'), 1, 1).section(QLatin1Char(' '), -1);
|
||||
|
@ -944,7 +935,6 @@ void KdenliveSettingsDialog::slotUpdateShuttleDevice(int ix)
|
|||
void KdenliveSettingsDialog::updateWidgets()
|
||||
{
|
||||
// Revert widgets to last saved state (for example when user pressed "Cancel")
|
||||
// //qCDebug(KDENLIVE_LOG) << "// // // KCONFIG Revert called";
|
||||
#ifdef USE_JOGSHUTTLE
|
||||
// revert jog shuttle device
|
||||
if (m_configShuttle.shuttledevicelist->count() > 0) {
|
||||
|
@ -999,7 +989,6 @@ void KdenliveSettingsDialog::updateExternalApps()
|
|||
void KdenliveSettingsDialog::updateSettings()
|
||||
{
|
||||
// Save changes to settings (for example when user pressed "Apply" or "Ok")
|
||||
// //qCDebug(KDENLIVE_LOG) << "// // // KCONFIG UPDATE called";
|
||||
if (m_pw->selectedProfile().isEmpty()) {
|
||||
KMessageBox::error(this, i18n("Please select a video profile"));
|
||||
return;
|
||||
|
|
|
@ -174,7 +174,6 @@ void VideoTextEdit::rebuildZones()
|
|||
for (int i = 0; i < document()->blockCount(); ++i) {
|
||||
int start = curs.position() + 1;
|
||||
QString anchorStart = selectionStartAnchor(curs, start, document()->characterCount());
|
||||
// qDebug()<<"=== START ANCHOR: "<<anchorStart<<" AT POS: "<<curs.position();
|
||||
curs.movePosition(QTextCursor::EndOfBlock, QTextCursor::MoveAnchor);
|
||||
int end = curs.position() - 1;
|
||||
QString anchorEnd = selectionEndAnchor(curs, end, start);
|
||||
|
@ -337,7 +336,6 @@ QVector<QPoint> VideoTextEdit::fullExport()
|
|||
QTextCursor curs(block);
|
||||
int start = curs.position() + 1;
|
||||
QString anchorStart = selectionStartAnchor(curs, start, document()->characterCount());
|
||||
// qDebug()<<"=== START ANCHOR: "<<anchorStart<<" AT POS: "<<curs.position();
|
||||
curs.movePosition(QTextCursor::EndOfBlock, QTextCursor::MoveAnchor);
|
||||
int end = curs.position() - 1;
|
||||
QString anchorEnd = selectionEndAnchor(curs, end, start);
|
||||
|
|
|
@ -425,7 +425,6 @@ void RemapView::mouseMoveEvent(QMouseEvent *event)
|
|||
}
|
||||
return;
|
||||
}
|
||||
// qDebug()<<"=== MOVING MOUSE: "<<pos<<" = "<<m_currentKeyframe<<", MOVE KFMODE: "<<m_moveKeyframeMode;
|
||||
if ((m_currentKeyframe.second == pos + m_inFrame && m_moveKeyframeMode == TopMove) ||
|
||||
(m_currentKeyframe.first == pos + m_inFrame && m_moveKeyframeMode == BottomMove)) {
|
||||
return;
|
||||
|
@ -453,7 +452,6 @@ void RemapView::mouseMoveEvent(QMouseEvent *event)
|
|||
if (i.key() < m_currentKeyframe.first) {
|
||||
continue;
|
||||
}
|
||||
// qDebug()<<"=== MOVING KFR: "<<i.key()<<" > "<<(i.key() + delta);
|
||||
// m_keyframes.insert(i.key() + delta, i.value());
|
||||
updated.insert(i.key() + delta, i.value());
|
||||
m_keyframes.remove(i.key());
|
||||
|
@ -1453,7 +1451,6 @@ void RemapView::paintEvent(QPaintEvent *event)
|
|||
*/
|
||||
p.setPen(m_colKeyframe);
|
||||
// Top timeline
|
||||
// qDebug()<<"=== MAX KFR WIDTH: "<<maxWidth<<", DURATION SCALED: "<<(m_duration * m_scale)<<", POS: "<<(m_position * m_scale);
|
||||
int maxPos = maxWidth + m_offset - 1;
|
||||
p.drawLine(m_offset, m_lineHeight, maxPos, m_lineHeight);
|
||||
p.drawLine(m_offset, m_lineHeight - m_lineHeight / 4, m_offset, m_lineHeight + m_lineHeight / 4);
|
||||
|
|
|
@ -579,13 +579,11 @@ void Wizard::installExtraMimes(const QString &baseName, const QStringList &globs
|
|||
extensions << glob;
|
||||
}
|
||||
}
|
||||
// qCDebug(KDENLIVE_LOG) << "EXTS: " << extensions;
|
||||
QDir mimeDir(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/mime/packages/"));
|
||||
if (!mimeDir.exists()) {
|
||||
mimeDir.mkpath(QStringLiteral("."));
|
||||
}
|
||||
QString packageFileName = mimeDir.absoluteFilePath(mimefile + QStringLiteral(".xml"));
|
||||
// qCDebug(KDENLIVE_LOG) << "INSTALLING NEW MIME TO: " << packageFileName;
|
||||
QFile packageFile(packageFileName);
|
||||
if (!packageFile.open(QIODevice::WriteOnly)) {
|
||||
qCCritical(KDENLIVE_LOG) << "Couldn't open" << packageFileName << "for writing";
|
||||
|
|
|
@ -1294,7 +1294,6 @@ QString DocumentChecker::searchFileRecursively(const QDir &dir, const QString &m
|
|||
}
|
||||
}
|
||||
}
|
||||
////qCDebug(KDENLIVE_LOG) << filesAndDirs.at(i) << file.size() << fileHash.toHex();
|
||||
}
|
||||
filesAndDirs = dir.entryList(QDir::Dirs | QDir::Readable | QDir::Executable | QDir::NoDotAndDotDot);
|
||||
for (int i = 0; i < filesAndDirs.size() && foundFileName.isEmpty(); ++i) {
|
||||
|
|
|
@ -88,7 +88,6 @@ KdenliveDoc::KdenliveDoc(QString projectFolder, QUndoGroup *undoGroup, const QSt
|
|||
}
|
||||
connect(m_commandStack.get(), &QUndoStack::indexChanged, this, &KdenliveDoc::slotModified);
|
||||
connect(m_commandStack.get(), &DocUndoStack::invalidate, this, &KdenliveDoc::checkPreviewStack, Qt::DirectConnection);
|
||||
// connect(m_commandStack, SIGNAL(cleanChanged(bool)), this, SLOT(setModified(bool)));
|
||||
pCore->taskManager.unBlock();
|
||||
initializeProperties(true, tracks, audioChannels);
|
||||
|
||||
|
@ -338,13 +337,11 @@ KdenliveDoc::~KdenliveDoc()
|
|||
}
|
||||
}
|
||||
}
|
||||
// qCDebug(KDENLIVE_LOG) << "// DEL CLP MAN";
|
||||
if (pCore->window()) {
|
||||
disconnect(this, &KdenliveDoc::docModified, pCore->window(), &MainWindow::slotUpdateDocumentState);
|
||||
}
|
||||
m_commandStack->clear();
|
||||
m_timelines.clear();
|
||||
// qCDebug(KDENLIVE_LOG) << "// DEL CLP MAN done";
|
||||
if (m_autosave) {
|
||||
if (!m_autosave->fileName().isEmpty()) {
|
||||
m_autosave->remove();
|
||||
|
@ -684,7 +681,6 @@ QDomDocument KdenliveDoc::xmlSceneList(const QString &scene)
|
|||
// check if project contains custom effects to embed them in project file
|
||||
QDomNodeList effects = mlt.elementsByTagName(QStringLiteral("filter"));
|
||||
int maxEffects = effects.count();
|
||||
// qCDebug(KDENLIVE_LOG) << "// FOUD " << maxEffects << " EFFECTS+++++++++++++++++++++";
|
||||
QMap<QString, QString> effectIds;
|
||||
for (int i = 0; i < maxEffects; ++i) {
|
||||
QDomNode m = effects.at(i);
|
||||
|
@ -1165,7 +1161,6 @@ QString KdenliveDoc::searchFileRecursively(const QDir &dir, const QString &match
|
|||
qCDebug(KDENLIVE_LOG) << filesAndDirs.at(i) << "size match but not hash";
|
||||
}
|
||||
}
|
||||
////qCDebug(KDENLIVE_LOG) << filesAndDirs.at(i) << file.size() << fileHash.toHex();
|
||||
}
|
||||
filesAndDirs = dir.entryList(QDir::Dirs | QDir::Readable | QDir::Executable | QDir::NoDotAndDotDot);
|
||||
for (int i = 0; i < filesAndDirs.size() && foundFileName.isEmpty(); ++i) {
|
||||
|
@ -1505,7 +1500,6 @@ void KdenliveDoc::cleanupBackupFiles()
|
|||
if (hourList.count() > 20) {
|
||||
int step = hourList.count() / 10;
|
||||
for (int i = 0; i < hourList.count(); i += step) {
|
||||
// qCDebug(KDENLIVE_LOG)<<"REMOVE AT: "<<i<<", COUNT: "<<hourList.count();
|
||||
hourList.removeAt(i);
|
||||
--i;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,6 @@ std::shared_ptr<EffectTreeModel> EffectTreeModel::construct(const QString &categ
|
|||
QString updatedName = effect.second + i18n(" - deprecated");
|
||||
data = {updatedName, effect.first, QVariant::fromValue(type), isFav, targetCategory->row(), isPreferred, includeListed};
|
||||
} else {
|
||||
// qDebug() << effect.second << effect.first << "in " << targetCategory->dataColumn(0).toString();
|
||||
data = {effect.second, effect.first, QVariant::fromValue(type), isFav, targetCategory->row(), isPreferred, includeListed};
|
||||
}
|
||||
if (KdenliveSettings::favorite_effects().contains(effect.first) && effectCategory.contains(favCategory)) {
|
||||
|
|
|
@ -146,7 +146,6 @@ void EffectsRepository::parseCustomAssetFile(const QString &file_name, std::unor
|
|||
}
|
||||
|
||||
if (customAssets.count(result.id) > 0) {
|
||||
// qDebug() << "duplicate effect" << result.id << ", VERSION= "<<result.version<<", EXISTING: "<<customAssets.at(result.id).version;
|
||||
if (result.version < customAssets.at(result.id).version) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ EffectItemModel::EffectItemModel(const QList<QVariant> &effectData, std::unique_
|
|||
if (m_childEffects.size() == 0) {
|
||||
return;
|
||||
}
|
||||
// qDebug() << "* * *SETTING EFFECT PARAM: " << name << " = " << m_asset->get(name.toUtf8().constData());
|
||||
QMapIterator<int, std::shared_ptr<EffectItemModel>> i(m_childEffects);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
|
|
|
@ -1271,14 +1271,12 @@ void EffectStackModel::registerItem(const std::shared_ptr<TreeItem> &item)
|
|||
QWriteLocker locker(&m_lock);
|
||||
if (!item->isRoot()) {
|
||||
auto effectItem = std::static_pointer_cast<EffectItemModel>(item);
|
||||
// qDebug() << "$$$$$$$$$$$$$$$$$$$$$ Planting effect: " << effectItem->getAssetId();
|
||||
if (effectItem->data(QModelIndex(), AssetParameterModel::RequiresInOut).toBool() == true) {
|
||||
int in = pCore->getItemIn(m_ownerId);
|
||||
int out = in + pCore->getItemDuration(m_ownerId) - 1;
|
||||
effectItem->filter().set_in_and_out(in, out);
|
||||
}
|
||||
if (!m_loadingExisting) {
|
||||
// qDebug() << "$$$$$$$$$$$$$$$$$$$$$ Planting effect in " << m_childServices.size();
|
||||
effectItem->plant(m_masterService);
|
||||
// Check if we have an internal effect that needs to stay on top
|
||||
if (m_ownerId.type == KdenliveObjectType::Master || m_ownerId.type == KdenliveObjectType::TimelineTrack) {
|
||||
|
@ -1658,7 +1656,6 @@ bool EffectStackModel::checkConsistency()
|
|||
if (filt->property_exists("kdenlive_id")) {
|
||||
kdenliveFilterCount++;
|
||||
}
|
||||
// qDebug() << "FILTER: "<<i<<" : "<<ptr->filter(i)->get("mlt_service");
|
||||
}
|
||||
if (kdenliveFilterCount != int(allFilters.size())) {
|
||||
qDebug() << "ERROR: Wrong filter count: " << kdenliveFilterCount << " = " << allFilters.size();
|
||||
|
|
|
@ -895,7 +895,6 @@ void CollapsibleEffectView::updateTimecodeFormat()
|
|||
|
||||
void CollapsibleEffectView::slotUpdateRegionEffectParams(const QDomElement & /*old*/, const QDomElement & /*e*/, int /*ix*/)
|
||||
{
|
||||
// qCDebug(KDENLIVE_LOG)<<"// EMIT CHANGE SUBEFFECT.....:";
|
||||
Q_EMIT parameterChanged(m_original_effect, m_effect, effectIndex());
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,6 @@ void ShuttleThread::shuttle(const media_ctrl_event &ev)
|
|||
int value = ev.value / 2;
|
||||
|
||||
if (value > MaxShuttleRange || value < -MaxShuttleRange) {
|
||||
// qCDebug(KDENLIVE_LOG) << "Jog shuttle value is out of range: " << MaxShuttleRange;
|
||||
return;
|
||||
}
|
||||
QApplication::postEvent(m_parent, new MediaCtrlEvent(MediaCtrlEvent::Shuttle, value));
|
||||
|
@ -194,8 +193,6 @@ DeviceMap JogShuttle::enumerateDevices(const QString &devPath)
|
|||
for (const QString &fileName : fileList) {
|
||||
QString devFullPath = devDir.absoluteFilePath(fileName);
|
||||
QString fileLink = JogShuttle::canonicalDevice(devFullPath);
|
||||
// qCDebug(KDENLIVE_LOG) << QStringLiteral(" [%1] ").arg(fileName);
|
||||
// qCDebug(KDENLIVE_LOG) << QStringLiteral(" [%1] ").arg(fileLink);
|
||||
|
||||
media_ctrl mc;
|
||||
media_ctrl_open_dev(&mc, fileLink.toUtf8().data());
|
||||
|
|
|
@ -5192,7 +5192,6 @@ void MainWindow::disconnectTimeline(TimelineWidget *timeline, bool onClose)
|
|||
if (pCore->currentDoc()) {
|
||||
// pCore->currentDoc()->position = pCore->getTimelinePosition();
|
||||
// disconnect(pCore->currentDoc(), &KdenliveDoc::docModified, this, &MainWindow::slotUpdateDocumentState);
|
||||
// qDebug()<<"=== SETTING POSITION FOR DOC: "<<pCore->currentDoc()->position<<" / "<<pCore->currentDoc()->uuid;
|
||||
}
|
||||
if (!onClose) {
|
||||
// Ensure the active timeline has an transparent black background for embedded compositing
|
||||
|
|
|
@ -1170,7 +1170,6 @@ bool ClipController::supportsProxy() const
|
|||
bool ClipController::hasProxy() const
|
||||
{
|
||||
QString proxy = getProducerProperty(QStringLiteral("kdenlive:proxy"));
|
||||
// qDebug()<<"::: PROXY: "<<proxy<<" = "<<getProducerProperty(QStringLiteral("resource"));
|
||||
return proxy.size() > 2 && proxy == getProducerProperty(QStringLiteral("resource"));
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,6 @@ ScopeWidget::ScopeWidget(QWidget *parent)
|
|||
, m_mutex()
|
||||
, m_size(0, 0)
|
||||
{
|
||||
// qCDebug(KDENLIVE_LOG) << "begin" << m_future.isFinished();
|
||||
// qCDebug(KDENLIVE_LOG) << "end";
|
||||
}
|
||||
|
||||
ScopeWidget::~ScopeWidget() = default;
|
||||
|
|
|
@ -388,7 +388,6 @@ QString SlideshowClip::selectedPath()
|
|||
}
|
||||
QString path = selectedPath(url, m_view.method_mime->isChecked(), QStringLiteral(".all.") + m_view.image_type->currentData().toString(), &list);
|
||||
m_count = list.count();
|
||||
// qCDebug(KDENLIVE_LOG)<<"// SELECTED PATH: "<<path;
|
||||
return path;
|
||||
}
|
||||
|
||||
|
@ -452,7 +451,6 @@ QString SlideshowClip::selectedPath(const QUrl &url, bool isMime, QString extens
|
|||
extension.append(QStringLiteral("?begin=%1").arg(firstFrame));
|
||||
}
|
||||
}
|
||||
// qCDebug(KDENLIVE_LOG) << "// FOUND " << (*list).count() << " items for " << url.toLocalFile();
|
||||
return folder + extension;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,6 @@ void ProjectManager::slotLoadOnOpen()
|
|||
QList<QUrl> urls;
|
||||
urls.reserve(list.count());
|
||||
for (const QString &path : list) {
|
||||
// qCDebug(KDENLIVE_LOG) << QDir::current().absoluteFilePath(path);
|
||||
urls << QUrl::fromLocalFile(QDir::current().absoluteFilePath(path));
|
||||
}
|
||||
pCore->bin()->droppedUrls(urls);
|
||||
|
@ -772,7 +771,6 @@ void ProjectManager::openFile(const QUrl &url)
|
|||
QMimeType mime = db.mimeTypeForUrl(url);
|
||||
if (mime.inherits(QStringLiteral("application/x-compressed-tar")) || mime.inherits(QStringLiteral("application/zip"))) {
|
||||
// Opening a compressed project file, we need to process it
|
||||
// qCDebug(KDENLIVE_LOG)<<"Opening archive, processing";
|
||||
QPointer<ArchiveWidget> ar = new ArchiveWidget(url);
|
||||
if (ar->exec() == QDialog::Accepted) {
|
||||
openFile(QUrl::fromLocalFile(ar->extractedProjectFile()));
|
||||
|
|
|
@ -117,8 +117,6 @@ bool Histogram::isBackgroundDependingOnInput() const
|
|||
|
||||
QRect Histogram::scopeRect()
|
||||
{
|
||||
// qCDebug(KDENLIVE_LOG) << "According to the spacer, the top left point is " << m_ui->verticalSpacer->geometry().x() << '/' <<
|
||||
// m_ui->verticalSpacer->geometry().y();
|
||||
QPoint topleft(offset, offset + m_ui->verticalSpacer->geometry().y());
|
||||
return QRect(topleft, this->rect().size() - QSize(topleft.x() + offset, topleft.y() + offset));
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ QImage WaveformGenerator::calculateWaveform(const QSize &waveformSize, const qre
|
|||
// Must be a float because the acceleration factor can be high, leading to <1 expected px per px.
|
||||
const float pixelDepth = float(totalPixels / accelFactor) / (ww * wh);
|
||||
const float gain = 255.f / (8 * pixelDepth);
|
||||
// qCDebug(KDENLIVE_LOG) << "Pixel depth: expected " << pixelDepth << "; Gain: using " << gain << " (acceleration: " << accelFactor << "x)";
|
||||
|
||||
// Subtract 1 from sizes because we start counting from 0.
|
||||
// Not doing it would result in attempts to paint outside of the image.
|
||||
|
|
|
@ -156,8 +156,6 @@ ClipModel::~ClipModel() = default;
|
|||
bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool logUndo, bool hasMix)
|
||||
{
|
||||
QWriteLocker locker(&m_lock);
|
||||
// qDebug() << "RESIZE CLIP" << m_id << "target size=" << size << "right=" << right << "endless=" << m_endlessResize << "length" <<
|
||||
// m_producer->get_length()<<" > "<<m_producer->get("kdenlive:duration")<<" = "<<m_producer->get("kdenlive:maxduration");
|
||||
int maxDuration = m_producer->get_length();
|
||||
if (!m_endlessResize && (size <= 0 || size > maxDuration) && !hasTimeRemap()) {
|
||||
return false;
|
||||
|
@ -185,7 +183,6 @@ bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool l
|
|||
} else {
|
||||
in += delta;
|
||||
}
|
||||
// qDebug() << "Resize facts delta =" << delta << "old in" << old_in << "old_out" << old_out << "in" << in << "out" << out;
|
||||
std::function<bool(void)> track_operation = []() { return true; };
|
||||
std::function<bool(void)> track_reverse = []() { return true; };
|
||||
int outPoint = out;
|
||||
|
|
|
@ -30,7 +30,6 @@ void GroupsModel::promoteToGroup(int gid, GroupType type)
|
|||
|
||||
auto ptr = m_parent.lock();
|
||||
if (ptr) {
|
||||
// qDebug() << "Registering group" << gid << "of type" << groupTypeToStr(getType(gid));
|
||||
ptr->registerGroup(gid);
|
||||
} else {
|
||||
qDebug() << "Impossible to create group because the timeline is not available anymore";
|
||||
|
@ -43,7 +42,6 @@ void GroupsModel::downgradeToLeaf(int gid)
|
|||
Q_ASSERT(m_downLink.at(gid).size() == 0);
|
||||
auto ptr = m_parent.lock();
|
||||
if (ptr) {
|
||||
// qDebug() << "Deregistering group" << gid << "of type" << groupTypeToStr(getType(gid));
|
||||
ptr->deregisterGroup(gid);
|
||||
m_groupIds.erase(gid);
|
||||
} else {
|
||||
|
|
|
@ -2011,7 +2011,6 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
|
|||
std::sort(sourceTracks.audioIds.begin(), sourceTracks.audioIds.end());
|
||||
std::sort(singleAudioTracks.begin(), singleAudioTracks.end());
|
||||
|
||||
// qDebug()<<"== GOT WANTED TKS\n VIDEO: "<<videoTracks<<"\n AUDIO TKS: "<<audioTracks<<"\n SINGLE AUDIO: "<<singleAudioTracks;
|
||||
int requestedVideoTracks = sourceTracks.videoIds.isEmpty() ? 0 : sourceTracks.videoIds.last() - sourceTracks.videoIds.first() + 1;
|
||||
int requestedAudioTracks = sourceTracks.audioIds.isEmpty() ? 0 : sourceTracks.audioIds.last() - sourceTracks.audioIds.first() + 1;
|
||||
if (requestedVideoTracks > timelineTracks.videoIds.size() || requestedAudioTracks > timelineTracks.audioIds.size()) {
|
||||
|
@ -2097,8 +2096,6 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
|
|||
return false;
|
||||
}
|
||||
tracksMap.insert(tk, timelineTracks.videoIds.at(newPos));
|
||||
// qDebug() << "/// MAPPING SOURCE TRACK: "<<tk<<" TO PROJECT TK: "<<timelineTracks.videoIds.at(newPos)<<" =
|
||||
// "<<timeline->getTrackMltIndex(timelineTracks.videoIds.at(newPos));
|
||||
}
|
||||
bool audioOffsetCalculated = false;
|
||||
int audioOffset = 0;
|
||||
|
|
|
@ -200,7 +200,6 @@ QModelIndex TimelineItemModel::makeTrackIndexFromID(int trackId) const
|
|||
QModelIndex TimelineItemModel::parent(const QModelIndex &index) const
|
||||
{
|
||||
READ_LOCK();
|
||||
// qDebug() << "TimelineItemModel::parent"<< index;
|
||||
if (index == QModelIndex()) {
|
||||
return index;
|
||||
}
|
||||
|
@ -306,7 +305,6 @@ QVariant TimelineItemModel::data(const QModelIndex &index, int role) const
|
|||
{
|
||||
READ_LOCK();
|
||||
if (!m_tractor || !index.isValid()) {
|
||||
// qDebug() << "DATA abort. Index validity="<<index.isValid();
|
||||
return QVariant();
|
||||
}
|
||||
const int id = int(index.internalId());
|
||||
|
@ -320,7 +318,6 @@ QVariant TimelineItemModel::data(const QModelIndex &index, int role) const
|
|||
return QVariant();
|
||||
}
|
||||
if (isClip(id)) {
|
||||
// qDebug() << "REQUESTING DATA "<<roleNames()[role]<<index;
|
||||
std::shared_ptr<ClipModel> clip = m_allClips.at(id);
|
||||
// Get data for a clip
|
||||
switch (role) {
|
||||
|
@ -426,7 +423,6 @@ QVariant TimelineItemModel::data(const QModelIndex &index, int role) const
|
|||
break;
|
||||
}
|
||||
} else if (isTrack(id)) {
|
||||
// qDebug() << "DATA REQUESTED FOR TRACK "<< id;
|
||||
switch (role) {
|
||||
case NameRole:
|
||||
case Qt::DisplayRole: {
|
||||
|
@ -435,10 +431,8 @@ QVariant TimelineItemModel::data(const QModelIndex &index, int role) const
|
|||
case TypeRole:
|
||||
return QVariant::fromValue(ClipType::ProducerType::Track);
|
||||
case DurationRole:
|
||||
// qDebug() << "DATA yielding duration" << m_tractor->get_playtime();
|
||||
return getTrackById_const(id)->trackDuration();
|
||||
case IsDisabledRole:
|
||||
// qDebug() << "DATA yielding mute" << 0;
|
||||
return getTrackById_const(id)->isAudioTrack() ? getTrackById_const(id)->isMute() : getTrackById_const(id)->isHidden();
|
||||
case IsAudioRole:
|
||||
return getTrackById_const(id)->isAudioTrack();
|
||||
|
@ -452,7 +446,6 @@ QVariant TimelineItemModel::data(const QModelIndex &index, int role) const
|
|||
return collapsed;
|
||||
}
|
||||
int height = getTrackById_const(id)->getProperty("kdenlive:trackheight").toInt();
|
||||
// qDebug() << "DATA yielding height" << height;
|
||||
return (height > 0 ? height : KdenliveSettings::trackheight());
|
||||
}
|
||||
case ThumbsFormatRole:
|
||||
|
@ -855,22 +848,18 @@ void TimelineItemModel::notifyChange(const QModelIndex &topleft, const QModelInd
|
|||
|
||||
void TimelineItemModel::_beginRemoveRows(const QModelIndex &i, int j, int k)
|
||||
{
|
||||
// qDebug()<<"FORWARDING beginRemoveRows"<<i<<j<<k;
|
||||
beginRemoveRows(i, j, k);
|
||||
}
|
||||
void TimelineItemModel::_beginInsertRows(const QModelIndex &i, int j, int k)
|
||||
{
|
||||
// qDebug()<<"FORWARDING beginInsertRows"<<i<<j<<k;
|
||||
beginInsertRows(i, j, k);
|
||||
}
|
||||
void TimelineItemModel::_endRemoveRows()
|
||||
{
|
||||
// qDebug()<<"FORWARDING endRemoveRows";
|
||||
endRemoveRows();
|
||||
}
|
||||
void TimelineItemModel::_endInsertRows()
|
||||
{
|
||||
// qDebug()<<"FORWARDING endinsertRows";
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
|
|
|
@ -175,10 +175,6 @@ Fun TrackModel::requestClipInsertion_lambda(int clipId, int position, bool updat
|
|||
Q_ASSERT(ptr->getClipPtr(clipId)->getCurrentTrackId() == -1);
|
||||
target_playlist = ptr->getClipPtr(clipId)->getSubPlaylistIndex();
|
||||
length = ptr->getClipPtr(clipId)->getPlaytime() - 1;
|
||||
/*if (target_playlist == 1 && ptr->getClipPtr(clipId)->getMixDuration() == 0) {
|
||||
target_playlist = 0;
|
||||
}*/
|
||||
// qDebug()<<"==== GOT TRARGET PLAYLIST: "<<target_playlist;
|
||||
} else {
|
||||
qDebug() << "impossible to get parent timeline";
|
||||
Q_ASSERT(false);
|
||||
|
@ -482,7 +478,6 @@ bool TrackModel::requestClipDeletion(int clipId, bool updateView, bool finalMove
|
|||
timelineUuid = ptr->uuid();
|
||||
}
|
||||
int old_position = old_clip->getPosition();
|
||||
// qDebug() << "/// REQUESTOING CLIP DELETION_: " << updateView;
|
||||
int duration = finalMove ? trackDuration() : 0;
|
||||
if (finalDeletion) {
|
||||
pCore->taskManager.discardJobs(ObjectId(KdenliveObjectType::TimelineClip, clipId, timelineUuid));
|
||||
|
@ -2477,7 +2472,6 @@ void TrackModel::syncronizeMixes(bool finalMove)
|
|||
{
|
||||
QList<int> toDelete;
|
||||
for (const auto &n : m_sameCompositions) {
|
||||
// qDebug() << "Key:[" << n.first << "] Value:[" << n.second << "]\n";
|
||||
int secondClipId = n.first;
|
||||
int firstClip = m_mixList.key(secondClipId, -1);
|
||||
Q_ASSERT(firstClip > -1);
|
||||
|
|
|
@ -576,14 +576,12 @@ void TimelineWidget::connectSubtitleModel(bool firstConnect)
|
|||
{
|
||||
qDebug() << "root context get sub model new function";
|
||||
if (!model()->hasSubtitleModel()) {
|
||||
// qDebug()<<"null ptr here at root context";
|
||||
return;
|
||||
} else {
|
||||
// qDebug()<<"null ptr NOT here at root context";
|
||||
rootObject()->setProperty("showSubtitles", KdenliveSettings::showSubtitles());
|
||||
if (firstConnect) {
|
||||
rootContext()->setContextProperty("subtitleModel", model()->getSubtitleModel().get());
|
||||
QQmlEngine::setObjectOwnership(model()->getSubtitleModel().get(), QQmlEngine::CppOwnership);
|
||||
}
|
||||
}
|
||||
|
||||
rootObject()->setProperty("showSubtitles", KdenliveSettings::showSubtitles());
|
||||
if (firstConnect) {
|
||||
rootContext()->setContextProperty("subtitleModel", model()->getSubtitleModel().get());
|
||||
QQmlEngine::setObjectOwnership(model()->getSubtitleModel().get(), QQmlEngine::CppOwnership);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,7 +88,6 @@ void GradientWidget::updatePreview()
|
|||
m_gradient.setStart(p.width() / 2, 0);
|
||||
m_gradient.setFinalStop(p.width() / 2 + (p.width() / 2) * qCos(qDegreesToRadians(ang)), p.height() * qSin(qDegreesToRadians(ang)));
|
||||
}
|
||||
// qCDebug(KDENLIVE_LOG)<<"* * * ANGLE: "<<angle->value()<<" = "<<p.height() * tan(angle->value() * 3.1415926 / 180.0);
|
||||
|
||||
QLinearGradient copy = m_gradient;
|
||||
QPointF gradStart = m_gradient.start() + QPointF(p.width() / 2, 0);
|
||||
|
|
|
@ -841,7 +841,6 @@ void GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent *e)
|
|||
}
|
||||
bool alreadySelected = false;
|
||||
for (QGraphicsItem *g : list) {
|
||||
// qDebug() << " - - CHECKING ITEM Z:" << g->zValue() << ", TYPE: " << g->type();
|
||||
// check is there is a selected item in list
|
||||
if (!(g->flags() & QGraphicsItem::ItemIsSelectable)) {
|
||||
continue;
|
||||
|
@ -863,7 +862,6 @@ void GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent *e)
|
|||
if ((item != nullptr) && ((item->flags() & QGraphicsItem::ItemIsMovable) != 0)) {
|
||||
m_sceneClickPoint = e->scenePos();
|
||||
m_selectedItem = item;
|
||||
// qCDebug(KDENLIVE_LOG) << "///////// ITEM TYPE: " << item->type();
|
||||
if (item->type() == QGraphicsTextItem::Type) {
|
||||
auto *t = static_cast<MyTextItem *>(item);
|
||||
if (t->textInteractionFlags() == Qt::TextEditorInteraction) {
|
||||
|
@ -935,7 +933,6 @@ void GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent *e)
|
|||
QGraphicsScene::mousePressEvent(e);
|
||||
}
|
||||
}
|
||||
// qCDebug(KDENLIVE_LOG) << "////// MOUSE CLICK, RESIZE MODE: " << m_resizeMode;
|
||||
}
|
||||
|
||||
void GraphicsSceneRectMove::clearTextSelection(bool reset)
|
||||
|
@ -1179,7 +1176,6 @@ void GraphicsSceneRectMove::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent)
|
|||
{
|
||||
if (wheelEvent->modifiers() == Qt::ControlModifier) {
|
||||
QList<QGraphicsView *> viewlist = views();
|
||||
////qCDebug(KDENLIVE_LOG) << wheelEvent->delta() << ' ' << zoom;
|
||||
if (!viewlist.isEmpty()) {
|
||||
if (wheelEvent->delta() > 0) {
|
||||
Q_EMIT sceneZoom(true);
|
||||
|
@ -1205,7 +1201,6 @@ void GraphicsSceneRectMove::setScale(double s)
|
|||
viewlist[0]->scale(s, s);
|
||||
m_zoom = m_zoom * s;
|
||||
}
|
||||
////qCDebug(KDENLIVE_LOG)<<"////////// ZOOM: "<<zoom;
|
||||
}
|
||||
|
||||
void GraphicsSceneRectMove::setZoom(double s)
|
||||
|
@ -1216,8 +1211,6 @@ void GraphicsSceneRectMove::setZoom(double s)
|
|||
viewlist[0]->scale(s, s);
|
||||
m_zoom = s;
|
||||
}
|
||||
|
||||
////qCDebug(KDENLIVE_LOG)<<"////////// ZOOM: "<<zoom;
|
||||
}
|
||||
|
||||
void GraphicsSceneRectMove::setCursor(const QCursor &c)
|
||||
|
|
|
@ -438,7 +438,6 @@ int TitleDocument::loadFromXml(const QDomDocument &doc, QList<QGraphicsItem *> &
|
|||
for (int i = 0; i < items.count(); ++i) {
|
||||
QGraphicsItem *gitem = nullptr;
|
||||
QDomNode itemNode = items.item(i);
|
||||
// qCDebug(KDENLIVE_LOG) << items.item(i).attributes().namedItem("type").nodeValue();
|
||||
int zValue = itemNode.attributes().namedItem(QStringLiteral("z-index")).nodeValue().toInt();
|
||||
double xPosition = itemNode.namedItem(QStringLiteral("position")).attributes().namedItem(QStringLiteral("x")).nodeValue().toDouble();
|
||||
if (zValue > -1000) {
|
||||
|
@ -690,7 +689,6 @@ int TitleDocument::loadFromXml(const QDomDocument &doc, QList<QGraphicsItem *> &
|
|||
}
|
||||
|
||||
if (itemNode.nodeName() == QLatin1String("background")) {
|
||||
// qCDebug(KDENLIVE_LOG) << items.item(i).attributes().namedItem("color").nodeValue();
|
||||
QColor color = QColor(stringToColor(itemNode.attributes().namedItem(QStringLiteral("color")).nodeValue()));
|
||||
// color.setAlpha(itemNode.attributes().namedItem("alpha").nodeValue().toInt());
|
||||
if (scene) {
|
||||
|
|
|
@ -521,7 +521,6 @@ TitleWidget::TitleWidget(const QUrl &url, QString projectTitlePath, Monitor *mon
|
|||
|
||||
graphicsView->show();
|
||||
graphicsView->setInteractive(true);
|
||||
// qCDebug(KDENLIVE_LOG) << "// TITLE WIDGWT: " << graphicsView->viewport()->width() << 'x' << graphicsView->viewport()->height();
|
||||
m_startViewport = new QGraphicsRectItem(QRectF(0, 0, m_frameWidth, m_frameHeight));
|
||||
// Setting data at -1 so that the item is recognized as undeletable by graphicsscenerectmove
|
||||
m_startViewport->setData(-1, -1);
|
||||
|
@ -1235,8 +1234,6 @@ void TitleWidget::selectionChanged()
|
|||
return;
|
||||
}
|
||||
|
||||
// qCDebug(KDENLIVE_LOG) << "Number of selected items: " << graphicsView->scene()->selectedItems().length() << '\n';
|
||||
|
||||
QList<QGraphicsItem *> l;
|
||||
|
||||
// mbt 1607: One text item might have grabbed the keyboard.
|
||||
|
@ -1290,7 +1287,6 @@ void TitleWidget::selectionChanged()
|
|||
break;
|
||||
}
|
||||
}
|
||||
// qCDebug(KDENLIVE_LOG) << "All equal? " << allEqual << ".\n";
|
||||
if (allEqual) {
|
||||
prepareTools(l.at(0));
|
||||
} else {
|
||||
|
@ -1337,7 +1333,6 @@ void TitleWidget::slotValueChanged(int type)
|
|||
*/
|
||||
|
||||
QList<QGraphicsItem *> l = graphicsView->scene()->selectedItems();
|
||||
// qCDebug(KDENLIVE_LOG) << l.size() << " items to be resized\n";
|
||||
|
||||
// Get the updated value here already to do less coding afterwards
|
||||
int val = 0;
|
||||
|
@ -1357,8 +1352,6 @@ void TitleWidget::slotValueChanged(int type)
|
|||
}
|
||||
|
||||
for (int k = 0; k < l.size(); ++k) {
|
||||
// qCDebug(KDENLIVE_LOG) << "Type of item " << k << ": " << l.at(k)->type() << '\n';
|
||||
|
||||
if (l.at(k)->type() == TEXTITEM) {
|
||||
// Just update the position. We don't allow setting width/height for text items yet.
|
||||
switch (type) {
|
||||
|
@ -1457,8 +1450,6 @@ void TitleWidget::slotValueChanged(int type)
|
|||
qtrans.rotate(t.rotatey, Qt::YAxis);
|
||||
qtrans.rotate(t.rotatez, Qt::ZAxis);
|
||||
i->setTransform(qtrans);
|
||||
// qCDebug(KDENLIVE_LOG) << "scale is: " << scale << '\n';
|
||||
// qCDebug(KDENLIVE_LOG) << i->boundingRect().width() << ": new width\n";
|
||||
m_transformations[i] = t;
|
||||
|
||||
if (l.size() == 1) {
|
||||
|
@ -1499,7 +1490,6 @@ void TitleWidget::updateDimension(QGraphicsItem *i)
|
|||
value_h->setValue(int(i->sceneBoundingRect().height()));
|
||||
} else if (i->type() == RECTITEM || i->type() == ELLIPSEITEM) {
|
||||
auto *r = static_cast<QGraphicsRectItem *>(i);
|
||||
// qCDebug(KDENLIVE_LOG) << "Rect width is: " << r->rect().width() << ", was: " << value_w->value() << '\n';
|
||||
value_w->setValue(int(r->rect().width()));
|
||||
value_h->setValue(int(r->rect().height()));
|
||||
} else if (i->type() == TEXTITEM) {
|
||||
|
@ -2802,14 +2792,10 @@ void TitleWidget::slotZIndexTop()
|
|||
{
|
||||
QList<QGraphicsItem *> l = graphicsView->scene()->selectedItems();
|
||||
qreal max = zIndexBounds(true, false);
|
||||
// qCDebug(KDENLIVE_LOG) << "Max z-index is " << max << ".\n";
|
||||
for (auto &i : l) {
|
||||
qreal currentZ = i->zValue();
|
||||
if (currentZ <= max) {
|
||||
// qCDebug(KDENLIVE_LOG) << "Updating item " << i << ", is " << currentZ << ".\n";
|
||||
i->setZValue(max + 1);
|
||||
} else {
|
||||
// qCDebug(KDENLIVE_LOG) << "Not updating " << i << ", is " << currentZ << ".\n";
|
||||
}
|
||||
}
|
||||
// Update the z index value in the GUI
|
||||
|
@ -2938,7 +2924,6 @@ void TitleWidget::prepareTools(QGraphicsItem *referenceItem)
|
|||
value_h->blockSignals(true);
|
||||
|
||||
if (referenceItem == nullptr) {
|
||||
// qCDebug(KDENLIVE_LOG) << "nullptr item.\n";
|
||||
origin_x_left->setChecked(false);
|
||||
origin_y_top->setChecked(false);
|
||||
updateTextOriginX();
|
||||
|
|
|
@ -47,7 +47,6 @@ std::shared_ptr<TransitionTreeModel> TransitionTreeModel::construct(bool flat, Q
|
|||
// we create the data list corresponding to this transition
|
||||
bool isFav = KdenliveSettings::favorite_transitions().contains(transition.first);
|
||||
bool includeListed = TransitionsRepository::get()->isIncludedInList(transition.first);
|
||||
// qDebug() << transition.second << transition.first << "in " << targetCategory->dataColumn(0).toString();
|
||||
QList<QVariant> data{transition.second, transition.first, QVariant::fromValue(type), isFav, 0, true, includeListed};
|
||||
|
||||
targetCategory->appendChild(data);
|
||||
|
|
|
@ -21,7 +21,6 @@ FunctionalUndoCommand::FunctionalUndoCommand(Fun undo, Fun redo, const QString &
|
|||
|
||||
void FunctionalUndoCommand::undo()
|
||||
{
|
||||
// qDebug() << "UNDOING " <<text();
|
||||
#ifdef CRASH_AUTO_TEST
|
||||
Logger::log_undo(true);
|
||||
#endif
|
||||
|
@ -34,7 +33,6 @@ void FunctionalUndoCommand::undo()
|
|||
void FunctionalUndoCommand::redo()
|
||||
{
|
||||
if (m_undone) {
|
||||
// qDebug() << "REDOING " <<text();
|
||||
#ifdef CRASH_AUTO_TEST
|
||||
Logger::log_undo(false);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue