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) ...@@ -83,13 +83,13 @@ KDebugSettingsDialog::KDebugSettingsDialog(QWidget *parent)
connect(saveAs, &SaveToolButton::saveAsFile, this, &KDebugSettingsDialog::slotSaveAs); connect(saveAs, &SaveToolButton::saveAsFile, this, &KDebugSettingsDialog::slotSaveAs);
connect(saveAs, &SaveToolButton::saveAsGroup, this, &KDebugSettingsDialog::slotSaveAsGroup); connect(saveAs, &SaveToolButton::saveAsGroup, this, &KDebugSettingsDialog::slotSaveAsGroup);
LoadToolButton *load = new LoadToolButton(this); mLoadToolButton = new LoadToolButton(this);
load->setObjectName(QStringLiteral("load_button")); mLoadToolButton->setObjectName(QStringLiteral("load_button"));
buttonBox->addButton(load, QDialogButtonBox::ActionRole); buttonBox->addButton(mLoadToolButton, QDialogButtonBox::ActionRole);
connect(load, &LoadToolButton::loadFromFile, this, &KDebugSettingsDialog::slotLoad); connect(mLoadToolButton, &LoadToolButton::loadFromFile, this, &KDebugSettingsDialog::slotLoad);
connect(load, &LoadToolButton::loadGroupRequested, this, &KDebugSettingsDialog::slotLoadGroup); connect(mLoadToolButton, &LoadToolButton::loadGroupRequested, this, &KDebugSettingsDialog::slotLoadGroup);
connect(load, &LoadToolButton::manageGroupRequested, this, &KDebugSettingsDialog::slotManageGroup); connect(mLoadToolButton, &LoadToolButton::manageGroupRequested, this, &KDebugSettingsDialog::slotManageGroup);
connect(this, &KDebugSettingsDialog::updateLoadGroupMenu, load, &LoadToolButton::updateLoadGroupMenu); connect(this, &KDebugSettingsDialog::updateLoadGroupMenu, mLoadToolButton, &LoadToolButton::updateLoadGroupMenu);
QPushButton *insertCategories = new QPushButton(i18n("Insert..."), this); QPushButton *insertCategories = new QPushButton(i18n("Insert..."), this);
insertCategories->setObjectName(QStringLiteral("insert_button")); insertCategories->setObjectName(QStringLiteral("insert_button"));
......
...@@ -31,6 +31,7 @@ class KDEApplicationDebugSettingPage; ...@@ -31,6 +31,7 @@ class KDEApplicationDebugSettingPage;
class CustomDebugSettingsPage; class CustomDebugSettingsPage;
class EnvironmentSettingsRulesPage; class EnvironmentSettingsRulesPage;
class CategoryWarning; class CategoryWarning;
class LoadToolButton;
class LIBKDEBUGSETTINGS_EXPORT KDebugSettingsDialog : public QDialog class LIBKDEBUGSETTINGS_EXPORT KDebugSettingsDialog : public QDialog
{ {
...@@ -67,6 +68,7 @@ private: ...@@ -67,6 +68,7 @@ private:
CustomDebugSettingsPage *mCustomSettingsPage = nullptr; CustomDebugSettingsPage *mCustomSettingsPage = nullptr;
EnvironmentSettingsRulesPage *mEnvironmentSettingsRulesPage = nullptr; EnvironmentSettingsRulesPage *mEnvironmentSettingsRulesPage = nullptr;
CategoryWarning *mCategoryWarning = nullptr; CategoryWarning *mCategoryWarning = nullptr;
LoadToolButton *mLoadToolButton = nullptr;
}; };
#endif // KDEBUGSETTINGSDIALOG_H #endif // KDEBUGSETTINGSDIALOG_H
...@@ -48,3 +48,9 @@ void LoadToolButton::updateLoadGroupMenu() ...@@ -48,3 +48,9 @@ void LoadToolButton::updateLoadGroupMenu()
{ {
mLoadMenu->refreshMenu(); mLoadMenu->refreshMenu();
} }
QStringList LoadToolButton::groupNames() const
{
return mLoadMenu->groupNames();
}
...@@ -33,6 +33,9 @@ public: ...@@ -33,6 +33,9 @@ public:
~LoadToolButton() override; ~LoadToolButton() override;
void updateLoadGroupMenu(); void updateLoadGroupMenu();
Q_REQUIRED_RESULT QStringList groupNames() const;
Q_SIGNALS: Q_SIGNALS:
void loadGroupRequested(const QString &fullPath); void loadGroupRequested(const QString &fullPath);
void loadFromFile(); 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