Commit 1300d7c0 authored by Laurent Montel's avatar Laurent Montel 😁

Clean up

parent d2f02fe1
......@@ -56,8 +56,6 @@ public:
void updateImageHtml();
void updateSettings();
//QWebElement webElement;
KPIMTextEdit::InsertImageWidget *imageWidget;
QLineEdit *title;
QLineEdit *alternateTitle;
......@@ -135,7 +133,7 @@ void ComposerImageDialogPrivate::updateImageHtml()
void ComposerImageDialogPrivate::initialize()
{
//q->setWindowTitle(webElement.isNull() ? i18n("Insert Image") : i18n("Edit Image"));
q->setWindowTitle(i18n("Insert Image"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(/*webElement.isNull() ? */QDialogButtonBox::Ok /*: QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply*/);
QVBoxLayout *mainLayout = new QVBoxLayout;
......@@ -245,15 +243,6 @@ ComposerImageDialog::ComposerImageDialog(QWidget *parent)
d->initialize();
}
#if 0
ComposerImageDialog::ComposerImageDialog(const QWebElement &element, QWidget *parent)
: QDialog(parent), d(new ComposerImageDialogPrivate(this))
{
d->webElement = element;
d->initialize();
}
#endif
ComposerImageDialog::~ComposerImageDialog()
{
delete d;
......
......@@ -23,8 +23,6 @@
#include <QDialog>
//class QWebElement;
namespace ComposerEditorWebEngine
{
class ComposerImageDialogPrivate;
......@@ -33,7 +31,6 @@ class ComposerImageDialog : public QDialog
Q_OBJECT
public:
explicit ComposerImageDialog(QWidget *parent);
//explicit ComposerImageDialog(const QWebElement &element, QWidget *parent);
~ComposerImageDialog();
/**
......@@ -49,7 +46,6 @@ private:
Q_PRIVATE_SLOT(d, void _k_slotApplyClicked())
Q_PRIVATE_SLOT(d, void _k_slotWebElementChanged())
Q_PRIVATE_SLOT(d, void _k_slotEnableButtonOk(bool b))
};
}
......
......@@ -42,7 +42,7 @@ public:
{
}
void initialize(/*const QWebElement &element = QWebElement()*/);
void initialize();
void updateSettings();
void updateLinkHtml();
......@@ -52,7 +52,6 @@ public:
QString html() const;
//QWebElement webElement;
QLineEdit *anchorName;
ComposerAnchorDialog *q;
};
......@@ -72,7 +71,7 @@ void ComposerAnchorDialogPrivate::initialize(/*const QWebElement &element*/)
q->connect(buttonBox, &QDialogButtonBox::rejected, q, &ComposerAnchorDialog::reject);
mainLayout->addWidget(buttonBox);
//q->setWindowTitle(webElement.isNull() ? i18n("Create Anchor") : i18n("Edit Anchor"));
q->setWindowTitle(i18n("Create Anchor"));
QVBoxLayout *vbox = new QVBoxLayout(mainWidget);
......@@ -83,7 +82,6 @@ void ComposerAnchorDialogPrivate::initialize(/*const QWebElement &element*/)
layout->addWidget(label, 0, 0);
anchorName = new QLineEdit;
//anchorName->setReadOnly(!webElement.isNull());
anchorName->setClearButtonEnabled(true);
layout->addWidget(anchorName, 0, 1);
#if 0
......@@ -135,14 +133,6 @@ ComposerAnchorDialog::ComposerAnchorDialog(QWidget *parent)
{
d->initialize();
}
#if 0
ComposerAnchorDialog::ComposerAnchorDialog(const QWebElement &element, QWidget *parent)
: QDialog(parent), d(new ComposerAnchorDialogPrivate(this))
{
d->initialize(element);
d->updateSettings();
}
#endif
ComposerAnchorDialog::~ComposerAnchorDialog()
{
......
......@@ -30,8 +30,7 @@ class ComposerAnchorDialog : public QDialog
{
Q_OBJECT
public:
//explicit ComposerAnchorDialog(const QWebElement &element, QWidget *parent = Q_NULLPTR);
ComposerAnchorDialog(QWidget *parent);
explicit ComposerAnchorDialog(QWidget *parent);
~ComposerAnchorDialog();
QString html() const;
......
......@@ -45,7 +45,7 @@ public:
{
}
void initialize(/*const QWebElement &element = QWebElement()*/);
void initialize();
QString html() const;
......@@ -56,14 +56,13 @@ public:
void _k_slotOkClicked();
void _k_slotWebElementChanged();
//QWebElement webElement;
QLineEdit *linkText;
QLineEdit *linkLocation;
KComboBox *target;
ComposerLinkDialog *q;
};
void ComposerLinkDialogPrivate::initialize(/*const QWebElement &element*/)
void ComposerLinkDialogPrivate::initialize()
{
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QWidget *mainWidget = new QWidget(q);
......@@ -76,9 +75,8 @@ void ComposerLinkDialogPrivate::initialize(/*const QWebElement &element*/)
q->connect(buttonBox, SIGNAL(accepted()), q, SLOT(_k_slotOkClicked()));
q->connect(buttonBox, &QDialogButtonBox::rejected, q, &ComposerLinkDialog::reject);
mainLayout->addWidget(buttonBox);
//webElement = element;
//q->setWindowTitle(webElement.isNull() ? i18n("Create Link") : i18n("Edit Link"));
q->setWindowTitle(i18n("Create Link"));
QVBoxLayout *vbox = new QVBoxLayout(mainWidget);
......@@ -196,14 +194,6 @@ ComposerLinkDialog::ComposerLinkDialog(const QString &selectedText, QWidget *par
d->initialize();
d->linkText->setText(selectedText);
}
#if 0
ComposerLinkDialog::ComposerLinkDialog(const QWebElement &element, QWidget *parent)
: QDialog(parent), d(new ComposerLinkDialogPrivate(this))
{
d->initialize(element);
d->updateSettings();
}
#endif
ComposerLinkDialog::~ComposerLinkDialog()
{
......
......@@ -31,8 +31,7 @@ class ComposerLinkDialog : public QDialog
{
Q_OBJECT
public:
explicit ComposerLinkDialog(const QString &selectedText, QWidget *parent);
//explicit ComposerLinkDialog(const QWebElement &element, QWidget *parent);
explicit ComposerLinkDialog(const QString &selectedText, QWidget *parent = Q_NULLPTR);
~ComposerLinkDialog();
QString html() const;
......
......@@ -50,10 +50,6 @@ BilboBrowser::BilboBrowser(QWidget *parent)
connect(mWebView, &QWebEngineView::loadProgress,
browserProgress, &QProgressBar::setValue);
connect(mWebView, &QWebEngineView::loadFinished, this, &BilboBrowser::slotCompleted);
//connect(mWebView, &QWebView::statusBarMessage, this,
// &BilboBrowser::slotSetStatusBarText);
//TODO
}
BilboBrowser::~BilboBrowser()
......
......@@ -169,7 +169,7 @@ void BlogiloComposerWebEngineEditor::execCommand(const QString &cmd, const QStri
void BlogiloComposerWebEngineEditor::insertShortUrl(const QString &url)
{
QString html = QStringLiteral("<a href=\'%1\'>%1</a>").arg(url);
const QString html = QStringLiteral("<a href=\'%1\'>%1</a>").arg(url);
execCommand(QStringLiteral("insertHtml"), html);
}
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