on xenial help sign in
do the reset in ShellApplication, so that it persists across multiple screens/views
bb30f52Lukáš Tinkl
qml/OrientedShell.qml−3
@@ -62,9 +62,6 @@ Item {
62 GSettings {
62 GSettings {
63 id: unity8Settings
63 id: unity8Settings
64 schema.id: "com.canonical.Unity8"
64 schema.id: "com.canonical.Unity8"
65− Component.onCompleted: {
66− schema.reset("alwaysShowOsk");
67− }
68 }
65 }
69
66
70 GSettings {
67 GSettings {
src/CMakeLists.txt+3−1
@@ -1,11 +1,13 @@
1add_subdirectory(libunity8-private)
1add_subdirectory(libunity8-private)
2
2
3pkg_check_modules(CONNECTIVITY REQUIRED connectivity-qt1)
3pkg_check_modules(CONNECTIVITY REQUIRED connectivity-qt1)
4+pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt)
4
5
5include_directories(
6include_directories(
6 SYSTEM
7 SYSTEM
7 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
8 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
8 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
9 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
10+ ${GSETTINGS_QT_INCLUDE_DIRS}
9 ${CONNECTIVITY_INCLUDE_DIRS}
11 ${CONNECTIVITY_INCLUDE_DIRS}
10)
12)
11
13
@@ -47,7 +49,7 @@ qt5_use_modules(${SHELL_APP} DBus Gui Qml Quick Test)
47if (NOT "${ANDROID_PROPERTIES_INCLUDE_DIRS}" STREQUAL "")
49if (NOT "${ANDROID_PROPERTIES_INCLUDE_DIRS}" STREQUAL "")
48 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${ANDROID_PROPERTIES_INCLUDE_DIRS})
50 set_target_properties(${SHELL_APP} PROPERTIES INCLUDE_DIRECTORIES ${ANDROID_PROPERTIES_INCLUDE_DIRS})
49endif()
51endif()
50−target_link_libraries(${SHELL_APP} ${ANDROID_PROPERTIES_LDFLAGS} UbuntuGestures connectivity-qt1 unity8-private)
52+target_link_libraries(${SHELL_APP} ${ANDROID_PROPERTIES_LDFLAGS} ${GSETTINGS_QT_LDFLAGS} UbuntuGestures connectivity-qt1 unity8-private)
51
53
52if (ENABLE_TOUCH_EMULATION)
54if (ENABLE_TOUCH_EMULATION)
53 target_link_libraries(${SHELL_APP} ${MOUSETOUCHADAPTOR_LIBS_LDFLAGS})
55 target_link_libraries(${SHELL_APP} ${MOUSETOUCHADAPTOR_LIBS_LDFLAGS})
src/ShellApplication.cpp+5
@@ -21,6 +21,8 @@
21#include <QProcess>
21#include <QProcess>
22#include <QScreen>
22#include <QScreen>
23
23
24+#include <QGSettings>
25+
24#include <libintl.h>
26#include <libintl.h>
25
27
26// libandroid-properties
28// libandroid-properties
@@ -75,6 +77,9 @@ ShellApplication::ShellApplication(int & argc, char ** argv, bool isMirServer)
75 bindtextdomain("unity8", translationDirectory().toUtf8().data());
77 bindtextdomain("unity8", translationDirectory().toUtf8().data());
76 textdomain("unity8");
78 textdomain("unity8");
77
79
80+ QScopedPointer<QGSettings> gSettings(new QGSettings("com.canonical.Unity8"));
81+ gSettings->reset(QStringLiteral("alwaysShowOsk"));
82+
78 m_shellView = new ShellView(m_qmlEngine, &m_qmlArgs);
83 m_shellView = new ShellView(m_qmlEngine, &m_qmlArgs);
79
84
80 if (parser.windowGeometry().isValid()) {
85 if (parser.windowGeometry().isValid()) {