libkleo
checksumdefinition.cpp
Go to the documentation of this file.
74 qWarning( "checksumdefinition.cpp: installPath() called before QCoreApplication was constructed" );
107 : Kleo::Exception( GPG_ERR_INV_PARAMETER, i18n("Error in checksum definition %1: %2", id, message ), MessageOnly ),
133 QString * command, QStringList * prefix, QStringList * suffix, ChecksumDefinition::ArgumentPassingMethod * method )
158 l = l.replaceInStrings( QLatin1String("__path_goes_here__"), ChecksumDefinition::installPath() );
183 qDebug() << "ChecksumDefinition[" << id << ']' << *command << *prefix << FILE_PLACEHOLDER << *suffix;
244 ChecksumDefinition::ChecksumDefinition( const QString & id, const QString & label, const QString & outputFileName, const QStringList & patterns )
299 qDebug( "[%p] Starting %s %s", p, qPrintable( cmd ), qPrintable( args.join(QLatin1String(" ")) ) );
345 std::vector< shared_ptr<ChecksumDefinition> > ChecksumDefinition::getChecksumDefinitions( QStringList & errors ) {
348 const QStringList groups = config->groupList().filter( QRegExp(QLatin1String("^Checksum Definition #")) );
352 const shared_ptr<ChecksumDefinition> ad( new KConfigBasedChecksumDefinition( KConfigGroup( config, group ) ) );
365 shared_ptr<ChecksumDefinition> ChecksumDefinition::getDefaultChecksumDefinition( const std::vector< shared_ptr<ChecksumDefinition> > & checksumDefinitions ) {
379 void ChecksumDefinition::setDefaultChecksumDefinition( const shared_ptr<ChecksumDefinition> & checksumDefinition ) {
bool startCreateCommand(QProcess *process, const QStringList &files) const
Definition: checksumdefinition.cpp:322
static void parse_command(QString cmdline, const QString &id, const QString &whichCommand, QString *command, QStringList *prefix, QStringList *suffix, ChecksumDefinition::ArgumentPassingMethod *method)
Definition: checksumdefinition.cpp:132
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
ArgumentPassingMethod
Definition: checksumdefinition.h:57
void push_back(const T &value)
void reserve(int alloc)
QString verifyCommand() const
Definition: checksumdefinition.cpp:261
static bool start_command(QProcess *p, const char *functionName, const QString &cmd, const QStringList &args, const QStringList &files, ChecksumDefinition::ArgumentPassingMethod method)
Definition: checksumdefinition.cpp:284
static std::vector< boost::shared_ptr< ChecksumDefinition > > getChecksumDefinitions()
Definition: checksumdefinition.cpp:339
QString join(const QString &separator) const
QString & remove(int position, int n)
static CryptoBackendFactory * instance()
Definition: cryptobackendfactory.cpp:102
static const QLatin1String CREATE_COMMAND_ENTRY("create-command")
static const QLatin1String CHECKSUM_DEFINITION_ID_ENTRY("checksum-definition-id")
int size() const
QString filePath() const
Definition: checksumdefinition.h:51
QString fromLocal8Bit(const char *str, int size)
QString createCommand() const
Definition: checksumdefinition.cpp:257
bool isEmpty() const
ChecksumDefinition(const QString &id, const QString &label, const QString &outputFileName, const QStringList &extensions)
Definition: checksumdefinition.cpp:244
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
static void setInstallPath(const QString &ip)
Definition: checksumdefinition.cpp:79
bool startVerifyCommand(QProcess *process, const QStringList &files) const
Definition: checksumdefinition.cpp:330
QCoreApplication * instance()
QStringList & replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs)
static void setDefaultChecksumDefinition(const boost::shared_ptr< ChecksumDefinition > &checksumDefinition)
Definition: checksumdefinition.cpp:379
static const QLatin1String FILE_PATTERNS_ENTRY("file-patterns")
static const QLatin1String NULL_SEPARATED_STDIN_INDICATOR("0|")
static QByteArray make_input(const QStringList &files, char sep)
Definition: checksumdefinition.cpp:275
bool exists() const
bool contains(QChar ch, Qt::CaseSensitivity cs) const
bool waitForStarted(int msecs)
Definition: exception.h:45
QString & replace(int position, int n, QChar after)
virtual ~ChecksumDefinition()
Definition: checksumdefinition.cpp:255
static QString installPath()
Definition: checksumdefinition.cpp:67
static boost::shared_ptr< ChecksumDefinition > getDefaultChecksumDefinition(const std::vector< boost::shared_ptr< ChecksumDefinition > > &available)
Definition: checksumdefinition.cpp:365
static QString try_extensions(const QString &path)
Definition: checksumdefinition.cpp:119
static const QLatin1String OUTPUT_FILE_ENTRY("output-file")
static const QLatin1String ID_ENTRY("id")
QList< T > mid(int pos, int length) const
static const QLatin1String FILE_PLACEHOLDER("%f")
qint64 write(const char *data, qint64 maxSize)
int indexOf(const QRegExp &rx, int from) const
static const QLatin1String INSTALLPATH_PLACEHOLDER("%I")
static const QLatin1String VERIFY_COMMAND_ENTRY("verify-command")
QStringList filter(const QString &str, Qt::CaseSensitivity cs) const
int size() const
QString applicationDirPath()
void closeWriteChannel()
static const QLatin1String NAME_ENTRY("Name")
void start(const QString &program, const QStringList &arguments, QFlags< QIODevice::OpenModeFlag > mode)
QByteArray encodeName(const QString &fileName)
static const QLatin1Char NEWLINE_SEPARATED_STDIN_INDICATOR( '|')
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:38 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:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.