Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix plugin numbering when adding plugins #2201

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion panel/panelpluginsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ QPointer<Plugin> PanelPluginsModel::loadPlugin(LXQt::PluginInfo const & desktopF

QString PanelPluginsModel::findNewPluginSettingsGroup(const QString &pluginType) const
{
QStringList groups = mPanel->settings()->childGroups();
QString userConfigDir = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
QSettings userSettings(QStringLiteral("%1/lxqt/panel.conf").arg(userConfigDir), QSettings::IniFormat);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't a reason that the config file should be panel.conf, to say nothing of its path. The panel config file I'm using right now is panel-kwin_wayland.conf.

#2126 was rather a question, whose answer you found. It was by no means a bug, and can be closed.

Copy link
Contributor Author

@isf63 isf63 Dec 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll close this PR because I'm not very familiar with Qt's system integration, nor LXQt settings.

I think it is a bug to have "<pluginname>2" as the first numbering, due to system config, though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a bug…

By definition, it isn't.

QStringList groups = userSettings.childGroups();
groups.sort();

// Generate new section name
Expand Down