Merge lp:~osomon/webbrowser-app/remove-qquickshortcut-source into lp:webbrowser-app/staging
- remove-qquickshortcut-source
- Merge into staging
Proposed by
Olivier Tilloy
Status: | Merged |
---|---|
Approved by: | Florian Boucault |
Approved revision: | 1644 |
Merged at revision: | 1643 |
Proposed branch: | lp:~osomon/webbrowser-app/remove-qquickshortcut-source |
Merge into: | lp:webbrowser-app/staging |
Diff against target: |
535 lines (+9/-406) 9 files modified
README (+1/-1) debian/control (+2/-3) src/app/CMakeLists.txt (+1/-3) src/app/browserapplication.cpp (+1/-3) src/app/qquickshortcut.cpp (+0/-283) src/app/qquickshortcut_p.h (+0/-109) src/app/webbrowser/Browser.qml (+1/-1) src/app/webbrowser/webbrowser-app.qml (+1/-1) src/app/webcontainer/WebApp.qml (+2/-2) |
To merge this branch: | bzr merge lp:~osomon/webbrowser-app/remove-qquickshortcut-source |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phablet Team | Pending | ||
Review via email: mp+321882@code.launchpad.net |
Commit message
Use the Shortcut QML type provided by QtQuick 2.5 instead of embedding a source copy.
This is okay now since the lowest target is xenial+overlay, which has Qt 5.6.
Description of the change
To post a comment you must log in.
- 1644. By Olivier Tilloy
-
Updated README.
Revision history for this message
Florian Boucault (fboucault) wrote : | # |
Revision history for this message
Olivier Tilloy (osomon) wrote : | # |
The QML unit tests don't test keyboard shortcuts (they do test key presses, but no Shortcut item is involved). So the build dependency doesn't need to be bumped.
This will change once the qmltests branch lands though.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'README' | |||
2 | --- README 2016-03-15 16:03:19 +0000 | |||
3 | +++ README 2017-04-05 06:09:00 +0000 | |||
4 | @@ -1,6 +1,6 @@ | |||
5 | 1 | webbrowser-app is a lightweight web browser tailored for Ubuntu, | 1 | webbrowser-app is a lightweight web browser tailored for Ubuntu, |
6 | 2 | based on the Oxide web engine and using the Ubuntu UI components. | 2 | based on the Oxide web engine and using the Ubuntu UI components. |
8 | 3 | It requires Qt 5.4 to build and run. | 3 | It requires Qt 5.5 to build and run. |
9 | 4 | 4 | ||
10 | 5 | 5 | ||
11 | 6 | = Building = | 6 | = Building = |
12 | 7 | 7 | ||
13 | === modified file 'debian/control' | |||
14 | --- debian/control 2017-03-07 20:13:27 +0000 | |||
15 | +++ debian/control 2017-04-05 06:09:00 +0000 | |||
16 | @@ -25,7 +25,6 @@ | |||
17 | 25 | qt5-default, | 25 | qt5-default, |
18 | 26 | qtbase5-dev (>= 5.4), | 26 | qtbase5-dev (>= 5.4), |
19 | 27 | qtbase5-dev-tools, | 27 | qtbase5-dev-tools, |
20 | 28 | qtbase5-private-dev, | ||
21 | 29 | qtdeclarative5-dev, | 28 | qtdeclarative5-dev, |
22 | 30 | qtdeclarative5-ubuntu-ui-extras0.2, | 29 | qtdeclarative5-ubuntu-ui-extras0.2, |
23 | 31 | qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3), | 30 | qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3), |
24 | @@ -48,7 +47,7 @@ | |||
25 | 48 | libqt5sql5-sqlite, | 47 | libqt5sql5-sqlite, |
26 | 49 | qml-module-qt-labs-folderlistmodel, | 48 | qml-module-qt-labs-folderlistmodel, |
27 | 50 | qml-module-qt-labs-settings, | 49 | qml-module-qt-labs-settings, |
29 | 51 | qml-module-qtquick2 (>= 5.4), | 50 | qml-module-qtquick2 (>= 5.5), |
30 | 52 | qml-module-qtquick-layouts, | 51 | qml-module-qtquick-layouts, |
31 | 53 | qml-module-qtquick-window2 (>= 5.3), | 52 | qml-module-qtquick-window2 (>= 5.3), |
32 | 54 | qml-module-qtsysteminfo, | 53 | qml-module-qtsysteminfo, |
33 | @@ -75,7 +74,7 @@ | |||
34 | 75 | fonts-liberation, | 74 | fonts-liberation, |
35 | 76 | liboxideqt-qmlplugin (>= 1.19), | 75 | liboxideqt-qmlplugin (>= 1.19), |
36 | 77 | libqt5sql5-sqlite, | 76 | libqt5sql5-sqlite, |
38 | 78 | qml-module-qtquick2 (>= 5.4), | 77 | qml-module-qtquick2 (>= 5.5), |
39 | 79 | qml-module-qtquick-window2 (>= 5.3), | 78 | qml-module-qtquick-window2 (>= 5.3), |
40 | 80 | qml-module-ubuntu-onlineaccounts, | 79 | qml-module-ubuntu-onlineaccounts, |
41 | 81 | qml-module-ubuntu-web (= ${binary:Version}), | 80 | qml-module-ubuntu-web (= ${binary:Version}), |
42 | 82 | 81 | ||
43 | === modified file 'src/app/CMakeLists.txt' | |||
44 | --- src/app/CMakeLists.txt 2016-10-31 10:53:51 +0000 | |||
45 | +++ src/app/CMakeLists.txt 2017-04-05 06:09:00 +0000 | |||
46 | @@ -24,13 +24,11 @@ | |||
47 | 24 | mime-database.cpp | 24 | mime-database.cpp |
48 | 25 | session-storage.cpp | 25 | session-storage.cpp |
49 | 26 | single-instance-manager.cpp | 26 | single-instance-manager.cpp |
50 | 27 | qquickshortcut.cpp | ||
51 | 28 | ) | 27 | ) |
52 | 29 | 28 | ||
53 | 30 | add_library(${COMMONLIB} STATIC ${COMMONLIB_SRC}) | 29 | add_library(${COMMONLIB} STATIC ${COMMONLIB_SRC}) |
54 | 31 | 30 | ||
57 | 32 | include_directories(${LIBAPPARMOR_INCLUDE_DIRS} | 31 | include_directories(${LIBAPPARMOR_INCLUDE_DIRS}) |
56 | 33 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS}) | ||
58 | 34 | target_link_libraries(${COMMONLIB} | 32 | target_link_libraries(${COMMONLIB} |
59 | 35 | Qt5::Core | 33 | Qt5::Core |
60 | 36 | Qt5::Gui | 34 | Qt5::Gui |
61 | 37 | 35 | ||
62 | === modified file 'src/app/browserapplication.cpp' | |||
63 | --- src/app/browserapplication.cpp 2016-10-31 10:53:51 +0000 | |||
64 | +++ src/app/browserapplication.cpp 2017-04-05 06:09:00 +0000 | |||
65 | @@ -1,5 +1,5 @@ | |||
66 | 1 | /* | 1 | /* |
68 | 2 | * Copyright 2013-2016 Canonical Ltd. | 2 | * Copyright 2013-2017 Canonical Ltd. |
69 | 3 | * | 3 | * |
70 | 4 | * This file is part of webbrowser-app. | 4 | * This file is part of webbrowser-app. |
71 | 5 | * | 5 | * |
72 | @@ -38,7 +38,6 @@ | |||
73 | 38 | #include "favicon-fetcher.h" | 38 | #include "favicon-fetcher.h" |
74 | 39 | #include "meminfo.h" | 39 | #include "meminfo.h" |
75 | 40 | #include "mime-database.h" | 40 | #include "mime-database.h" |
76 | 41 | #include "qquickshortcut_p.h" | ||
77 | 42 | #include "session-storage.h" | 41 | #include "session-storage.h" |
78 | 43 | 42 | ||
79 | 44 | BrowserApplication::BrowserApplication(int& argc, char** argv) | 43 | BrowserApplication::BrowserApplication(int& argc, char** argv) |
80 | @@ -176,7 +175,6 @@ | |||
81 | 176 | qmlRegisterSingletonType<MemInfo>(uri, 0, 1, "MemInfo", MemInfo_singleton_factory); | 175 | qmlRegisterSingletonType<MemInfo>(uri, 0, 1, "MemInfo", MemInfo_singleton_factory); |
82 | 177 | qmlRegisterSingletonType<MimeDatabase>(uri, 0, 1, "MimeDatabase", MimeDatabase_singleton_factory); | 176 | qmlRegisterSingletonType<MimeDatabase>(uri, 0, 1, "MimeDatabase", MimeDatabase_singleton_factory); |
83 | 178 | qmlRegisterType<SessionStorage>(uri, 0, 1, "SessionStorage"); | 177 | qmlRegisterType<SessionStorage>(uri, 0, 1, "SessionStorage"); |
84 | 179 | qmlRegisterType<QQuickShortcut>(uri, 0, 1, "Shortcut"); | ||
85 | 180 | 178 | ||
86 | 181 | m_engine = new QQmlEngine; | 179 | m_engine = new QQmlEngine; |
87 | 182 | connect(m_engine, SIGNAL(quit()), SLOT(quit())); | 180 | connect(m_engine, SIGNAL(quit()), SLOT(quit())); |
88 | 183 | 181 | ||
89 | === removed file 'src/app/qquickshortcut.cpp' | |||
90 | --- src/app/qquickshortcut.cpp 2016-03-29 11:01:18 +0000 | |||
91 | +++ src/app/qquickshortcut.cpp 1970-01-01 00:00:00 +0000 | |||
92 | @@ -1,283 +0,0 @@ | |||
93 | 1 | /**************************************************************************** | ||
94 | 2 | ** | ||
95 | 3 | ** Copyright (C) 2015 The Qt Company Ltd. | ||
96 | 4 | ** Contact: http://www.qt.io/licensing/ | ||
97 | 5 | ** | ||
98 | 6 | ** This file is part of the QtQuick module of the Qt Toolkit. | ||
99 | 7 | ** | ||
100 | 8 | ** $QT_BEGIN_LICENSE:LGPL21$ | ||
101 | 9 | ** Commercial License Usage | ||
102 | 10 | ** Licensees holding valid commercial Qt licenses may use this file in | ||
103 | 11 | ** accordance with the commercial license agreement provided with the | ||
104 | 12 | ** Software or, alternatively, in accordance with the terms contained in | ||
105 | 13 | ** a written agreement between you and The Qt Company. For licensing terms | ||
106 | 14 | ** and conditions see http://www.qt.io/terms-conditions. For further | ||
107 | 15 | ** information use the contact form at http://www.qt.io/contact-us. | ||
108 | 16 | ** | ||
109 | 17 | ** GNU Lesser General Public License Usage | ||
110 | 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | ||
111 | 19 | ** General Public License version 2.1 or version 3 as published by the Free | ||
112 | 20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and | ||
113 | 21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the | ||
114 | 22 | ** following information to ensure the GNU Lesser General Public License | ||
115 | 23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and | ||
116 | 24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
117 | 25 | ** | ||
118 | 26 | ** As a special exception, The Qt Company gives you certain additional | ||
119 | 27 | ** rights. These rights are described in The Qt Company LGPL Exception | ||
120 | 28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
121 | 29 | ** | ||
122 | 30 | ** $QT_END_LICENSE$ | ||
123 | 31 | ** | ||
124 | 32 | ****************************************************************************/ | ||
125 | 33 | |||
126 | 34 | #include "qquickshortcut_p.h" | ||
127 | 35 | |||
128 | 36 | #include <QtQuick/qquickitem.h> | ||
129 | 37 | #include <QtQuick/qquickwindow.h> | ||
130 | 38 | #include <QtGui/private/qguiapplication_p.h> | ||
131 | 39 | |||
132 | 40 | QT_BEGIN_NAMESPACE | ||
133 | 41 | |||
134 | 42 | /*! | ||
135 | 43 | \qmltype Shortcut | ||
136 | 44 | \instantiates QQuickShortcut | ||
137 | 45 | \inqmlmodule QtQuick | ||
138 | 46 | \since 5.5 | ||
139 | 47 | \ingroup qtquick-input | ||
140 | 48 | \brief Provides keyboard shortcuts | ||
141 | 49 | |||
142 | 50 | The Shortcut type provides a way of handling keyboard shortcuts. The shortcut can | ||
143 | 51 | be set to one of the \l{QKeySequence::StandardKey}{standard keyboard shortcuts}, | ||
144 | 52 | or it can be described with a string containing a sequence of up to four key | ||
145 | 53 | presses that are needed to \l{Shortcut::activated}{activate} the shortcut. | ||
146 | 54 | |||
147 | 55 | \qml | ||
148 | 56 | Item { | ||
149 | 57 | id: view | ||
150 | 58 | |||
151 | 59 | property int currentIndex | ||
152 | 60 | |||
153 | 61 | Shortcut { | ||
154 | 62 | sequence: StandardKey.NextChild | ||
155 | 63 | onActivated: view.currentIndex++ | ||
156 | 64 | } | ||
157 | 65 | } | ||
158 | 66 | \endqml | ||
159 | 67 | |||
160 | 68 | \sa Keys | ||
161 | 69 | */ | ||
162 | 70 | |||
163 | 71 | /*! \qmlsignal QtQuick::Shortcut::activated() | ||
164 | 72 | |||
165 | 73 | This signal is emitted when the shortcut is activated. | ||
166 | 74 | |||
167 | 75 | The corresponding handler is \c onActivated. | ||
168 | 76 | */ | ||
169 | 77 | |||
170 | 78 | /*! \qmlsignal QtQuick::Shortcut::activatedAmbiguously() | ||
171 | 79 | |||
172 | 80 | This signal is emitted when the shortcut is activated ambigously, | ||
173 | 81 | meaning that it matches the start of more than one shortcut. | ||
174 | 82 | |||
175 | 83 | The corresponding handler is \c onActivatedAmbiguously. | ||
176 | 84 | */ | ||
177 | 85 | |||
178 | 86 | QQuickShortcut::QQuickShortcut(QObject *parent) : QObject(parent), m_id(0), | ||
179 | 87 | m_enabled(true), m_completed(false), m_autorepeat(true), m_context(Qt::WindowShortcut) | ||
180 | 88 | { | ||
181 | 89 | } | ||
182 | 90 | |||
183 | 91 | QQuickShortcut::~QQuickShortcut() | ||
184 | 92 | { | ||
185 | 93 | ungrabShortcut(); | ||
186 | 94 | } | ||
187 | 95 | |||
188 | 96 | /*! | ||
189 | 97 | \qmlproperty keysequence QtQuick::Shortcut::sequence | ||
190 | 98 | |||
191 | 99 | This property holds the shortcut's key sequence. The key sequence can be set | ||
192 | 100 | to one of the \l{QKeySequence::StandardKey}{standard keyboard shortcuts}, or | ||
193 | 101 | it can be described with a string containing a sequence of up to four key | ||
194 | 102 | presses that are needed to \l{Shortcut::activated}{activate} the shortcut. | ||
195 | 103 | |||
196 | 104 | The default value is an empty key sequence. | ||
197 | 105 | |||
198 | 106 | \qml | ||
199 | 107 | Shortcut { | ||
200 | 108 | sequence: "Ctrl+E,Ctrl+W" | ||
201 | 109 | onActivated: edit.wrapMode = TextEdit.Wrap | ||
202 | 110 | } | ||
203 | 111 | \endqml | ||
204 | 112 | */ | ||
205 | 113 | QVariant QQuickShortcut::sequence() const | ||
206 | 114 | { | ||
207 | 115 | return m_sequence; | ||
208 | 116 | } | ||
209 | 117 | |||
210 | 118 | void QQuickShortcut::setSequence(const QVariant &sequence) | ||
211 | 119 | { | ||
212 | 120 | if (sequence == m_sequence) | ||
213 | 121 | return; | ||
214 | 122 | |||
215 | 123 | QKeySequence shortcut; | ||
216 | 124 | if (sequence.type() == QVariant::Int) | ||
217 | 125 | shortcut = QKeySequence(static_cast<QKeySequence::StandardKey>(sequence.toInt())); | ||
218 | 126 | else | ||
219 | 127 | shortcut = QKeySequence::fromString(sequence.toString()); | ||
220 | 128 | |||
221 | 129 | grabShortcut(shortcut, m_context); | ||
222 | 130 | |||
223 | 131 | m_sequence = sequence; | ||
224 | 132 | m_shortcut = shortcut; | ||
225 | 133 | emit sequenceChanged(); | ||
226 | 134 | } | ||
227 | 135 | |||
228 | 136 | /*! | ||
229 | 137 | \qmlproperty bool QtQuick::Shortcut::enabled | ||
230 | 138 | |||
231 | 139 | This property holds whether the shortcut is enabled. | ||
232 | 140 | |||
233 | 141 | The default value is \c true. | ||
234 | 142 | */ | ||
235 | 143 | bool QQuickShortcut::isEnabled() const | ||
236 | 144 | { | ||
237 | 145 | return m_enabled; | ||
238 | 146 | } | ||
239 | 147 | |||
240 | 148 | void QQuickShortcut::setEnabled(bool enabled) | ||
241 | 149 | { | ||
242 | 150 | if (enabled == m_enabled) | ||
243 | 151 | return; | ||
244 | 152 | |||
245 | 153 | if (m_id) | ||
246 | 154 | QGuiApplicationPrivate::instance()->shortcutMap.setShortcutEnabled(enabled, m_id, this); | ||
247 | 155 | |||
248 | 156 | m_enabled = enabled; | ||
249 | 157 | emit enabledChanged(); | ||
250 | 158 | } | ||
251 | 159 | |||
252 | 160 | /*! | ||
253 | 161 | \qmlproperty bool QtQuick::Shortcut::autoRepeat | ||
254 | 162 | |||
255 | 163 | This property holds whether the shortcut can auto repeat. | ||
256 | 164 | |||
257 | 165 | The default value is \c true. | ||
258 | 166 | */ | ||
259 | 167 | bool QQuickShortcut::autoRepeat() const | ||
260 | 168 | { | ||
261 | 169 | return m_autorepeat; | ||
262 | 170 | } | ||
263 | 171 | |||
264 | 172 | void QQuickShortcut::setAutoRepeat(bool repeat) | ||
265 | 173 | { | ||
266 | 174 | if (repeat == m_autorepeat) | ||
267 | 175 | return; | ||
268 | 176 | |||
269 | 177 | if (m_id) | ||
270 | 178 | QGuiApplicationPrivate::instance()->shortcutMap.setShortcutAutoRepeat(repeat, m_id, this); | ||
271 | 179 | |||
272 | 180 | m_autorepeat = repeat; | ||
273 | 181 | emit autoRepeatChanged(); | ||
274 | 182 | } | ||
275 | 183 | |||
276 | 184 | /*! | ||
277 | 185 | \qmlproperty enumeration QtQuick::Shortcut::context | ||
278 | 186 | |||
279 | 187 | This property holds the \l{Qt::ShortcutContext}{shortcut context}. | ||
280 | 188 | |||
281 | 189 | Supported values are: | ||
282 | 190 | \list | ||
283 | 191 | \li \c Qt.WindowShortcut (default) - The shortcut is active when its parent item is in an active top-level window. | ||
284 | 192 | \li \c Qt.ApplicationShortcut - The shortcut is active when one of the application's windows are active. | ||
285 | 193 | \endlist | ||
286 | 194 | |||
287 | 195 | \qml | ||
288 | 196 | Shortcut { | ||
289 | 197 | sequence: StandardKey.Quit | ||
290 | 198 | context: Qt.ApplicationShortcut | ||
291 | 199 | onActivated: Qt.quit() | ||
292 | 200 | } | ||
293 | 201 | \endqml | ||
294 | 202 | */ | ||
295 | 203 | Qt::ShortcutContext QQuickShortcut::context() const | ||
296 | 204 | { | ||
297 | 205 | return m_context; | ||
298 | 206 | } | ||
299 | 207 | |||
300 | 208 | void QQuickShortcut::setContext(Qt::ShortcutContext context) | ||
301 | 209 | { | ||
302 | 210 | if (context == m_context) | ||
303 | 211 | return; | ||
304 | 212 | |||
305 | 213 | grabShortcut(m_shortcut, context); | ||
306 | 214 | |||
307 | 215 | m_context = context; | ||
308 | 216 | emit contextChanged(); | ||
309 | 217 | } | ||
310 | 218 | |||
311 | 219 | void QQuickShortcut::classBegin() | ||
312 | 220 | { | ||
313 | 221 | } | ||
314 | 222 | |||
315 | 223 | void QQuickShortcut::componentComplete() | ||
316 | 224 | { | ||
317 | 225 | m_completed = true; | ||
318 | 226 | grabShortcut(m_shortcut, m_context); | ||
319 | 227 | } | ||
320 | 228 | |||
321 | 229 | bool QQuickShortcut::event(QEvent *event) | ||
322 | 230 | { | ||
323 | 231 | if (m_enabled && event->type() == QEvent::Shortcut) { | ||
324 | 232 | QShortcutEvent *se = static_cast<QShortcutEvent *>(event); | ||
325 | 233 | if (se->shortcutId() == m_id && se->key() == m_shortcut){ | ||
326 | 234 | if (se->isAmbiguous()) | ||
327 | 235 | emit activatedAmbiguously(); | ||
328 | 236 | else | ||
329 | 237 | emit activated(); | ||
330 | 238 | return true; | ||
331 | 239 | } | ||
332 | 240 | } | ||
333 | 241 | return false; | ||
334 | 242 | } | ||
335 | 243 | |||
336 | 244 | static bool qQuickShortcutContextMatcher(QObject *obj, Qt::ShortcutContext context) | ||
337 | 245 | { | ||
338 | 246 | switch (context) { | ||
339 | 247 | case Qt::ApplicationShortcut: | ||
340 | 248 | return true; | ||
341 | 249 | case Qt::WindowShortcut: | ||
342 | 250 | while (obj && !obj->isWindowType()) { | ||
343 | 251 | obj = obj->parent(); | ||
344 | 252 | if (QQuickItem *item = qobject_cast<QQuickItem *>(obj)) | ||
345 | 253 | obj = item->window(); | ||
346 | 254 | } | ||
347 | 255 | return obj && obj == QGuiApplication::focusWindow(); | ||
348 | 256 | default: | ||
349 | 257 | return false; | ||
350 | 258 | } | ||
351 | 259 | } | ||
352 | 260 | |||
353 | 261 | void QQuickShortcut::grabShortcut(const QKeySequence &sequence, Qt::ShortcutContext context) | ||
354 | 262 | { | ||
355 | 263 | ungrabShortcut(); | ||
356 | 264 | |||
357 | 265 | if (m_completed && !sequence.isEmpty()) { | ||
358 | 266 | QGuiApplicationPrivate *pApp = QGuiApplicationPrivate::instance(); | ||
359 | 267 | m_id = pApp->shortcutMap.addShortcut(this, sequence, context, qQuickShortcutContextMatcher); | ||
360 | 268 | if (!m_enabled) | ||
361 | 269 | pApp->shortcutMap.setShortcutEnabled(false, m_id, this); | ||
362 | 270 | if (!m_autorepeat) | ||
363 | 271 | pApp->shortcutMap.setShortcutAutoRepeat(false, m_id, this); | ||
364 | 272 | } | ||
365 | 273 | } | ||
366 | 274 | |||
367 | 275 | void QQuickShortcut::ungrabShortcut() | ||
368 | 276 | { | ||
369 | 277 | if (m_id) { | ||
370 | 278 | QGuiApplicationPrivate::instance()->shortcutMap.removeShortcut(m_id, this); | ||
371 | 279 | m_id = 0; | ||
372 | 280 | } | ||
373 | 281 | } | ||
374 | 282 | |||
375 | 283 | QT_END_NAMESPACE | ||
376 | 284 | 0 | ||
377 | === removed file 'src/app/qquickshortcut_p.h' | |||
378 | --- src/app/qquickshortcut_p.h 2016-03-29 11:01:18 +0000 | |||
379 | +++ src/app/qquickshortcut_p.h 1970-01-01 00:00:00 +0000 | |||
380 | @@ -1,109 +0,0 @@ | |||
381 | 1 | /**************************************************************************** | ||
382 | 2 | ** | ||
383 | 3 | ** Copyright (C) 2015 The Qt Company Ltd. | ||
384 | 4 | ** Contact: http://www.qt.io/licensing/ | ||
385 | 5 | ** | ||
386 | 6 | ** This file is part of the QtQuick module of the Qt Toolkit. | ||
387 | 7 | ** | ||
388 | 8 | ** $QT_BEGIN_LICENSE:LGPL21$ | ||
389 | 9 | ** Commercial License Usage | ||
390 | 10 | ** Licensees holding valid commercial Qt licenses may use this file in | ||
391 | 11 | ** accordance with the commercial license agreement provided with the | ||
392 | 12 | ** Software or, alternatively, in accordance with the terms contained in | ||
393 | 13 | ** a written agreement between you and The Qt Company. For licensing terms | ||
394 | 14 | ** and conditions see http://www.qt.io/terms-conditions. For further | ||
395 | 15 | ** information use the contact form at http://www.qt.io/contact-us. | ||
396 | 16 | ** | ||
397 | 17 | ** GNU Lesser General Public License Usage | ||
398 | 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | ||
399 | 19 | ** General Public License version 2.1 or version 3 as published by the Free | ||
400 | 20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and | ||
401 | 21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the | ||
402 | 22 | ** following information to ensure the GNU Lesser General Public License | ||
403 | 23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and | ||
404 | 24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
405 | 25 | ** | ||
406 | 26 | ** As a special exception, The Qt Company gives you certain additional | ||
407 | 27 | ** rights. These rights are described in The Qt Company LGPL Exception | ||
408 | 28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
409 | 29 | ** | ||
410 | 30 | ** $QT_END_LICENSE$ | ||
411 | 31 | ** | ||
412 | 32 | ****************************************************************************/ | ||
413 | 33 | |||
414 | 34 | #ifndef QQUICKSHORTCUT_P_H | ||
415 | 35 | #define QQUICKSHORTCUT_P_H | ||
416 | 36 | |||
417 | 37 | // | ||
418 | 38 | // W A R N I N G | ||
419 | 39 | // ------------- | ||
420 | 40 | // | ||
421 | 41 | // This file is not part of the Qt API. It exists purely as an | ||
422 | 42 | // implementation detail. This header file may change from version to | ||
423 | 43 | // version without notice, or even be removed. | ||
424 | 44 | // | ||
425 | 45 | // We mean it. | ||
426 | 46 | // | ||
427 | 47 | |||
428 | 48 | #include <QtCore/qobject.h> | ||
429 | 49 | #include <QtCore/qvariant.h> | ||
430 | 50 | #include <QtGui/qkeysequence.h> | ||
431 | 51 | #include <QtQml/qqmlparserstatus.h> | ||
432 | 52 | |||
433 | 53 | QT_BEGIN_NAMESPACE | ||
434 | 54 | |||
435 | 55 | class QQuickShortcut : public QObject, public QQmlParserStatus | ||
436 | 56 | { | ||
437 | 57 | Q_OBJECT | ||
438 | 58 | Q_INTERFACES(QQmlParserStatus) | ||
439 | 59 | Q_PROPERTY(QVariant sequence READ sequence WRITE setSequence NOTIFY sequenceChanged FINAL) | ||
440 | 60 | Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) | ||
441 | 61 | Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY autoRepeatChanged FINAL) | ||
442 | 62 | Q_PROPERTY(Qt::ShortcutContext context READ context WRITE setContext NOTIFY contextChanged FINAL) | ||
443 | 63 | |||
444 | 64 | public: | ||
445 | 65 | explicit QQuickShortcut(QObject *parent = Q_NULLPTR); | ||
446 | 66 | ~QQuickShortcut(); | ||
447 | 67 | |||
448 | 68 | QVariant sequence() const; | ||
449 | 69 | void setSequence(const QVariant &sequence); | ||
450 | 70 | |||
451 | 71 | bool isEnabled() const; | ||
452 | 72 | void setEnabled(bool enabled); | ||
453 | 73 | |||
454 | 74 | bool autoRepeat() const; | ||
455 | 75 | void setAutoRepeat(bool repeat); | ||
456 | 76 | |||
457 | 77 | Qt::ShortcutContext context() const; | ||
458 | 78 | void setContext(Qt::ShortcutContext context); | ||
459 | 79 | |||
460 | 80 | Q_SIGNALS: | ||
461 | 81 | void sequenceChanged(); | ||
462 | 82 | void enabledChanged(); | ||
463 | 83 | void autoRepeatChanged(); | ||
464 | 84 | void contextChanged(); | ||
465 | 85 | |||
466 | 86 | void activated(); | ||
467 | 87 | void activatedAmbiguously(); | ||
468 | 88 | |||
469 | 89 | protected: | ||
470 | 90 | void classBegin() Q_DECL_OVERRIDE; | ||
471 | 91 | void componentComplete() Q_DECL_OVERRIDE; | ||
472 | 92 | bool event(QEvent *event) Q_DECL_OVERRIDE; | ||
473 | 93 | |||
474 | 94 | void grabShortcut(const QKeySequence &sequence, Qt::ShortcutContext context); | ||
475 | 95 | void ungrabShortcut(); | ||
476 | 96 | |||
477 | 97 | private: | ||
478 | 98 | int m_id; | ||
479 | 99 | bool m_enabled; | ||
480 | 100 | bool m_completed; | ||
481 | 101 | bool m_autorepeat; | ||
482 | 102 | QKeySequence m_shortcut; | ||
483 | 103 | Qt::ShortcutContext m_context; | ||
484 | 104 | QVariant m_sequence; | ||
485 | 105 | }; | ||
486 | 106 | |||
487 | 107 | QT_END_NAMESPACE | ||
488 | 108 | |||
489 | 109 | #endif // QQUICKSHORTCUT_P_H | ||
490 | 110 | 0 | ||
491 | === modified file 'src/app/webbrowser/Browser.qml' | |||
492 | --- src/app/webbrowser/Browser.qml 2017-03-28 11:20:46 +0000 | |||
493 | +++ src/app/webbrowser/Browser.qml 2017-04-05 06:09:00 +0000 | |||
494 | @@ -16,7 +16,7 @@ | |||
495 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
496 | 17 | */ | 17 | */ |
497 | 18 | 18 | ||
499 | 19 | import QtQuick 2.4 | 19 | import QtQuick 2.5 |
500 | 20 | import QtQuick.Window 2.2 | 20 | import QtQuick.Window 2.2 |
501 | 21 | import QtSystemInfo 5.5 | 21 | import QtSystemInfo 5.5 |
502 | 22 | import Qt.labs.settings 1.0 | 22 | import Qt.labs.settings 1.0 |
503 | 23 | 23 | ||
504 | === modified file 'src/app/webbrowser/webbrowser-app.qml' | |||
505 | --- src/app/webbrowser/webbrowser-app.qml 2017-02-23 09:53:09 +0000 | |||
506 | +++ src/app/webbrowser/webbrowser-app.qml 2017-04-05 06:09:00 +0000 | |||
507 | @@ -16,7 +16,7 @@ | |||
508 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
509 | 17 | */ | 17 | */ |
510 | 18 | 18 | ||
512 | 19 | import QtQuick 2.4 | 19 | import QtQuick 2.5 |
513 | 20 | import QtQuick.Window 2.2 | 20 | import QtQuick.Window 2.2 |
514 | 21 | import Qt.labs.settings 1.0 | 21 | import Qt.labs.settings 1.0 |
515 | 22 | import Ubuntu.Components 1.3 | 22 | import Ubuntu.Components 1.3 |
516 | 23 | 23 | ||
517 | === modified file 'src/app/webcontainer/WebApp.qml' | |||
518 | --- src/app/webcontainer/WebApp.qml 2016-12-19 16:44:04 +0000 | |||
519 | +++ src/app/webcontainer/WebApp.qml 2017-04-05 06:09:00 +0000 | |||
520 | @@ -1,5 +1,5 @@ | |||
521 | 1 | /* | 1 | /* |
523 | 2 | * Copyright 2013-2016 Canonical Ltd. | 2 | * Copyright 2013-2017 Canonical Ltd. |
524 | 3 | * | 3 | * |
525 | 4 | * This file is part of webbrowser-app. | 4 | * This file is part of webbrowser-app. |
526 | 5 | * | 5 | * |
527 | @@ -16,7 +16,7 @@ | |||
528 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
529 | 17 | */ | 17 | */ |
530 | 18 | 18 | ||
532 | 19 | import QtQuick 2.4 | 19 | import QtQuick 2.5 |
533 | 20 | import webbrowsercommon.private 0.1 | 20 | import webbrowsercommon.private 0.1 |
534 | 21 | import com.canonical.Oxide 1.19 as Oxide | 21 | import com.canonical.Oxide 1.19 as Oxide |
535 | 22 | import Ubuntu.Components 1.3 | 22 | import Ubuntu.Components 1.3 |
Looks good. Only one question, qml-module-qtquick2 in Build-Depends: shouldn't it be bumped also? For the tests perhaps?