Commit 020db571 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Return groups name

parent bafc2113
......@@ -83,13 +83,13 @@ KDebugSettingsDialog::KDebugSettingsDialog(QWidget *parent)
connect(saveAs, &SaveToolButton::saveAsFile, this, &KDebugSettingsDialog::slotSaveAs);
connect(saveAs, &SaveToolButton::saveAsGroup, this, &KDebugSettingsDialog::slotSaveAsGroup);
LoadToolButton *load = new LoadToolButton(this);
load->setObjectName(QStringLiteral("load_button"));
buttonBox->addButton(load, QDialogButtonBox::ActionRole);
connect(load, &LoadToolButton::loadFromFile, this, &KDebugSettingsDialog::slotLoad);
connect(load, &LoadToolButton::loadGroupRequested, this, &KDebugSettingsDialog::slotLoadGroup);
connect(load, &LoadToolButton::manageGroupRequested, this, &KDebugSettingsDialog::slotManageGroup);
connect(this, &KDebugSettingsDialog::updateLoadGroupMenu, load, &LoadToolButton::updateLoadGroupMenu);
mLoadToolButton = new LoadToolButton(this);
mLoadToolButton->setObjectName(QStringLiteral("load_button"));
buttonBox->addButton(mLoadToolButton, QDialogButtonBox::ActionRole);
connect(mLoadToolButton, &LoadToolButton::loadFromFile, this, &KDebugSettingsDialog::slotLoad);
connect(mLoadToolButton, &LoadToolButton::loadGroupRequested, this, &KDebugSettingsDialog::slotLoadGroup);
connect(mLoadToolButton, &LoadToolButton::manageGroupRequested, this, &KDebugSettingsDialog::slotManageGroup);
connect(this, &KDebugSettingsDialog::updateLoadGroupMenu, mLoadToolButton, &LoadToolButton::updateLoadGroupMenu);
QPushButton *insertCategories = new QPushButton(i18n("Insert..."), this);
insertCategories->setObjectName(QStringLiteral("insert_button"));
......
......@@ -31,6 +31,7 @@ class KDEApplicationDebugSettingPage;
class CustomDebugSettingsPage;
class EnvironmentSettingsRulesPage;
class CategoryWarning;
class LoadToolButton;
class LIBKDEBUGSETTINGS_EXPORT KDebugSettingsDialog : public QDialog
{
......@@ -67,6 +68,7 @@ private:
CustomDebugSettingsPage *mCustomSettingsPage = nullptr;
EnvironmentSettingsRulesPage *mEnvironmentSettingsRulesPage = nullptr;
CategoryWarning *mCategoryWarning = nullptr;
LoadToolButton *mLoadToolButton = nullptr;
};
#endif // KDEBUGSETTINGSDIALOG_H
......@@ -48,3 +48,9 @@ void LoadToolButton::updateLoadGroupMenu()
{
mLoadMenu->refreshMenu();
}
QStringList LoadToolButton::groupNames() const
{
return mLoadMenu->groupNames();
}
......@@ -33,6 +33,9 @@ public:
~LoadToolButton() override;
void updateLoadGroupMenu();
Q_REQUIRED_RESULT QStringList groupNames() const;
Q_SIGNALS:
void loadGroupRequested(const QString &fullPath);
void loadFromFile();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment