diff options
Diffstat (limited to 'src/libs/installer/packagemanagercore_p.h')
-rw-r--r-- | src/libs/installer/packagemanagercore_p.h | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/src/libs/installer/packagemanagercore_p.h b/src/libs/installer/packagemanagercore_p.h index 9d4a6abab..d5bdc78fd 100644 --- a/src/libs/installer/packagemanagercore_p.h +++ b/src/libs/installer/packagemanagercore_p.h @@ -43,18 +43,16 @@ #define PACKAGEMANAGERCORE_P_H #include "getrepositoriesmetainfojob.h" -#include "settings.h" #include "packagemanagercore.h" #include "packagemanagercoredata.h" +#include "qinstallerglobal.h" -#include <kdsysinfo.h> -#include <kdupdaterapplication.h> -#include <kdupdaterupdatefinder.h> +#include "kdsysinfo.h" +#include "kdupdaterapplication.h" +#include "kdupdaterfiledownloaderfactory.h" +#include "kdupdaterupdatefinder.h" -#include <QtCore/QHash> -#include <QtCore/QObject> -#include <QtCore/QPair> -#include <QtCore/QPointer> +#include <QObject> class FSEngineClientHandler; class KDJob; @@ -68,9 +66,31 @@ namespace QInstaller { struct BinaryLayout; class Component; +class ScriptEngine; class ComponentModel; class TempDirDeleter; +/* + The default configuration interface implementation does call QSettings to save files for later deletion, + though according to QSettings there should nothing be written if QSettings is not setup properly (which + we do not in our case). Still, caused by a broken QSettings implementation at least on Linux we write an + empty config file which resulted in QTIFW-196. To workaround the issue we now use this empty dummy class. +*/ +class DummyConfigurationInterface : public KDUpdater::ConfigurationInterface +{ +public: + QVariant value(const QString &key) const + { + Q_UNUSED(key) + return QVariant(); + } + void setValue(const QString &key, const QVariant &value) + { + if (value.isNull()) + qDebug() << "DummyConfigurationInterface called with key:" << key << "and value:" << value; + } +}; + class PackageManagerCorePrivate : public QObject { Q_OBJECT @@ -115,10 +135,11 @@ public: bool buildComponentTree(QHash<QString, Component*> &components, bool loadScript); + ScriptEngine *scriptEngine(); void clearAllComponentLists(); void clearUpdaterComponentLists(); - QList<Component*> &replacementDependencyComponents(RunMode mode); - QHash<QString, QPair<Component*, Component*> > &componentsToReplace(RunMode mode); + QList<Component*> &replacementDependencyComponents(); + QHash<QString, QPair<Component*, Component*> > &componentsToReplace(); void clearComponentsToInstall(); bool appendComponentsToInstall(const QList<Component*> &components); @@ -146,6 +167,7 @@ public: int countProgressOperations(const OperationList &operations); void connectOperationToInstaller(Operation *const operation, double progressOperationPartSize); void connectOperationCallMethodRequest(Operation *const operation); + OperationList sortOperationsBasedOnComponentDependencies(const OperationList &operationList); Operation *createOwnedOperation(const QString &type); Operation *takeOwnedOperation(Operation *operation); @@ -241,6 +263,7 @@ private: qint64 m_magicBinaryMarker; bool m_componentsToInstallCalculated; + ScriptEngine *m_scriptEngine; // < name (component to replace), < replacement component, component to replace > > QHash<QString, QPair<Component*, Component*> > m_componentsToReplaceAllMode; QHash<QString, QPair<Component*, Component*> > m_componentsToReplaceUpdaterMode; |