From 36a8394828d6877893b44adfbc972c4de06901da Mon Sep 17 00:00:00 2001
From: Alan Alpert <alan.alpert@nokia.com>
Date: Tue, 6 Dec 2011 14:03:05 +1000
Subject: [PATCH] Work again.

Well, a little. At least one person can now run Gallery.qml again.

Removes all menu related stuff, removes Window (uses the
Window in QtQuick.Window instead, despite reduced functionality now).

Updates to work with the quick module split, and the xmllistmodel
module split.

Updates version number to 0.2 as well.
---
 components/Button.qml                   |   2 +-
 components/CheckBox.qml                 |   2 +-
 components/ComboBox.qml                 |   2 +-
 components/ContextMenu.qml              |  16 +-
 components/Dial.qml                     |   2 +-
 components/Frame.qml                    |   2 +-
 components/GroupBox.qml                 |   2 +-
 components/MenuItem.qml                 |   2 +-
 components/ProgressBar.qml              |   2 +-
 components/RadioButton.qml              |   2 +-
 components/ScrollArea.qml               |   2 +-
 components/ScrollBar.qml                |   2 +-
 components/Slider.qml                   |   2 +-
 components/SpinBox.qml                  |   2 +-
 components/SplitterRow.qml              |   2 +-
 components/TabBar.qml                   |   2 +-
 components/TabFrame.qml                 |   2 +-
 components/TableView.qml                |   2 +-
 components/TextArea.qml                 |   2 +-
 components/TextField.qml                |   2 +-
 components/ToolBar.qml                  |   2 +-
 components/ToolButton.qml               |   2 +-
 components/custom/Slider.qml            |   2 +-
 components/custom/Splitter.qml          |   2 +-
 components/private/ScrollAreaHelper.qml |   2 +-
 desktop.pro                             |   2 +-
 examples/Browser.qml                    |   2 +-
 examples/BrowserTab.qml                 |   2 +-
 examples/Gallery.qml                    |   9 +-
 examples/ModelView.qml                  |   3 +-
 examples/SplitterGallery.qml            |   2 +-
 examples/TableViewGallery.qml           |   2 +-
 examples/TopLevel.qml                   |   2 +-
 examples/TopLevelBrowser.qml            |   2 +-
 src/qstyleitem.cpp                      |   4 +-
 src/qstyleitem.h                        |   2 +-
 src/qstyleplugin.cpp                    |  27 +--
 src/qstyleplugin.h                      |   1 -
 src/qtmenu.cpp                          | 181 -------------------
 src/qtmenu.h                            |  93 ----------
 src/qtmenubar.cpp                       |  86 ---------
 src/qtmenubar.h                         |  73 --------
 src/qtmenuitem.cpp                      | 142 ---------------
 src/qtmenuitem.h                        | 117 ------------
 src/qtoplevelwindow.cpp                 |  92 ----------
 src/qtoplevelwindow.h                   |  69 --------
 src/qtsplitterbase.h                    |   1 +
 src/qwheelarea.h                        |   2 +-
 src/qwindowitem.cpp                     | 225 ------------------------
 src/qwindowitem.h                       | 126 -------------
 src/src.pro                             |  14 +-
 51 files changed, 67 insertions(+), 1278 deletions(-)
 delete mode 100644 src/qtmenu.cpp
 delete mode 100644 src/qtmenu.h
 delete mode 100644 src/qtmenubar.cpp
 delete mode 100644 src/qtmenubar.h
 delete mode 100644 src/qtmenuitem.cpp
 delete mode 100644 src/qtmenuitem.h
 delete mode 100644 src/qtoplevelwindow.cpp
 delete mode 100644 src/qtoplevelwindow.h
 delete mode 100644 src/qwindowitem.cpp
 delete mode 100644 src/qwindowitem.h

diff --git a/components/Button.qml b/components/Button.qml
index 9f456d312..0f6eb34cc 100644
--- a/components/Button.qml
+++ b/components/Button.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Components.Button {
     id: button
diff --git a/components/CheckBox.qml b/components/CheckBox.qml
index 9eed75e83..71c3f6276 100644
--- a/components/CheckBox.qml
+++ b/components/CheckBox.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 // jb : Size should not depend on background, we should make it consistent
 
diff --git a/components/ComboBox.qml b/components/ComboBox.qml
index 81fadf1dc..c79be5ac3 100644
--- a/components/ComboBox.qml
+++ b/components/ComboBox.qml
@@ -1,6 +1,6 @@
 import QtQuick 1.1
 import "custom" as Custom
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 /*
 *
diff --git a/components/ContextMenu.qml b/components/ContextMenu.qml
index b26a6f643..69b78b104 100644
--- a/components/ContextMenu.qml
+++ b/components/ContextMenu.qml
@@ -1,21 +1,26 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
-Menu {
+Item {
     id: root
     property ListModel model
     property string selectedText: itemTextAt(selectedIndex)
     property string hoveredText: itemTextAt(hoveredIndex)
-    property int x
-    property int y
-    property bool visible
+    property list<Item> menuItems
+
 
+    property int selectedIndex
+    property int hoveredIndex
     // 'centerSelectedText' means that the menu will be positioned
     //  so that the selected text' top left corner will be at x, y.
     property bool centerSelectedText: true
 
     visible: false
+/*
+    property int x
+    property int y
+    property bool visible
     onMenuClosed: visible = false
     onModelChanged: if (Component.status === Component.Ready && model != undefined) rebuildMenu()
     Component.onCompleted: if (model != undefined) rebuildMenu()
@@ -49,4 +54,5 @@ Menu {
                 addMenuItem(model.get(j).text)
         }
     }
+*/
 }
diff --git a/components/Dial.qml b/components/Dial.qml
index 61a03347b..8b15852db 100644
--- a/components/Dial.qml
+++ b/components/Dial.qml
@@ -27,7 +27,7 @@
 import QtQuick 2.0
 
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 // jens: ContainsMouse breaks drag functionality
 
diff --git a/components/Frame.qml b/components/Frame.qml
index bc7de579f..883a79651 100644
--- a/components/Frame.qml
+++ b/components/Frame.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Item {
     default property alias data: content.data
diff --git a/components/GroupBox.qml b/components/GroupBox.qml
index 6837ab1ff..9bcb65d0b 100644
--- a/components/GroupBox.qml
+++ b/components/GroupBox.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Components.GroupBox {
     id: groupbox
diff --git a/components/MenuItem.qml b/components/MenuItem.qml
index 15abc4dc8..acd00bd40 100644
--- a/components/MenuItem.qml
+++ b/components/MenuItem.qml
@@ -1,4 +1,4 @@
-import QtQuick 1.1
+import QtQuick 2.0
 
 Item {
     property string text
diff --git a/components/ProgressBar.qml b/components/ProgressBar.qml
index 822c13f97..a64355a5e 100644
--- a/components/ProgressBar.qml
+++ b/components/ProgressBar.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Components.ProgressBar {
     id:progressbar
diff --git a/components/RadioButton.qml b/components/RadioButton.qml
index 56a2d227f..128d7821d 100644
--- a/components/RadioButton.qml
+++ b/components/RadioButton.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 // jb : Size should not depend on background, we should make it consistent
 
diff --git a/components/ScrollArea.qml b/components/ScrollArea.qml
index 53421729e..f8c4f9791 100644
--- a/components/ScrollArea.qml
+++ b/components/ScrollArea.qml
@@ -1,7 +1,7 @@
 import QtQuick 2.0
 import "custom" as Components
 import "private" as Private
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 FocusScope {
     id: root
diff --git a/components/ScrollBar.qml b/components/ScrollBar.qml
index 1fa0aa172..a36fdbdec 100644
--- a/components/ScrollBar.qml
+++ b/components/ScrollBar.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Item {
     id: scrollbar
diff --git a/components/Slider.qml b/components/Slider.qml
index 0994f7c25..0b6122335 100644
--- a/components/Slider.qml
+++ b/components/Slider.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 // jens: ContainsMouse breaks drag functionality
 
diff --git a/components/SpinBox.qml b/components/SpinBox.qml
index 4e6e84b73..05783b859 100644
--- a/components/SpinBox.qml
+++ b/components/SpinBox.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Components.SpinBox {
     id:spinbox
diff --git a/components/SplitterRow.qml b/components/SplitterRow.qml
index eb0fd17f4..972fdf06a 100644
--- a/components/SplitterRow.qml
+++ b/components/SplitterRow.qml
@@ -1,6 +1,6 @@
 import QtQuick 1.1
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 /*
 *
diff --git a/components/TabBar.qml b/components/TabBar.qml
index ad70fd9c9..f42413ec0 100644
--- a/components/TabBar.qml
+++ b/components/TabBar.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 
 Item {
diff --git a/components/TabFrame.qml b/components/TabFrame.qml
index 725bec918..4a48d4f96 100644
--- a/components/TabFrame.qml
+++ b/components/TabFrame.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Item {
     id: tabWidget
diff --git a/components/TableView.qml b/components/TableView.qml
index 257f370fa..95fc22f54 100644
--- a/components/TableView.qml
+++ b/components/TableView.qml
@@ -1,5 +1,5 @@
 import QtQuick 2.0
-import QtDesktop 0.1
+import QtDesktop 0.2
 import "private" as Private
 
 /*
diff --git a/components/TextArea.qml b/components/TextArea.qml
index 66c2ea14e..841b85182 100644
--- a/components/TextArea.qml
+++ b/components/TextArea.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 ScrollArea {
     id:area
diff --git a/components/TextField.qml b/components/TextField.qml
index e6950422a..efe866294 100644
--- a/components/TextField.qml
+++ b/components/TextField.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Components.TextField {
     id: textfield
diff --git a/components/ToolBar.qml b/components/ToolBar.qml
index f2ebc9d7b..6aa32bc39 100644
--- a/components/ToolBar.qml
+++ b/components/ToolBar.qml
@@ -1,7 +1,7 @@
 import QtQuick 2.0
 import "."
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 StyleItem {
     id: toolbar
diff --git a/components/ToolButton.qml b/components/ToolButton.qml
index 5d597a077..76044fd2e 100644
--- a/components/ToolButton.qml
+++ b/components/ToolButton.qml
@@ -1,6 +1,6 @@
 import QtQuick 2.0
 import "custom" as Components
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Components.Button {
     id:button
diff --git a/components/custom/Slider.qml b/components/custom/Slider.qml
index 67179a9bc..7cf76e85b 100644
--- a/components/custom/Slider.qml
+++ b/components/custom/Slider.qml
@@ -25,7 +25,7 @@
 ****************************************************************************/
 
 import QtQuick 2.0
-import QtDesktop 0.1
+import QtDesktop 0.2
 //import "../"
 
 Item {
diff --git a/components/custom/Splitter.qml b/components/custom/Splitter.qml
index 417a6b31c..40fa9eccd 100644
--- a/components/custom/Splitter.qml
+++ b/components/custom/Splitter.qml
@@ -1,5 +1,5 @@
 import QtQuick 1.1
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Splitter {
     id: root
diff --git a/components/private/ScrollAreaHelper.qml b/components/private/ScrollAreaHelper.qml
index 3ad43e742..8573ec32e 100644
--- a/components/private/ScrollAreaHelper.qml
+++ b/components/private/ScrollAreaHelper.qml
@@ -1,5 +1,5 @@
 import QtQuick 1.1
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 WheelArea {
     id: wheelarea
diff --git a/desktop.pro b/desktop.pro
index 34fcd3f20..d7cfec9c1 100644
--- a/desktop.pro
+++ b/desktop.pro
@@ -1,2 +1,2 @@
 TEMPLATE = subdirs
-SUBDIRS = components src qmldesktopviewer
+SUBDIRS = components src
diff --git a/examples/Browser.qml b/examples/Browser.qml
index 558fc01b4..404b15ef0 100644
--- a/examples/Browser.qml
+++ b/examples/Browser.qml
@@ -2,7 +2,7 @@
 import QtQuick 2.0
 =======
 import QtQuick 1.0
-import QtDesktop 0.1
+import QtDesktop 0.2
 >>>>>>> master
 import QtWebKit 1.0
 import "content"
diff --git a/examples/BrowserTab.qml b/examples/BrowserTab.qml
index c0564f9cc..65dabb09e 100644
--- a/examples/BrowserTab.qml
+++ b/examples/BrowserTab.qml
@@ -1,5 +1,5 @@
 import QtQuick 1.0
-import QtDesktop 0.1
+import QtDesktop 0.2
 import QtWebKit 1.0
 import "content"
 
diff --git a/examples/Gallery.qml b/examples/Gallery.qml
index 665bd5e56..26dc867d6 100644
--- a/examples/Gallery.qml
+++ b/examples/Gallery.qml
@@ -1,6 +1,7 @@
 import QtQuick 2.0
 //import "../components"
-import QtDesktop 0.1
+import QtQuick.Window 2.0
+import QtDesktop 0.2
 import "content"
 
 
@@ -44,12 +45,15 @@ Rectangle {
 
             width: 400
             height: 400
+            /*
             minimumWidth: 400
             minimumHeight: 400
             windowDecoration: true
             modal: modalCheck.checked
-            title: "child window"
+            */
+            windowTitle: "child window"
 
+/*
             MenuBar {
                 Menu {
                     text: "File"
@@ -87,6 +91,7 @@ Rectangle {
                     }
                 }
             }
+*/
 
             Rectangle {
                 color: syspal.window
diff --git a/examples/ModelView.qml b/examples/ModelView.qml
index a997399e8..3998192ff 100644
--- a/examples/ModelView.qml
+++ b/examples/ModelView.qml
@@ -1,5 +1,6 @@
 import QtQuick 2.0
-import QtDesktop 0.1
+import QtDesktop 0.2
+import QtQuick.XmlListModel 2.0
 
 Item {
     id: root
diff --git a/examples/SplitterGallery.qml b/examples/SplitterGallery.qml
index 43cfffa02..ab4bf53de 100644
--- a/examples/SplitterGallery.qml
+++ b/examples/SplitterGallery.qml
@@ -1,5 +1,5 @@
 import QtQuick 1.1
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Rectangle {
     width: 800
diff --git a/examples/TableViewGallery.qml b/examples/TableViewGallery.qml
index c199d50fd..20cf97ab9 100644
--- a/examples/TableViewGallery.qml
+++ b/examples/TableViewGallery.qml
@@ -1,5 +1,5 @@
 import QtQuick 1.0
-import QtDesktop 0.1
+import QtDesktop 0.2
 
 Rectangle {
 
diff --git a/examples/TopLevel.qml b/examples/TopLevel.qml
index f024083f1..dd0495c56 100644
--- a/examples/TopLevel.qml
+++ b/examples/TopLevel.qml
@@ -1,5 +1,5 @@
 import QtQuick 1.0
-import QtDesktop 0.1
+import QtDesktop 0.2
 import "content"
 
 Window {
diff --git a/examples/TopLevelBrowser.qml b/examples/TopLevelBrowser.qml
index bbefcc470..366ff4d70 100644
--- a/examples/TopLevelBrowser.qml
+++ b/examples/TopLevelBrowser.qml
@@ -1,5 +1,5 @@
 import QtQuick 1.0
-import QtDesktop 0.1
+import QtDesktop 0.2
 import "content"
 
 Window {
diff --git a/src/qstyleitem.cpp b/src/qstyleitem.cpp
index 6c82c1461..5f950951a 100644
--- a/src/qstyleitem.cpp
+++ b/src/qstyleitem.cpp
@@ -54,7 +54,7 @@
 
 QStyleItem::QStyleItem(QQuickPaintedItem *parent)
     : QQuickPaintedItem(parent),
-    m_dummywidget(0),
+    m_dummywidget(new QWidget),
     m_styleoption(0),
     m_type(Undefined),
     m_sunken(false),
@@ -862,6 +862,8 @@ void QStyleItem::setElementType(const QString &str)
     } else if (str == "scrollareacorner") {
         m_itemType = ScrollAreaCorner;
     }
+    if (!m_dummywidget)
+            m_dummywidget = new QWidget();
     if (m_dummywidget) {
         m_dummywidget->installEventFilter(this);
         m_dummywidget->setAttribute(Qt::WA_QuitOnClose, false); // dont keep app open
diff --git a/src/qstyleitem.h b/src/qstyleitem.h
index 5a5d4f40b..161b60fe2 100644
--- a/src/qstyleitem.h
+++ b/src/qstyleitem.h
@@ -40,7 +40,7 @@
 #ifndef STYLEWRAPPER_H
 #define STYLEWRAPPER_H
 
-#include <QtDeclarative/qquickpainteditem.h>
+#include <QtQuick/qquickpainteditem.h>
 //#include <QSGItem>
 #include <QtWidgets/QStyle>
 #include <QEvent>
diff --git a/src/qstyleplugin.cpp b/src/qstyleplugin.cpp
index c23ed701d..e1f748942 100644
--- a/src/qstyleplugin.cpp
+++ b/src/qstyleplugin.cpp
@@ -41,9 +41,6 @@
 #include "qstyleplugin.h"
 #include "qstyleitem.h"
 #include "qrangemodel.h"
-#include "qtmenu.h"
-#include "qtmenubar.h"
-#include "qwindowitem.h"
 #include "qdesktopitem.h"
 #include "qwheelarea.h"
 #include "qcursorarea.h"
@@ -83,24 +80,16 @@ public:
 void StylePlugin::registerTypes(const char *uri)
 {
     qDebug(uri);
-    qmlRegisterType<QWindowItem>(uri, 0, 1, "Window");
-    qmlRegisterType<QStyleItem>(uri, 0, 1, "StyleItem");
-    qmlRegisterType<QCursorArea>(uri, 0, 1, "CursorArea");
-    qmlRegisterType<QTooltipArea>(uri, 0, 1, "TooltipArea");
-    qmlRegisterType<QRangeModel>(uri, 0, 1, "RangeModel");
-    qmlRegisterType<QWheelArea>(uri, 0, 1, "WheelArea");
+    qmlRegisterType<QStyleItem>(uri, 0, 2, "StyleItem");
+    qmlRegisterType<QCursorArea>(uri, 0, 2, "CursorArea");
+    qmlRegisterType<QTooltipArea>(uri, 0, 2, "TooltipArea");
+    qmlRegisterType<QRangeModel>(uri, 0, 2, "RangeModel");
+    qmlRegisterType<QWheelArea>(uri, 0, 2, "WheelArea");
 
-    qmlRegisterType<QtMenu>(uri, 0, 1, "Menu");
-    qmlRegisterType<QtMenuBar>(uri, 0, 1, "MenuBar");
-    qmlRegisterType<QtMenuItem>(uri, 0, 1, "MenuItem");
-    qmlRegisterType<QtMenuSeparator>(uri, 0, 1, "Separator");
+    qmlRegisterType<QFileSystemModel>(uri, 0, 2, "FileSystemModel");
+    qmlRegisterType<QtSplitterBase>(uri, 0, 2, "Splitter");
 
-    qmlRegisterType<QFileSystemModel>(uri, 0, 1, "FileSystemModel");
-    qmlRegisterType<QtSplitterBase>(uri, 0, 1, "Splitter");
-    qmlRegisterType<QWindowItem>("QtQuick", 0, 1, "Window");
-
-    qmlRegisterUncreatableType<QtMenuBase>("uri", 0, 1, "NativeMenuBase", QLatin1String("Do not create objects of type NativeMenuBase"));
-    qmlRegisterUncreatableType<QDesktopItem>("QtQuick",2,0,"Desktop", QLatin1String("Do not create objects of type Desktop"));
+    qmlRegisterUncreatableType<QDesktopItem>(uri, 0,2,"Desktop", QLatin1String("Do not create objects of type Desktop"));
 }
 
 void StylePlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri)
diff --git a/src/qstyleplugin.h b/src/qstyleplugin.h
index 73c7a7e89..28a08b1b8 100644
--- a/src/qstyleplugin.h
+++ b/src/qstyleplugin.h
@@ -41,7 +41,6 @@
 #define STYLEPLUGIN_H
 
 #include <QDeclarativeExtensionPlugin>
-#include <QtScript/QScriptValue>
 #include <QtCore/QTimer>
 #include <QtWidgets/QFileSystemModel>
 #include "qdeclarativefolderlistmodel.h"
diff --git a/src/qtmenu.cpp b/src/qtmenu.cpp
deleted file mode 100644
index 1b91f6384..000000000
--- a/src/qtmenu.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project on Qt Labs.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-#include "qtmenu.h"
-#include "qdebug.h"
-#include <qguiapplication.h>
-#include <QtWidgets/qmenubar.h>
-
-#include "qtoplevelwindow.h"
-
-QtMenu::QtMenu(QObject *parent)
-    : QtMenuBase(parent),
-      dummy(0),
-      _selectedIndex(0),
-      _highlightedIndex(0)
-{
-    _qmenu = new QMenu(0);
-    connect(_qmenu, SIGNAL(aboutToHide()), this, SIGNAL(menuClosed()));
-}
-
-QtMenu::~QtMenu()
-{
-    delete _qmenu;
-}
-
-void QtMenu::setText(const QString &text)
-{
-    _qmenu->setTitle(text);
-}
-
-QString QtMenu::text() const
-{
-    return _qmenu->title();
-}
-
-void QtMenu::setSelectedIndex(int index)
-{
-    _selectedIndex = index;
-    QList<QAction *> actionList = _qmenu->actions();
-    if (_selectedIndex >= 0 && _selectedIndex < actionList.size())
-        _qmenu->setActiveAction(actionList[_selectedIndex]);
-    emit selectedIndexChanged();
-}
-
-void QtMenu::setHoveredIndex(int index)
-{
-    _highlightedIndex = index;
-    QList<QAction *> actionList = _qmenu->actions();
-    if (_highlightedIndex >= 0 && _highlightedIndex < actionList.size())
-        _qmenu->setActiveAction(actionList[_highlightedIndex]);
-    emit hoveredIndexChanged();
-}
-
-QDeclarativeListProperty<QtMenuBase> QtMenu::menuItems()
-{
-    return QDeclarativeListProperty<QtMenuBase>(this, 0, &QtMenu::append_qmenuItem);
-}
-
-void QtMenu::showPopup(qreal x, qreal y, int atActionIndex)
-{
-    if (_qmenu->isVisible())
-        return;
-
-    // If atActionIndex is valid, x and y is specified from the
-    // the position of the corresponding QAction:
-    QAction *atAction = 0;
-    if (atActionIndex >= 0 && atActionIndex < _qmenu->actions().size())
-        atAction = _qmenu->actions()[atActionIndex];
-
-    // x,y are in view coordinates, QMenu expects screen coordinates
-    // ### activeWindow hack
-    int menuBarHeight = 0;
-    QWindow *window = QGuiApplication::focusWindow();
-//    QWidget *window = QApplication::activeWindow();
-    QTopLevelWindow *tw = qobject_cast<QTopLevelWindow*>(window);
-    if (tw) {
-        QMenuBar *menuBar = tw->menuBar();
-        menuBarHeight = menuBar->height();
-    }
-
-    QPoint screenPosition = window->mapToGlobal(QPoint(x, y+menuBarHeight));
-
-    setHoveredIndex(_selectedIndex);
-    _qmenu->popup(screenPosition, atAction);
-}
-
-void QtMenu::hidePopup()
-{
-    _qmenu->close();
-}
-
-QAction* QtMenu::action()
-{
-    return _qmenu->menuAction();
-}
-
-Q_INVOKABLE void QtMenu::clearMenuItems()
-{
-    _qmenu->clear();
-    foreach (QtMenuBase *item, _qmenuItems) {
-        delete item;
-    }
-    _qmenuItems.clear();
-}
-
-void QtMenu::addMenuItem(const QString &text)
-{
-    QtMenuItem *menuItem = new QtMenuItem(this);
-    menuItem->setText(text);
-    _qmenuItems.append(menuItem);
-    _qmenu->addAction(menuItem->action());
-
-    connect(menuItem->action(), SIGNAL(triggered()), this, SLOT(emitSelected()));
-    connect(menuItem->action(), SIGNAL(hovered()), this, SLOT(emitHovered()));
-
-    if (_qmenu->actions().size() == 1)
-        // Inform QML that the selected action (0) now has changed contents:
-        emit selectedIndexChanged();
-}
-
-void QtMenu::emitSelected()
-{
-    QAction *act = qobject_cast<QAction *>(sender());
-    if (!act)
-        return;
-    _selectedIndex = _qmenu->actions().indexOf(act);
-    emit selectedIndexChanged();
-}
-
-void QtMenu::emitHovered()
-{
-    QAction *act = qobject_cast<QAction *>(sender());
-    if (!act)
-        return;
-    _highlightedIndex = _qmenu->actions().indexOf(act);
-    emit hoveredIndexChanged();
-}
-
-QString QtMenu::itemTextAt(int index) const
-{
-    QList<QAction *> actionList = _qmenu->actions();
-    if (index >= 0 && index < actionList.size())
-        return actionList[index]->text();
-    else
-        return "";
-}
-
-void QtMenu::append_qmenuItem(QDeclarativeListProperty<QtMenuBase> *list, QtMenuBase *menuItem)
-{
-    QtMenu *menu = qobject_cast<QtMenu *>(list->object);
-    if (menu) {
-        menuItem->setParent(menu);
-        menu->_qmenuItems.append(menuItem);
-        menu->qmenu()->addAction(menuItem->action());
-    }
-}
-
-
diff --git a/src/qtmenu.h b/src/qtmenu.h
deleted file mode 100644
index 6e4f82110..000000000
--- a/src/qtmenu.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project on Qt Labs.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-#ifndef QTMLMENU_H
-#define QTMLMENU_H
-
-#include <QtWidgets/qmenu.h>
-#include <QtDeclarative/qdeclarative.h>
-#include <QtDeclarative/QQuickItem>
-#include <QtDeclarative/QDeclarativeListProperty>
-#include "qtmenuitem.h"
-#include <QtDeclarative/QDeclarativeListProperty>
-#include "qtmenuitem.h"
-
-class QtMenu : public QtMenuBase
-{
-    Q_OBJECT
-    Q_PROPERTY(QString text READ text WRITE setText)
-    Q_PROPERTY(int selectedIndex READ selectedIndex WRITE setSelectedIndex NOTIFY selectedIndexChanged)
-    Q_PROPERTY(int hoveredIndex READ hoveredIndex WRITE setHoveredIndex NOTIFY hoveredIndexChanged)
-    Q_PROPERTY(QDeclarativeListProperty<QtMenuBase> menuItems READ menuItems)
-    Q_CLASSINFO("DefaultProperty", "menuItems")
-public:
-    QtMenu(QObject *parent = 0);
-    virtual ~QtMenu();
-
-    void setText(const QString &text);
-    QString text() const;
-
-    int selectedIndex() const { return _selectedIndex; }
-    void setSelectedIndex(int index);
-    int hoveredIndex() const { return _highlightedIndex; }
-    void setHoveredIndex(int index);
-
-    QDeclarativeListProperty<QtMenuBase> menuItems();
-    QMenu* qmenu() { return _qmenu; }
-
-    QAction* action();
-
-    Q_INVOKABLE int minimumWidth() const { return _qmenu->minimumWidth(); }
-    Q_INVOKABLE void setMinimumWidth(int w) { _qmenu->setMinimumWidth(w); }
-    Q_INVOKABLE void showPopup(qreal x, qreal y, int atActionIndex = -1);
-    Q_INVOKABLE void hidePopup();
-    Q_INVOKABLE void clearMenuItems();
-    Q_INVOKABLE void addMenuItem(const QString &text);
-    Q_INVOKABLE QString itemTextAt(int index) const;
-
-Q_SIGNALS:
-    void menuClosed();
-    void selectedIndexChanged();
-    void hoveredIndexChanged();
-
-private Q_SLOTS:
-    void emitSelected();
-    void emitHovered();
-
-private:
-    static void append_qmenuItem(QDeclarativeListProperty<QtMenuBase> *list, QtMenuBase *menuItem);
-
-private:
-    QWidget *dummy;
-    QMenu *_qmenu;
-    QList<QtMenuBase *> _qmenuItems;
-    int _selectedIndex;
-    int _highlightedIndex;
-};
-
-QML_DECLARE_TYPE(QtMenu)
-
-#endif // QTMLMENU_H
diff --git a/src/qtmenubar.cpp b/src/qtmenubar.cpp
deleted file mode 100644
index 921ec530f..000000000
--- a/src/qtmenubar.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTgall
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qtmenubar.h"
-#include "qwindowitem.h"
-
-#include <QtWidgets/QMenu>
-#include <QtWidgets/QMenuBar>
-
-QtMenuBar::QtMenuBar(QQuickItem *parent)
-    : QQuickItem(parent)/*, _menuBar(new QMenuBar)*/
-{
-    connect(this, SIGNAL(parentChanged()), this, SLOT(updateParent()));
-    setFlag(QQuickItem::ItemHasContents, false);
-}
-
-QtMenuBar::~QtMenuBar()
-{
-}
-
-QDeclarativeListProperty<QtMenu> QtMenuBar::menus()
-{
-    return QDeclarativeListProperty<QtMenu>(this, 0, &QtMenuBar::append_menu);
-}
-
-void QtMenuBar::updateParent()
-{
-    if (QWindowItem* window = qobject_cast<QWindowItem*>(parent()))
-        _menuBar = window->window()->menuBar();
-
-    //THIS IS WRONG... WE NEED TO DO THAT DIFFERENT!
-    _menuBar->clear();
-
-    foreach (QtMenu *menu, m_menus) {
-        _menuBar->addMenu(menu->qmenu());
-    }
-    //THIS IS WRONG... WE NEED TO DO THAT DIFFERENT!
-
-}
-
-void QtMenuBar::append_menu(QDeclarativeListProperty<QtMenu> *list, QtMenu *menu)
-{
-    QtMenuBar *menuBar = qobject_cast<QtMenuBar *>(list->object);
-    if (menuBar) {
-        menu->setParent(menuBar);
-        menuBar->m_menus.append(menu);
-        if (menuBar->_menuBar)
-            menuBar->_menuBar->addMenu(menu->qmenu());
-    }
-}
diff --git a/src/qtmenubar.h b/src/qtmenubar.h
deleted file mode 100644
index 66a3908bd..000000000
--- a/src/qtmenubar.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QTMENUBAR_H
-#define QTMENUBAR_H
-
-#include <QQuickItem>
-#include <QtGui>
-#include <QtWidgets/QMenu>
-#include <QtWidgets/QMenuBar>
-
-#include "qtmenu.h"
-
-class QtMenuBar: public QQuickItem
-{
-    Q_OBJECT
-
-    Q_PROPERTY(QDeclarativeListProperty<QtMenu> menus READ menus)
-    Q_CLASSINFO("DefaultProperty", "menus")
-public:
-    QtMenuBar(QQuickItem *parent = 0);
-    ~QtMenuBar();
-
-    QDeclarativeListProperty<QtMenu> menus();
-
-protected Q_SLOTS:
-    void updateParent();
-
-private:
-    static void append_menu(QDeclarativeListProperty<QtMenu> *list, QtMenu *menu);
-
-private:
-    QList<QtMenu *> m_menus;
-    QMenuBar *_menuBar;
-};
-
-#endif //QTMENUBAR_H
diff --git a/src/qtmenuitem.cpp b/src/qtmenuitem.cpp
deleted file mode 100644
index 34be067e5..000000000
--- a/src/qtmenuitem.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTgall
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qtmenuitem.h"
-
-void QtMenuBase::setIconSource(const QUrl &icon)
-{
-    _iconSource = icon;
-    if (_iconName.isEmpty())
-        action()->setIcon(QIcon(icon.toLocalFile()));
-    else
-        action()->setIcon(QIcon::fromTheme(_iconName, QIcon(_iconSource.toLocalFile())));
-
-    emit iconSourceChanged();
-}
-
-QUrl QtMenuBase::iconSource() const
-{
-    return _iconSource;
-}
-
-void QtMenuBase::setIconName(const QString &icon)
-{
-    _iconName = icon;
-    action()->setIcon(QIcon::fromTheme(_iconName, QIcon(_iconSource.toLocalFile())));
-
-    emit iconNameChanged();
-}
-
-QString QtMenuBase::iconName() const
-{
-    return _iconName;
-}
-
-QtMenuSeparator::QtMenuSeparator(QObject *parent)
-    : QtMenuBase(parent), _action(new QAction(this))
-{
-    _action->setSeparator(true);
-}
-
-QtMenuSeparator::~QtMenuSeparator()
-{
-}
-
-QAction * QtMenuSeparator::action()
-{
-    return _action;
-}
-
-QtMenuItem::QtMenuItem(QObject *parent)
-    : QtMenuBase(parent), _action(new QAction(this))
-{
-    connect(_action, SIGNAL(triggered()), this, SIGNAL(triggered()));
-    connect(_action, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool)));
-}
-
-QtMenuItem::~QtMenuItem()
-{
-}
-
-void QtMenuItem::setText(const QString &text)
-{
-    _action->setText(text);
-    emit textChanged();
-}
-
-void QtMenuItem::setShortcut(const QString &shortcut)
-{
-    _action->setShortcut(QKeySequence(shortcut));
-    emit shortcutChanged();
-}
-
-void QtMenuItem::setCheckable(bool checkable)
-{
-    _action->setCheckable(checkable);
-}
-
-void QtMenuItem::setChecked(bool checked)
-{
-    _action->setChecked(checked);
-}
-
-QString QtMenuItem::text() const
-{
-    return _action->text();
-}
-
-QString QtMenuItem::shortcut() const
-{
-    return _action->shortcut().toString();
-}
-
-bool QtMenuItem::checkable() const
-{
-    return _action->isCheckable();
-}
-
-bool QtMenuItem::checked() const
-{
-    return _action->isChecked();
-}
-
-QAction * QtMenuItem::action()
-{
-    return _action;
-}
diff --git a/src/qtmenuitem.h b/src/qtmenuitem.h
deleted file mode 100644
index f5860a031..000000000
--- a/src/qtmenuitem.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QTMENUITEM_H
-#define QTMENUITEM_H
-
-#include <QtCore/QObject>
-#include <QtWidgets/QAction>
-#include <QtCore/QUrl>
-
-class QtMenuBase: public QObject {
-    Q_OBJECT
-    Q_PROPERTY(QUrl iconSource READ iconSource WRITE setIconSource NOTIFY iconSourceChanged)
-    Q_PROPERTY(QString iconName READ iconName WRITE setIconName NOTIFY iconNameChanged)
-
-public:
-    QtMenuBase(QObject *parent = 0) : QObject(parent) {}
-    virtual QAction* action() = 0;
-
-    void setIconSource(const QUrl &icon);
-    QUrl iconSource() const;
-
-    void setIconName(const QString &icon);
-    QString iconName() const;
-
-Q_SIGNALS:
-    void iconSourceChanged();
-    void iconNameChanged();
-
-private:
-    QUrl _iconSource;
-    QString _iconName;
-};
-
-class QtMenuSeparator : public QtMenuBase
-{
-    Q_OBJECT
-public:
-    QtMenuSeparator(QObject *parent = 0);
-    ~QtMenuSeparator();
-    QAction* action();
-
-private:
-    QAction *_action;
-};
-
-class QtMenuItem: public QtMenuBase
-{
-    Q_OBJECT
-    Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged);
-    Q_PROPERTY(QString shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged)
-    Q_PROPERTY(bool checkable READ checkable WRITE setCheckable)
-    Q_PROPERTY(bool checked READ checked WRITE setChecked NOTIFY toggled)
-
-public:
-    QtMenuItem(QObject *parent = 0);
-    ~QtMenuItem();
-
-    void setText(const QString &text);
-    void setShortcut(const QString &shortcut);
-    void setCheckable(bool checkable);
-    void setChecked(bool checked);
-
-    QString text() const;
-    QString shortcut() const;
-    bool checkable() const;
-    bool checked() const;
-
-    QAction* action();
-
-Q_SIGNALS:
-    void triggered();
-    void textChanged();
-    void shortcutChanged();
-    void toggled(bool);
-
-private:
-    QAction *_action;
-};
-
-#endif //QTMENUITEM_H
diff --git a/src/qtoplevelwindow.cpp b/src/qtoplevelwindow.cpp
deleted file mode 100644
index d029e03ac..000000000
--- a/src/qtoplevelwindow.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-#include "qtoplevelwindow.h"
-
-#include <QtWidgets/QDesktopWidget>
-
-QTopLevelWindow::QTopLevelWindow()
-    : QMainWindow(), _view(new QQuickView), _positionIsDefined(false) {
-    setVisible(false);
-    //setCentralWidget(_view);
-    setAttribute(Qt::WA_DeleteOnClose);
-}
-
-QTopLevelWindow::~QTopLevelWindow()
-{
-    //we need this to break the parental loop of QWindowItem and QTopLevelWindow
-    //_view->scene()->setParent(0);
-}
-
-void QTopLevelWindow::registerChildWindow(QTopLevelWindow* child)
-{
-    _childWindows.insert(child);
-    child->setParent(this);
-}
-
-void QTopLevelWindow::hideChildWindows()
-{
-    foreach(QTopLevelWindow* child, _childWindows) {
-        child->hide();
-    }
-}
-
-void QTopLevelWindow::initPosition()
-{
-    if (!_positionIsDefined)
-        center();
-    foreach(QTopLevelWindow* child, _childWindows) {
-        child->initPosition();
-    }
-}
-
-void QTopLevelWindow::center()
-{
-    QPoint parentCenter;
-    if (parentWidget())
-        parentCenter = parentWidget()->geometry().center();
-    else
-        parentCenter = QDesktopWidget().screenGeometry().center();
-    QRect thisGeometry = geometry();
-    thisGeometry.moveCenter(parentCenter);
-    setGeometry(thisGeometry);
-}
-
-void QTopLevelWindow::move(int x, int y)
-{
-    qDebug("a %d, %d", x, y);
-    move(QPoint(x,y));
-}
-
-void QTopLevelWindow::move(const QPoint &point)
-{
-    _positionIsDefined = true;
-    QMainWindow::move(point);
-}
-
-void QTopLevelWindow::setWindowFlags(Qt::WindowFlags type)
-{
-    QWidget::setWindowFlags(type | Qt::Window);
-}
-
-bool QTopLevelWindow::event(QEvent *event) {
-    switch (event->type()) {
-        case QEvent::WindowStateChange:
-            emit windowStateChanged();
-            break;
-        case QEvent::Show:
-            emit visibilityChanged();
-            break;
-        case QEvent::Hide:
-            hideChildWindows();
-            emit visibilityChanged();
-            break;
-        case QEvent::ParentChange:
-            setAttribute(Qt::WA_DeleteOnClose, !parent());
-            break;
-        case QEvent::Resize: {
-            const QResizeEvent *resize = static_cast<const QResizeEvent *>(event);
-            emit sizeChanged(resize->size());
-            break;
-        }
-        default: break;
-    }
-    return QMainWindow::event(event);
-}
diff --git a/src/qtoplevelwindow.h b/src/qtoplevelwindow.h
deleted file mode 100644
index 143b576a3..000000000
--- a/src/qtoplevelwindow.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project on Qt Labs.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-#ifndef QTOPLEVELWINDOW_H
-#define QTOPLEVELWINDOW_H
-
-#include <QtDeclarative/QQuickView>
-#include <QtWidgets/QMainWindow>
-#include <QWindowStateChangeEvent>
-#include <QDebug>
-
-class QTopLevelWindow : public QMainWindow {
-    Q_OBJECT
-public:
-    QTopLevelWindow();
-    ~QTopLevelWindow();
-
-    //QGraphicsScene *scene() { return _view->scene(); }
-    QQuickView *view() { return _view; }
-
-
-    void registerChildWindow(QTopLevelWindow* child);
-    void hideChildWindows();
-    void initPosition();
-    void setWindowFlags(Qt::WindowFlags type);
-
-    void center();
-    void move(int x, int y);
-    void move(const QPoint &);
-
-protected:
-    virtual bool event(QEvent *event);
-
-Q_SIGNALS:
-    void visibilityChanged();
-    void windowStateChanged();
-    void sizeChanged(QSize newSize);
-
-private:
-    QQuickView *_view;
-    QSet<QTopLevelWindow*> _childWindows;
-    bool _positionIsDefined;
-
-};
-
-#endif // QTOPLEVELWINDOW_H
diff --git a/src/qtsplitterbase.h b/src/qtsplitterbase.h
index 726f2f043..c5507e2f1 100644
--- a/src/qtsplitterbase.h
+++ b/src/qtsplitterbase.h
@@ -2,6 +2,7 @@
 #define QTSPLITTERBASE_H
 
 #include <QtDeclarative>
+#include <QtQuick>
 
 
 class QtSplitterAttached : public QObject
diff --git a/src/qwheelarea.h b/src/qwheelarea.h
index 275e6abf6..f88832f60 100644
--- a/src/qwheelarea.h
+++ b/src/qwheelarea.h
@@ -29,7 +29,7 @@
 
 #include <QtGui/qevent.h>
 #include <QtWidgets/qgraphicssceneevent.h>
-#include <QtDeclarative/qquickitem.h>
+#include <QtQuick/qquickitem.h>
 
 
 class QWheelArea : public QQuickItem
diff --git a/src/qwindowitem.cpp b/src/qwindowitem.cpp
deleted file mode 100644
index ae38b00e1..000000000
--- a/src/qwindowitem.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTgall
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include "qwindowitem.h"
-#include "qtoplevelwindow.h"
-
-#include <QTimer>
-
-QWindowItem::QWindowItem(QTopLevelWindow* tlw)
-    : _window(tlw ? tlw : new QTopLevelWindow), _positionIsDefined(false), _delayedVisible(false), _x(0), _y(0)
-{
-    connect(_window, SIGNAL(visibilityChanged()), this, SIGNAL(visibleChanged()));
-    connect(_window, SIGNAL(windowStateChanged()), this, SIGNAL(windowStateChanged()));
-    connect(_window, SIGNAL(sizeChanged(QSize)), this, SLOT(updateSize(QSize)));
-
-    connect(qApp, SIGNAL(aboutToQuit()), _window, SLOT(close()));
-    view()->setResizeMode(QQuickView::SizeRootObjectToView);
-    _window->installEventFilter(this);
-}
-
-QWindowItem::~QWindowItem()
-{
-}
-
-bool QWindowItem::eventFilter(QObject *, QEvent *ev)
-{
-    switch(ev->type()) {
-    case QEvent::Resize:
-        emit sizeChanged();
-        emit widthChanged();
-        emit heightChanged();
-        break;
-
-    case QEvent::Move:
-        emit xChanged();
-        emit yChanged();
-        break;
-
-    default:
-        break;
-    }
-    return false;
-}
-
-void QWindowItem::registerChildWindow(QWindowItem *child) {
-    _window->registerChildWindow(child->window());
-}
-
-void QWindowItem::updateParentWindow() {
-    QQuickItem *p = parentItem();
-    while (p) {
-        if (QWindowItem *w = qobject_cast<QWindowItem*>(p)) {
-            w->registerChildWindow(this);
-            return;
-        }
-        p = p->parentItem();
-    }
-}
-
-void QWindowItem::componentComplete()
-{
-    updateParentWindow();
-//    _window->scene()->addItem(this);
-//    if (!_window->parentWidget())
-//        _window->initPosition();
-
-    QQuickItem::componentComplete();
-
-    if (_delayedVisible) {
-        setVisible(true);
-    }
-}
-
-void QWindowItem::updateSize(QSize newSize)
-{
-    QQuickItem::setSize(newSize);
-    emit sizeChanged();
-}
-
-void QWindowItem::center()
-{
-    _window->center();
-}
-
-void QWindowItem::setX(int x)
-{
-    _x = x;
-    _window->move(x, _y);
-}
-void QWindowItem::setY(int y)
-{
-    _y = y;
-    _window->move(_x, y);
-}
-
-void QWindowItem::moveWindow(int x,int y, int lx, int ly)
-{
-    QPoint p = _window->mapToGlobal(QPoint(x,y));
-    p.setX(p.x() - lx);
-    p.setY(p.y() - ly);
-    _window->move(p);
-}
-
-void QWindowItem::setHeight(int height)
-{
-    int menuBarHeight = _window->menuBar()->sizeHint().height();
-    if (menuBarHeight) menuBarHeight++;
-    _window->resize(width(), height+menuBarHeight);
-    QQuickItem::setHeight(_window->height());
-}
-
-void QWindowItem::setMinimumHeight(int height)
-{
-    int menuBarHeight = _window->menuBar()->sizeHint().height();
-    if (menuBarHeight) menuBarHeight++;
-    _window->setMinimumHeight(height+menuBarHeight);
-}
-
-void QWindowItem::setMaximumHeight(int height)
-{
-    int menuBarHeight = _window->menuBar()->sizeHint().height();
-    if (menuBarHeight) menuBarHeight++;
-    _window->setMaximumHeight(height+menuBarHeight);
-}
-
-void QWindowItem::setWidth(int width)
-{
-    _window->resize(width, height());
-    QQuickItem::setWidth(_window->width());
-}
-
-void QWindowItem::setTitle(QString title)
-{
-    _window->setWindowTitle(title);
-    emit titleChanged();
-}
-
-void QWindowItem::setVisible(bool visible)
-{
-    _window->setWindowFlags(_window->windowFlags() | Qt::Window);
-    if (visible) {
-        if (isComponentComplete()) {
-            // avoid flickering when showing the widget,
-            // by passing the event loop at least once
-            QTimer::singleShot(1, _window, SLOT(show()));
-        } else {
-            _delayedVisible = true;
-        }
-    } else {
-        _window->hide();
-    }
-}
-
-void QWindowItem::setWindowDecoration(bool s)
-{
-    bool visible = _window->isVisible();
-
-
-    _window->setWindowFlags(s ? _window->windowFlags() & ~Qt::FramelessWindowHint
-                              : _window->windowFlags() | Qt::FramelessWindowHint);
-    if (visible)
-        _window->show();
-    emit windowDecorationChanged();
-}
-
-void QWindowItem::setModal(bool modal)
-{
-    bool visible = _window->isVisible();
-    _window->hide();
-    _window->setWindowModality(modal ? Qt::WindowModal : Qt::NonModal);
-
-    if (modal) //this is a workaround for a bug in Qt? or in Unity?
-        _window->setWindowFlags(_window->windowFlags() | Qt::WindowStaysOnTopHint);
-    else
-        _window->setWindowFlags(_window->windowFlags() & ~Qt::WindowStaysOnTopHint );
-
-    if (visible)
-        _window->show();
-    emit modalityChanged();
-}
-
-void QWindowItem::setClose(bool close)
-{
-    if (close)
-        _window->close();
-}
-
-
diff --git a/src/qwindowitem.h b/src/qwindowitem.h
deleted file mode 100644
index 81e439b9b..000000000
--- a/src/qwindowitem.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project on Qt Labs.
-**
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions contained
-** in the Technology Preview License Agreement accompanying this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-****************************************************************************/
-
-#ifndef QWindowItem_H
-#define QWindowItem_H
-
-#include "qtoplevelwindow.h"
-
-#include <QtWidgets/QApplication>
-#include <QQuickItem>
-#include <QQuickView>
-#include <QtWidgets/QMenuBar>
-
-
-class QWindowItem : public QQuickItem
-{
-    Q_OBJECT
-    Q_PROPERTY(int x READ x WRITE setX NOTIFY xChanged)
-    Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged)
-    Q_PROPERTY(int height READ height WRITE setHeight NOTIFY sizeChanged)
-    Q_PROPERTY(int width READ width WRITE setWidth NOTIFY sizeChanged)
-    Q_PROPERTY(int minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged)
-    Q_PROPERTY(int maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged)
-    Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged)
-    Q_PROPERTY(int maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged)
-    Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
-    Q_PROPERTY(bool windowDecoration READ windowDecoration WRITE setWindowDecoration NOTIFY windowDecorationChanged)
-    Q_PROPERTY(bool modal READ modal WRITE setModal NOTIFY modalityChanged)
-    Q_PROPERTY(bool close READ close WRITE setClose)
-    Q_PROPERTY(Qt::WindowState windowState READ windowState WRITE setWindowState NOTIFY windowStateChanged)
-    Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
-
-public:
-    QWindowItem(QTopLevelWindow* QTopLevelWindow = 0);
-    ~QWindowItem();
-
-    QTopLevelWindow *window() { return _window; }
-    QQuickView *view() { return _window->view(); }
-    int x() { return _window->x(); }
-    int y() { return _window->y(); }
-    int height() { return _window->height(); }
-    int minimumHeight() { return _window->minimumHeight(); }
-    int maximumHeight() { return _window->maximumHeight(); }
-    int width() { return _window->width(); }
-    int minimumWidth() { return _window->minimumWidth(); }
-    int maximumWidth() { return _window->maximumWidth(); }
-    bool isVisible() { return _window->isVisible(); }
-    bool windowDecoration() { return !(_window->windowFlags() & Qt::FramelessWindowHint); }
-    Qt::WindowState windowState() { return static_cast<Qt::WindowState>(static_cast<int>(_window->windowState()) & ~Qt::WindowActive); }
-    QString title() const { return _window->windowTitle(); }
-    bool modal() { return _window->isModal(); }
-    bool close() { return false; } //we always return false here
-
-    void setX(int x);
-    void setY(int y);
-    void setHeight(int height);
-    void setMinimumHeight(int height);
-    void setMaximumHeight(int height);
-    void setWidth(int width);
-    void setMinimumWidth(int width) { _window->setMinimumWidth(width); }
-    void setMaximumWidth(int width) { _window->setMaximumWidth(width); }
-    void setVisible(bool visible);
-    void setWindowDecoration(bool s);
-    void setWindowState(Qt::WindowState state) { _window->setWindowState(state); }
-    void setTitle(QString title);
-    void setModal(bool modal);
-    void setClose(bool close);
-
-protected:
-    bool eventFilter(QObject *, QEvent *ev);
-    void updateParentWindow();
-    void registerChildWindow(QWindowItem* child);
-    void componentComplete();
-
-protected Q_SLOTS:
-    void updateSize(QSize newSize);
-    void center();
-    void moveWindow(int x, int y, int lx, int ly);
-
-Q_SIGNALS:
-    void sizeChanged();
-    void xChanged();
-    void yChanged();
-    void visibleChanged();
-    void windowDecorationChanged();
-    void windowStateChanged();
-    void minimumHeightChanged();
-    void minimumWidthChanged();
-    void maximumHeightChanged();
-    void maximumWidthChanged();
-    void titleChanged();
-    void modalityChanged();
-
-private:
-    QTopLevelWindow *_window;
-    bool _complete;
-    bool _positionIsDefined;
-    bool _delayedVisible;
-    int _x;
-    int _y;
-};
-
-#endif // QWindowItem_H
diff --git a/src/src.pro b/src/src.pro
index 6e82d68bc..e95a64d7b 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -9,33 +9,23 @@ DESTDIR = ../components/plugin
 OBJECTS_DIR = obj
 MOC_DIR = moc
 
-HEADERS += qtmenu.h \
-           qtmenubar.h \
-           qrangemodel_p.h \
+HEADERS += qrangemodel_p.h \
            qrangemodel.h \
            qstyleplugin.h \
            qdeclarativefolderlistmodel.h \
            qstyleitem.h \
            qwheelarea.h \
-           qtmenuitem.h \
-           qwindowitem.h \
            qdesktopitem.h \
-           qtoplevelwindow.h \
            qcursorarea.h \
            qtooltiparea.h \
     qtsplitterbase.h
 
-SOURCES += qtmenu.cpp \
-           qtmenubar.cpp \
-           qrangemodel.cpp \
+SOURCES += qrangemodel.cpp \
            qstyleplugin.cpp \
            qdeclarativefolderlistmodel.cpp \
            qstyleitem.cpp \
            qwheelarea.cpp \
-           qtmenuitem.cpp \
-           qwindowitem.cpp \
            qdesktopitem.cpp \
-           qtoplevelwindow.cpp \
            qcursorarea.cpp \
            qtooltiparea.cpp \
     qtsplitterbase.cpp
-- 
GitLab