Commit 15d14b19 authored by Vincent Pinon's avatar Vincent Pinon

fix remaining krazy warnings

parent d0fa610d
...@@ -289,7 +289,7 @@ void MltDeviceCapture::showAudio(Mlt::Frame& frame) ...@@ -289,7 +289,7 @@ void MltDeviceCapture::showAudio(Mlt::Frame& frame)
int freq = 0; int freq = 0;
int num_channels = 0; int num_channels = 0;
int samples = 0; int samples = 0;
qint16* data = (int16_t*)frame.get_audio(audio_format, freq, num_channels, samples); qint16* data = (qint16*)frame.get_audio(audio_format, freq, num_channels, samples);
if (!data) { if (!data) {
return; return;
......
...@@ -758,7 +758,7 @@ void KdenliveSettingsDialog::updateSettings() ...@@ -758,7 +758,7 @@ void KdenliveSettingsDialog::updateSettings()
resetProfile = true; resetProfile = true;
} }
} else if (KdenliveSettings::audiodevicename().isEmpty() == false) { } else if (KdenliveSettings::audiodevicename().isEmpty() == false) {
KdenliveSettings::setAudiodevicename(QString::null); KdenliveSettings::setAudiodevicename(QString());
resetProfile = true; resetProfile = true;
} }
......
...@@ -825,7 +825,7 @@ Mlt::Producer *DocClipBase::cloneProducer(Mlt::Producer *source) ...@@ -825,7 +825,7 @@ Mlt::Producer *DocClipBase::cloneProducer(Mlt::Producer *source)
} }
if (result == NULL || !result->is_valid()) { if (result == NULL || !result->is_valid()) {
// placeholder clip // placeholder clip
QString txt = "+" + i18n("Missing clip") + ".txt"; QString txt = '+' + i18n("Missing clip") + ".txt";
char *tmp = qstrdup(txt.toUtf8().constData()); char *tmp = qstrdup(txt.toUtf8().constData());
result = new Mlt::Producer(*source->profile(), tmp); result = new Mlt::Producer(*source->profile(), tmp);
delete[] tmp; delete[] tmp;
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
#include <KGlobal> #include <KGlobal>
#include <KBookmarkManager> #include <KBookmarkManager>
#include <KBookmark> #include <KBookmark>
#include <KStandardDirs>
#include <QCryptographicHash> #include <QCryptographicHash>
#include <QFile> #include <QFile>
......
...@@ -836,7 +836,7 @@ void ParameterContainer::slotStartFilterJobAction() ...@@ -836,7 +836,7 @@ void ParameterContainer::slotStartFilterJobAction()
CustomTrackView::adjustEffectParameters(parameters, params, m_metaInfo->profile); CustomTrackView::adjustEffectParameters(parameters, params, m_metaInfo->profile);
QString paramData; QString paramData;
for (int j = 0; j < parameters.count(); ++j) for (int j = 0; j < parameters.count(); ++j)
paramData.append(parameters.at(j).name()+"="+parameters.at(j).value()+" "); paramData.append(parameters.at(j).name()+'='+parameters.at(j).value()+' ');
filterparams.replace("%params", paramData); filterparams.replace("%params", paramData);
} }
QMap <QString, QString> extraParams; QMap <QString, QString> extraParams;
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/ ***************************************************************************/
#ifndef JOG_SHUTTLE_ACTION_H #ifndef JOGACTION_H
#define JOG_SHUTTLE_ACTION_H #define JOGACTION_H
#include "jogshuttle.h" #include "jogshuttle.h"
#include <QObject> #include <QObject>
......
...@@ -473,7 +473,7 @@ ...@@ -473,7 +473,7 @@
</entry> </entry>
<entry name="dvgrabextra" type="String"> <entry name="dvgrabextra" type="String">
<label>Additionnal dvgrab parameters.</label> <label>Additional dvgrab parameters.</label>
<default></default> <default></default>
</entry> </entry>
...@@ -792,7 +792,7 @@ ...@@ -792,7 +792,7 @@
</entry> </entry>
<entry name="add_new_clip" type="Bool"> <entry name="add_new_clip" type="Bool">
<label>Add cutted clips to project after transcoding.</label> <label>Add cut clips to project after transcoding.</label>
<default>true</default> <default>true</default>
</entry> </entry>
......
...@@ -22,7 +22,7 @@ AudioCorrelation::AudioCorrelation(AudioEnvelope *mainTrackEnvelope) : ...@@ -22,7 +22,7 @@ AudioCorrelation::AudioCorrelation(AudioEnvelope *mainTrackEnvelope) :
m_mainTrackEnvelope(mainTrackEnvelope) m_mainTrackEnvelope(mainTrackEnvelope)
{ {
m_mainTrackEnvelope->normalizeEnvelope(); m_mainTrackEnvelope->normalizeEnvelope();
connect(m_mainTrackEnvelope, SIGNAL(envelopeReady(AudioEnvelope *)), this, SLOT(slotAnnounceEnvelope())); connect(m_mainTrackEnvelope, SIGNAL(envelopeReady(AudioEnvelope*)), this, SLOT(slotAnnounceEnvelope()));
} }
AudioCorrelation::~AudioCorrelation() AudioCorrelation::~AudioCorrelation()
...@@ -46,7 +46,7 @@ void AudioCorrelation::slotAnnounceEnvelope() ...@@ -46,7 +46,7 @@ void AudioCorrelation::slotAnnounceEnvelope()
void AudioCorrelation::addChild(AudioEnvelope *envelope) void AudioCorrelation::addChild(AudioEnvelope *envelope)
{ {
envelope->normalizeEnvelope(); envelope->normalizeEnvelope();
connect(envelope, SIGNAL(envelopeReady(AudioEnvelope *)), this, SLOT(slotProcessChild(AudioEnvelope *))); connect(envelope, SIGNAL(envelopeReady(AudioEnvelope*)), this, SLOT(slotProcessChild(AudioEnvelope*)));
} }
void AudioCorrelation::slotProcessChild(AudioEnvelope *envelope) void AudioCorrelation::slotProcessChild(AudioEnvelope *envelope)
......
...@@ -102,7 +102,7 @@ void AudioEnvelope::loadEnvelope() ...@@ -102,7 +102,7 @@ void AudioEnvelope::loadEnvelope()
qint64 position = mlt_frame_get_position(frame->get_frame()); qint64 position = mlt_frame_get_position(frame->get_frame());
int samples = mlt_sample_calculator(m_producer->get_fps(), samplingRate, position); int samples = mlt_sample_calculator(m_producer->get_fps(), samplingRate, position);
qint16 *data = static_cast<int16_t*>(frame->get_audio(format_s16, samplingRate, channels, samples)); qint16 *data = static_cast<qint16*>(frame->get_audio(format_s16, samplingRate, channels, samples));
qint64 sum = 0; qint64 sum = 0;
for (int k = 0; k < samples; ++k) { for (int k = 0; k < samples; ++k) {
......
/* /*
Copyright (c) 2003-2010, Mark Borgerding Copyright (c) 2003-2010, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2010, Mark Borgerding Copyright (c) 2003-2010, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2010, Mark Borgerding Copyright (c) 2003-2010, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2004, Mark Borgerding Copyright (c) 2003-2004, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2004, Mark Borgerding Copyright (c) 2003-2004, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2010, Mark Borgerding Copyright (c) 2003-2010, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2004, Mark Borgerding Copyright (c) 2003-2004, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2004, Mark Borgerding Copyright (c) 2003-2004, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2004, Mark Borgerding Copyright (c) 2003-2010, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2004, Mark Borgerding Copyright (c) 2003-2004, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2004, Mark Borgerding Copyright (c) 2003-2004, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2004, Mark Borgerding Copyright (c) 2003-2004, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2004, Mark Borgerding Copyright (c) 2003-2004, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
/* /*
Copyright (c) 2003-2004, Mark Borgerding Copyright (c) 2003-2004, Mark Borgerding (Mark@Borgerding.net)
All rights reserved. All rights reserved.
......
...@@ -2592,7 +2592,7 @@ void MainWindow::slotRenderProject() ...@@ -2592,7 +2592,7 @@ void MainWindow::slotRenderProject()
} }
slotCheckRenderStatus(); slotCheckRenderStatus();
m_renderWidget->show(); m_renderWidget->show();
m_renderWidget->showNormal(); //m_renderWidget->showNormal();
// What are the following lines supposed to do? // What are the following lines supposed to do?
//m_activeTimeline->tracksNumber(); //m_activeTimeline->tracksNumber();
...@@ -3962,7 +3962,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) ...@@ -3962,7 +3962,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
void MainWindow::slotSaveZone(Render *render, const QPoint &zone, DocClipBase *baseClip, KUrl path) void MainWindow::slotSaveZone(Render *render, const QPoint &zone, DocClipBase *baseClip, KUrl path)
{ {
KDialog *dialog = new KDialog(this); QPointer<KDialog> dialog = new KDialog(this);
dialog->setCaption("Save clip zone"); dialog->setCaption("Save clip zone");
dialog->setButtons(KDialog::Ok | KDialog::Cancel); dialog->setButtons(KDialog::Ok | KDialog::Cancel);
...@@ -4019,7 +4019,6 @@ void MainWindow::slotSaveZone(Render *render, const QPoint &zone, DocClipBase *b ...@@ -4019,7 +4019,6 @@ void MainWindow::slotSaveZone(Render *render, const QPoint &zone, DocClipBase *b
else render->saveZone(url->url(), edit->text(), zone); else render->saveZone(url->url(), edit->text(), zone);
} }
delete dialog; delete dialog;
} }
void MainWindow::slotSetInPoint() void MainWindow::slotSetInPoint()
...@@ -4784,10 +4783,11 @@ void MainWindow::slotArchiveProject() ...@@ -4784,10 +4783,11 @@ void MainWindow::slotArchiveProject()
{ {
QList <DocClipBase*> list = m_projectList->documentClipList(); QList <DocClipBase*> list = m_projectList->documentClipList();
QDomDocument doc = m_activeDocument->xmlSceneList(m_projectMonitor->sceneList(), m_projectList->expandedFolders()); QDomDocument doc = m_activeDocument->xmlSceneList(m_projectMonitor->sceneList(), m_projectList->expandedFolders());
ArchiveWidget *d = new ArchiveWidget(m_activeDocument->url().fileName(), doc, list, m_activeTimeline->projectView()->extractTransitionsLumas(), this); QPointer<ArchiveWidget> d = new ArchiveWidget(m_activeDocument->url().fileName(), doc, list, m_activeTimeline->projectView()->extractTransitionsLumas(), this);
if (d->exec()) { if (d->exec()) {
m_messageLabel->setMessage(i18n("Archiving project"), OperationCompletedMessage); m_messageLabel->setMessage(i18n("Archiving project"), OperationCompletedMessage);
} }
delete d;
} }
......
...@@ -738,7 +738,7 @@ void RecMonitor::slotRecord() ...@@ -738,7 +738,7 @@ void RecMonitor::slotRecord()
m_captureArgs << "-r" << QString::number(KdenliveSettings::grab_fps()); m_captureArgs << "-r" << QString::number(KdenliveSettings::grab_fps());
if (KdenliveSettings::grab_hide_mouse()) captureSize.append("+nomouse"); if (KdenliveSettings::grab_hide_mouse()) captureSize.append("+nomouse");
m_captureArgs << "-i" << captureSize; m_captureArgs << "-i" << captureSize;
grabParameters = KdenliveSettings::grab_parameters().simplified().split(" "); grabParameters = KdenliveSettings::grab_parameters().simplified().split(' ');
m_captureArgs << grabParameters; m_captureArgs << grabParameters;
m_captureArgs << path; m_captureArgs << path;
......
/* /*
Copyright : (C) 1990 Philip J. Schneider (pjs@apple.com)
* GraphicsGems.h * GraphicsGems.h
* Version 1.0 - Andrew Glassner * Version 1.0 - Andrew Glassner
* from "Graphics Gems", Academic Press, 1990 * from "Graphics Gems", Academic Press, 1990
......
/* /*
Copyright : (C) 1990 Philip J. Schneider (pjs@apple.com)
Solving the Nearest Point-on-Curve Problem Solving the Nearest Point-on-Curve Problem
and and
A Bezier Curve-Based Root-Finder A Bezier Curve-Based Root-Finder
......
...@@ -892,12 +892,13 @@ void ClipProperties::slotEditMarker() ...@@ -892,12 +892,13 @@ void ClipProperties::slotEditMarker()
QList < CommentedTime > marks = m_clip->commentedSnapMarkers(); QList < CommentedTime > marks = m_clip->commentedSnapMarkers();
int pos = m_view.markers_list->currentIndex().row(); int pos = m_view.markers_list->currentIndex().row();
if (pos < 0 || pos > marks.count() - 1) return; if (pos < 0 || pos > marks.count() - 1) return;
MarkerDialog d(m_clip, marks.at(pos), m_tc, i18n("Edit Marker"), this); QPointer<MarkerDialog> d = new MarkerDialog(m_clip, marks.at(pos), m_tc, i18n("Edit Marker"), this);
if (d.exec() == QDialog::Accepted) { if (d->exec() == QDialog::Accepted) {
QList <CommentedTime> markers; QList <CommentedTime> markers;
markers << d.newMarker(); markers << d->newMarker();
emit addMarkers(m_clip->getId(), markers); emit addMarkers(m_clip->getId(), markers);
} }
delete d;
} }
void ClipProperties::slotDeleteMarker() void ClipProperties::slotDeleteMarker()
......
...@@ -1911,7 +1911,7 @@ void ProjectList::slotAddSlideshowClip() ...@@ -1911,7 +1911,7 @@ void ProjectList::slotAddSlideshowClip()
if (!m_commandStack) if (!m_commandStack)
kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK"; kDebug() << "!!!!!!!!!!!!!!!! NO CMD STK";
SlideshowClip *dia = new SlideshowClip(m_timecode, this); QPointer<SlideshowClip> dia = new SlideshowClip(m_timecode, this);
if (dia->exec() == QDialog::Accepted) { if (dia->exec() == QDialog::Accepted) {
QStringList groupInfo = getGroup(); QStringList groupInfo = getGroup();
...@@ -2218,7 +2218,7 @@ void ProjectList::extractMetadata(DocClipBase *clip) ...@@ -2218,7 +2218,7 @@ void ProjectList::extractMetadata(DocClipBase *clip)
p.start("exiftool", args); p.start("exiftool", args);
p.waitForFinished(); p.waitForFinished();
QString res = p.readAllStandardOutput(); QString res = p.readAllStandardOutput();
QStringList list = res.split("\n"); QStringList list = res.split('\n');
foreach(const QString &tagline, list) { foreach(const QString &tagline, list) {
if (tagline.startsWith(QLatin1String("-File")) || tagline.startsWith(QLatin1String("-ExifTool"))) continue; if (tagline.startsWith(QLatin1String("-File")) || tagline.startsWith(QLatin1String("-ExifTool"))) continue;
QString tag = tagline.section(':', 1).simplified(); QString tag = tagline.section(':', 1).simplified();
...@@ -2235,7 +2235,7 @@ void ProjectList::extractMetadata(DocClipBase *clip) ...@@ -2235,7 +2235,7 @@ void ProjectList::extractMetadata(DocClipBase *clip)
p.start("exiftool", args); p.start("exiftool", args);
p.waitForFinished(); p.waitForFinished();
QString res = p.readAllStandardOutput(); QString res = p.readAllStandardOutput();
QStringList list = res.split("\n"); QStringList list = res.split('\n');
foreach(const QString &tagline, list) { foreach(const QString &tagline, list) {
if (!tagline.startsWith(QLatin1String("-H264"))) continue; if (!tagline.startsWith(QLatin1String("-H264"))) continue;
QString tag = tagline.section(':', 1); QString tag = tagline.section(':', 1);
...@@ -2396,7 +2396,7 @@ bool ProjectList::adjustProjectProfileToItem(ProjectItem *item) ...@@ -2396,7 +2396,7 @@ bool ProjectList::adjustProjectProfileToItem(ProjectItem *item)
// get a list of compatible profiles // get a list of compatible profiles
QMap <QString, QString> suggestedProfiles = ProfilesDialog::getProfilesFromProperties(width, height, fps, par, item->clipType() == Image); QMap <QString, QString> suggestedProfiles = ProfilesDialog::getProfilesFromProperties(width, height, fps, par, item->clipType() == Image);
if (!suggestedProfiles.isEmpty()) { if (!suggestedProfiles.isEmpty()) {
KDialog *dialog = new KDialog(this); QPointer<KDialog> dialog = new KDialog(this);
dialog->setCaption(i18n("Change project profile")); dialog->setCaption(i18n("Change project profile"));
dialog->setButtons(KDialog::Ok | KDialog::Cancel); dialog->setButtons(KDialog::Ok | KDialog::Cancel);
...@@ -3818,9 +3818,9 @@ void ProjectList::slotGotFilterJobResults(QString id, int , int , stringMap resu ...@@ -3818,9 +3818,9 @@ void ProjectList::slotGotFilterJobResults(QString id, int , int , stringMap resu
int cutPos = 0; int cutPos = 0;
QUndoCommand *command = new QUndoCommand(); QUndoCommand *command = new QUndoCommand();
command->setText(i18n("Auto Split Clip")); command->setText(i18n("Auto Split Clip"));
foreach (QString pos, value) { foreach (const QString &pos, value) {
if (!pos.contains("=")) continue; if (!pos.contains("=")) continue;
int newPos = pos.section("=", 0, 0).toInt(); int newPos = pos.section('=', 0, 0).toInt();
// Don't use scenes shorter than 1 second // Don't use scenes shorter than 1 second
if (newPos - cutPos < 24) continue; if (newPos - cutPos < 24) continue;
(void) new AddClipCutCommand(this, id, cutPos + offset, newPos + offset, QString(), true, false, command); (void) new AddClipCutCommand(this, id, cutPos + offset, newPos + offset, QString(), true, false, command);
...@@ -3838,9 +3838,9 @@ void ProjectList::slotGotFilterJobResults(QString id, int , int , stringMap resu ...@@ -3838,9 +3838,9 @@ void ProjectList::slotGotFilterJobResults(QString id, int , int , stringMap resu
command->setText(i18n("Add Markers")); command->setText(i18n("Add Markers"));
QList <CommentedTime> markersList; QList <CommentedTime> markersList;
int index = 1; int index = 1;
foreach (QString pos, value) { foreach (const QString &pos, value) {
if (!pos.contains("=")) continue; if (!pos.contains("=")) continue;
int newPos = pos.section("=", 0, 0).toInt(); int newPos = pos.section('=', 0, 0).toInt();
// Don't use scenes shorter than 1 second // Don't use scenes shorter than 1 second
if (newPos - cutPos < 24) continue; if (newPos - cutPos < 24) continue;
CommentedTime m(GenTime(newPos + offset, m_fps), QString::number(index), markersType); CommentedTime m(GenTime(newPos + offset, m_fps), QString::number(index), markersType);
......
...@@ -376,8 +376,8 @@ void ProjectListView::mouseMoveEvent(QMouseEvent *event) ...@@ -376,8 +376,8 @@ void ProjectListView::mouseMoveEvent(QMouseEvent *event)
const SubProjectItem *clickItem = static_cast <const SubProjectItem *>(item); const SubProjectItem *clickItem = static_cast <const SubProjectItem *>(item);
QPoint p = clickItem->zone(); QPoint p = clickItem->zone();
QString data = parentclip->clipId(); QString data = parentclip->clipId();
data.append("/" + QString::number(p.x())); data.append('/' + QString::number(p.x()));
data.append("/" + QString::number(p.y())); data.append('/' + QString::number(p.y()));
ids.append(data); ids.append(data);
} else { } else {
const ProjectItem *clip = static_cast <const ProjectItem *>(item); const ProjectItem *clip = static_cast <const ProjectItem *>(item);
......
...@@ -1919,7 +1919,7 @@ void Render::showAudio(Mlt::Frame& frame) ...@@ -1919,7 +1919,7 @@ void Render::showAudio(Mlt::Frame& frame)
int freq = 48000; int freq = 48000;
int num_channels = 2; int num_channels = 2;
int samples = 0; int samples = 0;
qint16* data = (int16_t*)frame.get_audio(audio_format, freq, num_channels, samples); qint16* data = (qint16*)frame.get_audio(audio_format, freq, num_channels, samples);
if (!data) { if (!data) {
return; return;
...@@ -4545,12 +4545,12 @@ void Render::slotMultiStreamProducerFound(const QString &path, QList<int> audio_ ...@@ -4545,12 +4545,12 @@ void Render::slotMultiStreamProducerFound(const QString &path, QList<int> audio_
int swidth = 60.0 * m_mltProfile->width() / m_mltProfile->height(); int swidth = 60.0 * m_mltProfile->width() / m_mltProfile->height();
if (width % 2 == 1) width++; if (width % 2 == 1) width++;
KDialog dialog(qApp->activeWindow()); QPointer<KDialog> dialog = new KDialog(qApp->activeWindow());
dialog.setCaption("Multi Stream Clip"); dialog->setCaption("Multi Stream Clip");
dialog.setButtons(KDialog::Ok | KDialog::Cancel); dialog->setButtons(KDialog::Ok | KDialog::Cancel);
dialog.setButtonText(KDialog::Ok, i18n("Import selected clips")); dialog->setButtonText(KDialog::Ok, i18n("Import selected clips"));
QWidget *content = new QWidget(&dialog); QWidget *content = new QWidget(dialog);
dialog.setMainWidget(content); dialog->setMainWidget(content);
QVBoxLayout *vbox = new QVBoxLayout(content); QVBoxLayout *vbox = new QVBoxLayout(content);
QLabel *lab1 = new QLabel(i18n("Additional streams for clip\n %1", path), content); QLabel *lab1 = new QLabel(i18n("Additional streams for clip\n %1", path), content);
vbox->addWidget(lab1); vbox->addWidget(lab1);
...@@ -4581,7 +4581,7 @@ void Render::slotMultiStreamProducerFound(const QString &path, QList<int> audio_ ...@@ -4581,7 +4581,7 @@ void Render::slotMultiStreamProducerFound(const QString &path, QList<int> audio_
} }
vbox->addWidget(streamFrame); vbox->addWidget(streamFrame);
} }
if (dialog.exec() == QDialog::Accepted) { if (dialog->exec() == QDialog::Accepted) {
// import selected streams // import selected streams
for (int i = 0; i < groupList.count(); ++i) { for (int i = 0; i < groupList.count(); ++i) {
if (groupList.at(i)->isChecked()) { if (groupList.at(i)->isChecked()) {
...@@ -4594,6 +4594,7 @@ void Render::slotMultiStreamProducerFound(const QString &path, QList<int> audio_ ...@@ -4594,6 +4594,7 @@ void Render::slotMultiStreamProducerFound(const QString &path, QList<int> audio_
} }
} }
} }
delete dialog;
} }
//static //static
......
...@@ -2087,7 +2087,7 @@ bool ClipItem::updateNormalKeyframes(QDomElement parameter, ItemInfo oldInfo) ...@@ -2087,7 +2087,7 @@ bool ClipItem::updateNormalKeyframes(QDomElement parameter, ItemInfo oldInfo)
const QStringList data = parameter.attribute("keyframes").split(';', QString::SkipEmptyParts); const QStringList data = parameter.attribute("keyframes").split(';', QString::SkipEmptyParts);
QMap <int, double> keyframes; QMap <int, double> keyframes;
foreach (QString keyframe, data) { foreach (const QString &keyframe, data) {
int keyframepos = keyframe.section('=', 0, 0).toInt(); int keyframepos = keyframe.section('=', 0, 0).toInt();
// if keyframe was at clip start, update it // if keyframe was at clip start, update it
if (keyframepos == oldin) { if (keyframepos == oldin) {
......
...@@ -5485,11 +5485,12 @@ void CustomTrackView::slotSaveClipMarkers(const QString &id) ...@@ -5485,11 +5485,12 @@ void CustomTrackView::slotSaveClipMarkers(const QString &id)
cbox->setItemData(i + 1, CommentedTime::markerColor(i), Qt::DecorationRole); cbox->setItemData(i + 1, CommentedTime::markerColor(i), Qt::DecorationRole);
} }
cbox->setCurrentIndex(0); cbox->setCurrentIndex(0);
KFileDialog fd(KUrl("kfiledialog:///projectfolder"), "text/plain", this, cbox); QPointer<KFileDialog> fd = new KFileDialog(KUrl("kfiledialog:///projectfolder"), "text/plain", this, cbox);
fd.setMode(KFile::File); fd->setMode(KFile::File);
fd.setOperationMode(KFileDialog::Saving); fd->setOperationMode(KFileDialog::Saving);
if (fd.exec() != QDialog::Accepted) return; if (fd->exec() != QDialog::Accepted) return;
QString url = fd.selectedFile(); QString url = fd->selectedFile();
delete fd;
//QString url = KFileDialog::getSaveFileName(KUrl("kfiledialog:///projectfolder"), "text/plain", this, i18n("Save markers")); //QString url = KFileDialog::getSaveFileName(KUrl("kfiledialog:///projectfolder"), "text/plain", this, i18n("Save markers"));
if (url.isEmpty()) return; if (url.isEmpty()) return;
...@@ -5527,11 +5528,12 @@ void CustomTrackView::slotLoadClipMarkers(const QString &id) ...@@ -5527,11 +5528,12 @@ void CustomTrackView::slotLoadClipMarkers(const QString &id)
cbox->setItemData(i, CommentedTime::markerColor(i), Qt::DecorationRole); cbox->setItemData(i, CommentedTime::markerColor(i), Qt::DecorationRole);
} }
cbox->setCurrentIndex(KdenliveSettings::default_marker_type()); cbox->setCurrentIndex(KdenliveSettings::default_marker_type());
KFileDialog fd(KUrl("kfiledialog:///projectfolder"), "text/plain", this, cbox); QPointer<KFileDialog> fd = new KFileDialog(KUrl("kfiledialog:///projectfolder"), "text/plain", this, cbox);
fd.setMode(KFile::File); fd->setMode(KFile::File);
fd.setOperationMode(KFileDialog::Opening); fd->setOperationMode(KFileDialog::Opening);
if (fd.exec() != QDialog::Accepted) return; if (fd->exec() != QDialog::Accepted) return;
QString url = fd.selectedFile(); QString url = fd->selectedFile();
delete fd;
//KUrl url = KFileDialog::getOpenUrl(KUrl("kfiledialog:///projectfolder"), "text/plain", this, i18n("Load marker file")); //KUrl url = KFileDialog::getOpenUrl(KUrl("kfiledialog:///projectfolder"), "text/plain", this, i18n("Load marker file"));
if (url.isEmpty()) return; if (url.isEmpty()) return;
...@@ -5544,7 +5546,7 @@ void CustomTrackView::slotLoadClipMarkers(const QString &id) ...@@ -5544,7 +5546,7 @@ void CustomTrackView::slotLoadClipMarkers(const QString &id)
} }
QString data = QString::fromUtf8(file.readAll()); QString data = QString::fromUtf8(file.readAll());
file.close(); file.close();
QStringList lines = data.split("\n", QString::SkipEmptyParts); QStringList lines = data.split('\n', QString::SkipEmptyParts);
QStringList values; QStringList values;
bool ok; bool ok;
QUndoCommand *command = new QUndoCommand(); QUndoCommand *command = new QUndoCommand();
...@@ -5553,7 +5555,7 @@ void CustomTrackView::slotLoadClipMarkers(const QString &id) ...@@ -5553,7 +5555,7 @@ void CustomTrackView::slotLoadClipMarkers(const QString &id)
QList <CommentedTime> markersList; QList <CommentedTime> markersList;
foreach(const QString &line, lines) { foreach(const QString &line, lines) {
markerText.clear(); markerText.clear();
values = line.split("\t", QString::SkipEmptyParts); values = line.split('\t', QString::SkipEmptyParts);
double time1 = values.at(0).toDouble(&ok); double time1 = values.at(0).toDouble(&ok);
double time2 = -1; double time2 = -1;
if (!ok) continue; if (!ok) continue;
......
/*************************************************************************** /***************************************************************************
* Copyright (C) 2007-2012 by Jean-Baptiste Mardelle (jb@kdenlive.org) * * Copyright (C) 2007-2012 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* Copyright (C) 2008 by Marco Gittler * * Copyright (C) 2008 by Marco Gittler (g.marco@freenet.de) *
* Copyright (C) 2010 by Till Theato (root@ttill.de) * * Copyright (C) 2010 by Till Theato (root@ttill.de) *
* Copyright (C) 2014 by Vincent Pinon (vpinon@april.org) * * Copyright (C) 2014 by Vincent Pinon (vpinon@april.org) *
* * * *
......
/*************************************************************************** /***************************************************************************
* Copyright (C) 2007-2012 by Jean-Baptiste Mardelle (jb@kdenlive.org) * * Copyright (C) 2007-2012 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* Copyright (C) 2008 by Marco Gittler * * Copyright (C) 2008 by Marco Gittler (g.marco@freenet.de) *
* Copyright (C) 2010 by Till Theato (root@ttill.de) * * Copyright (C) 2010 by Till Theato (root@ttill.de) *
* Copyright (C) 2014 by Vincent Pinon (vpinon@april.org) * * Copyright (C) 2014 by Vincent Pinon (vpinon@april.org) *
* *