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.cpp31
1 files changed, 24 insertions, 7 deletions
diff --git a/src/libs/installer/productkeycheck.cpp b/src/libs/installer/productkeycheck.cpp
index f975db821..a4af2b6d3 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,14 +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)
{
- static ProductKeyCheck *instance = 0;
- if (instance == 0)
- instance = new ProductKeyCheck();
- return instance;
+ ProductKeyCheckPrivate::core = core;
}
+
bool ProductKeyCheck::hasValidKey()
{
return true;
@@ -74,7 +84,14 @@ QString ProductKeyCheck::maintainanceToolDetailErrorNotice()
}
// to filter none valid licenses
-bool ProductKeyCheck::isValidLicense(const QString &/*fileName*/)
+bool ProductKeyCheck::isValidLicenseTextFile(const QString &/*fileName*/)
{
return true;
}
+
+
+bool ProductKeyCheck::isValidRepository(const QInstaller::Repository &repository) const
+{
+ Q_UNUSED(repository)
+ return true;
+} \ No newline at end of file