Pass Linux OS info during notification #4932
This commit is contained in:
parent
b4563a42c4
commit
f03b453c6f
|
@ -18,6 +18,7 @@
|
|||
#include "CoreInterface.h"
|
||||
|
||||
#include "CommandProcess.h"
|
||||
#include "QUtility.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QProcess>
|
||||
|
@ -73,9 +74,17 @@ QString CoreInterface::checkSubscription()
|
|||
return run(args);
|
||||
}
|
||||
|
||||
QString CoreInterface::notifyActivation(const QString& input)
|
||||
QString CoreInterface::notifyActivation(const QString& action)
|
||||
{
|
||||
QStringList args("--notify-activation");
|
||||
|
||||
QString input(action + ":" + hash(getFirstMacAddress()));
|
||||
QString os= getOSInformation();
|
||||
if (!os.isEmpty()) {
|
||||
input.append(":").append(os);
|
||||
}
|
||||
input.append("\n");
|
||||
|
||||
return run(args, input);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,6 @@ public:
|
|||
QString getSubscriptionFilename();
|
||||
QString activateSerial(const QString& serial);
|
||||
QString checkSubscription();
|
||||
QString notifyActivation(const QString& input);
|
||||
QString notifyActivation(const QString& action);
|
||||
QString run(const QStringList& args, const QString& input = "");
|
||||
};
|
||||
|
|
|
@ -217,16 +217,14 @@ void SetupWizard::accept()
|
|||
{
|
||||
appConfig.setSerialKey(m_pLineEditSerialKey->text());
|
||||
|
||||
QString info("serial:" + hash(getFirstMacAddress()) + "\n");
|
||||
CoreInterface coreInterface;
|
||||
coreInterface.notifyActivation(info);
|
||||
coreInterface.notifyActivation("serial");
|
||||
}
|
||||
|
||||
if (m_pRadioButtonSkip->isChecked())
|
||||
{
|
||||
QString info("skip:" + hash(getFirstMacAddress()) + "\n");
|
||||
CoreInterface coreInterface;
|
||||
coreInterface.notifyActivation(info);
|
||||
coreInterface.notifyActivation("skip");
|
||||
}
|
||||
|
||||
m_MainWindow.setEdition(m_Edition);
|
||||
|
|
Loading…
Reference in New Issue