Changeset View
Changeset View
Standalone View
Standalone View
autotests/client/test_selection.cpp
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | 98 | { | |||
---|---|---|---|---|---|
103 | } | 103 | } | ||
104 | c->connection->setSocketName(s_socketName); | 104 | c->connection->setSocketName(s_socketName); | ||
105 | 105 | | |||
106 | c->thread = new QThread(this); | 106 | c->thread = new QThread(this); | ||
107 | c->connection->moveToThread(c->thread); | 107 | c->connection->moveToThread(c->thread); | ||
108 | c->thread->start(); | 108 | c->thread->start(); | ||
109 | 109 | | |||
110 | c->connection->initConnection(); | 110 | c->connection->initConnection(); | ||
111 | if (!connectedSpy.wait()) { | 111 | if (!connectedSpy.wait(500)) { | ||
112 | return false; | 112 | return false; | ||
113 | } | 113 | } | ||
114 | 114 | | |||
115 | c->queue = new EventQueue(this); | 115 | c->queue = new EventQueue(this); | ||
116 | c->queue->setup(c->connection); | 116 | c->queue->setup(c->connection); | ||
117 | 117 | | |||
118 | Registry registry; | 118 | Registry registry; | ||
119 | QSignalSpy interfacesAnnouncedSpy(®istry, &Registry::interfacesAnnounced); | 119 | QSignalSpy interfacesAnnouncedSpy(®istry, &Registry::interfacesAnnounced); | ||
120 | if (!interfacesAnnouncedSpy.isValid()) { | 120 | if (!interfacesAnnouncedSpy.isValid()) { | ||
121 | return false; | 121 | return false; | ||
122 | } | 122 | } | ||
123 | registry.setEventQueue(c->queue); | 123 | registry.setEventQueue(c->queue); | ||
124 | registry.create(c->connection); | 124 | registry.create(c->connection); | ||
125 | if (!registry.isValid()) { | 125 | if (!registry.isValid()) { | ||
126 | return false; | 126 | return false; | ||
127 | } | 127 | } | ||
128 | registry.setup(); | 128 | registry.setup(); | ||
129 | if (!interfacesAnnouncedSpy.wait()) { | 129 | if (!interfacesAnnouncedSpy.wait(500)) { | ||
130 | return false; | 130 | return false; | ||
131 | } | 131 | } | ||
132 | 132 | | |||
133 | c->compositor = registry.createCompositor(registry.interface(Registry::Interface::Compositor).name, | 133 | c->compositor = registry.createCompositor(registry.interface(Registry::Interface::Compositor).name, | ||
134 | registry.interface(Registry::Interface::Compositor).version, | 134 | registry.interface(Registry::Interface::Compositor).version, | ||
135 | this); | 135 | this); | ||
136 | if (!c->compositor->isValid()) { | 136 | if (!c->compositor->isValid()) { | ||
137 | return false; | 137 | return false; | ||
Show All 9 Lines | 145 | c->seat = registry.createSeat(registry.interface(Registry::Interface::Seat).name, | |||
147 | this); | 147 | this); | ||
148 | if (!c->seat->isValid()) { | 148 | if (!c->seat->isValid()) { | ||
149 | return false; | 149 | return false; | ||
150 | } | 150 | } | ||
151 | QSignalSpy keyboardSpy(c->seat, &Seat::hasKeyboardChanged); | 151 | QSignalSpy keyboardSpy(c->seat, &Seat::hasKeyboardChanged); | ||
152 | if (!keyboardSpy.isValid()) { | 152 | if (!keyboardSpy.isValid()) { | ||
153 | return false; | 153 | return false; | ||
154 | } | 154 | } | ||
155 | if (!keyboardSpy.wait()) { | 155 | if (!keyboardSpy.wait(500)) { | ||
156 | return false; | 156 | return false; | ||
157 | } | 157 | } | ||
158 | if (!c->seat->hasKeyboard()) { | 158 | if (!c->seat->hasKeyboard()) { | ||
159 | return false; | 159 | return false; | ||
160 | } | 160 | } | ||
161 | c->keyboard = c->seat->createKeyboard(c->seat); | 161 | c->keyboard = c->seat->createKeyboard(c->seat); | ||
162 | if (!c->keyboard->isValid()) { | 162 | if (!c->keyboard->isValid()) { | ||
163 | return false; | 163 | return false; | ||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |