Commit 246bd99e authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

clazy: fix missing reference on non-trivial types

parent d5329dc8
......@@ -269,7 +269,7 @@ AddJob* Archive::addFiles(const QStringList & files, const CompressionOptions& o
return newJob;
}
ExtractJob* Archive::copyFiles(const QList<QVariant> & files, const QString & destinationDir, ExtractionOptions options)
ExtractJob* Archive::copyFiles(const QList<QVariant>& files, const QString& destinationDir, const ExtractionOptions& options)
{
ExtractionOptions newOptions = options;
if (isPasswordProtected()) {
......
......@@ -170,7 +170,7 @@ public:
*/
AddJob* addFiles(const QStringList & files, const CompressionOptions& options = CompressionOptions());
ExtractJob* copyFiles(const QList<QVariant> & files, const QString & destinationDir, ExtractionOptions options = ExtractionOptions());
ExtractJob* copyFiles(const QList<QVariant> &files, const QString &destinationDir, const ExtractionOptions &options = ExtractionOptions());
bool isSingleFolderArchive();
QString subfolderName();
......
......@@ -91,7 +91,7 @@ public:
* @note If returning false, make sure to emit the error() signal beforewards to notify
* the user of the error condition.
*/
virtual bool copyFiles(const QList<QVariant> & files, const QString & destinationDirectory, ExtractionOptions options) = 0;
virtual bool copyFiles(const QList<QVariant> &files, const QString &destinationDirectory, const ExtractionOptions &options) = 0;
bool waitForFinishedSignal();
virtual bool doKill();
......
......@@ -138,7 +138,7 @@ bool CliInterface::list()
return true;
}
bool CliInterface::copyFiles(const QVariantList &files, const QString &destinationDirectory, ExtractionOptions options)
bool CliInterface::copyFiles(const QVariantList &files, const QString &destinationDirectory, const ExtractionOptions &options)
{
qCDebug(ARK) << Q_FUNC_INFO << "to" << destinationDirectory;
......
......@@ -268,7 +268,7 @@ public:
virtual ~CliInterface();
virtual bool list() Q_DECL_OVERRIDE;
virtual bool copyFiles(const QList<QVariant> & files, const QString & destinationDirectory, ExtractionOptions options) Q_DECL_OVERRIDE;
virtual bool copyFiles(const QList<QVariant>& files, const QString& destinationDirectory, const ExtractionOptions& options) Q_DECL_OVERRIDE;
virtual bool addFiles(const QStringList & files, const CompressionOptions& options) Q_DECL_OVERRIDE;
virtual bool deleteFiles(const QList<QVariant> & files) Q_DECL_OVERRIDE;
......
......@@ -245,7 +245,7 @@ QString ListJob::subfolderName() const
return m_subfolderName;
}
ExtractJob::ExtractJob(const QVariantList& files, const QString& destinationDir, ExtractionOptions options, ReadOnlyArchiveInterface *interface, QObject *parent)
ExtractJob::ExtractJob(const QVariantList& files, const QString& destinationDir, const ExtractionOptions& options, ReadOnlyArchiveInterface *interface, QObject *parent)
: Job(interface, parent)
, m_files(files)
, m_destinationDir(destinationDir)
......
......@@ -123,7 +123,7 @@ class KERFUFFLE_EXPORT ExtractJob : public Job
Q_OBJECT
public:
ExtractJob(const QVariantList& files, const QString& destinationDir, ExtractionOptions options, ReadOnlyArchiveInterface *interface, QObject *parent = 0);
ExtractJob(const QVariantList& files, const QString& destinationDir, const ExtractionOptions& options, ReadOnlyArchiveInterface *interface, QObject *parent = 0);
QString destinationDirectory() const;
ExtractionOptions extractionOptions() const;
......
......@@ -81,7 +81,7 @@ bool JSONArchiveInterface::addFiles(const QStringList& files, const Kerfuffle::C
return true;
}
bool JSONArchiveInterface::copyFiles(const QList<QVariant>& files, const QString& destinationDirectory, Kerfuffle::ExtractionOptions options)
bool JSONArchiveInterface::copyFiles(const QList<QVariant>& files, const QString& destinationDirectory, const Kerfuffle::ExtractionOptions& options)
{
Q_UNUSED(files)
Q_UNUSED(destinationDirectory)
......
......@@ -52,12 +52,12 @@ public:
explicit JSONArchiveInterface(QObject *parent, const QVariantList& args);
virtual ~JSONArchiveInterface();
virtual bool list();
virtual bool open();
virtual bool list() Q_DECL_OVERRIDE;
virtual bool open() Q_DECL_OVERRIDE;
virtual bool addFiles(const QStringList& files, const Kerfuffle::CompressionOptions& options);
virtual bool copyFiles(const QList<QVariant>& files, const QString& destinationDirectory, Kerfuffle::ExtractionOptions options);
virtual bool deleteFiles(const QList<QVariant>& files);
virtual bool addFiles(const QStringList& files, const Kerfuffle::CompressionOptions& options) Q_DECL_OVERRIDE;
virtual bool copyFiles(const QList<QVariant>& files, const QString& destinationDirectory, const Kerfuffle::ExtractionOptions& options) Q_DECL_OVERRIDE;
virtual bool deleteFiles(const QList<QVariant>& files) Q_DECL_OVERRIDE;
private:
JSONParser::JSONArchive m_archive;
......
......@@ -900,14 +900,14 @@ KJob* ArchiveModel::setArchive(Kerfuffle::Archive *archive)
return job;
}
ExtractJob* ArchiveModel::extractFile(const QVariant& fileName, const QString & destinationDir, const Kerfuffle::ExtractionOptions options) const
ExtractJob* ArchiveModel::extractFile(const QVariant& fileName, const QString& destinationDir, const Kerfuffle::ExtractionOptions& options) const
{
QList<QVariant> files;
files << QVariant::fromValue(fileRootNodePair(fileName.toString()));
return extractFiles(files, destinationDir, options);
}
ExtractJob* ArchiveModel::extractFiles(const QList<QVariant>& files, const QString & destinationDir, const Kerfuffle::ExtractionOptions options) const
ExtractJob* ArchiveModel::extractFiles(const QList<QVariant>& files, const QString& destinationDir, const Kerfuffle::ExtractionOptions& options) const
{
Q_ASSERT(m_archive);
ExtractJob *newJob = m_archive->copyFiles(files, destinationDir, options);
......
......@@ -69,8 +69,8 @@ public:
Kerfuffle::ArchiveEntry entryForIndex(const QModelIndex &index);
int childCount(const QModelIndex &index, int &dirs, int &files) const;
Kerfuffle::ExtractJob* extractFile(const QVariant& fileName, const QString & destinationDir, const Kerfuffle::ExtractionOptions options = Kerfuffle::ExtractionOptions()) const;
Kerfuffle::ExtractJob* extractFiles(const QList<QVariant>& files, const QString & destinationDir, const Kerfuffle::ExtractionOptions options = Kerfuffle::ExtractionOptions()) const;
Kerfuffle::ExtractJob* extractFile(const QVariant& fileName, const QString& destinationDir, const Kerfuffle::ExtractionOptions& options = Kerfuffle::ExtractionOptions()) const;
Kerfuffle::ExtractJob* extractFiles(const QList<QVariant>& files, const QString& destinationDir, const Kerfuffle::ExtractionOptions& options = Kerfuffle::ExtractionOptions()) const;
Kerfuffle::AddJob* addFiles(const QStringList & paths, const Kerfuffle::CompressionOptions& options = Kerfuffle::CompressionOptions());
Kerfuffle::DeleteJob* deleteFiles(const QList<QVariant> & files);
......
......@@ -1110,7 +1110,7 @@ void Part::slotShowContextMenu()
popup->popup(QCursor::pos());
}
void Part::displayMsgWidget(KMessageWidget::MessageType type, QString msg)
void Part::displayMsgWidget(KMessageWidget::MessageType type, const QString& msg)
{
KMessageWidget *msgWidget = new KMessageWidget();
msgWidget->setText(msg);
......
......@@ -120,7 +120,7 @@ private:
QList<QVariant> filesAndRootNodesForIndexes(const QModelIndexList& list) const;
QModelIndexList addChildren(const QModelIndexList &list) const;
void registerJob(KJob *job);
void displayMsgWidget(KMessageWidget::MessageType type, QString msg);
void displayMsgWidget(KMessageWidget::MessageType type, const QString& msg);
ArchiveModel *m_model;
QTreeView *m_view;
......
......@@ -140,7 +140,7 @@ bool LibArchiveInterface::doKill()
return true;
}
bool LibArchiveInterface::copyFiles(const QVariantList& files, const QString& destinationDirectory, ExtractionOptions options)
bool LibArchiveInterface::copyFiles(const QVariantList& files, const QString& destinationDirectory, const ExtractionOptions& options)
{
qCDebug(ARK) << "Changing current directory to " << destinationDirectory;
QDir::setCurrent(destinationDirectory);
......
......@@ -46,7 +46,7 @@ public:
bool list();
bool doKill();
bool copyFiles(const QVariantList& files, const QString& destinationDirectory, ExtractionOptions options);
bool copyFiles(const QVariantList& files, const QString& destinationDirectory, const ExtractionOptions& options);
bool addFiles(const QStringList& files, const CompressionOptions& options);
bool deleteFiles(const QVariantList& files);
......
......@@ -46,7 +46,7 @@ LibSingleFileInterface::~LibSingleFileInterface()
{
}
bool LibSingleFileInterface::copyFiles(const QList<QVariant> & files, const QString & destinationDirectory, Kerfuffle::ExtractionOptions options)
bool LibSingleFileInterface::copyFiles(const QList<QVariant>& files, const QString& destinationDirectory, const Kerfuffle::ExtractionOptions& options)
{
Q_UNUSED(files)
Q_UNUSED(options)
......
......@@ -37,7 +37,7 @@ public:
virtual ~LibSingleFileInterface();
virtual bool list() Q_DECL_OVERRIDE;
virtual bool copyFiles(const QList<QVariant> & files, const QString & destinationDirectory, Kerfuffle::ExtractionOptions options) Q_DECL_OVERRIDE;
virtual bool copyFiles(const QList<QVariant>& files, const QString& destinationDirectory, const Kerfuffle::ExtractionOptions& options) Q_DECL_OVERRIDE;
protected:
const QString uncompressedFileName() const;
......
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