[vlc-commits] qt: use local-path for ui header wrapper

Alexandre Janniaux git at videolan.org
Sat Apr 11 09:13:36 CEST 2020


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Wed Apr  8 17:45:26 2020 +0200| [7d0f71e878bb52a5ff9b2fb50c8fecc53f62bc56] | committer: Alexandre Janniaux

qt: use local-path for ui header wrapper

Those files could generated in implementation-specified location by
build systems, as it's the behaviour of qmake based build system.

In particular, meson implementation provides the same behaviour and
it will be handled automatically, thus having a full path makes the
file not found with meson.

Use local-path and specify all include directories to simulate this.
New files must not have the same filename as existing ones.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7d0f71e878bb52a5ff9b2fb50c8fecc53f62bc56
---

 modules/gui/qt/Makefile.am                                | 12 +++++++++++-
 modules/gui/qt/dialogs/extended/extended_panels.hpp       |  6 ++++--
 modules/gui/qt/dialogs/fingerprint/fingerprintdialog.cpp  |  4 +++-
 modules/gui/qt/dialogs/help/help.hpp                      |  6 ++++--
 modules/gui/qt/dialogs/messages/messages.hpp              |  5 ++++-
 modules/gui/qt/dialogs/open/open.hpp                      |  4 +++-
 modules/gui/qt/dialogs/open/open_panels.hpp               |  9 +++++----
 modules/gui/qt/dialogs/podcast/podcast_configuration.hpp  |  4 +++-
 modules/gui/qt/dialogs/preferences/simple_preferences.hpp | 11 ++++++-----
 modules/gui/qt/dialogs/sout/profile_selector.hpp          |  4 +++-
 modules/gui/qt/dialogs/sout/sout.hpp                      |  4 +++-
 modules/gui/qt/dialogs/vlm/vlm.hpp                        |  4 +++-
 12 files changed, 52 insertions(+), 21 deletions(-)

diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index 627cc5c5ab..07d146f604 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -14,7 +14,17 @@
 SUFFIXES += .ui .h .hpp .moc.cpp .qml
 
 libqt_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
-	-I$(srcdir)/gui/qt -I$(builddir)/gui/qt/ -I$(builddir)/gui/qt/ui
+	-I$(srcdir)/gui/qt -I$(builddir)/gui/qt/ \
+	-I$(builddir)/gui/qt/dialogs/extended \
+	-I$(builddir)/gui/qt/dialogs/fingerprint \
+	-I$(builddir)/gui/qt/dialogs/help \
+	-I$(builddir)/gui/qt/dialogs/messages \
+	-I$(builddir)/gui/qt/dialogs/open \
+	-I$(builddir)/gui/qt/dialogs/podcast \
+	-I$(builddir)/gui/qt/dialogs/preferences \
+	-I$(builddir)/gui/qt/dialogs/sout \
+	-I$(builddir)/gui/qt/dialogs/vlm
+
 libqt_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt)
 libqt_plugin_la_LIBADD = $(QT_LIBS) $(LIBS_qt) $(LIBM)
 libqt_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)'
diff --git a/modules/gui/qt/dialogs/extended/extended_panels.hpp b/modules/gui/qt/dialogs/extended/extended_panels.hpp
index 98f0d84376..f0c775d6fb 100644
--- a/modules/gui/qt/dialogs/extended/extended_panels.hpp
+++ b/modules/gui/qt/dialogs/extended/extended_panels.hpp
@@ -31,10 +31,12 @@
 #include <vlc_common.h>
 
 #include "qt.hpp"
-#include "dialogs/extended/ui_equalizer.h"
-#include "dialogs/extended/ui_video_effects.h"
 #include "util/variables.hpp"
 
+/* Auto-generated from .ui files */
+#include "ui_equalizer.h"
+#include "ui_video_effects.h"
+
 #include <QTabWidget>
 
 #define BANDS 10
diff --git a/modules/gui/qt/dialogs/fingerprint/fingerprintdialog.cpp b/modules/gui/qt/dialogs/fingerprint/fingerprintdialog.cpp
index a2efeda3ab..468b69bd3d 100644
--- a/modules/gui/qt/dialogs/fingerprint/fingerprintdialog.cpp
+++ b/modules/gui/qt/dialogs/fingerprint/fingerprintdialog.cpp
@@ -19,7 +19,9 @@
  *****************************************************************************/
 
 #include "dialogs/fingerprint/fingerprintdialog.hpp"
-#include "dialogs/fingerprint/ui_fingerprintdialog.h"
+
+/* Auto-generated from .ui files */
+#include "ui_fingerprintdialog.h"
 
 #include "dialogs/fingerprint/chromaprint.hpp"
 #include <vlc_url.h>
diff --git a/modules/gui/qt/dialogs/help/help.hpp b/modules/gui/qt/dialogs/help/help.hpp
index 5754e06b9a..96c10981dd 100644
--- a/modules/gui/qt/dialogs/help/help.hpp
+++ b/modules/gui/qt/dialogs/help/help.hpp
@@ -31,8 +31,10 @@
 
 #include "widgets/native/qvlcframe.hpp"
 #include "util/singleton.hpp"
-#include "dialogs/help/ui_about.h"
-#include "dialogs/help/ui_update.h"
+
+/* Auto-generated from .ui files */
+#include "ui_about.h"
+#include "ui_update.h"
 
 class QEvent;
 
diff --git a/modules/gui/qt/dialogs/messages/messages.hpp b/modules/gui/qt/dialogs/messages/messages.hpp
index 91571f2d35..e006d9a8de 100644
--- a/modules/gui/qt/dialogs/messages/messages.hpp
+++ b/modules/gui/qt/dialogs/messages/messages.hpp
@@ -25,7 +25,10 @@
 
 #include "widgets/native/qvlcframe.hpp"
 #include "util/singleton.hpp"
-#include "dialogs/messages/ui_messages_panel.h"
+
+/* Auto-generated from .ui files */
+#include "ui_messages_panel.h"
+
 #include <stdarg.h>
 #include <QMutex>
 #include <atomic>
diff --git a/modules/gui/qt/dialogs/open/open.hpp b/modules/gui/qt/dialogs/open/open.hpp
index 0ae45ecc95..e14442cb03 100644
--- a/modules/gui/qt/dialogs/open/open.hpp
+++ b/modules/gui/qt/dialogs/open/open.hpp
@@ -31,9 +31,11 @@
 #include <vlc_url.h>
 
 #include "widgets/native/qvlcframe.hpp"
-#include "dialogs/open/ui_open.h"
 #include "dialogs/open/open_panels.hpp"
 
+/* Auto-generated from .ui files */
+#include "ui_open.h"
+
 enum {
     OPEN_FILE_TAB,
     OPEN_DISC_TAB,
diff --git a/modules/gui/qt/dialogs/open/open_panels.hpp b/modules/gui/qt/dialogs/open/open_panels.hpp
index 57fffd53d5..b91e9343f5 100644
--- a/modules/gui/qt/dialogs/open/open_panels.hpp
+++ b/modules/gui/qt/dialogs/open/open_panels.hpp
@@ -33,10 +33,11 @@
 
 #include "dialogs/preferences/preferences_widgets.hpp"
 
-#include "dialogs/open/ui_open_file.h"
-#include "dialogs/open/ui_open_disk.h"
-#include "dialogs/open/ui_open_net.h"
-#include "dialogs/open/ui_open_capture.h"
+/* Auto-generated from .ui files */
+#include "ui_open_file.h"
+#include "ui_open_disk.h"
+#include "ui_open_net.h"
+#include "ui_open_capture.h"
 
 #include <QFileDialog>
 
diff --git a/modules/gui/qt/dialogs/podcast/podcast_configuration.hpp b/modules/gui/qt/dialogs/podcast/podcast_configuration.hpp
index 65308b9440..1e99d67bf6 100644
--- a/modules/gui/qt/dialogs/podcast/podcast_configuration.hpp
+++ b/modules/gui/qt/dialogs/podcast/podcast_configuration.hpp
@@ -24,9 +24,11 @@
 #define QVLC_PODCAST_CONFIGURATION_DIALOG_H_ 1
 
 #include "widgets/native/qvlcframe.hpp"
-#include "dialogs/podcast/ui_podcast_configuration.h"
 #include "util/singleton.hpp"
 
+/* Auto-generated from .ui files */
+#include "ui_podcast_configuration.h"
+
 class PodcastConfigDialog : public QVLCDialog, public Singleton<PodcastConfigDialog>
 {
     Q_OBJECT
diff --git a/modules/gui/qt/dialogs/preferences/simple_preferences.hpp b/modules/gui/qt/dialogs/preferences/simple_preferences.hpp
index be31f6ecde..32d7df9fc2 100644
--- a/modules/gui/qt/dialogs/preferences/simple_preferences.hpp
+++ b/modules/gui/qt/dialogs/preferences/simple_preferences.hpp
@@ -30,11 +30,12 @@
 #include <vlc_common.h>
 #include <vlc_interface.h>
 
-#include "dialogs/preferences/ui_sprefs_input.h"
-#include "dialogs/preferences/ui_sprefs_audio.h"
-#include "dialogs/preferences/ui_sprefs_video.h"
-#include "dialogs/preferences/ui_sprefs_subtitles.h"
-#include "dialogs/preferences/ui_sprefs_interface.h"
+/* Auto-generated from .ui files */
+#include "ui_sprefs_input.h"
+#include "ui_sprefs_audio.h"
+#include "ui_sprefs_video.h"
+#include "ui_sprefs_subtitles.h"
+#include "ui_sprefs_interface.h"
 
 #include <vlc_media_library.h>
 #include <QDialogButtonBox>
diff --git a/modules/gui/qt/dialogs/sout/profile_selector.hpp b/modules/gui/qt/dialogs/sout/profile_selector.hpp
index c1c37a50f8..ad08a785e5 100644
--- a/modules/gui/qt/dialogs/sout/profile_selector.hpp
+++ b/modules/gui/qt/dialogs/sout/profile_selector.hpp
@@ -31,7 +31,9 @@
 
 #include "widgets/native/qvlcframe.hpp"
 #include "util/soutchain.hpp"
-#include "dialogs/sout/ui_profiles.h"
+
+/* Auto-generated from .ui files */
+#include "ui_profiles.h"
 
 class QComboBox;
 
diff --git a/modules/gui/qt/dialogs/sout/sout.hpp b/modules/gui/qt/dialogs/sout/sout.hpp
index ca8c5aa5b3..d42fe6bf43 100644
--- a/modules/gui/qt/dialogs/sout/sout.hpp
+++ b/modules/gui/qt/dialogs/sout/sout.hpp
@@ -29,7 +29,9 @@
 
 #include <vlc_common.h> /* Gettext functions */
 
-#include "dialogs/sout/ui_sout.h"
+/* Auto-generated from .ui files */
+#include "ui_sout.h"
+
 #include "widgets/native/qvlcframe.hpp"
 #include "util/soutchain.hpp"
 
diff --git a/modules/gui/qt/dialogs/vlm/vlm.hpp b/modules/gui/qt/dialogs/vlm/vlm.hpp
index 234c676898..7f60ae5c19 100644
--- a/modules/gui/qt/dialogs/vlm/vlm.hpp
+++ b/modules/gui/qt/dialogs/vlm/vlm.hpp
@@ -30,7 +30,9 @@
 
 #include <vlc_vlm.h>
 
-#include "dialogs/vlm/ui_vlm.h"
+/* Auto-generated from .ui files */
+#include "ui_vlm.h"
+
 #include "widgets/native/qvlcframe.hpp"
 #include "util/singleton.hpp"
 #include <QDateTime>



More information about the vlc-commits mailing list