From 9608aa7f0fda6a2979db41c5f82f19c7dd5420c7 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Thu, 24 Sep 2020 19:52:30 +0200 Subject: [PATCH] Fix clazy warning --- src/Archiver.cxx | 4 ++-- src/Archiver.hxx | 24 ++++++++++++------------ src/Selector.cxx | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Archiver.cxx b/src/Archiver.cxx index d5c3388..d78a236 100644 --- a/src/Archiver.cxx +++ b/src/Archiver.cxx @@ -927,7 +927,7 @@ bool Archiver::getNextSlice() QString prefix = filePrefix.isEmpty() ? QStringLiteral("backup") : filePrefix; if ( targetURL.isLocalFile() ) - baseName = targetURL.path() + QLatin1Char('/') + prefix + QDateTime::currentDateTime().toString(QLatin1String("_yyyy.MM.dd-hh.mm.ss")); + baseName = targetURL.path() + QLatin1Char('/') + prefix + QDateTime::currentDateTime().toString(QStringLiteral("_yyyy.MM.dd-hh.mm.ss")); else baseName = QDir::tempPath() + QLatin1Char('/') + prefix + QDateTime::currentDateTime().toString(QStringLiteral("_yyyy.MM.dd-hh.mm.ss")); } @@ -969,7 +969,7 @@ bool Archiver::getNextSlice() //-------------------------------------------------------------------------------- -void Archiver::emitArchiveError() const +void Archiver::emitArchiveError() { QString err; diff --git a/src/Archiver.hxx b/src/Archiver.hxx index 337b103..2f73c67 100644 --- a/src/Archiver.hxx +++ b/src/Archiver.hxx @@ -108,17 +108,17 @@ class Archiver : public QObject void setForceFullBackup(bool force = true); Q_SIGNALS: - void inProgress(bool runs) const; - void logging(const QString &) const; - void warning(const QString &) const; - void targetCapacity(KIO::filesize_t bytes) const; - void sliceProgress(int percent) const; - void fileProgress(int percent) const; - void newSlice(int) const; - void totalFilesChanged(int) const; - void totalBytesChanged(KIO::filesize_t) const; - void elapsedChanged(const QTime &) const; - void backupTypeChanged(bool incremental) const; + void inProgress(bool runs); + void logging(const QString &); + void warning(const QString &); + void targetCapacity(KIO::filesize_t bytes); + void sliceProgress(int percent); + void fileProgress(int percent); + void newSlice(int); + void totalFilesChanged(int); + void totalBytesChanged(KIO::filesize_t); + void elapsedChanged(const QTime &); + void backupTypeChanged(bool incremental); private Q_SLOTS: void slotResult(KJob *); @@ -150,7 +150,7 @@ class Archiver : public QObject // return true if given fileName matches any of the defined filters bool fileIsFiltered(const QString &fileName) const; - void emitArchiveError() const; + void emitArchiveError(); static bool UDSlessThan(const KIO::UDSEntry &left, const KIO::UDSEntry &right); diff --git a/src/Selector.cxx b/src/Selector.cxx index 12e863b..1ac6574 100644 --- a/src/Selector.cxx +++ b/src/Selector.cxx @@ -261,7 +261,7 @@ Selector::Selector(QWidget *parent, KActionCollection *actionCollection) QFileInfo info(QStringLiteral("/")); item->setSize(info.size()); item->setLastModified(info.lastModified()); - item->setIcon(QIcon::fromTheme(QLatin1String("folder"))); + item->setIcon(QIcon::fromTheme(QStringLiteral("folder"))); setExpanded(item->index(), true); fillTree(item, QStringLiteral("/"), false); -- GitLab