Make column visibility global (#3748)

This commit is contained in:
Alexandru Ionut Tripon
2025-06-02 12:45:03 +03:00
committed by GitHub
22 changed files with 187 additions and 70 deletions
+4 -4
View File
@@ -134,7 +134,7 @@ NewInstanceDialog::NewInstanceDialog(const QString& initialGroup,
updateDialogState();
if (APPLICATION->settings()->get("NewInstanceGeometry").isValid()) {
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get("NewInstanceGeometry").toByteArray()));
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get("NewInstanceGeometry").toString().toUtf8()));
} else {
auto screen = parent->screen();
auto geometry = screen->availableSize();
@@ -146,7 +146,7 @@ NewInstanceDialog::NewInstanceDialog(const QString& initialGroup,
void NewInstanceDialog::reject()
{
APPLICATION->settings()->set("NewInstanceGeometry", saveGeometry().toBase64());
APPLICATION->settings()->set("NewInstanceGeometry", QString::fromUtf8(saveGeometry().toBase64()));
// This is just so that the pages get the close() call and can react to it, if needed.
m_container->prepareToClose();
@@ -156,7 +156,7 @@ void NewInstanceDialog::reject()
void NewInstanceDialog::accept()
{
APPLICATION->settings()->set("NewInstanceGeometry", saveGeometry().toBase64());
APPLICATION->settings()->set("NewInstanceGeometry", QString::fromUtf8(saveGeometry().toBase64()));
importIconNow();
// This is just so that the pages get the close() call and can react to it, if needed.
@@ -316,7 +316,7 @@ void NewInstanceDialog::importIconNow()
InstIconKey = importIconName.mid(0, importIconName.lastIndexOf('.'));
importIcon = false;
}
APPLICATION->settings()->set("NewInstanceGeometry", saveGeometry().toBase64());
APPLICATION->settings()->set("NewInstanceGeometry", QString::fromUtf8(saveGeometry().toBase64()));
}
void NewInstanceDialog::selectedPageChanged(BasePage* previous, BasePage* selected)
@@ -84,7 +84,7 @@ ResourceDownloadDialog::ResourceDownloadDialog(QWidget* parent, const std::share
void ResourceDownloadDialog::accept()
{
if (!geometrySaveKey().isEmpty())
APPLICATION->settings()->set(geometrySaveKey(), saveGeometry().toBase64());
APPLICATION->settings()->set(geometrySaveKey(), QString::fromUtf8(saveGeometry().toBase64()));
QDialog::accept();
}
@@ -105,7 +105,7 @@ void ResourceDownloadDialog::reject()
}
if (!geometrySaveKey().isEmpty())
APPLICATION->settings()->set(geometrySaveKey(), saveGeometry().toBase64());
APPLICATION->settings()->set(geometrySaveKey(), QString::fromUtf8(saveGeometry().toBase64()));
QDialog::reject();
}
@@ -275,7 +275,7 @@ ModDownloadDialog::ModDownloadDialog(QWidget* parent, const std::shared_ptr<ModF
connectButtons();
if (!geometrySaveKey().isEmpty())
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get(geometrySaveKey()).toByteArray()));
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get(geometrySaveKey()).toString().toUtf8()));
}
QList<BasePage*> ModDownloadDialog::getPages()
@@ -318,7 +318,7 @@ ResourcePackDownloadDialog::ResourcePackDownloadDialog(QWidget* parent,
connectButtons();
if (!geometrySaveKey().isEmpty())
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get(geometrySaveKey()).toByteArray()));
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get(geometrySaveKey()).toString().toUtf8()));
}
QList<BasePage*> ResourcePackDownloadDialog::getPages()
@@ -343,7 +343,7 @@ TexturePackDownloadDialog::TexturePackDownloadDialog(QWidget* parent,
connectButtons();
if (!geometrySaveKey().isEmpty())
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get(geometrySaveKey()).toByteArray()));
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get(geometrySaveKey()).toString().toUtf8()));
}
QList<BasePage*> TexturePackDownloadDialog::getPages()
@@ -368,7 +368,7 @@ ShaderPackDownloadDialog::ShaderPackDownloadDialog(QWidget* parent,
connectButtons();
if (!geometrySaveKey().isEmpty())
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get(geometrySaveKey()).toByteArray()));
restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get(geometrySaveKey()).toString().toUtf8()));
}
QList<BasePage*> ShaderPackDownloadDialog::getPages()