on xenial help sign in
Set phone form factor for scope requests.
15882deMichal Hruby
Dash/ScopeView.qml+2−1
@@ -28,7 +28,8 @@ FocusScope {
28 signal movementStarted
28 signal movementStarted
29 signal positionedAtBeginning
29 signal positionedAtBeginning
30
30
31− // FIXME delay the search so that daemons have time to settle
31+ // FIXME delay the search so that daemons have time to settle, note that
32+ // removing this will break ScopeView::test_changeScope
32 onScopeChanged: timer.restart()
33 onScopeChanged: timer.restart()
33
34
34 Timer {
35 Timer {
plugins/Unity/scope.cpp+3−2
@@ -36,8 +36,8 @@
36
36
37#include <libintl.h>
37#include <libintl.h>
38
38
39−Scope::Scope(QObject *parent) :
39+Scope::Scope(QObject *parent) : QObject(parent)
40− QObject(parent)
40+ , m_formFactor("phone")
41{
41{
42 m_categories.reset(new Categories(this));
42 m_categories.reset(new Categories(this));
43}
43}
@@ -128,6 +128,7 @@ void Scope::setFormFactor(const QString& form_factor) {
128 m_formFactor = form_factor;
128 m_formFactor = form_factor;
129 if (m_unityScope) {
129 if (m_unityScope) {
130 m_unityScope->form_factor = m_formFactor.toStdString();
130 m_unityScope->form_factor = m_formFactor.toStdString();
131+ synchronizeStates(); // will trigger a re-search
131 }
132 }
132 Q_EMIT formFactorChanged();
133 Q_EMIT formFactorChanged();
133 }
134 }