From ae0154935ddbb1d7b1266694e37586159df11c68 Mon Sep 17 00:00:00 2001
From: Filippo Scognamiglio <flscogna@gmail.com>
Date: Wed, 3 Sep 2014 00:47:00 +0200
Subject: [PATCH] Changed plugin name to avoid future conflicts.

---
 app/qml/PreprocessedTerminal.qml          |  2 +-
 app/qml/main.qml                          |  2 -
 konsole-qml-plugin/konsole-qml-plugin.pro |  2 +-
 konsole-qml-plugin/src/plugin.cpp         |  8 +--
 konsole-qml-plugin/src/plugins.qmltypes   | 61 +++++++++--------------
 konsole-qml-plugin/src/qmldir             |  2 +-
 6 files changed, 31 insertions(+), 46 deletions(-)

diff --git a/app/qml/PreprocessedTerminal.qml b/app/qml/PreprocessedTerminal.qml
index 7a876bc..03030c1 100644
--- a/app/qml/PreprocessedTerminal.qml
+++ b/app/qml/PreprocessedTerminal.qml
@@ -22,7 +22,7 @@ import QtQuick 2.2
 import QtGraphicalEffects 1.0
 import QtQuick.Controls 1.1
 
-import org.kde.konsole 0.1
+import org.crt.konsole 0.1
 
 Item{
     id: terminalContainer
diff --git a/app/qml/main.qml b/app/qml/main.qml
index b55da31..690d654 100644
--- a/app/qml/main.qml
+++ b/app/qml/main.qml
@@ -23,8 +23,6 @@ import QtQuick.Window 2.1
 import QtQuick.Controls 1.1
 import QtGraphicalEffects 1.0
 
-import org.kde.konsole 0.1
-
 ApplicationWindow{
     id: terminalWindow
 
diff --git a/konsole-qml-plugin/konsole-qml-plugin.pro b/konsole-qml-plugin/konsole-qml-plugin.pro
index 01a963d..55e6fab 100644
--- a/konsole-qml-plugin/konsole-qml-plugin.pro
+++ b/konsole-qml-plugin/konsole-qml-plugin.pro
@@ -12,7 +12,7 @@ DEFINES += HAVE_POSIX_OPENPT HAVE_SYS_TIME_H HAVE_UPDWTMPX
 DEFINES += Q_WS_UBUNTU
 
 TARGET = kdekonsole
-PLUGIN_IMPORT_PATH = org/kde/konsole
+PLUGIN_IMPORT_PATH = org/crt/konsole
 PLUGIN_ASSETS = $$PWD/assets/*
 
 DESTDIR = $$OUT_PWD/../imports/$$PLUGIN_IMPORT_PATH
diff --git a/konsole-qml-plugin/src/plugin.cpp b/konsole-qml-plugin/src/plugin.cpp
index ce7f3d5..1b28ec4 100644
--- a/konsole-qml-plugin/src/plugin.cpp
+++ b/konsole-qml-plugin/src/plugin.cpp
@@ -33,7 +33,7 @@ KonsoleKterminalPlugin::~KonsoleKterminalPlugin() { }
 
 void KonsoleKterminalPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
 {
-    Q_ASSERT(uri == QLatin1String("org.kde.konsole"));
+    Q_ASSERT(uri == QLatin1String("org.crt.konsole"));
 
     QQmlExtensionPlugin::initializeEngine(engine, uri);
 
@@ -44,8 +44,8 @@ void KonsoleKterminalPlugin::initializeEngine(QQmlEngine *engine, const char *ur
         QString cs, kbl;
 
         foreach (QString pwd, pwds) {
-            cs  = pwd + "/org/kde/konsole/color-schemes";
-            kbl = pwd + "/org/kde/konsole/kb-layouts";
+            cs  = pwd + "/org/crt/konsole/color-schemes";
+            kbl = pwd + "/org/crt/konsole/kb-layouts";
             if (QDir(cs).exists()) break;
         }
 
@@ -56,7 +56,7 @@ void KonsoleKterminalPlugin::initializeEngine(QQmlEngine *engine, const char *ur
 
 void KonsoleKterminalPlugin::registerTypes(const char *uri)
 {
-    Q_ASSERT(uri == QLatin1String("org.kde.konsole"));
+    Q_ASSERT(uri == QLatin1String("org.crt.konsole"));
 
     qmlRegisterType<KTerminalDisplay>(uri, 0, 1, "KTerminal");
     qmlRegisterType<KSession>(uri, 0, 1, "KSession");
diff --git a/konsole-qml-plugin/src/plugins.qmltypes b/konsole-qml-plugin/src/plugins.qmltypes
index cfde7ec..45aa3ab 100644
--- a/konsole-qml-plugin/src/plugins.qmltypes
+++ b/konsole-qml-plugin/src/plugins.qmltypes
@@ -3,13 +3,15 @@ import QtQuick.tooling 1.1
 // This file describes the plugin-supplied types contained in the library.
 // It is used for QML tooling purposes only.
 //
-// This file was auto-generated with the command '/usr/lib/x86_64-linux-gnu/qt5/bin/qmlplugindump -notrelocatable org.kde.konsole 0.1 ../../../'.
+// This file was auto-generated by:
+// 'qmlplugindump org.crt.konsole 0.1 .'
 
 Module {
     Component {
         name: "KSession"
         prototype: "QObject"
-        exports: ["org.kde.konsole/KSession 0.1"]
+        exports: ["KSession 0.1"]
+        exportMetaObjectRevisions: [0]
         Property { name: "kbScheme"; type: "string" }
         Signal { name: "finished" }
         Signal {
@@ -54,14 +56,16 @@ Module {
         name: "KTerminalDisplay"
         defaultProperty: "data"
         prototype: "QQuickPaintedItem"
-        exports: ["org.kde.konsole/KTerminal 0.1"]
+        exports: ["KTerminal 0.1"]
+        exportMetaObjectRevisions: [0]
         Property { name: "session"; type: "KSession"; isPointer: true }
         Property { name: "colorScheme"; type: "string" }
         Property { name: "font"; type: "QFont" }
         Property { name: "activeFocusOnClick"; type: "bool" }
         Property { name: "ShowIMEOnClick"; type: "bool" }
-        Property { name: "terminalSize"; type: "QSize" }
-        Property { name: "paintedFontSize"; type: "QSize"}
+        Property { name: "terminalSize"; type: "QSize"; isReadonly: true }
+        Property { name: "paintedFontSize"; type: "QSize"; isReadonly: true }
+        Property { name: "usesMouse"; type: "bool"; isReadonly: true }
         Signal {
             name: "changedScheme"
             Parameter { name: "scheme"; type: "string" }
@@ -74,6 +78,7 @@ Module {
             name: "changedAutoFocus"
             Parameter { name: "au"; type: "bool" }
         }
+        Signal { name: "updatedImage" }
         Signal {
             name: "mouseSignal"
             Parameter { type: "int" }
@@ -118,9 +123,6 @@ Module {
             name: "changedSession"
             Parameter { name: "session"; type: "KSession"; isPointer: true }
         }
-        Signal { name: "terminalSizeChanged" }
-        Singal { name: "paintedFontSizeChanged" }
-        Signal { name: "updatedImage" }
         Method { name: "forcedFocus" }
         Method {
             name: "setColorScheme"
@@ -128,31 +130,15 @@ Module {
         }
         Method { name: "availableColorSchemes"; type: "QStringList" }
         Method {
-            name: "scrollWheel"
-            Parameter { name: "x"; type: "double" }
-            Parameter { name: "y"; type: "double" }
-            Parameter { name: "lines"; type: "int" }
+            name: "scrollScreenWindow"
+            Parameter { name: "mode"; type: "ScreenWindow::RelativeScrollMode" }
+            Parameter { name: "amount"; type: "int" }
         }
         Method {
-            name: "mousePress"
-            Parameter { name: "x"; type: "double" }
-            Parameter { name: "y"; type: "double" }
-        }
-        Method {
-            name: "mouseMove"
-            Parameter { name: "x"; type: "double" }
-            Parameter { name: "y"; type: "double" }
-        }
-        Method {
-            name: "mouseRelease"
-            Parameter { name: "x"; type: "double" }
-            Parameter { name: "y"; type: "double" }
-        }
-        Method {
-            name: "mouseDoubleClick"
-            Parameter { name: "x"; type: "double" }
-            Parameter { name: "y"; type: "double" }
+            name: "setUsesMouse"
+            Parameter { name: "usesMouse"; type: "bool" }
         }
+        Method { name: "getUsesMouse"; type: "bool" }
         Method { name: "autoFocus"; type: "bool" }
         Method {
             name: "setAutoFocus"
@@ -192,20 +178,21 @@ Module {
             Parameter { name: "color"; type: "QColor" }
         }
         Method { name: "selectionChanged" }
+        Method {
+            name: "banana"
+            Parameter { name: "x"; type: "int" }
+            Parameter { name: "y"; type: "int" }
+            Parameter { name: "z"; type: "int" }
+            Parameter { name: "w"; type: "int" }
+        }
         Method {
             name: "setSession"
             Parameter { name: "session"; type: "KSession"; isPointer: true }
         }
         Method { name: "getSession"; type: "KSession*" }
-
-        //My additions
         Method {
             name: "setLineSpacing"
-            Parameter { name: "i"; type: "uint"}
-        }
-        Method {
-            name: "setUsesMouse"
-            Parameter { name: "usesMouse"; type: "bool"}
+            Parameter { type: "uint" }
         }
     }
 }
diff --git a/konsole-qml-plugin/src/qmldir b/konsole-qml-plugin/src/qmldir
index f7c8b18..39a9ecd 100644
--- a/konsole-qml-plugin/src/qmldir
+++ b/konsole-qml-plugin/src/qmldir
@@ -1,3 +1,3 @@
-module org.kde.konsole
+module org.crt.konsole
 typeinfo plugins.qmltypes
 plugin kdekonsole