[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdenlive] src: Merge branch '16.12'
From:       Jean-Baptiste Mardelle <null () kde ! org>
Date:       2016-12-31 0:40:24
Message-ID: E1cN7ii-0002tu-Ia () code ! kde ! org
[Download RAW message or body]

Git commit 7f591a4ab3d5d8c78aedcfe850a2f2878f379ef3 by Jean-Baptiste Mardelle.
Committed on 31/12/2016 at 00:40.
Pushed by mardelle into branch 'master'.

Merge branch '16.12'

M  +3    -3    src/bin/generators/generators.cpp
M  +0    -1    src/doc/kdenlivedoc.cpp
M  +14   -14   src/project/dialogs/projectsettings.cpp
M  +8    -8    src/project/projectmanager.cpp

https://commits.kde.org/kdenlive/7f591a4ab3d5d8c78aedcfe850a2f2878f379ef3

diff --cc src/bin/generators/generators.cpp
index 8eeb05f05,3223425b5..8f819ed11
--- a/src/bin/generators/generators.cpp
+++ b/src/bin/generators/generators.cpp
@@@ -173,11 -174,11 +173,11 @@@ QUrl Generators::getSavedClip(QString c
  
      if (url.isValid()) {
  #if KXMLGUI_VERSION_MINOR < 23 && KXMLGUI_VERSION_MAJOR == 5
 -    // Since Plasma 5.7 (release at same time as KF 5.23, 
 -    // the file dialog manages the overwrite check
 +        // Since Plasma 5.7 (release at same time as KF 5.23,
 +        // the file dialog manages the overwrite check
-         if (QFile::exists(url.path())) {
+         if (QFile::exists(url.toLocalFile())) {
              if (KMessageBox::warningYesNo(this, i18n("Output file already exists. \
                Do you want to overwrite it?")) != KMessageBox::Yes) {
-                 return getSavedClip(url.path());
+                 return getSavedClip(url.toLocalFile());
              }
          }
  #endif
diff --cc src/project/dialogs/projectsettings.cpp
index 4195ec52c,11bf52b6b..c5a569b3e
--- a/src/project/dialogs/projectsettings.cpp
+++ b/src/project/dialogs/projectsettings.cpp
@@@ -362,8 -364,8 +362,8 @@@ void ProjectSettings::slotUpdateFiles(b
              }
              allFonts << fonts;
          } else if (clip->clipType() == Playlist) {
-             QStringList files = extractPlaylistUrls(clip->clipUrl().path());
+             QStringList files = extractPlaylistUrls(clip->clipUrl().toLocalFile());
 -            foreach(const QString & file, files) {
 +            foreach (const QString &file, files) {
                  count++;
                  new QTreeWidgetItem(others, QStringList() << file);
              }
@@@ -579,24 -570,20 +579,24 @@@ QStringList ProjectSettings::extractSli
          QRegExp rx(regexp);
          int count = 0;
          QStringList result = dir.entryList(QDir::Files);
 -        foreach(const QString & path, result) {
 -            if (rx.exactMatch(path)) count++;
 +        foreach (const QString &path, result) {
 +            if (rx.exactMatch(path)) {
 +                count++;
 +            }
          }
-         urls.append(url.path() + " (" + i18np("1 image found", "%1 images found", \
count) + ')'); +         urls.append(url.toLocalFile() + " (" + i18np("1 image \
found", "%1 images found", count) + ')');  }
      return urls;
  }
  
  void ProjectSettings::slotExportToText()
  {
-     const QString savePath = QFileDialog::getSaveFileName(this, QString(), \
project_folder->url().path(), QStringLiteral("text/plain")); +     const QString \
savePath = QFileDialog::getSaveFileName(this, QString(), \
                project_folder->url().toLocalFile(), QStringLiteral("text/plain"));
 -    if (savePath.isEmpty()) return;
 +    if (savePath.isEmpty()) {
 +        return;
 +    }
      QString data;
-     data.append(i18n("Project folder: %1",  project_folder->url().path()) + '\n');
+     data.append(i18n("Project folder: %1",  project_folder->url().toLocalFile()) + \
                '\n');
      data.append(i18n("Project profile: %1",  m_pw->selectedProfile()) + '\n');
      data.append(i18n("Total clips: %1 (%2 used in timeline).", files_count->text(), \
used_count->text()) + "\n\n");  for (int i = 0; i < files_list->topLevelItemCount(); \
                ++i) {
diff --cc src/project/projectmanager.cpp
index f8ac88baf,669f03dba..0062c1ff8
--- a/src/project/projectmanager.cpp
+++ b/src/project/projectmanager.cpp
@@@ -331,8 -335,9 +331,8 @@@ bool ProjectManager::hasSelection() con
  bool ProjectManager::saveFileAs()
  {
      QFileDialog fd(pCore->window());
-     fd.setDirectory(m_project->url().isValid() ? \
m_project->url().adjusted(QUrl::RemoveFilename).path() : \
KdenliveSettings::defaultprojectfolder()); +     \
fd.setDirectory(m_project->url().isValid() ? \
m_project->url().adjusted(QUrl::RemoveFilename).toLocalFile() : \
                KdenliveSettings::defaultprojectfolder());
 -    fd.setMimeTypeFilters(QStringList()<<QStringLiteral("application/x-kdenlive"));
 +    fd.setMimeTypeFilters(QStringList() << \
QStringLiteral("application/x-kdenlive"));  \
fd.setAcceptMode(QFileDialog::AcceptSave);  fd.setFileMode(QFileDialog::AnyFile);
      fd.setDefaultSuffix(QStringLiteral("kdenlive"));
@@@ -494,8 -499,8 +494,8 @@@ void ProjectManager::openFile(const QUr
      if (checkForBackupFile(url)) {
          return;
      }
-     pCore->window()->slotGotProgressInfo(i18n("Opening file %1", url.path()), 100, \
InformationMessage); +     pCore->window()->slotGotProgressInfo(i18n("Opening file \
                %1", url.toLocalFile()), 100, InformationMessage);
 -    doOpenFile(url, NULL);
 +    doOpenFile(url, Q_NULLPTR);
  }
  
  void ProjectManager::doOpenFile(const QUrl &url, KAutoSaveFile *stale)
@@@ -572,8 -576,8 +572,8 @@@
      pCore->window()->m_timelineArea->setCurrentIndex(pCore->window()->m_timelineArea->addTab(m_trackView, \
QIcon::fromTheme(QStringLiteral("kdenlive")), m_project->description()));  if (!ok) {
          pCore->window()->m_timelineArea->setEnabled(false);
-         KMessageBox::sorry(pCore->window(), i18n("Cannot open file %1.\nProject is \
corrupted.", url.path())); +         KMessageBox::sorry(pCore->window(), i18n("Cannot \
                open file %1.\nProject is corrupted.", url.toLocalFile()));
 -        pCore->window()->slotGotProgressInfo(QString(), -1);
 +        pCore->window()->slotGotProgressInfo(QString(), 100);
          newFile(false, true);
          return;
      }
@@@ -633,9 -635,9 +633,9 @@@ void ProjectManager::slotOpenBackup(con
      QPointer<BackupWidget> dia = new BackupWidget(projectFile, projectFolder, \
projectId, pCore->window());  if (dia->exec() == QDialog::Accepted) {
          QString requestedBackup = dia->selectedFile();
-         m_project->backupLastSavedVersion(projectFile.path());
+         m_project->backupLastSavedVersion(projectFile.toLocalFile());
          closeCurrentDocument(false);
 -        doOpenFile(QUrl::fromLocalFile(requestedBackup), NULL);
 +        doOpenFile(QUrl::fromLocalFile(requestedBackup), Q_NULLPTR);
          if (m_project) {
              m_project->setUrl(projectFile);
              m_project->setModified(true);
@@@ -803,8 -808,8 +803,8 @@@ void ProjectManager::slotMoveFinished(K
  {
      if (job->error() == 0) {
          pCore->window()->slotGotProgressInfo(QString(), 100, InformationMessage);
 -        KIO::CopyJob *copyJob = static_cast<KIO::CopyJob *> (job);
 +        KIO::CopyJob *copyJob = static_cast<KIO::CopyJob *>(job);
-         QString newFolder = copyJob->destUrl().path();
+         QString newFolder = copyJob->destUrl().toLocalFile();
          // Check if project folder is inside document folder, in which case, paths \
                will be relative
          QDir projectDir(m_project->url().toString(QUrl::RemoveFilename | \
QUrl::RemoveScheme));  QDir srcDir(m_project->projectTempFolder());


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic