diff --git a/dist/changes-5.9.1 b/dist/changes-5.9.1
new file mode 100644
index 0000000000000000000000000000000000000000..838d8eae6e82de2d04d7e4f957aa30940ad0c3ad
--- /dev/null
+++ b/dist/changes-5.9.1
@@ -0,0 +1,26 @@
+Qt 5.9.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.9.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.9 series is binary compatible with the 5.8.x series.
+Applications compiled for 5.8 will continue to run with 5.9.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+*                          Library                                         *
+****************************************************************************
+
+- This release contains mostly minor code improvements.
+- [QTBUG-60000] Fixed crash when closing a debugged application that uses
+  the virtual keyboard.
diff --git a/qtvirtualkeyboard.pro b/qtvirtualkeyboard.pro
index 8af5ef4ba1a673c9033ff093c6a497136af2078c..6394e32c031c9114d9f87ee73915150e0091591a 100644
--- a/qtvirtualkeyboard.pro
+++ b/qtvirtualkeyboard.pro
@@ -1,3 +1,4 @@
 OTHER_FILES += README.md
 requires(qtHaveModule(quick))
+requires(!winrt)
 load(qt_parts)
diff --git a/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnnclauseconverterjajp.cpp b/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnnclauseconverterjajp.cpp
index 13ae45fad4976da2689de6b1d02734826c654f4e..947f6cee92cd3a361f0c535a4bea3e85afed1241 100644
--- a/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnnclauseconverterjajp.cpp
+++ b/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnnclauseconverterjajp.cpp
@@ -93,12 +93,12 @@ public:
         /* check if the part of speech is valid */
         if (fzk == NULL) {
             if (connectible(stem.partOfSpeech.right, terminal.left)) {
-                clause.reset(new WnnClause(input, stem));
+                clause = QSharedPointer<WnnClause>::create(input, stem);
             }
         } else {
             if (connectible(stem.partOfSpeech.right, fzk->partOfSpeech.left)
                 && connectible(fzk->partOfSpeech.right, terminal.left)) {
-                clause.reset(new WnnClause(input, stem, *fzk));
+                clause = QSharedPointer<WnnClause>::create(input, stem, *fzk);
             }
         }
         if (clause == NULL) {
diff --git a/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnndictionary.cpp b/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnndictionary.cpp
index 2a8aad86282f4b1777141d79f55455a2e94035a2..1063fd9a08672c5f775e766dad4761fd2fe66539 100644
--- a/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnndictionary.cpp
+++ b/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnndictionary.cpp
@@ -879,7 +879,7 @@ QSharedPointer<WnnWord> OpenWnnDictionary::getNextWord(int length)
     /* Get the result from fixed dictionary */
     int res = d->getNextWord(length);
     if (res > 0)
-        return QSharedPointer<WnnWord>(new WnnWord(d->getCandidate(), d->getStroke(), WnnPOS(d->getLeftPartOfSpeech(), d->getRightPartOfSpeech()), d->getFrequency()));
+        return QSharedPointer<WnnWord>::create(d->getCandidate(), d->getStroke(), WnnPOS(d->getLeftPartOfSpeech(), d->getRightPartOfSpeech()), d->getFrequency());
     return QSharedPointer<WnnWord>();
 }
 
diff --git a/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnnenginejajp.cpp b/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnnenginejajp.cpp
index dbcfb0cda6f8ca96bd2d54acc2c24f1370c48a68..dbcb7c37a83a2a9ae45fe330279382e37ac56e1c 100644
--- a/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnnenginejajp.cpp
+++ b/src/virtualkeyboard/3rdparty/openwnn/wnnEngine/openwnnenginejajp.cpp
@@ -115,7 +115,7 @@ public:
             if (!convResult.isEmpty()) {
                 for (QList<WnnClause>::ConstIterator it = convResult.constBegin();
                      it != convResult.constEnd(); it++) {
-                    addCandidate(QSharedPointer<WnnWord>(new WnnWord(*it)));
+                    addCandidate(QSharedPointer<WnnWord>::create(*it));
                 }
             }
             /* end of candidates by single clause conversion */
@@ -128,7 +128,7 @@ public:
 
             for (QList<WnnWord>::ConstIterator it = addCandidateList.constBegin();
                  it != addCandidateList.constEnd(); it++) {
-                addCandidate(QSharedPointer<WnnWord>(new WnnWord(*it)));
+                addCandidate(QSharedPointer<WnnWord>::create(*it));
             }
 
             mGetCandidateFrom = 3;
@@ -282,7 +282,7 @@ int OpenWnnEngineJAJP::convert(ComposingText &text)
         if (headCandidates.isEmpty()) {
             return 0;
         }
-        head.reset(new WnnClause(input, headCandidates.first()));
+        head = QSharedPointer<WnnClause>::create(input, headCandidates.first());
 
         /* set the rest of input string */
         input = text.toString(ComposingText::LAYER1, cursor, text.size(ComposingText::LAYER1) - 1);
@@ -296,7 +296,7 @@ int OpenWnnEngineJAJP::convert(ComposingText &text)
         sentence = d->mClauseConverter.consecutiveClauseConvert(input);
     }
     if (!head.isNull()) {
-        sentence.reset(new WnnSentence(*head, sentence.data()));
+        sentence = QSharedPointer<WnnSentence>::create(*head, sentence.data());
     }
     if (sentence.isNull()) {
         return 0;
@@ -356,7 +356,7 @@ bool OpenWnnEngineJAJP::learn(WnnWord &word)
         }
     } else {
         ret = dict.learnWord(word, d->mPreviousWord.data());
-        d->mPreviousWord.reset(new WnnWord(word));
+        d->mPreviousWord = QSharedPointer<WnnWord>::create(word);
         d->mClauseConverter.setDictionary(&dict);
     }
 
diff --git a/src/virtualkeyboard/content/layouts/da_DK/handwriting.qml b/src/virtualkeyboard/content/layouts/da_DK/handwriting.qml
index 0de55c64b55a53d544b4d0770b9ee2141a81767c..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/da_DK/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/da_DK/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/content/layouts/de_DE/handwriting.qml b/src/virtualkeyboard/content/layouts/de_DE/handwriting.qml
index 0de55c64b55a53d544b4d0770b9ee2141a81767c..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/de_DE/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/de_DE/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/content/layouts/en_GB/handwriting.qml b/src/virtualkeyboard/content/layouts/en_GB/handwriting.qml
index b5baceb3bead152f65e254dff0658dd4afa7f6a7..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/en_GB/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/en_GB/handwriting.qml
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
 ** Contact: https://www.qt.io/licensing/
 **
 ** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
diff --git a/src/virtualkeyboard/content/layouts/es_ES/handwriting.qml b/src/virtualkeyboard/content/layouts/es_ES/handwriting.qml
index 162079d60b04044ee07fbd2e936a8f381a5811ec..0b9291625906a11543a682505132504cb9ceb1e6 100644
--- a/src/virtualkeyboard/content/layouts/es_ES/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/es_ES/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml b/src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml
index 0de55c64b55a53d544b4d0770b9ee2141a81767c..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml b/src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml
index 0de55c64b55a53d544b4d0770b9ee2141a81767c..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/content/layouts/it_IT/handwriting.qml b/src/virtualkeyboard/content/layouts/it_IT/handwriting.qml
index 0de55c64b55a53d544b4d0770b9ee2141a81767c..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/it_IT/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/it_IT/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml b/src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml
index 0de55c64b55a53d544b4d0770b9ee2141a81767c..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml b/src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml
index 0de55c64b55a53d544b4d0770b9ee2141a81767c..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml b/src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml
index 0de55c64b55a53d544b4d0770b9ee2141a81767c..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml b/src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml
index 0de55c64b55a53d544b4d0770b9ee2141a81767c..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml b/src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml
index 0de55c64b55a53d544b4d0770b9ee2141a81767c..d42de535320b197c4b7da5a4694f9c599d9d61c7 100644
--- a/src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml
+++ b/src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml
@@ -1,23 +1,31 @@
-/******************************************************************************
+/****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
 **
-** This file is part of the Qt Virtual Keyboard module.
-**
-** $QT_BEGIN_LICENSE:COMM$
+** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
 **
+** $QT_BEGIN_LICENSE:GPL$
 ** Commercial License Usage
 ** Licensees holding valid commercial Qt licenses may use this file in
 ** accordance with the commercial license agreement provided with the
 ** Software or, alternatively, in accordance with the terms contained in
 ** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 **
 ** $QT_END_LICENSE$
 **
-******************************************************************************/
+****************************************************************************/
 
 import QtQuick 2.0
 import QtQuick.Layouts 1.0
diff --git a/src/virtualkeyboard/desktopinputselectioncontrol.cpp b/src/virtualkeyboard/desktopinputselectioncontrol.cpp
index 7ecf0f6cb416ed6fcea3c8ce983a77565403be84..bb2925b563adbf397c85491f83de5740a96125b2 100644
--- a/src/virtualkeyboard/desktopinputselectioncontrol.cpp
+++ b/src/virtualkeyboard/desktopinputselectioncontrol.cpp
@@ -176,8 +176,8 @@ void DesktopInputSelectionControl::createHandles()
         Settings *settings = Settings::instance();
         connect(settings, &Settings::styleChanged, this, &DesktopInputSelectionControl::reloadGraphics);
 
-        m_anchorSelectionHandle.reset(new InputSelectionHandle(this, focusWindow));
-        m_cursorSelectionHandle.reset(new InputSelectionHandle(this, focusWindow));
+        m_anchorSelectionHandle = QSharedPointer<InputSelectionHandle>::create(this, focusWindow);
+        m_cursorSelectionHandle = QSharedPointer<InputSelectionHandle>::create(this, focusWindow);
 
         reloadGraphics();
         if (QCoreApplication *app = QCoreApplication::instance()) {
diff --git a/src/virtualkeyboard/styles/styles.qrc b/src/virtualkeyboard/styles/styles.qrc
index 39ca357b535649a6ed12162e5f3e9ed20311febe..819d4771acab6647d5a2b3206e317e7943fa31b0 100644
--- a/src/virtualkeyboard/styles/styles.qrc
+++ b/src/virtualkeyboard/styles/styles.qrc
@@ -4,7 +4,6 @@
         <file>KeyIcon.qml</file>
         <file>KeyPanel.qml</file>
         <file>SelectionListItem.qml</file>
-        <file>qmldir</file>
         <file>TraceInputKeyPanel.qml</file>
         <file>TraceCanvas.qml</file>
         <file>TraceUtils.js</file>