X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdatabackup%2Fbackupwidget.cpp;h=81a96f8637a6240f725f4b5338e6ccfec5ec992c;hb=56aee6aedeeed3efd10ada8fe3c229eddc01ef05;hp=d707ccca88a1592c52e069cb8528b9def26113a4;hpb=e0fa1332f109b6455207ea701da386b2fddddf09;p=kdenlive diff --git a/src/databackup/backupwidget.cpp b/src/databackup/backupwidget.cpp index d707ccca..81a96f86 100644 --- a/src/databackup/backupwidget.cpp +++ b/src/databackup/backupwidget.cpp @@ -34,8 +34,7 @@ BackupWidget::BackupWidget(const KUrl &projectUrl, const KUrl &projectFolder, co // No url, means we opened the backup dialog from an empty project info_label->setText(i18n("Showing all backup files in folder")); m_projectWildcard = '*'; - } - else { + } else { info_label->setText(i18n("Showing backup files for %1", projectUrl.fileName())); m_projectWildcard = projectUrl.fileName().section('.', 0, -2); if (!projectId.isEmpty()) m_projectWildcard.append('-' + projectId); @@ -57,14 +56,10 @@ BackupWidget::BackupWidget(const KUrl &projectUrl, const KUrl &projectFolder, co connect(project_url, SIGNAL(textChanged(QString)), this, SLOT(slotParseBackupFiles())); backup_list->setCurrentRow(0); backup_list->setMinimumHeight(QFontMetrics(font()).lineSpacing() * 12); - } - - BackupWidget::~BackupWidget() { - } void BackupWidget::slotParseBackupFiles() @@ -83,7 +78,7 @@ void BackupWidget::slotParseBackupFiles() QString label; for (int i = 0; i < resultList.count(); ++i) { label = resultList.at(i).lastModified().toString(Qt::SystemLocaleLongDate); - if (m_projectWildcard.startsWith('*')) { + if (m_projectWildcard.startsWith(QLatin1Char('*'))) { // Displaying all backup files, so add project name in the entries label.prepend(resultList.at(i).fileName().section('-', 0, -7) + ".kdenlive - "); } @@ -106,7 +101,10 @@ void BackupWidget::slotDisplayBackupPreview() QString BackupWidget::selectedFile() const { - if (!backup_list->currentItem()) return QString(); + if (!backup_list->currentItem()) + return QString(); return backup_list->currentItem()->data(Qt::UserRole).toString(); } + +#include "backupwidget.moc"