Commit b2cd2124 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

[Qt] You need now Qt4.3...

Even lenny has it... (etch doesn't)
If you want to maintain a Qt4.2 version, you are welcome.
parent 98922f95
......@@ -4898,7 +4898,7 @@ AC_ARG_ENABLE(qt4,
AS_IF([test "${SYS}" = "darwin"], [enable_qt4=no])
])
AS_IF([test "${enable_qt4}" != "no"], [
PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.2.0], [
PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.3.0], [
VLC_ADD_PLUGIN([qt4])
AC_DEFINE([HAVE_QT4], 1, [Define to 1 if you have QT4 library.])
ALIASES="${ALIASES} qvlc"
......
......@@ -87,15 +87,9 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
setAttribute( Qt::WA_PaintOnScreen, true );
/* The core can ask through a callback to show the video. */
#if HAS_QT43
connect( this, SIGNAL(askVideoWidgetToShow( unsigned int, unsigned int)),
this, SLOT(SetSizing(unsigned int, unsigned int )),
Qt::BlockingQueuedConnection );
#else
#warning This is broken. Fix it with a QEventLoop with a processEvents ()
connect( this, SIGNAL(askVideoWidgetToShow( unsigned int, unsigned int)),
this, SLOT(SetSizing(unsigned int, unsigned int )) );
#endif
}
void VideoWidget::paintEvent(QPaintEvent *ev)
......
......@@ -77,10 +77,8 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
dialogBox->setFileMode( QFileDialog::ExistingFiles );
dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
#if HAS_QT43
dialogBox->restoreState(
getSettings()->value( "file-dialog-state" ).toByteArray() );
#endif
/* We don't want to see a grip in the middle of the window, do we? */
dialogBox->setSizeGripEnabled( false );
......@@ -96,11 +94,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
/* Ugly hacks to get the good Widget */
//This lineEdit is the normal line in the fileDialog.
#if HAS_QT43
lineFileEdit = dialogBox->findChildren<QLineEdit*>()[0];
#else
lineFileEdit = dialogBox->findChildren<QLineEdit*>()[1];
#endif
/* Make a list of QLabel inside the QFileDialog to access the good ones */
QList<QLabel *> listLabel = dialogBox->findChildren<QLabel*>();
......@@ -144,9 +138,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
FileOpenPanel::~FileOpenPanel()
{
#if HAS_QT43
getSettings()->setValue( "file-dialog-state", dialogBox->saveState() );
#endif
}
/* Show a fileBrowser to select a subtitle */
......
......@@ -77,14 +77,12 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
getSettings()->beginGroup("Playlist");
#if HAS_QT43
if( getSettings()->contains( "headerState" ) )
{
view->header()->restoreState(
getSettings()->value( "headerState" ).toByteArray() );
}
else
#endif
{
/* Configure the size of the header */
view->header()->resizeSection( 0, 200 );
......@@ -355,11 +353,9 @@ void StandardPLPanel::deleteSelection()
StandardPLPanel::~StandardPLPanel()
{
#if HAS_QT43
getSettings()->beginGroup("Playlist");
getSettings()->setValue( "headerState", view->header()->saveState() );
getSettings()->endGroup();
#endif
}
......@@ -309,9 +309,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
optionWidgets.append( ui.outputModule );
optionWidgets.append( ui.volNormBox );
/*Little mofification of ui.volumeValue to compile with Qt < 4.3 */
#if HAS_QT43
ui.volumeValue->setButtonSymbols(QAbstractSpinBox::NoButtons);
#endif
optionWidgets.append( ui.volumeValue );
updateAudioOptions( ui.outputModule->currentIndex() );
......
......@@ -35,7 +35,9 @@
#include <QEvent>
#define HAS_QT43 ( QT_VERSION >= 0x040300 )
#if ( QT_VERSION < 0x040300 )
# error Update your Qt
#endif
enum {
QT_NORMAL_MODE = 0,
......@@ -115,11 +117,7 @@ struct intf_sys_t
#define TOGGLEV( x ) { if( x->isVisible() ) x->hide(); \
else x->show(); }
#if HAS_QT43
#define setLayoutMargins( a, b, c, d, e) setContentsMargins( a, b, c, d )
#else
#define setLayoutMargins( a, b, c, d, e) setMargin( e )
#endif
#define setLayoutMargins( a, b, c, d, e) setContentsMargins( a, b, c, d )
#define getSettings() p_intf->p_sys->mainSettings
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment