kleopatra
verifychecksumscontroller.cpp
Go to the documentation of this file.
84 static const Qt::CaseSensitivity fs_cs = HAVE_UNIX ? Qt::CaseSensitive : Qt::CaseInsensitive ; // can we use QAbstractFileEngine::caseSensitive()?
106 static QList<QRegExp> get_patterns( const std::vector< shared_ptr<ChecksumDefinition> > & checksumDefinitions )
194 VerifyChecksumsController::VerifyChecksumsController( const shared_ptr<const ExecutionContext> & ctx, QObject * p )
413 static std::vector<SumFile> find_sums_by_input_files( const QStringList & files, QStringList & errors,
451 kDebug() << "find_sums_by_input_files: it's something else; checking whether we'll find a sumfile for it...";
456 const QStringList::const_iterator it = kdtools::find_if( sumfiles, sumfile_contains_file( dir, fileName ) );
471 for ( std::map<QDir,std::set<QString,less_file>,less_dir>::const_iterator it = dirs2sums.begin(), end = dirs2sums.end() ; it != end ; ++it ) {
485 aggregate_size( it->first, kdtools::transform<QStringList>( summedfiles, mem_fn( &File::name ) ) ),
571 return s << "SumFile(" << sum.dir << "->" << sum.sumFile << "<-(" << sum.totalSize << ')' << ")\n";
580 const std::vector< shared_ptr<ChecksumDefinition> > checksumDefinitions = this->checksumDefinitions;
599 const function<void(int)> progressCb = boost::bind( &Private::progress, this, _1, 0, scanning );
602 const std::vector<SumFile> sumfiles = find_sums_by_input_files( files, errors, progressCb, checksumDefinitions );
628 i18n("Verifying checksums (%2) in %1", sumFile.checksumDefinition->label(), sumFile.dir.path() ) );
Definition: setinitialpindialog.cpp:62
static const struct @2 statusStrings[]
QString cap(int nth) const
Definition: setinitialpindialog.cpp:57
void clear()
int sum(const std::vector< ImportResult > &res, int(ImportResult::*fun)() const )
Definition: importcertificatescommand.cpp:224
QStringList systemEnvironment()
static QStringList c_lang_environment()
Definition: verifychecksumscontroller.cpp:499
static QList< QRegExp > get_patterns(const std::vector< shared_ptr< ChecksumDefinition > > &checksumDefinitions)
Definition: verifychecksumscontroller.cpp:106
QString readLine(qint64 maxlen)
QByteArray trimmed() const
void push_back(const T &value)
virtual bool waitForReadyRead(int msecs)
QString errorString() const
QProcess::ProcessError error() const
int lastIndexOf(char ch, int from) const
int size() const
static QStringList fs_intersect(QStringList l1, QStringList l2)
Definition: createchecksumscontroller.cpp:173
iterator erase(iterator pos)
QString join(const QString &separator) const
static shared_ptr< ChecksumDefinition > filename2definition(const QString &fileName, const std::vector< shared_ptr< ChecksumDefinition > > &checksumDefinitions)
Definition: verifychecksumscontroller.cpp:326
int size() const
static QString process(const SumFile &sumFile, bool *fatal, const QStringList &env, const function< void(const QString &, VerifyChecksumsDialog::Status)> &status)
Definition: verifychecksumscontroller.cpp:525
QString fromLocal8Bit(const char *str, int size)
bool atEnd() const
bool empty() const
bool isDir() const
QString fileName() const
~VerifyChecksumsController()
Definition: verifychecksumscontroller.cpp:200
bool isEmpty() const
const char * constData() const
QDebug operator<<(QDebug debug, const std::vector< T, A > &v)
Definition: headerview.cpp:78
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
QFuture< T > run(Function function,...)
void setEnvironment(const QStringList &environment)
QDir dir() const
Definition: commands/command.h:46
QByteArray mid(int pos, int len) const
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
bool cdUp()
static quint64 aggregate_size(const QDir &dir, const QStringList &files)
Definition: verifychecksumscontroller.cpp:319
iterator end()
void progress(int current, int total, const QString &what)
void setWorkingDirectory(const QString &dir)
char toLatin1() const
void cancel()
Definition: verifychecksumscontroller.cpp:240
static QStringList filter_checksum_files(QStringList l, const QList< QRegExp > &rxs)
Definition: verifychecksumscontroller.cpp:257
QByteArray left(int len) const
QByteArray toLatin1() const
static const QLatin1String CHECKSUM_DEFINITION_ID_ENTRY("checksum-definition-id")
QString absolutePath() const
QStringList entryList(QFlags< QDir::Filter > filters, QFlags< QDir::SortFlag > sort) const
virtual bool canReadLine() const
QString absoluteFilePath(const QString &fileName) const
void reserve(int size)
VerifyChecksumsController(QObject *parent=0)
Definition: verifychecksumscontroller.cpp:188
void setFiles(const QStringList &files)
Definition: verifychecksumscontroller.cpp:204
static VerifyChecksumsDialog::Status string2status(const QByteArray &str)
Definition: verifychecksumscontroller.cpp:518
void setReadChannel(ProcessChannel channel)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
static std::vector< File > parse_sum_file(const QString &fileName)
Definition: verifychecksumscontroller.cpp:297
int compare(const QString &other) const
bool exactMatch(const QString &str) const
void start()
Definition: verifychecksumscontroller.cpp:212
QProcess::ExitStatus exitStatus() const
iterator begin()
Definition: controller.h:52
int exitCode() const
QProcess::ProcessState state() const
QString decodeName(const QByteArray &localFileName)
QByteArray readAllStandardError()
static QStringList find_base_directiories(const QStringList &files)
Definition: verifychecksumscontroller.cpp:382
qint64 readLine(char *data, qint64 maxSize)
static std::vector< SumFile > find_sums_by_input_files(const QStringList &files, QStringList &errors, const function< void(int)> &progress, const std::vector< shared_ptr< ChecksumDefinition > > &checksumDefinitions)
Definition: verifychecksumscontroller.cpp:413
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.