Commit aa5fa64e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use savetoolbutton

parent 710f25d5
Pipeline #44506 canceled with stage
......@@ -22,6 +22,7 @@
#include "kdebugsettingsdialog.h"
#include "categorywarning.h"
#include "loadtoolbutton.h"
#include "savetoolbutton.h"
#include <QDialogButtonBox>
#include <QPushButton>
#include <QTabWidget>
......@@ -54,7 +55,7 @@ void KDebugSettingsDialogTest::shouldHaveDefaultValue()
|| (objName == QLatin1String("environmentsettingsrulespage"));
QVERIFY(hasCorrectName);
}
auto saveAs = buttonBox->findChild<QToolButton *>(QStringLiteral("saveas_button"));
auto saveAs = buttonBox->findChild<SaveToolButton *>(QStringLiteral("saveas_button"));
QVERIFY(saveAs);
auto load = buttonBox->findChild<LoadToolButton *>(QStringLiteral("load_button"));
QVERIFY(load);
......
......@@ -27,6 +27,7 @@
#include "loadcategoriesjob.h"
#include "saverulesjob.h"
#include "loadtoolbutton.h"
#include "savetoolbutton.h"
#include <KLocalizedString>
#include <KConfigGroup>
......@@ -72,11 +73,11 @@ KDebugSettingsDialog::KDebugSettingsDialog(QWidget *parent)
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Apply, this);
buttonBox->setObjectName(QStringLiteral("buttonbox"));
QToolButton *saveAs = new QToolButton(this);
SaveToolButton *saveAs = new SaveToolButton(this);
saveAs->setText(i18n("Save As..."));
saveAs->setObjectName(QStringLiteral("saveas_button"));
buttonBox->addButton(saveAs, QDialogButtonBox::ActionRole);
connect(saveAs, &QToolButton::clicked, this, &KDebugSettingsDialog::slotSaveAs);
connect(saveAs, &SaveToolButton::clicked, this, &KDebugSettingsDialog::slotSaveAs);
LoadToolButton *load = new LoadToolButton(this);
......
......@@ -18,10 +18,12 @@
*/
#include "savetoolbutton.h"
#include <KLocalizedString>
SaveToolButton::SaveToolButton(QWidget *parent)
: QToolButton(parent)
{
setText(i18n("Save As..."));
//TODO
}
......
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