Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
b0152eca
Commit
b0152eca
authored
Dec 09, 2007
by
Rémi Denis-Courmont
Browse files
Simply X11 Qt4 error detection
parent
64b1b518
Changes
2
Show whitespace changes
Inline
Side-by-side
configure.ac
View file @
b0152eca
...
...
@@ -5187,9 +5187,6 @@ AS_IF([test "${enable_qt4}" != "no" &&
[ VLC_ADD_PLUGINS([qt4])
ALIASES="${ALIASES} qvlc"
enableqt4=true
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "cygwin"; then
AC_CHECK_HEADERS([X11/Xlib.h],[],[AC_MSG_ERROR([You need X11 headers])])
fi
VLC_ADD_LIBS([qt4],[$QT4_LIBS])
VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS -DQT4LOCALEDIR=\\\\\\\"$($PKG_CONFIG --variable=prefix QtCore)/share/qt4/translations/\\\\\\\"])
AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
...
...
modules/gui/qt4/qt4.cpp
View file @
b0152eca
...
...
@@ -180,19 +180,13 @@ static int Open( vlc_object_t *p_this )
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
p_intf
->
pf_run
=
Run
;
#if defined HAVE_GETENV && defined Q_WS_X11 && defined HAVE_X11_XLIB_H
char
*
psz_display
=
getenv
(
"DISPLAY"
);
if
(
!
psz_display
||
!*
psz_display
)
{
msg_Err
(
p_intf
,
"no X server"
);
return
VLC_EGENERIC
;
}
#if defined Q_WS_X11 && defined HAVE_X11_XLIB_H
/* Thanks for libqt4 calling exit() in QApplication::QApplication()
* instead of returning an error, we have to check
for DISPLAY validit
y */
Display
*
p_display
=
XOpenDisplay
(
psz_display
);
* instead of returning an error, we have to check
the X11 displa
y */
Display
*
p_display
=
XOpenDisplay
(
NULL
);
if
(
!
p_display
)
{
msg_Err
(
p_intf
,
"Could not connect to X server
%s"
,
psz_display
);
msg_Err
(
p_intf
,
"Could not connect to X server
"
);
return
VLC_EGENERIC
;
}
XCloseDisplay
(
p_display
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment