Bump the required Qt versions

Multimedia / VLC - Jean-Baptiste Kempf [videolan.org] - 18 March 2016 14:05 UTC



###

diff --git a/configure.ac b/configure.ac
index 658ba82..a716c09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3772,7 +3772,7 @@ AC_ARG_ENABLE(qt, [
])
])
AS_IF([test "${enable_qt}" != "no"], [
- PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [
+ PKG_CHECK_MODULES([QT], [Qt5Core >= 5.2.0 Qt5Widgets Qt5Gui], [
PKG_CHECK_MODULES([QTX11], [Qt5X11Extras], [
VLC_ADD_LIBS([qt],[${QTX11_LIBS}])
VLC_ADD_CXXFLAGS([qt],[${QTX11_CFLAGS} -DQT5_HAS_X11])
@@ -3795,7 +3795,7 @@ AS_IF([test "${enable_qt}" != "no"], [
AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
], [
- PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
+ PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.8.0],, [
AS_IF([test -n "${enable_qt}"],[
AC_MSG_ERROR([${QT_PKG_ERRORS}.])
],[
diff --git a/modules/gui/qt/qt.hpp b/modules/gui/qt/qt.hpp
index c6aadeb..a3e7d93 100644
--- a/modules/gui/qt/qt.hpp
+++ b/modules/gui/qt/qt.hpp
@@ -42,11 +42,10 @@
#define QT_NO_CAST_TO_ASCII
#include

-#if ( QT_VERSION < 0x040600 )
-# error Update your Qt version to at least 4.6.0
+#if ( QT_VERSION < 0x040800 )
+# error Update your Qt version to at least 4.8.0
#endif

-#define HAS_QT47 ( QT_VERSION >= 0x040700 )
#define HAS_QT5 ( QT_VERSION >= 0x050000 )
#define HAS_QT56 ( QT_VERSION >= 0x050600 )

diff --git a/modules/gui/qt/util/searchlineedit.cpp b/modules/gui/qt/util/searchlineedit.cpp
index b540805..0fd232c 100644
--- a/modules/gui/qt/util/searchlineedit.cpp
+++ b/modules/gui/qt/util/searchlineedit.cpp
@@ -40,69 +40,6 @@

#include

-#if !HAS_QT47
-
-ClickLineEdit::ClickLineEdit( const QString &msg, QWidget *parent) : QLineEdit( parent )
-{
- mDrawClickMsg = true;
- setPlaceholderText( msg );
-}
-
-void ClickLineEdit::setPlaceholderText( const QString &msg )
-{
- mClickMessage = msg;
- repaint();
-}
-
-
-void ClickLineEdit::setText( const QString &txt )
-{
- mDrawClickMsg = txt.isEmpty();
- repaint();
- QLineEdit::setText( txt );
-}
-
-void ClickLineEdit::paintEvent( QPaintEvent *pe )
-{
- QLineEdit::paintEvent( pe );
- if ( mDrawClickMsg && !hasFocus() ) {
- QPainter p( this );
- QPen tmp = p.pen();
- p.setPen( palette().color( QPalette::Disabled, QPalette::Text ) );
- QRect cr = contentsRect();
- // Add two pixel margin on the left side
- cr.setLeft( cr.left() + 3 );
- p.drawText( cr, Qt::AlignLeft | Qt::AlignVCenter, mClickMessage );
- p.setPen( tmp );
- p.end();
- }
-}
-
-void ClickLineEdit::dropEvent( QDropEvent *ev )
-{
- mDrawClickMsg = false;
- QLineEdit::dropEvent( ev );
-}
-
-void ClickLineEdit::focusInEvent( QFocusEvent *ev )
-{
- if ( mDrawClickMsg ) {
- mDrawClickMsg = false;
- repaint();
- }
- QLineEdit::focusInEvent( ev );
-}
-
-void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
-{
- if ( text().isEmpty() ) {
- mDrawClickMsg = true;
- repaint();
- }
- QLineEdit::focusOutEvent( ev );
-}
-#endif
-
#ifndef Q_OS_MAC
SearchLineEdit::SearchLineEdit( QWidget *parent ) : QLineEdit( parent )
{
diff --git a/modules/gui/qt/util/searchlineedit.hpp b/modules/gui/qt/util/searchlineedit.hpp
index 179188b..ceb1a43 100644
--- a/modules/gui/qt/util/searchlineedit.hpp
+++ b/modules/gui/qt/util/searchlineedit.hpp
@@ -34,7 +34,6 @@
#endif
#include

-#if HAS_QT47
class ClickLineEdit : public QLineEdit
{
Q_OBJECT
@@ -44,33 +43,6 @@ public:
QLineEdit::setPlaceholderText ( msg );
}
};
-#else
-/**
- This class provides a QLineEdit which contains a greyed-out hinting
- text as long as the user didn't enter any text
-
- @short LineEdit with customizable "Click here" text
- @author Daniel Molkentin
-*/
-class ClickLineEdit : public QLineEdit
-{
- Q_OBJECT
- Q_PROPERTY( QString clickMessage READ placeholderText WRITE setPlaceholderText )
-public:
- ClickLineEdit( const QString &msg, QWidget *parent );
- void setPlaceholderText( const QString &msg ) Q_DECL_OVERRIDE;
- const QString& placeholderText() const Q_DECLARE_OVERRIDE { return mClickMessage; }
- void setText( const QString& txt ) Q_DECLARE_OVERRIDE;
-protected:
- void paintEvent( QPaintEvent *e ) Q_DECL_OVERRIDE;
- void dropEvent( QDropEvent *ev ) Q_DECL_OVERRIDE;
- void focusInEvent( QFocusEvent *ev ) Q_DECL_OVERRIDE;
- void focusOutEvent( QFocusEvent *ev ) Q_DECL_OVERRIDE;
-private:
- QString mClickMessage;
- bool mDrawClickMsg;
-};
-#endif

#ifndef Q_OS_MAC
class QFramelessButton;

3001875 Bump the required Qt versions
configure.ac | 4 +-
modules/gui/qt/qt.hpp | 5 +--
modules/gui/qt/util/searchlineedit.cpp | 63 --------------------------------
modules/gui/qt/util/searchlineedit.hpp | 28 --------------
4 files changed, 4 insertions(+), 96 deletions(-)

Upstream: git.videolan.org


  • Share