Commit 1e82634c authored by Laurent Montel's avatar Laurent Montel 😁

Coding style

parent 246edd79
......@@ -27,7 +27,6 @@
RegexpEditorLineEditTest::RegexpEditorLineEditTest(QObject *parent)
: QObject(parent)
{
}
void RegexpEditorLineEditTest::shouldHaveDefaultValue()
......
......@@ -33,7 +33,6 @@
#include <KTextWidgets/kregexpeditorinterface.h>
K_PLUGIN_FACTORY_WITH_JSON(RegexpEditorLineEditFactory, "regexepeditorlineedit.json", registerPlugin<RegexpEditorLineEdit>();
)
struct InfoRegExp
......@@ -41,7 +40,6 @@ struct InfoRegExp
InfoRegExp()
: status(Unknown)
{
}
enum RegexpEditorStatus {
......@@ -99,18 +97,18 @@ void RegexpEditorLineEdit::slotOpenRegexpEditor()
QString error;
mEditorDialog = KServiceTypeTrader::createInstanceFromQuery<QDialog>(QStringLiteral("KRegExpEditor/KRegExpEditor"), this, this, {}, {}, &error);
if ( !mEditorDialog ) {
if (!mEditorDialog) {
qCWarning(REGEXPEDITORLINEEDITPLUGIN_LOG) << " Impossible to create regexpeditor " << error;
return;
}
}
KRegExpEditorInterface* iface = qobject_cast<KRegExpEditorInterface*>(mEditorDialog);
Q_ASSERT( iface ); // This should not fail!
KRegExpEditorInterface *iface = qobject_cast<KRegExpEditorInterface *>(mEditorDialog);
Q_ASSERT(iface); // This should not fail!
// now use the editor.
iface->setRegExp(mLineEdit->text());
if(mEditorDialog->exec() == QDialog::Accepted) {
if (mEditorDialog->exec() == QDialog::Accepted) {
mLineEdit->setText(iface->regExp());
}
}
......@@ -143,5 +141,4 @@ void RegexpEditorLineEdit::setPlaceholderText(const QString &str)
mLineEdit->setPlaceholderText(str);
}
#include "regexpeditorlineedit.moc"
......@@ -28,7 +28,9 @@ class RegexpEditorLineEdit : public KSieveUi::AbstractRegexpEditorLineEdit
{
Q_OBJECT
public:
explicit RegexpEditorLineEdit(QWidget *parent = nullptr, const QList<QVariant> & = {});
explicit RegexpEditorLineEdit(QWidget *parent = nullptr, const QList<QVariant> & =
{
});
~RegexpEditorLineEdit();
void switchToRegexpEditorLineEdit(bool regexpEditor) override;
......
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