on xenial help sign in
* Use unity-mir instead of full path

* Make comments more clean about unity-mir dynamic loading

commit65486da52e50e563dd1e34f97d769abd04b5e782 authorRicardo Mendoza <ricardo.mendoza@canonical.com> dateMon 9 Sep 2013, 21:13 (13 years ago) parentdc3b578
1 file changed+5−6
main.cpp+5−6
main.cpp+5−6
@@ -91,7 +91,7 @@ int startShell(int argc, const char** argv, void* server)
9191 QGuiApplication::setApplicationName("Unity 8");
9292 QGuiApplication *application;
9393 if (isUbuntuMirServer) {
94− QLibrary unityMir("/usr/lib/arm-linux-gnueabihf/libunity-mir.so.1.0.0");
94+ QLibrary unityMir("unity-mir");
9595 unityMir.load();
9696
9797 typedef QGuiApplication* (*createServerApplication_t)(int&, const char **, void*);
@@ -190,11 +190,10 @@ int main(int argc, const char *argv[])
190190 if (qgetenv("QT_QPA_PLATFORM").startsWith("ubuntumir")) {
191191 setenv("QT_QPA_PLATFORM", "ubuntumirserver", 1);
192192
193− // if we use unity-mir directly, we link straight to mirserver, which exports
194− // the same symbols as qtubuntu, so if running on SF, the linker finds the mir
195− // symbols first and uses them! Crash!
196− // load the triangle library
197− QLibrary unityMir("/usr/lib/arm-linux-gnueabihf/libunity-mir.so.1.0.0");
193+ // If we use unity-mir directly, we automatically link to the Mir-server
194+ // platform-api bindings, which result in unexpected behaviour when
195+ // running the non-Mir scenario.
196+ QLibrary unityMir("unity-mir");
198197 unityMir.load();
199198 if (!unityMir.isLoaded()) {
200199 qDebug() << "Library unity-mir not found/loaded";