[vlmc-devel] VLMCCoreMain: Use QApplication if it has gui

Yikai Lu git at videolan.org
Fri Jun 9 14:07:26 CEST 2017


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Fri Jun  9 20:59:53 2017 +0900| [34595867d94ce8cd261fe2443c1e09eed3383621] | committer: Yikai Lu

VLMCCoreMain: Use QApplication if it has gui

> https://code.videolan.org/videolan/vlmc/commit/34595867d94ce8cd261fe2443c1e09eed3383621
---

 src/Main/main.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/Main/main.cpp b/src/Main/main.cpp
index 92f3ecb2..db99c3fc 100644
--- a/src/Main/main.cpp
+++ b/src/Main/main.cpp
@@ -187,7 +187,11 @@ VLMCGuimain( int argc, char **argv )
 int
 VLMCCoremain( int argc, char **argv )
 {
+#ifdef HAVE_GUI
+    QApplication app( argc, argv );
+#else
     QCoreApplication app( argc, argv );
+#endif
 
     Backend::IBackend* backend;
     VLMCmainCommon( app, &backend );



More information about the Vlmc-devel mailing list