KPackage
packagejobthread.cpp
86PackageJobThread::PackageJobThread(PackageJob::OperationType type, const QString &src, const QString &dest, const KPackage::Package &package)
158bool PackageJobThread::installPackage(const QString &src, const QString &dest, const Package &package, PackageJob::OperationType operation)
202 // qCWarning(KPACKAGE_LOG) << "Could not open package file, unsupported archive format:" << src << mimetype.name();
203 d->errorMessage = i18n("Could not open package file, unsupported archive format: %1 %2", src, mimetype.name());
243 KPluginMetaData meta = copyPackage.metadata(); // The packagestructure might have set the metadata, so use that
255 const QRegularExpression validatePluginName(QStringLiteral("^[\\w\\-\\.]+$")); // Only allow letters, numbers, underscore and period.
257 // qCDebug(KPACKAGE_LOG) << "Package plugin id " << pluginName << "contains invalid characters";
272 if (QString jsonPath = targetName + QLatin1String("/metadata.json"); QFileInfo::exists(jsonPath)) {
277 d->errorMessage = i18n("The new package has a different type from the old version already installed.");
282 d->errorMessage = i18n("Impossible to remove the old installation of %1 located at %2. error: %3", pluginName, targetName, d->errorMessage);
286 d->errorMessage = i18n("Not installing version %1 of %2. Version %3 already installed.", meta.version(), meta.pluginId(), oldMeta.version());
302 const QStringList dependencies = meta.value(QStringLiteral("X-KPackage-Dependencies"), QStringList());
305 const QString knsrcFilePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("knsrcfiles/") + depUrl.host());
359 // Do not emit the install path changed, information about the removed package might be useful for consumers
368 d->errorMessage = packagePath.isEmpty() ? i18n("package path was deleted manually") : i18n("%1 does not exist", packagePath);
QStringList entries() const
bool copyTo(const QString &dest, bool recursive=true) const
const KArchiveEntry * entry(const QString &name) const
virtual bool isDirectory() const
QString name() const
virtual bool open(QIODevice::OpenMode mode)
const KArchiveDirectory * directory() const
QString pluginId() const
bool value(QStringView key, bool defaultValue) const
static KPluginMetaData fromJsonFile(const QString &jsonFile)
QString version() const
QString i18n(const char *text, const TYPE &arg...)
void update(Part *part, const QByteArray &data, qint64 dataSize)
KIOCORE_EXPORT MimetypeJob * mimetype(const QUrl &url, JobFlags flags=DefaultFlags)
QString path(const QString &relativePath)
KGuiItem ok()
Files
bool mkpath(const QString &dirPath) const const
QChar separator()
bool copy(const QString &fileName, const QString &newName)
bool exists() const const
QString baseName() const const
bool exists() const const
ReadOnly
void append(QList< T > &&value)
qsizetype count() const const
void pop_back()
void push_back(parameter_type value)
QMimeType mimeTypeForFile(const QFileInfo &fileInfo, MatchMode mode) const const
bool inherits(const char *className) const const
ForwardedChannels
int exitCode() const const
void setArguments(const QStringList &arguments)
void setProcessChannelMode(ProcessChannelMode mode)
void setProgram(const QString &program)
void start(OpenMode mode)
bool waitForFinished(int msecs)
GenericDataLocation
QString findExecutable(const QString &executableName, const QStringList &paths)
QString locate(StandardLocation type, const QString &fileName, LocateOptions options)
QString & append(QChar ch)
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
qsizetype size() const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QString join(QChar separator) const const
QString path() const const
void setAutoRemove(bool b)
QString scheme() const const
QString toString(FormattingOptions options) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:08:06 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:08:06 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.