Commit afeba8af authored by Laurent Montel's avatar Laurent Montel 😁

Reactivate more code

parent 63b00e15
......@@ -144,7 +144,7 @@ void ComposerLinkDialogPrivate::_k_slotOkClicked()
QString ComposerLinkDialogPrivate::html() const
{
const QUrl url = ComposerEditorNG::Utils::guessUrlFromString(linkLocation->text());
const QUrl url = ComposerEditorWebEngine::Utils::guessUrlFromString(linkLocation->text());
if (url.isValid()) {
const QString targetStr = target->itemData(target->currentIndex()).toString();
QString html = QStringLiteral("<a ");
......
......@@ -20,8 +20,8 @@
#include "composerwebengine_p.h"
#include "table/composertabledialog.h"
#if 0
#include "utils/composereditorutils_p.h"
#if 0
#include "link/composerlinkdialog.h"
#include "link/composeranchordialog.h"
#include "list/composerlistdialog.h"
......@@ -55,6 +55,7 @@
#include <PimCommon/KPimPrintPreviewDialog>
#include <QDBusConnectionInterface>
#include <image/composerimagedialog.h>
#include <link/composerlinkdialog.h>
//#include <QWebFrame>
//#include <QWebElement>
......@@ -651,24 +652,20 @@ void ComposerEditorWebEnginePrivate::_k_slotDeleteText()
void ComposerEditorWebEnginePrivate::_k_setTextForegroundColor()
{
#if 0
QColor newColor = ComposerWebEngine::Utils::convertRgbToQColor(evaluateJavascript(QStringLiteral("getTextForegroundColor()")).toString());
QColor newColor = ComposerEditorWebEngine::Utils::convertRgbToQColor(evaluateJavascript(QStringLiteral("getTextForegroundColor()")).toString());
newColor = QColorDialog::getColor(newColor, q);
if (newColor.isValid()) {
execCommand(QStringLiteral("foreColor"), newColor.name());
}
#endif
}
void ComposerEditorWebEnginePrivate::_k_slotAddImage()
{
#if 0
QPointer<ComposerImageDialog> dlg = new ComposerImageDialog(q);
QPointer<ComposerEditorWebEngine::ComposerImageDialog> dlg = new ComposerEditorWebEngine::ComposerImageDialog(q);
if (dlg->exec() == QDialog::Accepted) {
execCommand(QStringLiteral("insertHTML"), dlg->html());
}
delete dlg;
#endif
}
void ComposerEditorWebEnginePrivate::_k_slotEditImage()
......@@ -682,7 +679,7 @@ void ComposerEditorWebEnginePrivate::_k_slotEditImage()
void ComposerEditorWebEnginePrivate::_k_slotInsertTable()
{
QPointer<ComposerTableDialog> dlg = new ComposerTableDialog(q);
QPointer<ComposerEditorWebEngine::ComposerTableDialog> dlg = new ComposerEditorWebEngine::ComposerTableDialog(q);
if (dlg->exec() == QDialog::Accepted) {
execCommand(QStringLiteral("insertHTML"), dlg->html());
}
......
......@@ -22,7 +22,7 @@
#include <QFile>
QColor ComposerEditorNG::Utils::convertRgbToQColor(QString rgb)
QColor ComposerEditorWebEngine::Utils::convertRgbToQColor(QString rgb)
{
rgb.chop(1);
rgb.remove(QStringLiteral("rgb("));
......@@ -35,7 +35,7 @@ QColor ComposerEditorNG::Utils::convertRgbToQColor(QString rgb)
return QColor();
}
QUrl ComposerEditorNG::Utils::guessUrlFromString(const QString &string)
QUrl ComposerEditorWebEngine::Utils::guessUrlFromString(const QString &string)
{
const QString urlStr = string.trimmed();
const QRegExp test(QStringLiteral("^[a-zA-Z]+\\:.*"));
......
......@@ -25,7 +25,7 @@
#include <QString>
#include <QUrl>
namespace ComposerEditorNG
namespace ComposerEditorWebEngine
{
namespace Utils
......
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