Compare commits

..

No commits in common. "main" and "v1.0.0" have entirely different histories.
main ... v1.0.0

24 changed files with 147 additions and 135 deletions

View File

@ -1,11 +1,25 @@
/* /*
* Copyright (C) 2025-2026 ООО «КАРУМА» * Copyright (C) 2015-2016 Département de l'Instruction Publique (DIP-SEM)
* *
* This file is part of SaiCore. * Copyright (C) 2013 Open Education Foundation
* *
* SaiCore is proprietary software: you can NOT redistribute it and/or modify * Copyright (C) 2010-2013 Groupement d'Intérêt Public pour
* it without the express written permission of ООО «КАРУМА». * l'Education Numérique en Afrique (GIP ENA)
* *
* SaiCore is distributed under a proprietary EULA license. * This file is part of OpenBoard.
* See the LICENSE file for details, or contact support@saicore.ru *
* OpenBoard is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* OpenBoard is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenBoard. If not, see <http://www.gnu.org/licenses/>.
*/ */

View File

@ -1,13 +1,27 @@
/* /*
* Copyright (C) 2025-2026 ООО «КАРУМА» * Copyright (C) 2015-2022 Département de l'Instruction Publique (DIP-SEM)
*
* Copyright (C) 2013 Open Education Foundation
*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour
* l'Education Numérique en Afrique (GIP ENA)
* *
* This file is part of SaiCore. * This file is part of SaiCore.
* *
* SaiCore is proprietary software: you can NOT redistribute it and/or modify * SaiCore is free software: you can redistribute it and/or modify
* it without the express written permission of ООО «КАРУМА». * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
* *
* SaiCore is distributed under a proprietary EULA license. * SaiCore is distributed in the hope that it will be useful,
* See the LICENSE file for details, or contact support@saicore.ru * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with SaiCore. If not, see <http://www.gnu.org/licenses/>.
*/ */

View File

@ -1,13 +1,27 @@
/* /*
* Copyright (C) 2025-2026 ООО «КАРУМА» * Copyright (C) 2015-2022 Département de l'Instruction Publique (DIP-SEM)
*
* Copyright (C) 2013 Open Education Foundation
*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour
* l'Education Numérique en Afrique (GIP ENA)
* *
* This file is part of SaiCore. * This file is part of SaiCore.
* *
* SaiCore is proprietary software: you can NOT redistribute it and/or modify * SaiCore is free software: you can redistribute it and/or modify
* it without the express written permission of ООО «КАРУМА». * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
* *
* SaiCore is distributed under a proprietary EULA license. * SaiCore is distributed in the hope that it will be useful,
* See the LICENSE file for details, or contact support@saicore.ru * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with SaiCore. If not, see <http://www.gnu.org/licenses/>.
*/ */

View File

@ -1,13 +1,22 @@
/* /*
* Copyright (C) 2025-2026 ООО «КАРУМА» * Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
* *
* This file is part of SaiCore. * This file is part of Open-Sankoré.
* *
* SaiCore is proprietary software: you can NOT redistribute it and/or modify * Open-Sankoré is free software: you can redistribute it and/or modify
* it without the express written permission of ООО «КАРУМА». * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
* *
* SaiCore is distributed under a proprietary EULA license. * Open-Sankoré is distributed in the hope that it will be useful,
* See the LICENSE file for details, or contact support@saicore.ru * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/ */

View File

@ -1,13 +1,22 @@
/* /*
* Copyright (C) 2025-2026 ООО «КАРУМА» * Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
* *
* This file is part of SaiCore. * This file is part of Open-Sankoré.
* *
* SaiCore is proprietary software: you can NOT redistribute it and/or modify * Open-Sankoré is free software: you can redistribute it and/or modify
* it without the express written permission of ООО «КАРУМА». * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
* *
* SaiCore is distributed under a proprietary EULA license. * Open-Sankoré is distributed in the hope that it will be useful,
* See the LICENSE file for details, or contact support@saicore.ru * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/ */

View File

@ -1,13 +1,27 @@
/* /*
* Copyright (C) 2025-2026 ООО «КАРУМА» * Copyright (C) 2015-2022 Département de l'Instruction Publique (DIP-SEM)
*
* Copyright (C) 2013 Open Education Foundation
*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour
* l'Education Numérique en Afrique (GIP ENA)
* *
* This file is part of SaiCore. * This file is part of SaiCore.
* *
* SaiCore is proprietary software: you can NOT redistribute it and/or modify * SaiCore is free software: you can redistribute it and/or modify
* it without the express written permission of ООО «КАРУМА». * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
* *
* SaiCore is distributed under a proprietary EULA license. * SaiCore is distributed in the hope that it will be useful,
* See the LICENSE file for details, or contact support@saicore.ru * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with SaiCore. If not, see <http://www.gnu.org/licenses/>.
*/ */

View File

@ -1 +0,0 @@
{"tag_name":"v1.0.0","target_commitish":"main","name":"SaiCore v1.0.0","body":"SaiCore v1.0.0 — отечественное ПО для интерактивных панелей и досок.\n\nВозможности:\n- Рисование, презентации, запись уроков\n- Работа с документами PDF\n- Кроссплатформенность: Astra Linux, Debian, Ubuntu\n- Проприетарная лицензия EULA\n- Пробный период 30 дней\n- Система лицензирования с grace period 7 дней\n\nПравообладатель: ООО «КАРУМА»","draft":false,"prerelease":false}

View File

@ -3227,9 +3227,9 @@ hr { height: 1px; border-width: 0; }
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Cantarell'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Cantarell'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt;&quot;&gt;SaiCore — программное обеспечение для интерактивных панелей. © 2026 SaiCore. Все права защищены.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt;&quot;&gt;SaiCore — программное обеспечение для интерактивных панелей. © 2026 SaiCore. Все права защищены.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Cantarell'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Cantarell'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt;&quot;&gt;SaiCore разработано ООО «КАРУМА». Все права защищены.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt;&quot;&gt;SaiCore основано на OpenBoard. OpenBoard является производным от Open-Sankoré. Open-Sankoré © 2010-2015 GIP ENA. Все права защищены.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Cantarell'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Cantarell'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt;&quot;&gt;SaiCore — проприетарное программное обеспечение ООО «КАРУМА». Использование без лицензионного ключа допускается только в течение пробного периода (30 дней). Подробнее: &lt;/span&gt;&lt;a href=&quot;https://saicore.ru&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;saicore.ru&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt;&quot;&gt;SaiCore — свободное программное обеспечение: вы можете распространять и изменять его на условиях GNU General Public License версии 3, опубликованной Free Software Foundation. Исходный код доступен на &lt;/span&gt;&lt;a href=&quot;https://saicore.ru&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;saicore.ru&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Cantarell'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Cantarell'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt;&quot;&gt;Контактная информация:&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt;&quot;&gt;Контактная информация:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;https://saicore.ru&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;saicore.ru&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;https://saicore.ru&quot;&gt;&lt;span style=&quot; font-family:'Cantarell'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;saicore.ru&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>

View File

@ -76,7 +76,7 @@ const QString UBSvgSubsetAdaptor::sFontSizePrefix = "font-size:";
const QString UBSvgSubsetAdaptor::sPixelUnit = "px"; const QString UBSvgSubsetAdaptor::sPixelUnit = "px";
const QString UBSvgSubsetAdaptor::sFontWeightPrefix = "font-weight:"; const QString UBSvgSubsetAdaptor::sFontWeightPrefix = "font-weight:";
const QString UBSvgSubsetAdaptor::sFontStylePrefix = "font-style:"; const QString UBSvgSubsetAdaptor::sFontStylePrefix = "font-style:";
const QString UBSvgSubsetAdaptor::sFormerUniboardDocumentNamespaceUri = "https://saicore.ru/document"; const QString UBSvgSubsetAdaptor::sFormerUniboardDocumentNamespaceUri = "http://www.mnemis.com/uniboard";
const QString tElement = "element"; const QString tElement = "element";
const QString tGroup = "group"; const QString tGroup = "group";
@ -307,7 +307,7 @@ QUuid UBSvgSubsetAdaptor::sceneUuid(std::shared_ptr<UBDocumentProxy> proxy, cons
{ {
auto svgSceneUuid = xml.attributes().value(UBSettings::uniboardDocumentNamespaceUri, "uuid"); auto svgSceneUuid = xml.attributes().value(UBSettings::uniboardDocumentNamespaceUri, "uuid");
if (svgSceneUuid.isNull()) if (svgSceneUuid.isNull())
svgSceneUuid = xml.attributes().value("https://saicore.ru/document", "uuid"); svgSceneUuid = xml.attributes().value("http://www.mnemis.com/uniboard", "uuid");
if (!svgSceneUuid.isNull()) if (!svgSceneUuid.isNull())
uuid = QUuid(svgSceneUuid.toString()); uuid = QUuid(svgSceneUuid.toString());

View File

@ -67,10 +67,10 @@ UBMainWindow* UBApplication::mainWindow = 0;
bool UBApplication::isClosing = false; bool UBApplication::isClosing = false;
const QString UBApplication::mimeTypeUniboardDocument = QString("application/vnd.saicore-document"); const QString UBApplication::mimeTypeUniboardDocument = QString("application/vnd.mnemis-uniboard-document");
const QString UBApplication::mimeTypeUniboardPage = QString("application/vnd.saicore-page"); const QString UBApplication::mimeTypeUniboardPage = QString("application/vnd.mnemis-uniboard-page");
const QString UBApplication::mimeTypeUniboardPageItem = QString("application/vnd.saicore-page-item"); const QString UBApplication::mimeTypeUniboardPageItem = QString("application/vnd.mnemis-uniboard-page-item");
const QString UBApplication::mimeTypeUniboardPageThumbnail = QString("application/vnd.saicore-thumbnail"); const QString UBApplication::mimeTypeUniboardPageThumbnail = QString("application/vnd.mnemis-uniboard-thumbnail");
QString UBApplication::fileToOpen = ""; QString UBApplication::fileToOpen = "";
@ -179,7 +179,7 @@ UBApplication::~UBApplication()
staticMemoryCleaner = 0; staticMemoryCleaner = 0;
} }
QString UBApplication::checkLanguageAvailabilityForSaiCore(QString &language) QString UBApplication::checkLanguageAvailabilityForSankore(QString &language)
{ {
QStringList availableTranslations = UBPlatformUtils::availableTranslations(); QStringList availableTranslations = UBPlatformUtils::availableTranslations();
@ -213,11 +213,11 @@ void UBApplication::setupTranslators(QStringList args)
QString language(""); QString language("");
if(!forcedLanguage.isEmpty()) if(!forcedLanguage.isEmpty())
language = checkLanguageAvailabilityForSaiCore(forcedLanguage); language = checkLanguageAvailabilityForSankore(forcedLanguage);
if(language.isEmpty()){ if(language.isEmpty()){
QString systemLanguage = UBPlatformUtils::systemLanguage(); QString systemLanguage = UBPlatformUtils::systemLanguage();
language = checkLanguageAvailabilityForSaiCore(systemLanguage); language = checkLanguageAvailabilityForSankore(systemLanguage);
} }
if(language.isEmpty()){ if(language.isEmpty()){

View File

@ -128,7 +128,7 @@ class UBApplication : public SingleApplication
void setupTranslators(QStringList args); void setupTranslators(QStringList args);
QList<QMenu*> mProtoMenus; QList<QMenu*> mProtoMenus;
bool mIsVerbose; bool mIsVerbose;
QString checkLanguageAvailabilityForSaiCore(QString& language); QString checkLanguageAvailabilityForSankore(QString& language);
protected: protected:
/* /*
#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA) #if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA)

View File

@ -25,7 +25,6 @@
UBLicenseManager* UBLicenseManager::sInstance = nullptr; UBLicenseManager* UBLicenseManager::sInstance = nullptr;
const QString LICENSE_SERVER_URL = "https://license.saicore.ru/api/activate"; const QString LICENSE_SERVER_URL = "https://license.saicore.ru/api/activate";
const QString UPDATE_CHECK_URL = "https://license.saicore.ru/api/check_update";
const int TRIAL_DURATION_DAYS = 30; const int TRIAL_DURATION_DAYS = 30;
const int GRACE_PERIOD_DAYS = 7; const int GRACE_PERIOD_DAYS = 7;
@ -312,8 +311,6 @@ bool UBLicenseManager::activateLicense(const QString& key)
json["product"] = "SaiCore"; json["product"] = "SaiCore";
json["version"] = "1.0.0"; json["version"] = "1.0.0";
mPendingActivationKey = key.trimmed().toUpper();
QNetworkReply* reply = mNetworkManager->post(request, QJsonDocument(json).toJson(QJsonDocument::Compact)); QNetworkReply* reply = mNetworkManager->post(request, QJsonDocument(json).toJson(QJsonDocument::Compact));
connect(reply, &QNetworkReply::finished, this, [this, reply]() { onActivationReply(reply); }); connect(reply, &QNetworkReply::finished, this, [this, reply]() { onActivationReply(reply); });
@ -326,11 +323,10 @@ void UBLicenseManager::onActivationReply(QNetworkReply* reply)
if (reply->error() != QNetworkReply::NoError) if (reply->error() != QNetworkReply::NoError)
{ {
if (validateLicenseOffline(mPendingActivationKey)) if (validateLicenseOffline(mLicenseKey))
{ {
mLicenseKey = mPendingActivationKey; mLicenseKey = reply->property("key").toString();
mLicenseExpiry = QDateTime::currentDateTime().addYears(1); mLicenseExpiry = QDateTime::currentDateTime().addYears(1);
mGracePeriodStart = QDateTime();
mState = LicenseActive; mState = LicenseActive;
saveState(); saveState();
emit licenseStateChanged(mState); emit licenseStateChanged(mState);
@ -358,7 +354,6 @@ void UBLicenseManager::onActivationReply(QNetworkReply* reply)
mLicenseKey = obj.value("license_key").toString(); mLicenseKey = obj.value("license_key").toString();
mLicenseExpiry = expiry; mLicenseExpiry = expiry;
mGracePeriodStart = QDateTime();
mState = LicenseActive; mState = LicenseActive;
saveState(); saveState();
emit licenseStateChanged(mState); emit licenseStateChanged(mState);
@ -394,48 +389,3 @@ void UBLicenseManager::deactivateLicense()
saveState(); saveState();
emit licenseStateChanged(mState); emit licenseStateChanged(mState);
} }
void UBLicenseManager::checkForUpdates()
{
QNetworkRequest request;
request.setUrl(QUrl(UPDATE_CHECK_URL));
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
request.setRawHeader("User-Agent", "SaiCore/1.0.0");
QJsonObject json;
json["version"] = "1.0.0";
json["platform"] = QSysInfo::productType();
QNetworkReply* reply = mNetworkManager->post(request, QJsonDocument(json).toJson(QJsonDocument::Compact));
connect(reply, &QNetworkReply::finished, this, [this, reply]() { onUpdateCheckReply(reply); });
}
void UBLicenseManager::onUpdateCheckReply(QNetworkReply* reply)
{
reply->deleteLater();
if (reply->error() != QNetworkReply::NoError)
{
qWarning() << "Update check failed:" << reply->errorString();
return;
}
QByteArray data = reply->readAll();
QJsonDocument doc = QJsonDocument::fromJson(data);
QJsonObject obj = doc.object();
bool hasUpdate = obj.value("update_available").toBool(false);
if (hasUpdate)
{
QString version = obj.value("latest_version").toString();
QString downloadUrl = obj.value("download_url").toString();
QString changelog = obj.value("changelog").toString();
qInfo() << "Update available:" << version;
emit updateAvailable(version, downloadUrl, changelog);
}
else
{
qDebug() << "SaiCore is up to date";
}
}

View File

@ -59,7 +59,6 @@ public:
bool activateLicense(const QString& key); bool activateLicense(const QString& key);
bool validateLicenseFormat(const QString& key) const; bool validateLicenseFormat(const QString& key) const;
bool validateLicenseOffline(const QString& key) const; bool validateLicenseOffline(const QString& key) const;
void checkForUpdates();
void startTrial(); void startTrial();
void deactivateLicense(); void deactivateLicense();
@ -69,11 +68,9 @@ public:
signals: signals:
void licenseStateChanged(LicenseState newState); void licenseStateChanged(LicenseState newState);
void activationResult(bool success, const QString& message); void activationResult(bool success, const QString& message);
void updateAvailable(const QString& version, const QString& downloadUrl, const QString& changelog);
private slots: private slots:
void onActivationReply(QNetworkReply* reply); void onActivationReply(QNetworkReply* reply);
void onUpdateCheckReply(QNetworkReply* reply);
private: private:
UBLicenseManager(QObject* parent = nullptr); UBLicenseManager(QObject* parent = nullptr);
@ -87,7 +84,6 @@ private:
QDateTime mTrialStart; QDateTime mTrialStart;
QDateTime mLicenseExpiry; QDateTime mLicenseExpiry;
QDateTime mGracePeriodStart; QDateTime mGracePeriodStart;
QString mPendingActivationKey;
QNetworkAccessManager* mNetworkManager; QNetworkAccessManager* mNetworkManager;
static const int GRACE_PERIOD_DAYS = 7; static const int GRACE_PERIOD_DAYS = 7;

View File

@ -51,8 +51,8 @@ QString UBSettings::documentDate = QString("date");
QString UBSettings::trashedDocumentGroupNamePrefix = QString("_Trash:"); QString UBSettings::trashedDocumentGroupNamePrefix = QString("_Trash:");
QString UBSettings::uniboardDocumentNamespaceUri = "https://saicore.ru/document"; QString UBSettings::uniboardDocumentNamespaceUri = "http://uniboard.mnemis.com/document";
QString UBSettings::uniboardApplicationNamespaceUri = "https://saicore.ru/application"; QString UBSettings::uniboardApplicationNamespaceUri = "http://uniboard.mnemis.com/application";
QString UBSettings::undoCommandTransactionName = "UndoTransaction"; QString UBSettings::undoCommandTransactionName = "UndoTransaction";

View File

@ -222,13 +222,6 @@ int main(int argc, char *argv[])
<< "days remaining. License required."; << "days remaining. License required.";
} }
QObject::connect(licenseManager, &UBLicenseManager::updateAvailable,
[](const QString& version, const QString& url, const QString& changelog) {
qDebug() << "Update available:" << version << url;
});
licenseManager->checkForUpdates();
qDebug() << "file name argument" << fileToOpen; qDebug() << "file name argument" << fileToOpen;
result = app.exec(fileToOpen); result = app.exec(fileToOpen);
} }

View File

@ -869,7 +869,7 @@ void UBGraphicsWidgetItem::registerAPI()
if (!mUniboardAPI) if (!mUniboardAPI)
{ {
mUniboardAPI = new UBWidgetUniboardAPI(scene(), this); mUniboardAPI = new UBWidgetUniboardAPI(scene(), this);
mWebEngineView->page()->webChannel()->registerObject("saicore", mUniboardAPI); mWebEngineView->page()->webChannel()->registerObject("sankore", mUniboardAPI);
} }
else else
{ {
@ -1354,8 +1354,8 @@ QString UBGraphicsW3CWidgetItem::createHtmlWrapperInDir(const QString& html, con
#endif #endif
outConfig << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << '\n'; outConfig << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << '\n';
outConfig << "<widget xmlns=\"http://www.w3.org/ns/widgets\"" << '\n'; outConfig << "<widget xmlns=\"http://www.w3.org/ns/widgets\"" << '\n';
outConfig << " xmlns:ub=\"https://saicore.ru/widgets\"" << '\n'; outConfig << " xmlns:ub=\"http://uniboard.mnemis.com/widgets\"" << '\n';
outConfig << " id=\"https://saicore.ru/" << pName << "\"" <<'\n'; outConfig << " id=\"http://uniboard.mnemis.com/" << pName << "\"" <<'\n';
outConfig << " version=\"2.0\"" << '\n'; outConfig << " version=\"2.0\"" << '\n';
outConfig << " width=\"" << sizeHint.width() << "\"" << '\n'; outConfig << " width=\"" << sizeHint.width() << "\"" << '\n';

View File

@ -115,9 +115,9 @@ QStringList UBPlatformUtils::availableTranslations()
{ {
QString translationsPath = applicationResourcesDirectory() + "/" + "i18n" + "/"; QString translationsPath = applicationResourcesDirectory() + "/" + "i18n" + "/";
QStringList translationsList = UBFileSystemUtils::allFiles(translationsPath); QStringList translationsList = UBFileSystemUtils::allFiles(translationsPath);
static const QRegularExpression saicoreTranslationFiles("(.*)SaiCore_(.*).qm"); static const QRegularExpression sankoreTranslationFiles("(.*)SaiCore_(.*).qm");
translationsList = translationsList.filter(saicoreTranslationFiles); translationsList = translationsList.filter(sankoreTranslationFiles);
return translationsList.replaceInStrings(saicoreTranslationFiles, "\\2"); return translationsList.replaceInStrings(sankoreTranslationFiles, "\\2");
} }
QString UBPlatformUtils::translationPath(QString pFilePrefix,QString pLanguage) QString UBPlatformUtils::translationPath(QString pFilePrefix,QString pLanguage)

View File

@ -84,9 +84,9 @@ QStringList UBPlatformUtils::availableTranslations()
{ {
QString translationsPath = applicationResourcesDirectory() + "/" + "i18n" + "/"; QString translationsPath = applicationResourcesDirectory() + "/" + "i18n" + "/";
QStringList translationsList = UBFileSystemUtils::allFiles(translationsPath); QStringList translationsList = UBFileSystemUtils::allFiles(translationsPath);
static const QRegularExpression saicoreTranslationFiles("(.*)SaiCore_(.*).qm"); static const QRegularExpression sankoreTranslationFiles("(.*)SaiCore_(.*).qm");
translationsList = translationsList.filter(saicoreTranslationFiles); translationsList = translationsList.filter(sankoreTranslationFiles);
return translationsList.replaceInStrings(saicoreTranslationFiles, "\\2"); return translationsList.replaceInStrings(sankoreTranslationFiles, "\\2");
} }
QString UBPlatformUtils::translationPath(QString pFilePrefix,QString pLanguage) QString UBPlatformUtils::translationPath(QString pFilePrefix,QString pLanguage)

View File

@ -32,7 +32,7 @@ const char *UBFeaturesWidget::objNameFeatureList = "FeatureList";
const QMargins FeatureListMargins(0, 0, 0, 30); const QMargins FeatureListMargins(0, 0, 0, 30);
const int FeatureListBorderOffset = 10; const int FeatureListBorderOffset = 10;
const char featureTypeSplitter = ':'; const char featureTypeSplitter = ':';
static const QString mimeSaiCoreFeatureTypes = "SaiCore/featureTypes"; static const QString mimeSankoreFeatureTypes = "Sankore/featureTypes";
UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name) UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name)
: UBDockPaletteWidget(parent) : UBDockPaletteWidget(parent)
@ -777,7 +777,7 @@ void UBFeaturesProgressInfo::sendFeature(UBFeature pFeature)
UBFeaturesWebView::UBFeaturesWebView(QWidget* parent, const char* name):QWidget(parent) UBFeaturesWebView::UBFeaturesWebView(QWidget* parent, const char* name):QWidget(parent)
, mpView(NULL) , mpView(NULL)
, mpLayout(NULL) , mpLayout(NULL)
, mpSaiCoreAPI(NULL) , mpSankoreAPI(NULL)
{ {
setObjectName(name); setObjectName(name);
@ -788,10 +788,10 @@ UBFeaturesWebView::UBFeaturesWebView(QWidget* parent, const char* name):QWidget(
mpView = new QWebEngineView(this); mpView = new QWebEngineView(this);
mpView->setObjectName("SearchEngineView"); mpView->setObjectName("SearchEngineView");
mpSaiCoreAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene()); mpSankoreAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene());
QWebChannel* channel = new QWebChannel(this); QWebChannel* channel = new QWebChannel(this);
mpView->page()->setWebChannel(channel); mpView->page()->setWebChannel(channel);
mpView->page()->webChannel()->registerObject("saicore", mpSaiCoreAPI); mpView->page()->webChannel()->registerObject("sankore", mpSankoreAPI);
UBWebController::injectScripts(mpView); UBWebController::injectScripts(mpView);
mpLayout->addWidget(mpView); mpLayout->addWidget(mpView);
@ -800,10 +800,10 @@ UBFeaturesWebView::UBFeaturesWebView(QWidget* parent, const char* name):QWidget(
UBFeaturesWebView::~UBFeaturesWebView() UBFeaturesWebView::~UBFeaturesWebView()
{ {
if( NULL != mpSaiCoreAPI ) if( NULL != mpSankoreAPI )
{ {
delete mpSaiCoreAPI; delete mpSankoreAPI;
mpSaiCoreAPI = NULL; mpSankoreAPI = NULL;
} }
if( NULL != mpView ) if( NULL != mpView )
{ {
@ -1156,7 +1156,7 @@ QMimeData* UBFeaturesModel::mimeData(const QModelIndexList &indexes) const
mimeData->setUrls(urlList); mimeData->setUrls(urlList);
mimeData->setFeatures(featuresList); mimeData->setFeatures(featuresList);
mimeData->setData(mimeSaiCoreFeatureTypes, typeData); mimeData->setData(mimeSankoreFeatureTypes, typeData);
return mimeData; return mimeData;
} }

View File

@ -300,7 +300,7 @@ public:
private: private:
QWebEngineView* mpView; QWebEngineView* mpView;
QVBoxLayout* mpLayout; QVBoxLayout* mpLayout;
UBWidgetUniboardAPI* mpSaiCoreAPI; UBWidgetUniboardAPI* mpSankoreAPI;
}; };
class UBFeatureProperties : public QWidget class UBFeatureProperties : public QWidget

View File

@ -40,10 +40,10 @@ UBStartupHintsPalette::UBStartupHintsPalette(QWidget *parent) :
setLayout(mLayout); setLayout(mLayout);
QString url = UBSettings::settings()->applicationStartupHintsDirectory() + "/index.html"; QString url = UBSettings::settings()->applicationStartupHintsDirectory() + "/index.html";
mpWebView = new UBWebEngineView(this); mpWebView = new UBWebEngineView(this);
mpSaiCoreAPI = new UBWidgetUniboardAPI(0); mpSankoreAPI = new UBWidgetUniboardAPI(0);
QWebChannel* channel = new QWebChannel(this); QWebChannel* channel = new QWebChannel(this);
mpWebView->page()->setWebChannel(channel); mpWebView->page()->setWebChannel(channel);
mpWebView->page()->webChannel()->registerObject("saicore", mpSaiCoreAPI); mpWebView->page()->webChannel()->registerObject("sankore", mpSankoreAPI);
UBWebController::injectScripts(mpWebView); UBWebController::injectScripts(mpWebView);
if (QFile::exists(url)) if (QFile::exists(url))
mpWebView->setUrl(QUrl::fromLocalFile(url)); mpWebView->setUrl(QUrl::fromLocalFile(url));

View File

@ -48,7 +48,7 @@ private:
QCheckBox* mShowNextTime; QCheckBox* mShowNextTime;
QVBoxLayout* mLayout; QVBoxLayout* mLayout;
QHBoxLayout* mButtonLayout; QHBoxLayout* mButtonLayout;
UBWidgetUniboardAPI *mpSaiCoreAPI; UBWidgetUniboardAPI *mpSankoreAPI;
UBWebEngineView* mpWebView; UBWebEngineView* mpWebView;
private slots: private slots:

View File

@ -222,7 +222,7 @@ void UBToolWidget::registerAPI()
mWebView->page()->setWebChannel(channel); mWebView->page()->setWebChannel(channel);
mUniboardAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene(), mToolWidget); mUniboardAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene(), mToolWidget);
channel->registerObject("saicore", mUniboardAPI); channel->registerObject("sankore", mUniboardAPI);
UBGraphicsW3CWidgetItem *graphicsW3cWidgetItem = dynamic_cast<UBGraphicsW3CWidgetItem*>(mToolWidget); UBGraphicsW3CWidgetItem *graphicsW3cWidgetItem = dynamic_cast<UBGraphicsW3CWidgetItem*>(mToolWidget);
if (graphicsW3cWidgetItem) if (graphicsW3cWidgetItem)

View File

@ -308,8 +308,8 @@ void UBEmbedController::generateConfig(int pWidth, int pHeight, const QString& p
#endif #endif
out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << '\n'; out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << '\n';
out << "<widget xmlns=\"http://www.w3.org/ns/widgets\"" << '\n'; out << "<widget xmlns=\"http://www.w3.org/ns/widgets\"" << '\n';
out << " xmlns:ub=\"https://saicore.ru/widgets\"" << '\n'; out << " xmlns:ub=\"http://uniboard.mnemis.com/widgets\"" << '\n';
out << " id=\"https://saicore.ru/" << mTrapFlashUi->widgetNameLineEdit->text() << "\"" <<'\n'; out << " id=\"http://uniboard.mnemis.com/" << mTrapFlashUi->widgetNameLineEdit->text() << "\"" <<'\n';
out << " version=\"2.0\"" << '\n'; out << " version=\"2.0\"" << '\n';
out << " width=\"" << pWidth << "\"" << '\n'; out << " width=\"" << pWidth << "\"" << '\n';