Add richtexteditor. Signal when some variables are not initialized

wilder-work
Laurent Montel 8 years ago
parent 1acd104e9a
commit 2f6d2a4728
  1. 1
      src/editor/kmcomposerwin.cpp
  2. 4
      src/editor/plugininterface/kmailplugineditorcheckbeforesendmanagerinterface.cpp
  3. 8
      src/editor/plugininterface/kmailplugineditorconverttextmanagerinterface.cpp
  4. 8
      src/editor/plugininterface/kmailplugineditorinitmanagerinterface.cpp
  5. 6
      src/editor/plugininterface/kmailplugineditormanagerinterface.cpp

@ -433,6 +433,7 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg, bool lastSignState
mPluginEditorConvertTextManagerInterface->setParentWidget(this);
mPluginEditorConvertTextManagerInterface->setActionCollection(actionCollection());
mPluginEditorConvertTextManagerInterface->setRichTextEditor(composerEditorNg);
setupStatusBar(attachmentView->widget());
setupActions();

@ -49,6 +49,10 @@ void KMailPluginEditorCheckBeforeSendManagerInterface::initializePlugins()
qCDebug(KMAIL_LOG) << "Plugin was already initialized. This is a bug";
return;
}
if (!mParentWidget) {
qCDebug(KMAIL_LOG) << "KMailPluginEditorCheckBeforeSendManagerInterface : Parent is null. This is a bug";
}
const QVector<MessageComposer::PluginEditorCheckBeforeSend *> lstPlugin = MessageComposer::PluginEditorCheckBeforeSendManager::self()->pluginsList();
for (MessageComposer::PluginEditorCheckBeforeSend *plugin : lstPlugin) {
if (plugin->isEnabled()) {

@ -61,6 +61,13 @@ void KMailPluginEditorConvertTextManagerInterface::initializePlugins()
qCDebug(KMAIL_LOG) << "KMailPluginEditorConvertTextManagerInterface : Plugin was already initialized. This is a bug";
return;
}
if (!mRichTextEditor) {
qCDebug(KMAIL_LOG) << "KMailPluginEditorConvertTextManagerInterface : Richtexteditor is null. This is a bug";
return;
}
if (!mParentWidget) {
qCDebug(KMAIL_LOG) << "KMailPluginEditorConvertTextManagerInterface : Parent is null. This is a bug";
}
const QVector<MessageComposer::PluginEditorConvertText *> lstPlugin = MessageComposer::PluginEditorConvertTextManager::self()->pluginsList();
for (MessageComposer::PluginEditorConvertText *plugin : lstPlugin) {
if (plugin->isEnabled()) {
@ -70,6 +77,7 @@ void KMailPluginEditorConvertTextManagerInterface::initializePlugins()
mListPluginInterface.append(interface);
}
}
qCDebug(KMAIL_LOG) << "KMailPluginEditorConvertTextManagerInterface : Initialize done, number of plugins found: " << mListPluginInterface.count();
}
KPIMTextEdit::RichTextComposer *KMailPluginEditorConvertTextManagerInterface::richTextEditor() const

@ -54,6 +54,14 @@ void KMailPluginEditorInitManagerInterface::initializePlugins()
qCDebug(KMAIL_LOG) << "KMailPluginEditorInitManagerInterface : Plugin was already initialized. This is a bug";
return;
}
if (!mRichTextEditor) {
qCDebug(KMAIL_LOG) << "KMailPluginEditorInitManagerInterface : Richtexteditor is null. This is a bug";
return;
}
if (!mParentWidget) {
qCDebug(KMAIL_LOG) << "KMailPluginEditorInitManagerInterface : Parent is null. This is a bug";
}
const QVector<MessageComposer::PluginEditorInit *> lstPlugin = MessageComposer::PluginEditorInitManager::self()->pluginsList();
for (MessageComposer::PluginEditorInit *plugin : lstPlugin) {
if (plugin->isEnabled()) {

@ -61,9 +61,13 @@ void KMailPluginEditorManagerInterface::initializePlugins()
return;
}
if (!mRichTextEditor) {
qCDebug(KMAIL_LOG) << "Missing richtexteditor";
qCDebug(KMAIL_LOG) << "KMailPluginEditorManagerInterface: Missing richtexteditor";
return;
}
if (!mParentWidget) {
qCDebug(KMAIL_LOG) << "KMailPluginEditorManagerInterface : Parent is null. This is a bug";
}
const QVector<MessageComposer::PluginEditor *> lstPlugin = MessageComposer::PluginEditorManager::self()->pluginsList();
for (MessageComposer::PluginEditor *plugin : lstPlugin) {
if (plugin->isEnabled()) {

Loading…
Cancel
Save