Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -275,7 +275,8 @@ void TabletProxy::setQmlTabletRoot(QQuickItem* qmlTabletRoot, QObject* qmlOffscr · 274 unmodified lines | |||
| 275 | QMetaObject::invokeMethod(_qmlTabletRoot, "loadSource", Q_ARG(const QVariant&, QVariant(TABLET_SOURCE_URL))); | 275 | QMetaObject::invokeMethod(_qmlTabletRoot, "loadSource", Q_ARG(const QVariant&, QVariant(TABLET_SOURCE_URL))); |
| 276 | } | 276 | } |
| 277 | 277 | ||
| 278 | gotoHomeScreen(); | 278 | // force to the tablet to go to the homescreen |
| 279 | gotoHomeScreen(true); | ||
| 279 | 280 | ||
| 280 | QMetaObject::invokeMethod(_qmlTabletRoot, "setUsername", Q_ARG(const QVariant&, QVariant(getUsername()))); | 281 | QMetaObject::invokeMethod(_qmlTabletRoot, "setUsername", Q_ARG(const QVariant&, QVariant(getUsername()))); |
| 281 | 282 | ||
| @@ -293,6 +294,9 @@ void TabletProxy::setQmlTabletRoot(QQuickItem* qmlTabletRoot, QObject* qmlOffscr · 11 unmodified lines | |||
| 293 | } | 294 | } |
| 294 | } | 295 | } |
| 295 | 296 | ||
| 297 | void TabletProxy::gotoHomeScreen() { | ||
| 298 | gotoHomeScreen(false); | ||
| 299 | } | ||
| 296 | void TabletProxy::gotoMenuScreen(const QString& submenu) { | 300 | void TabletProxy::gotoMenuScreen(const QString& submenu) { |
| 297 | 301 | ||
| 298 | QObject* root = nullptr; | 302 | QObject* root = nullptr; |
| @@ -334,8 +338,8 @@ void TabletProxy::loadQMLSource(const QVariant& path) { · 35 unmodified lines | |||
| 334 | } | 338 | } |
| 335 | } | 339 | } |
| 336 | 340 | ||
| 337 | void TabletProxy::gotoHomeScreen() { | 341 | void TabletProxy::gotoHomeScreen(bool forceOntoHomeScreen) { |
| 338 | if (_state != State::Home || _state != State::Uninitialized) { | 342 | if (_state != State::Home && ( _state != State::Uninitialized || forceOntoHomeScreen)) { |
| 339 | if (!_toolbarMode && _qmlTabletRoot) { | 343 | if (!_toolbarMode && _qmlTabletRoot) { |
| 340 | auto loader = _qmlTabletRoot->findChild<QQuickItem*>("loader"); | 344 | auto loader = _qmlTabletRoot->findChild<QQuickItem*>("loader"); |
| 341 | QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToHomeScreen()), Qt::DirectConnection); | 345 | QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToHomeScreen()), Qt::DirectConnection); |