summaryrefslogtreecommitdiff
path: root/doc/examples/htmleditor/htmleditorplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/htmleditor/htmleditorplugin.cpp')
-rw-r--r--doc/examples/htmleditor/htmleditorplugin.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/doc/examples/htmleditor/htmleditorplugin.cpp b/doc/examples/htmleditor/htmleditorplugin.cpp
deleted file mode 100644
index 657963f345..0000000000
--- a/doc/examples/htmleditor/htmleditorplugin.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "htmleditorplugin.h"
-#include "htmleditorfactory.h"
-#include <coreplugin/actionmanager/actionmanager.h>
-#include <coreplugin/actionmanager/command.h>
-#include <coreplugin/coreconstants.h>
-#include <coreplugin/mimedatabase.h>
-#include <coreplugin/icore.h>
-#include <QtPlugin>
-#include <QString>
-#include <QMessageBox>
-#include <QFontDialog>
-
-HTMLEditorPlugin::HTMLEditorPlugin()
-{
- // Do nothing
-}
-
-HTMLEditorPlugin::~HTMLEditorPlugin()
-{
- // Do notning
-}
-
-void HTMLEditorPlugin::extensionsInitialized()
-{
- // Do nothing
-}
-
-bool HTMLEditorPlugin::initialize(const QStringList& args, QString *errMsg)
-{
- Q_UNUSED(args);
-
- Core::ActionManager* am = Core::ICore::instance()->actionManager();
- Core::ActionContainer* ac = am->actionContainer(Core::Constants::M_EDIT);
- QAction* Font = ac->menu()->addAction("Font");
-
- // Create a command for "Font".
- Core::Command* cmd = am->registerAction(new QAction(this),"HTMLEditorPlugin.Font",QList<int>() << 0);
- cmd->action()->setText("Font");
-
- Core::ICore* core = Core::ICore::instance();
- Core::MimeDatabase* mdb = core->mimeDatabase();
-
- if(!mdb->addMimeTypes("text-html-mimetype.xml", errMsg))
- return false;
-
- QMessageBox::information(0, "Msg", *errMsg);
-
- addAutoReleasedObject(new HTMLEditorFactory(this));
- return true;
-}
-
-void HTMLEditorPlugin::shutdown()
-{
- // Do nothing
-}
-
-Q_EXPORT_PLUGIN(HTMLEditorPlugin)