summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/productkeycheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/productkeycheck.cpp')
-rw-r--r--src/libs/installer/productkeycheck.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/libs/installer/productkeycheck.cpp b/src/libs/installer/productkeycheck.cpp
index 120014dad..e2aac1813 100644
--- a/src/libs/installer/productkeycheck.cpp
+++ b/src/libs/installer/productkeycheck.cpp
@@ -28,12 +28,16 @@
**************************************************************************/
#include <productkeycheck.h>
-
+#include <packagemanagercore.h>
class ProductKeyCheckPrivate
{
+ public:
+ static QPointer<QInstaller::PackageManagerCore> core;
};
+QPointer<QInstaller::PackageManagerCore> ProductKeyCheckPrivate::core = 0;
+
ProductKeyCheck::ProductKeyCheck()
: d(new ProductKeyCheckPrivate())
@@ -45,12 +49,20 @@ ProductKeyCheck::~ProductKeyCheck()
delete d;
}
-ProductKeyCheck *ProductKeyCheck::instance()
+ProductKeyCheck *ProductKeyCheck::instance(QInstaller::PackageManagerCore *core)
{
static ProductKeyCheck instance;
+ if (core)
+ instance.setPackageManagerCore(core);
return &instance;
}
+void ProductKeyCheck::setPackageManagerCore(QInstaller::PackageManagerCore *core)
+{
+ ProductKeyCheckPrivate::core = core;
+}
+
+
bool ProductKeyCheck::hasValidKey()
{
return true;