aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/desktopinputselectioncontrol.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-07-21 12:12:07 +0200
committerMarc Mutz <marc.mutz@kdab.com>2017-07-21 21:35:56 +0000
commit2f03202810f6c264509fb704511301d51f282292 (patch)
tree59169c9f8a8d7fc8b8a91eec9c3f86e230297204 /src/virtualkeyboard/desktopinputselectioncontrol.cpp
parenta50b87870cf84e14eebfc2b00151342ec0d7e0f4 (diff)
Use QSharedPointer::create() more
Reduces allocations. This is the result of running the (experimental) clang-tidy check qt-modernize-qsharedpointer-create Discarded changes: none. Change-Id: I9ef1ccd46315f1bb8f3cc30a652f17c18b46232c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/virtualkeyboard/desktopinputselectioncontrol.cpp')
-rw-r--r--src/virtualkeyboard/desktopinputselectioncontrol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/virtualkeyboard/desktopinputselectioncontrol.cpp b/src/virtualkeyboard/desktopinputselectioncontrol.cpp
index 7ecf0f6c..bb2925b5 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()) {