Browse Source

Fix frontend compat with old python versions and qt6 settings

Signed-off-by: falkTX <falktx@falktx.com>
pull/1780/head
falkTX 1 year ago
parent
commit
f1097581f8
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 12 additions and 2 deletions
  1. +12
    -2
      source/frontend/pluginlist/pluginlistdialog.cpp

+ 12
- 2
source/frontend/pluginlist/pluginlistdialog.cpp View File

@@ -1527,7 +1527,12 @@ void PluginListDialog::loadSettings()
self.fFavoritePlugins = settings.valueStringList("PluginDatabase/Favorites");
self.fFavoritePluginsChanged = false;

restoreGeometry(settings.valueByteArray("PluginDatabase/Geometry"));
#if QT_VERSION >= 0x60000
#define PLG_SUFFIX "_2qt6"
#else
#define PLG_SUFFIX "_2"
#endif
restoreGeometry(settings.valueByteArray("PluginDatabase/Geometry" PLG_SUFFIX));
self.ui.ch_effects->setChecked(settings.valueBool("PluginDatabase/ShowEffects", true));
self.ui.ch_instruments->setChecked(settings.valueBool("PluginDatabase/ShowInstruments", true));
self.ui.ch_midi->setChecked(settings.valueBool("PluginDatabase/ShowMIDI", true));
@@ -1583,7 +1588,12 @@ void PluginListDialog::loadSettings()
self.ui.ch_cat_other->setChecked(categories.contains(":other:"));
}

const QByteArray tableGeometry = settings.valueByteArray("PluginDatabase/TableGeometry_6");
#if QT_VERSION >= 0x60000
#define TG_SUFFIX "_7qt6"
#else
#define TG_SUFFIX "_7"
#endif
const QByteArray tableGeometry = settings.valueByteArray("PluginDatabase/TableGeometry" TG_SUFFIX);
QHeaderView* const horizontalHeader = self.ui.tableWidget->horizontalHeader();
if (! tableGeometry.isNull())
{


Loading…
Cancel
Save