Commit fa77da17 authored by Vincent Pinon's avatar Vincent Pinon

Gardening: fix GCC warnings (2)

parent e9979ffd
......@@ -190,9 +190,9 @@ void CommentedTime::setComment(const QString &comm)
c = comm;
}
void CommentedTime::setMarkerType(int t)
void CommentedTime::setMarkerType(int newtype)
{
type = t;
type = newtype;
}
QString CommentedTime::hash() const
......
......@@ -98,7 +98,7 @@ void ClipCreationDialog::createClipFromXml(KdenliveDoc *doc, QDomElement &xml, c
//FIXME?
Q_UNUSED(groupInfo)
uint id = bin->getFreeClipId();
int id = bin->getFreeClipId();
xml.setAttribute(QStringLiteral("id"), QString::number(id));
AddClipCommand *command = new AddClipCommand(bin, xml, QString::number(id), true);
doc->commandStack()->push(command);
......@@ -127,7 +127,7 @@ void ClipCreationDialog::createColorClip(KdenliveDoc *doc, const QStringList &gr
QDomElement prod = xml.createElement(QStringLiteral("producer"));
xml.appendChild(prod);
prod.setAttribute(QStringLiteral("type"), (int) Color);
uint id = bin->getFreeClipId();
int id = bin->getFreeClipId();
prod.setAttribute(QStringLiteral("id"), QString::number(id));
prod.setAttribute(QStringLiteral("in"), QStringLiteral("0"));
prod.setAttribute(QStringLiteral("length"), doc->getFramePos(doc->timecode().getTimecode(t->gentime())));
......@@ -188,7 +188,7 @@ void ClipCreationDialog::createQTextClip(KdenliveDoc *doc, const QStringList &gr
QDomElement prod = xml.createElement(QStringLiteral("producer"));
xml.appendChild(prod);
prod.setAttribute(QStringLiteral("type"), (int) QText);
uint id = bin->getFreeClipId();
int id = bin->getFreeClipId();
prod.setAttribute(QStringLiteral("id"), QString::number(id));
prod.setAttribute(QStringLiteral("in"), QStringLiteral("0"));
......@@ -267,7 +267,7 @@ void ClipCreationDialog::createSlideshowClip(KdenliveDoc *doc, const QStringList
properties.insert(QStringLiteral("kdenlive:folderid"), groupInfo.at(0));
}
addXmlProperties(prod, properties);
uint id = bin->getFreeClipId();
int id = bin->getFreeClipId();
AddClipCommand *command = new AddClipCommand(bin, xml.documentElement(), QString::number(id), true);
doc->commandStack()->push(command);
}
......@@ -287,7 +287,7 @@ void ClipCreationDialog::createTitleClip(KdenliveDoc *doc, const QStringList &gr
QDomElement prod = xml.createElement(QStringLiteral("producer"));
xml.appendChild(prod);
//prod.setAttribute("resource", imagePath);
uint id = bin->getFreeClipId();
int id = bin->getFreeClipId();
prod.setAttribute(QStringLiteral("id"), QString::number(id));
QMap<QString, QString> properties;
......@@ -326,7 +326,7 @@ void ClipCreationDialog::createTitleTemplateClip(KdenliveDoc *doc, const QString
properties.insert(QStringLiteral("kdenlive:folderid"), groupInfo.at(0));
}
addXmlProperties(prod, properties);
uint id = bin->getFreeClipId();
int id = bin->getFreeClipId();
prod.setAttribute(QStringLiteral("id"), QString::number(id));
prod.setAttribute(QStringLiteral("type"), (int) TextTemplate);
prod.setAttribute(QStringLiteral("transparency"), QStringLiteral("1"));
......@@ -446,7 +446,7 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QList<QUrl>
i.next();
properties.insert(i.key(), i.value());
}
uint id = bin->getFreeClipId();
int id = bin->getFreeClipId();
prod.setAttribute(QStringLiteral("id"), QString::number(id));
QMimeDatabase db;
QMimeType type = db.mimeTypeForUrl(file);
......@@ -466,8 +466,8 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QList<QUrl>
prod.setAttribute(QStringLiteral("type"), (int) Text);
// extract embedded images
QDomNodeList items = txtdoc.elementsByTagName(QStringLiteral("content"));
for (int i = 0; i < items.count(); ++i) {
QDomElement content = items.item(i).toElement();
for (int j = 0; j < items.count(); ++j) {
QDomElement content = items.item(j).toElement();
if (content.hasAttribute(QStringLiteral("base64"))) {
QString titlesFolder = doc->projectDataFolder() + QStringLiteral("/titles/");
QString path = TitleDocument::extractBase64Image(titlesFolder, content.attribute(QStringLiteral("base64")));
......@@ -560,10 +560,10 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QStringList
KFileItem item(url);
if (item.mimetype().startsWith(QLatin1String("image"))) {
// import as sequence if we found more than one image in the sequence
QStringList list;
QString pattern = SlideshowClip::selectedPath(url, false, QString(), &list);
qCDebug(KDENLIVE_LOG) << " / // IMPORT PATTERN: " << pattern << " COUNT: " << list.count();
int count = list.count();
QStringList patternlist;
QString pattern = SlideshowClip::selectedPath(url, false, QString(), &patternlist);
qCDebug(KDENLIVE_LOG) << " / // IMPORT PATTERN: " << pattern << " COUNT: " << patternlist.count();
int count = patternlist.count();
if (count > 1) {
delete fileWidget;
delete dlg;
......@@ -589,7 +589,7 @@ void ClipCreationDialog::createClipsCommand(KdenliveDoc *doc, const QStringList
properties.insert(QStringLiteral("kdenlive:folderid"), groupInfo.at(0));
}
addXmlProperties(prod, properties);
uint id = bin->getFreeClipId();
int id = bin->getFreeClipId();
AddClipCommand *command = new AddClipCommand(bin, xml.documentElement(), QString::number(id), true);
doc->commandStack()->push(command);
return;
......
......@@ -857,7 +857,7 @@ void Wizard::slotSaveCaptureFormat()
ProfilesDialog::saveProfile(profile, dir.absoluteFilePath(QStringLiteral("video4linux")));
}
void Wizard::slotUpdateDecklinkDevice(int captureCard)
void Wizard::slotUpdateDecklinkDevice(uint captureCard)
{
KdenliveSettings::setDecklink_capturedevice(captureCard);
}
......
......@@ -80,7 +80,7 @@ private slots:
void slotDetectWebcam();
void slotUpdateCaptureParameters();
void slotSaveCaptureFormat();
void slotUpdateDecklinkDevice(int captureCard);
void slotUpdateDecklinkDevice(uint captureCard);
void slotOpenManual();
};
......
......@@ -122,7 +122,7 @@ uint KThumb::imageVariance(const QImage &image)
{
uint delta = 0;
uint avg = 0;
uint bytes = image.byteCount();
uint bytes = static_cast<uint>(image.byteCount());
uint STEPS = bytes / 2;
QVarLengthArray<uchar> pivot(STEPS);
const uchar *bits = image.bits();
......
......@@ -143,17 +143,17 @@ void LibraryTree::dropEvent(QDropEvent *event)
emit importSequence(QString(qMimeData->data(QStringLiteral("kdenlive/clip"))).split(QLatin1Char(';')), dest);
} else if (qMimeData->hasFormat(QStringLiteral("kdenlive/producerslist"))) {
QStringList list = QString(qMimeData->data(QStringLiteral("kdenlive/producerslist"))).split(QLatin1Char(';'));
foreach (const QString &data, list) {
if (data.startsWith(QLatin1Char('#'))) {
foreach (const QString &prodslist, list) {
if (prodslist.startsWith(QLatin1Char('#'))) {
// Bin folder, not supported yet
continue;
}
if (data.contains(QLatin1Char('/'))) {
if (prodslist.contains(QLatin1Char('/'))) {
// Clip zone
emit importSequence(data.split(QLatin1Char('/')), dest);
emit importSequence(prodslist.split(QLatin1Char('/')), dest);
} else {
// Full clip
emit importSequence(QStringList() << data << QStringLiteral("-1") << QStringLiteral("-1"), dest);
emit importSequence(QStringList() << prodslist << QStringLiteral("-1") << QStringLiteral("-1"), dest);
}
}
}
......@@ -463,7 +463,7 @@ void LibraryWidget::slotDownloadFinished(KJob *)
m_progressBar->setVisible(false);
}
void LibraryWidget::slotDownloadProgress(KJob *, unsigned long progress)
void LibraryWidget::slotDownloadProgress(KJob *, int progress)
{
m_progressBar->setVisible(true);
m_progressBar->setValue(progress);
......
......@@ -183,7 +183,7 @@ private slots:
void slotSaveSequence(const QStringList &info, QString dest);
void slotItemEdited(QTreeWidgetItem *item, int column);
void slotDownloadFinished(KJob *);
void slotDownloadProgress(KJob *, unsigned long);
void slotDownloadProgress(KJob *, int);
void slotGotPreview(const KFileItem &item, const QPixmap &pix);
void slotItemsAdded(const QUrl &url, const KFileItemList &list);
void slotItemsDeleted(const KFileItemList &list);
......
This diff is collapsed.
......@@ -436,7 +436,7 @@ private slots:
void slotDownloadResources();
/** @brief Process keyframe data sent from a clip to effect / transition stack. */
void slotProcessImportKeyframes(GraphicsRectItem type, const QString &tag, const QString &data);
void slotProcessImportKeyframes(GraphicsRectItem type, const QString& tag, const QString& keyframes);
/** @brief Move playhead to mouse curser position if defined key is pressed */
void slotAlignPlayheadToMousePos();
......
......@@ -25,6 +25,7 @@
#include <KMessageBox>
#include <klocalizedstring.h>
#include <kio_version.h>
ClipTranscode::ClipTranscode(const QStringList &urls, const QString &params, const QStringList &postParams, const QString &description, const QStringList &folderInfo, bool automaticMode, QWidget *parent) :
QDialog(parent), m_urls(urls), m_folderInfo(folderInfo), m_duration(0), m_automaticMode(automaticMode), m_postParams(postParams)
......@@ -49,7 +50,7 @@ ClipTranscode::ClipTranscode(const QStringList &urls, const QString &params, con
QString fileName = m_urls.constFirst();
source_url->setUrl(QUrl::fromLocalFile(fileName));
dest_url->setMode(KFile::File);
#if KXMLGUI_VERSION_MINOR > 32 || KXMLGUI_VERSION_MAJOR > 5
#if KIO_VERSION >= QT_VERSION_CHECK(5,33,0)
dest_url->setAcceptMode(QFileDialog::AcceptSave);
#endif
if (!params.isEmpty()) {
......
......@@ -390,9 +390,9 @@ void ProjectSettings::slotUpdateFiles(bool cacheOnly)
label_fonts->setHidden(true);
}
used_count->setText(QString::number(used));
used_size->setText(KIO::convertSize(usedSize));
used_size->setText(KIO::convertSize(static_cast<KIO::filesize_t>(usedSize)));
unused_count->setText(QString::number(unUsed));
unused_size->setText(KIO::convertSize(unUsedSize));
unused_size->setText(KIO::convertSize(static_cast<KIO::filesize_t>(unUsedSize)));
delete_unused->setEnabled(unUsed > 0);
}
......
......@@ -799,7 +799,7 @@ void ProjectManager::moveProjectData(const QString &src, const QString &dest)
void ProjectManager::slotMoveProgress(KJob *, unsigned long progress)
{
pCore->window()->slotGotProgressInfo(i18n("Moving project folder"), progress, ProcessingJobMessage);
pCore->window()->slotGotProgressInfo(i18n("Moving project folder"), static_cast<int>(progress), ProcessingJobMessage);
}
void ProjectManager::slotMoveFinished(KJob *job)
......
......@@ -312,6 +312,6 @@ void OAuth2::obtainNewAccessToken()
KSharedConfigPtr config = KSharedConfig::openConfig();
KConfigGroup authGroup(config, "FreeSoundAuthentication");
QString mstr_RefreshToken = authGroup.readEntry(QStringLiteral("freesound_refresh_token"));
mstr_RefreshToken = authGroup.readEntry(QStringLiteral("freesound_refresh_token"));
OAuth2::RequestAccessCode(true, mstr_RefreshToken); // request new access code via the refresh token method
}
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