#include "translationcomponents.h" #include "ui_translationcomponents.h" #include "models/patchinstaller.h" #include "models/patchdownloader.h" #include "models/settings.h" TranslationComponents::TranslationComponents(QWidget *parent) : QWidget(parent), ui(new Ui::TranslationComponents) { ui->setupUi(this); setAttribute(Qt::WA_StyledBackground, true); ui->texts_block_label->setTooltipParentWidget(parentWidget()); ui->texts_block_label->raise(); ui->texts_block_label->setTooltipText("Перевод всех текстовых элементов в игре: названий, квестов, меню и т.д."); connect(ui->texts_block_switch, &SwitchButton::valueChanged, this, &TranslationComponents::onTextsChange); ui->graphics_block_label->setTooltipParentWidget(parentWidget()); ui->graphics_block_label->raise(); ui->graphics_block_label->setTooltipText("Переведенные карты локаций и элементы графического интерфейса."); connect(ui->graphics_block_switch, &SwitchButton::valueChanged, this, &TranslationComponents::onImagesChange); ui->video_block_label->setTooltipParentWidget(parentWidget()); ui->video_block_label->raise(); ui->video_block_label->setTooltipText("Переведенные и озвученные видеоролики и кат-сцены."); connect(ui->video_block_switch, &SwitchButton::valueChanged, this, &TranslationComponents::onVideosChange); ui->audio_block_label->setTooltipParentWidget(parentWidget()); ui->audio_block_label->raise(); ui->audio_block_label->setTooltipText("Переведенные и озвученные реплики персонажей."); connect(ui->audio_block_switch, &SwitchButton::valueChanged, this, &TranslationComponents::onSoundsChange); ui->loadscreens_block_label->setTooltipParentWidget(parentWidget()); ui->loadscreens_block_label->raise(); ui->loadscreens_block_label->setTooltipText("Загрузочные экраны от команды Наследия"); connect(ui->loadscreens_block_switch, &SwitchButton::valueChanged, this, &TranslationComponents::onLoadscreensChange); connect(&PatchInstaller::instance(), &PatchInstaller::successfullyInitialized, this, &TranslationComponents::resetSwitchesToDefault); connect(&PatchInstaller::instance(), &PatchInstaller::started, this, &TranslationComponents::disableControls); connect(&PatchInstaller::instance(), &PatchInstaller::finished, this, &TranslationComponents::enableControls); connect(&PatchDownloader::instance(), &PatchDownloader::started, this, &TranslationComponents::disableControls); connect(&PatchDownloader::instance(), &PatchDownloader::finished, this, &TranslationComponents::enableControls); } TranslationComponents::~TranslationComponents() { delete ui; } void TranslationComponents::resetSwitchesToDefault() { PatchInstaller::AppliedPatchesInfo info = PatchInstaller::instance().getPatchesInfo(); Settings::setValue("DatabaseDownload/text", info.texts_patch_hashsum != ""); Settings::setValue("DatabaseDownload/font", info.texts_patch_hashsum != ""); Settings::setValue("DatabaseDownload/image", info.images_patch_hashsum != ""); Settings::setValue("DatabaseDownload/loadscreen", info.loadscreens_patch_hashsum != ""); Settings::setValue("DatabaseDownload/texture", info.textures_patch_hashsum != ""); Settings::setValue("DatabaseDownload/sound", info.sounds_patch_hashsum != ""); Settings::setValue("DatabaseDownload/video", info.videos_patch_hashsum != ""); ui->texts_block_switch->setValue(info.texts_patch_hashsum != 0 && info.fonts_patch_hashsum != 0); ui->graphics_block_switch->setValue(info.images_patch_hashsum != 0 && info.textures_patch_hashsum != 0); ui->video_block_switch->setValue(info.videos_patch_hashsum != 0); ui->audio_block_switch->setValue(info.sounds_patch_hashsum != 0); ui->loadscreens_block_switch->setValue(info.loadscreens_patch_hashsum != 0); } void TranslationComponents::disableControls() { ui->texts_block_switch->setEnabled(false); ui->graphics_block_switch->setEnabled(false); ui->video_block_switch->setEnabled(false); ui->audio_block_switch->setEnabled(false); ui->loadscreens_block_switch->setEnabled(false); } void TranslationComponents::enableControls() { ui->texts_block_switch->setEnabled(true); ui->graphics_block_switch->setEnabled(true); ui->video_block_switch->setEnabled(true); ui->audio_block_switch->setEnabled(true); ui->loadscreens_block_switch->setEnabled(true); } void TranslationComponents::onTextsChange(bool new_value) { Settings::setValue("DatabaseDownload/text", new_value); Settings::setValue("DatabaseDownload/font", new_value); checkIfSettingsDoNotMatchCurrentDatState(); QMetaObject::invokeMethod(&PatchDownloader::instance(), &PatchDownloader::checkForUpdates, Qt::QueuedConnection); } void TranslationComponents::onImagesChange(bool new_value) { Settings::setValue("DatabaseDownload/image", new_value); Settings::setValue("DatabaseDownload/texture", new_value); checkIfSettingsDoNotMatchCurrentDatState(); QMetaObject::invokeMethod(&PatchDownloader::instance(), &PatchDownloader::checkForUpdates, Qt::QueuedConnection); } void TranslationComponents::onVideosChange(bool new_value) { Settings::setValue("DatabaseDownload/video", new_value); checkIfSettingsDoNotMatchCurrentDatState(); QMetaObject::invokeMethod(&PatchDownloader::instance(), &PatchDownloader::checkForUpdates, Qt::QueuedConnection); } void TranslationComponents::onSoundsChange(bool new_value) { Settings::setValue("DatabaseDownload/sound", new_value); checkIfSettingsDoNotMatchCurrentDatState(); QMetaObject::invokeMethod(&PatchDownloader::instance(), &PatchDownloader::checkForUpdates, Qt::QueuedConnection); } void TranslationComponents::onLoadscreensChange(bool new_value) { Settings::setValue("DatabaseDownload/loadscreen", new_value); checkIfSettingsDoNotMatchCurrentDatState(); QMetaObject::invokeMethod(&PatchDownloader::instance(), &PatchDownloader::checkForUpdates, Qt::QueuedConnection); } void TranslationComponents::checkIfSettingsDoNotMatchCurrentDatState() { PatchInstaller::AppliedPatchesInfo info = PatchInstaller::instance().getPatchesInfo(); bool texts_enabled = info.texts_patch_hashsum != ""; bool images_enabled = info.images_patch_hashsum != ""; bool sounds_enabled = info.sounds_patch_hashsum != ""; bool loadscreens_enabled = info.loadscreens_patch_hashsum != ""; bool textures_enabled = info.textures_patch_hashsum != ""; bool fonts_enabled = info.fonts_patch_hashsum != ""; bool videos_enabled = info.videos_patch_hashsum != ""; bool match = Settings::getValue("DatabaseDownload/text").toBool() == texts_enabled && Settings::getValue("DatabaseDownload/font").toBool() == fonts_enabled && Settings::getValue("DatabaseDownload/image").toBool() == images_enabled && Settings::getValue("DatabaseDownload/loadscreen").toBool() == loadscreens_enabled && Settings::getValue("DatabaseDownload/texture").toBool() == textures_enabled && Settings::getValue("DatabaseDownload/sound").toBool() == sounds_enabled && Settings::getValue("DatabaseDownload/video").toBool() == videos_enabled; if (!match) { emit needToPatch(); } else { emit noNeedToPatch(); } } PANIC: session(release): write data/sessions/8/4/8408309690c17cd8: no space left on device

PANIC

session(release): write data/sessions/8/4/8408309690c17cd8: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)