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