Merge branch 'Applications/18.04'

parents dbd5a248 c595018a
......@@ -78,7 +78,7 @@ include(CheckIncludeFiles)
check_include_files(malloc.h HAVE_MALLOC_H)
check_include_files(pthread.h HAVE_PTHREAD_H)
find_package(Qt5 REQUIRED COMPONENTS Core DBus Widgets Script Svg Quick )
find_package(Qt5 REQUIRED COMPONENTS Core DBus Widgets Script Svg Quick Concurrent)
find_package(Qt5 OPTIONAL_COMPONENTS WebKitWidgets QUIET)
find_package(KF5 5.23.0 OPTIONAL_COMPONENTS XmlGui QUIET)
......
......@@ -244,7 +244,7 @@
</ul>
</description>
<releases>
<release date="2018-01-07" version="17.12.1"/>
<release date="2018-04-19" version="18.04.0"/>
</releases>
<url type="homepage">https://kdenlive.org/</url>
<url type="bugtracker">https://bugs.kde.org</url>
......
......@@ -9,12 +9,6 @@ set(kdenlive_render_SRCS
add_executable(kdenlive_render ${kdenlive_render_SRCS})
ecm_mark_nongui_executable(kdenlive_render)
qt5_use_modules(kdenlive_render Widgets Concurrent DBus)
target_link_libraries(kdenlive_render
${QT_LIBRARIES}
${Qt5_LIBRARIES}
)
target_link_libraries(kdenlive_render Qt5::Core Qt5::DBus)
install(TARGETS kdenlive_render DESTINATION ${BIN_INSTALL_DIR})
......@@ -299,7 +299,7 @@ if (KF5Crash_FOUND)
target_link_libraries(kdenlive KF5::Crash)
endif()
qt5_use_modules( kdenlive Script Widgets Concurrent Qml Quick)
target_link_libraries(kdenlive Qt5::Script Qt5::Widgets Qt5::Concurrent Qt5::Qml Qt5::Quick)
if (Qt5WebKitWidgets_FOUND)
message(STATUS "Found Qt5 WebKitWidgets. You can use your Freesound.org credentials to download files")
......
......@@ -388,9 +388,9 @@ void RenderWidget::setDocumentPath(const QString &path)
{
if (m_view.out_file->url().adjusted(QUrl::RemoveFilename).toLocalFile() == QUrl::fromLocalFile(m_projectFolder).adjusted(QUrl::RemoveFilename).toLocalFile()) {
const QString fileName = m_view.out_file->url().fileName();
m_view.out_file->setUrl(QUrl::fromLocalFile(path + fileName));
m_view.out_file->setUrl(QUrl::fromLocalFile(QDir(path).absoluteFilePath(fileName)));
}
m_projectFolder = path;
m_projectFolder = QUrl::fromLocalFile(path).adjusted(QUrl::NormalizePathSegments | QUrl::StripTrailingSlash).toLocalFile() + QDir::separator();
parseScriptFiles();
}
......
......@@ -74,8 +74,6 @@ Wizard::Wizard(bool autoClose, QWidget *parent) :
m_systemCheckIsOk(false),
m_brokenModule(false)
{
// Check color theme
ThemeManager::instance()->initDarkTheme();
setWindowTitle(i18n("Welcome to Kdenlive"));
int logoHeight = fontMetrics().height() * 2.5;
setWizardStyle(QWizard::ModernStyle);
......@@ -607,23 +605,6 @@ void Wizard::slotCheckPrograms()
else item->setIcon(0, m_okIcon);
#endif
*/
if (QStandardPaths::findExecutable(QStringLiteral("dvdauthor")).isEmpty()) {
m_infos.append(i18n("<li>Missing app: <b>dvdauthor</b><br/>required for creation of DVD</li>"));
allIsOk = false;
}
if (QStandardPaths::findExecutable(QStringLiteral("genisoimage")).isEmpty()) {
// no GenIso, check for mkisofs
if (QStandardPaths::findExecutable(QStringLiteral("mkisofs")).isEmpty()) {
m_infos.append(i18n("<li>Missing app: <b>genisoimage</b> or <b>mkisofs</b><br/>required for creation of DVD ISO images</li>"));
allIsOk = false;
}
}
if (QStandardPaths::findExecutable(QStringLiteral("xine")).isEmpty() && QStandardPaths::findExecutable(QStringLiteral("vlc")).isEmpty()) {
m_infos.append(i18n("<li>Missing app: <b>vlc</b> or <b>xine</b><br/>recommended to preview DVD</li>"));
allIsOk = false;
}
// set up some default applications
QString program;
......
......@@ -237,6 +237,7 @@ bool DocumentChecker::hasErrorInClips()
}
QMap<QString, QString> autoFixLuma;
QString lumaPath;
// Check existence of luma files
foreach (const QString &lumafile, filesToCheck) {
filePath = lumafile;
......@@ -244,16 +245,29 @@ bool DocumentChecker::hasErrorInClips()
filePath.prepend(root);
}
if (!QFile::exists(filePath)) {
QString fixedLuma;
QString lumaName = filePath.section(QLatin1Char('/'), -1);
// check if this was an old format luma, not in correct folder
fixedLuma = filePath.section(QLatin1Char('/'), 0, -2);
fixedLuma.append(hdProfile ? QStringLiteral("/HD/") : QStringLiteral("/PAL/"));
fixedLuma.append(filePath.section(QLatin1Char('/'), -1));
QString fixedLuma = filePath.section(QLatin1Char('/'), 0, -2);
lumaName.prepend(hdProfile ? QStringLiteral("/HD/") : QStringLiteral("/PAL/"));
fixedLuma.append(lumaName);
if (QFile::exists(fixedLuma)) {
// Auto replace pgm with png for lumas
autoFixLuma.insert(filePath, fixedLuma);
continue;
}
// Check MLT folder
if (lumaPath.isEmpty()) {
QDir dir(QCoreApplication::applicationDirPath());
dir.cdUp();
dir.cd(QStringLiteral("share/kdenlive/lumas/"));
lumaPath = dir.absolutePath();
}
lumaName.prepend(lumaPath);
if (QFile::exists(lumaName)) {
autoFixLuma.insert(filePath, lumaName);
continue;
}
if (filePath.endsWith(QLatin1String(".pgm"))) {
fixedLuma = filePath.section(QLatin1Char('.') , 0, -2) + QStringLiteral(".png");
} else if (filePath.endsWith(QLatin1String(".png"))) {
......@@ -282,7 +296,6 @@ bool DocumentChecker::hasErrorInClips()
}
}
}
if (m_missingClips.isEmpty() && missingLumas.isEmpty() && missingProxies.isEmpty() && missingSources.isEmpty() && m_missingFonts.isEmpty()) {
return false;
}
......
......@@ -741,7 +741,10 @@ QString KdenliveDoc::projectTempFolder() const
QString KdenliveDoc::projectDataFolder() const
{
if (m_projectFolder.isEmpty()) {
return KdenliveSettings::defaultprojectfolder();
if (KdenliveSettings::customprojectfolder()) {
return KdenliveSettings::defaultprojectfolder();
}
return QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
}
return m_projectFolder;
}
......@@ -795,7 +798,7 @@ void KdenliveDoc::moveProjectData(const QString &/*src*/, const QString &dest)
if (proxyDir.mkpath(QStringLiteral("."))) {
KIO::CopyJob *job = KIO::move(cacheUrls, QUrl::fromLocalFile(proxyDir.absolutePath()));
KJobWidgets::setWindow(job, QApplication::activeWindow());
if (job->exec() > 0) {
if (job->exec() == false) {
KMessageBox::sorry(QApplication::activeWindow(), i18n("Moving proxy clips failed: %1", job->errorText()));
}
}
......
......@@ -1641,6 +1641,8 @@ bool MainWindow::readOptions()
if (!initialGroup.exists() || KdenliveSettings::sdlAudioBackend().isEmpty()) {
// First run, check if user is on a KDE Desktop
firstRun = true;
// Check color theme
ThemeManager::instance()->initDarkTheme();
// this is our first run, show Wizard
QPointer<Wizard> w = new Wizard(true);
if (w->exec() == QDialog::Accepted && w->isOk()) {
......@@ -1695,10 +1697,10 @@ void MainWindow::slotEditProjectSettings()
pCore->projectManager()->currentTimeline()->updatePreviewSettings(w->selectedPreview());
bool modified = false;
if (m_recMonitor) {
m_recMonitor->slotUpdateCaptureFolder(project->projectDataFolder() + QDir::separator());
m_recMonitor->slotUpdateCaptureFolder(project->projectDataFolder());
}
if (m_renderWidget) {
m_renderWidget->setDocumentPath(project->projectDataFolder() + QDir::separator());
m_renderWidget->setDocumentPath(project->projectDataFolder());
}
if (KdenliveSettings::videothumbnails() != w->enableVideoThumbs()) {
slotSwitchVideoThumbs();
......@@ -1816,7 +1818,7 @@ void MainWindow::slotRenderProject()
connect(m_renderWidget, &RenderWidget::openDvdWizard, this, &MainWindow::slotDvdWizard);
m_renderWidget->setProfile(project->mltProfile().path);
m_renderWidget->setGuides(pCore->projectManager()->currentTimeline()->projectView()->guidesData(), project->projectDuration());
m_renderWidget->setDocumentPath(project->projectDataFolder() + QDir::separator());
m_renderWidget->setDocumentPath(project->projectDataFolder());
m_renderWidget->setRenderProfile(project->getRenderProperties());
}
if (m_compositeAction->currentAction()) {
......@@ -2026,7 +2028,7 @@ void MainWindow::connectDocument()
slotCheckRenderStatus();
m_renderWidget->setProfile(project->mltProfile().path);
m_renderWidget->setGuides(pCore->projectManager()->currentTimeline()->projectView()->guidesData(), project->projectDuration());
m_renderWidget->setDocumentPath(project->projectDataFolder() + QDir::separator());
m_renderWidget->setDocumentPath(project->projectDataFolder());
m_renderWidget->setRenderProfile(project->getRenderProperties());
}
m_zoomSlider->setValue(project->zoom().x());
......@@ -2041,7 +2043,7 @@ void MainWindow::connectDocument()
pCore->monitorManager()->setDocument(project);
trackView->updateProfile(1.0);
if (m_recMonitor) {
m_recMonitor->slotUpdateCaptureFolder(project->projectDataFolder() + QDir::separator());
m_recMonitor->slotUpdateCaptureFolder(project->projectDataFolder());
}
// Init document zone
m_projectMonitor->slotZoneMoved(trackView->inPoint(), trackView->outPoint());
......@@ -2158,7 +2160,7 @@ void MainWindow::slotUpdateCaptureFolder()
{
if (m_recMonitor) {
if (pCore->projectManager()->current()) {
m_recMonitor->slotUpdateCaptureFolder(pCore->projectManager()->current()->projectDataFolder() + QDir::separator());
m_recMonitor->slotUpdateCaptureFolder(pCore->projectManager()->current()->projectDataFolder());
} else {
m_recMonitor->slotUpdateCaptureFolder(KdenliveSettings::defaultprojectfolder());
}
......
......@@ -197,8 +197,14 @@ void RecMonitor::slotUpdateCaptureFolder(const QString &currentProjectFolder)
{
if (KdenliveSettings::capturetoprojectfolder()) {
m_capturePath = currentProjectFolder;
if (!m_capturePath.endsWith(QDir::separator())) {
m_capturePath.append(QDir::separator());
}
} else {
m_capturePath = KdenliveSettings::capturefolder();
if (!m_capturePath.endsWith(QDir::separator())) {
m_capturePath.append(QDir::separator());
}
}
if (m_captureProcess) {
m_captureProcess->setWorkingDirectory(m_capturePath);
......@@ -630,11 +636,11 @@ void RecMonitor::slotRecord()
} else if (device_selector->currentIndex() == BlackMagic) {
extension = KdenliveSettings::decklink_extension();
}
QString path = QUrl(m_capturePath).toLocalFile() + QDir::separator() + QStringLiteral("capture0000.") + extension;
QString path = QDir(m_capturePath).absoluteFilePath(QStringLiteral("capture0000.") + extension);
int i = 1;
while (QFile::exists(path)) {
QString num = QString::number(i).rightJustified(4, '0', false);
path = QUrl(m_capturePath).toLocalFile() + QDir::separator() + QStringLiteral("capture") + num + QLatin1Char('.') + extension;
path = QDir(m_capturePath).absoluteFilePath(QStringLiteral("capture") + num + QLatin1Char('.') + extension);
++i;
}
m_captureFile = QUrl(path);
......@@ -1033,12 +1039,12 @@ void RecMonitor::slotPlay()
void RecMonitor::slotReadProcessInfo()
{
QString data = m_captureProcess->readAllStandardError().simplified();
QString processData = m_captureProcess->readAllStandardError().simplified();
if (device_selector->currentIndex() == ScreenBag) {
m_error.append(data + QLatin1Char('\n'));
m_error.append(processData + QLatin1Char('\n'));
} else if (device_selector->currentIndex() == Firewire) {
data = data.section(QLatin1Char('"'), 2, 2).simplified();
m_dvinfo.setText(data.left(11));
processData = processData.section(QLatin1Char('"'), 2, 2).simplified();
m_dvinfo.setText(processData.left(11));
m_dvinfo.updateGeometry();
}
}
......
......@@ -8327,7 +8327,7 @@ void CustomTrackView::adjustEffects(ClipItem *item, const ItemInfo &oldInfo, QUn
if (!effects.isEmpty()) {
QMap<int, QDomElement>::const_iterator i = effects.constBegin();
while (i != effects.constEnd()) {
new EditEffectCommand(this, item->track(), item->startPos(), i.value(), item->effect(i.key()), i.value().attribute(QStringLiteral("kdenlive_ix")).toInt(), true, true, false, command);
new EditEffectCommand(this, item->track(), item->startPos(), i.value(), item->effect(i.key()), i.value().attribute(QStringLiteral("kdenlive_ix")).toInt(), true, true, true, false, command);
++i;
}
}
......
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