[vlmc-devel] Main: Mark WITH_GUI on Widget-related code, and use QCoreApplication if non-GUI

Yikai Lu git at videolan.org
Sat Jun 4 11:47:40 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Tue Apr 12 23:30:21 2016 +0900| [c80621bbabd1c015146cc5b0f816943c4c302b87] | committer: Hugo Beauzée-Luyssen

Main: Mark WITH_GUI on Widget-related code, and use QCoreApplication if non-GUI

> https://code.videolan.org/videolan/vlmc/commit/c80621bbabd1c015146cc5b0f816943c4c302b87
---

 src/Main/main.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/Main/main.cpp b/src/Main/main.cpp
index 84b50c0..dd092ce 100644
--- a/src/Main/main.cpp
+++ b/src/Main/main.cpp
@@ -41,10 +41,14 @@
 #include "Gui/wizard/firstlaunch/FirstLaunchWizard.h"
 #endif
 
+#ifdef WITH_GUI
 #include <QApplication>
 #include <QColor>
-#include <QFile>
 #include <QPalette>
+#else
+#include <QCoreApplication>
+#endif
+#include <QFile>
 #include <QSettings>
 #include <QUuid>
 #include <QTextCodec>



More information about the Vlmc-devel mailing list