Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • djain/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
  • sammirata/vlc4
  • syrykh/vlc
  • Vvorcun/macos-new-icon
  • AyaanshC/vlc
  • nasso/vlc
  • Quark/vlc
  • sebastinas/vlc
  • rhstone/vlc
  • talregev/vlc
  • Managor/vlc
  • abdsaber000/vlc
  • falbrechtskirchinger/vlc
  • b.sullender/vlc
  • hulxv/vlc
  • zyad-ayad/vlc
  • shocknovaa/vlc
  • gremlinflat/vlc
  • Pratham24D/vlc
  • hmaarrfk/vlc
412 results
Show changes
Commits on Source (30)
Showing
with 119 additions and 63 deletions
......@@ -12,6 +12,8 @@
SUFFIXES += .ui .h .hpp .moc.cpp
libqt_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DQT_USE_QSTRINGBUILDER \
-DQT_NO_CAST_FROM_BYTEARRAY \
-I$(srcdir)/gui/qt -I$(builddir)/gui/qt
libqt_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt)
libqt_plugin_la_LIBADD = $(QT_LIBS) $(LIBS_qt) $(LIBM)
......
......@@ -52,6 +52,9 @@
#include <QApplication>
#include <QWindow>
#include <QScreen>
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
#include <QDesktopWidget>
#endif
//#define DEBUG_LAYOUT 1
......@@ -721,7 +724,6 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
#ifdef DEBUG_LAYOUT
setStyleSheet( "background: red ");
#endif
setAttribute( Qt::WA_MacBrushedMetal);
controlLayout = new QVBoxLayout( this );
controlLayout->setContentsMargins( 3, 1, 0, 1 );
controlLayout->setSpacing( 0 );
......@@ -894,7 +896,7 @@ void FullscreenControllerWidget::restoreFSC()
if ( targetScreen() < 0 )
return;
QRect currentRes = QApplication::desktop()->screenGeometry( targetScreen() );
QRect currentRes = QGuiApplication::screens()[ targetScreen() ]->geometry();
QWindow *wh = windowHandle();
if ( wh != Q_NULLPTR )
{
......@@ -930,7 +932,7 @@ void FullscreenControllerWidget::restoreFSC()
void FullscreenControllerWidget::centerFSC( int number )
{
QRect currentRes = QApplication::desktop()->screenGeometry( number );
QRect currentRes = QGuiApplication::screens()[ number ]->geometry();
/* screen has changed, calculate new position */
QPoint pos = QPoint( currentRes.x() + (currentRes.width() / 2) - (width() / 2),
......@@ -1004,7 +1006,7 @@ void FullscreenControllerWidget::slowHideFSC()
void FullscreenControllerWidget::updateFullwidthGeometry( int number )
{
QRect screenGeometry = QApplication::desktop()->screenGeometry( number );
QRect screenGeometry = QGuiApplication::screens()[ number ]->geometry();
setMinimumWidth( screenGeometry.width() );
setGeometry( screenGeometry.x(), screenGeometry.y() + screenGeometry.height() - height(), screenGeometry.width(), height() );
adjustSize();
......@@ -1027,8 +1029,23 @@ void FullscreenControllerWidget::setTargetScreen(int screennumber)
int FullscreenControllerWidget::targetScreen()
{
if( i_screennumber < 0 || i_screennumber >= QApplication::desktop()->screenCount() )
if( i_screennumber < 0 || i_screennumber >= QGuiApplication::screens().length() )
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
auto *screen = QGuiApplication::screenAt( p_intf->p_sys->p_mi->pos() );
if (screen != nullptr)
{
for (qsizetype i = 0; i < QGuiApplication::screens().length(); i++)
{
if (screen == QGuiApplication::screens()[i])
return i;
}
}
return -1;
#else
return QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
#endif
}
return i_screennumber;
}
......@@ -1113,18 +1130,23 @@ void FullscreenControllerWidget::mouseMoveEvent( QMouseEvent *event )
if( i_mouse_last_x == -1 || i_mouse_last_y == -1 )
return;
int i_moveX = event->globalX() - i_mouse_last_x;
int i_moveY = event->globalY() - i_mouse_last_y;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const auto pos = event->globalPosition();
#else
const auto pos = event->globalPos();
#endif
int i_moveX = pos.x() - i_mouse_last_x;
int i_moveY = pos.y() - i_mouse_last_y;
const QRect screenRect = QApplication::desktop()->screenGeometry( targetScreen() );
const QRect screenRect = QGuiApplication::screens()[ targetScreen() ]->geometry();
const int i_x = qBound( screenRect.left(), x() + i_moveX, screenRect.right() - width() );
const int i_y = qBound( screenRect.top(), y() + i_moveY, screenRect.bottom() - height() );
move( i_x, i_y );
i_mouse_last_x = event->globalX();
i_mouse_last_y = event->globalY();
i_mouse_last_x = pos.x();
i_mouse_last_y = pos.y();
}
}
......@@ -1135,8 +1157,13 @@ void FullscreenControllerWidget::mouseMoveEvent( QMouseEvent *event )
void FullscreenControllerWidget::mousePressEvent( QMouseEvent *event )
{
if( isWideFSC ) return;
i_mouse_last_x = event->globalX();
i_mouse_last_y = event->globalY();
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
auto pos = event->globalPosition();
#else
auto pos = event->globalPos();
#endif
i_mouse_last_x = pos.x();
i_mouse_last_y = pos.y();
event->accept();
}
......@@ -1154,7 +1181,11 @@ void FullscreenControllerWidget::mouseReleaseEvent( QMouseEvent *event )
/**
* On mouse go above FSC
*/
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void FullscreenControllerWidget::enterEvent( QEnterEvent *event )
#else
void FullscreenControllerWidget::enterEvent( QEvent *event )
#endif
{
b_mouse_over = true;
......
......@@ -277,7 +277,11 @@ protected:
void mouseMoveEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
void mousePressEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
void mouseReleaseEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void enterEvent( QEnterEvent *event ) Q_DECL_OVERRIDE;
#else
void enterEvent( QEvent *event ) Q_DECL_OVERRIDE;
#endif
void leaveEvent( QEvent *event ) Q_DECL_OVERRIDE;
void keyPressEvent( QKeyEvent *event ) Q_DECL_OVERRIDE;
......
......@@ -74,7 +74,7 @@ class ExtV4l2 : public QWidget
public:
ExtV4l2( intf_thread_t *, QWidget * );
void showEvent( QShowEvent *event ) Q_DECL_OVERRIDE;
void showEvent( QShowEvent *event ) override;
private:
intf_thread_t *p_intf;
......@@ -162,13 +162,13 @@ public:
const slider_data_t *p_data, int index );
protected:
float initialValue() Q_DECL_OVERRIDE;
float initialValue() override;
int index;
QStringList getBandsFromAout() const;
void writeToConfig();
void writeToConfig() override;
public slots:
void onValueChanged( int i ) Q_DECL_OVERRIDE;
void onValueChanged( int i ) override;
};
class Equalizer: public AudioFilterControlWidget
......@@ -179,7 +179,7 @@ public:
Equalizer( intf_thread_t *, QWidget * );
protected:
void build() Q_DECL_OVERRIDE;
void build() override;
private:
FilterSliderData *preamp;
......
......@@ -516,7 +516,7 @@ void InfoPanel::update( input_item_t *p_item)
current_item->addChild(child_item);
}
InfoTree->setItemExpanded( current_item, true);
current_item->setExpanded(true);
}
}
......
......@@ -113,7 +113,7 @@ class InputStatsPanel: public QWidget
public:
InputStatsPanel( QWidget * );
protected:
void hideEvent( QHideEvent * ) Q_DECL_OVERRIDE;
void hideEvent( QHideEvent * ) override;
private:
QTreeWidget *StatsTree;
QTreeWidgetItem *input;
......
......@@ -43,6 +43,14 @@
#include <QPainter>
#include <QTimer>
#include <QUrl>
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <QRandomGenerator>
static inline int qrand() {
auto * q = QRandomGenerator::system();
return q->generate();
}
#endif
#if defined (QT5_HAS_X11)
# include <X11/Xlib.h>
......@@ -82,6 +90,7 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i, QWidget* p_parent )
layout->setContentsMargins( 0, 0, 0, 0 );
stable = NULL;
p_window = NULL;
qApp->installNativeEventFilter(this);
show();
}
......@@ -261,7 +270,11 @@ void VideoWidget::setSize( unsigned int w, unsigned int h )
sync();
}
bool VideoWidget::nativeEvent( const QByteArray& eventType, void* message, long* )
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool VideoWidget::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *)
#else
bool VideoWidget::nativeEventFilter(const QByteArray &eventType, void *message, long *)
#endif
{
#if defined(QT5_HAS_X11)
# if defined(QT5_HAS_XCB)
......
......@@ -43,6 +43,7 @@
#include <QLabel>
#include <QMouseEvent>
#include <QPropertyAnimation>
#include <QAbstractNativeEventFilter>
class QMenu;
class QSlider;
......@@ -51,7 +52,7 @@ class SpeedControlWidget;
struct vout_window_t;
/******************** Video Widget ****************/
class VideoWidget : public QFrame
class VideoWidget : public QFrame, public QAbstractNativeEventFilter
{
Q_OBJECT
public:
......@@ -68,7 +69,11 @@ protected:
return NULL;
}
bool nativeEvent(const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
#else
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
#endif
virtual void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE;
void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
......
......@@ -39,9 +39,6 @@
#include <vlc_intf_strings.h>
#include <vlc_modules.h>
#include <vlc_plugin.h>
#ifdef _WIN32
#include <vlc_charset.h> /* FromWide for Win32 */
#endif
#include <QFileDialog>
#include <QDialogButtonBox>
......@@ -381,16 +378,14 @@ void DiscOpenPanel::onFocus()
wchar_t psz_name[512] = L"";
GetVolumeInformationW( drive, psz_name, 511, NULL, NULL, NULL, NULL, 0 );
char *psz_drive = FromWide( drive );
QString psz_drive = QString::fromWCharArray( drive );
QString displayName = psz_drive;
char *psz_title = FromWide( psz_name );
if( !EMPTY_STR(psz_title)) {
QString psz_title = QString::fromWCharArray( psz_name );
if( !psz_title.isEmpty()) {
displayName = displayName + " - " + psz_title;
}
ui.deviceCombo->addItem( displayName, qfu(psz_drive) );
free( psz_drive );
free( psz_title );
ui.deviceCombo->addItem( displayName, psz_drive );
}
/* go to next drive */
......
......@@ -640,8 +640,8 @@ int PLSelector::getCurrentItemCategory()
void PLSelector::wheelEvent( QWheelEvent *e )
{
if( verticalScrollBar()->isVisible() && (
(verticalScrollBar()->value() != verticalScrollBar()->minimum() && e->delta() >= 0 ) ||
(verticalScrollBar()->value() != verticalScrollBar()->maximum() && e->delta() < 0 )
(verticalScrollBar()->value() != verticalScrollBar()->minimum() && e->angleDelta().y() >= 0 ) ||
(verticalScrollBar()->value() != verticalScrollBar()->maximum() && e->angleDelta().y() < 0 )
) )
QApplication::sendEvent(verticalScrollBar(), e);
......
......@@ -99,7 +99,11 @@ signals:
void action( PLSelItem* );
private:
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
inline void enterEvent( QEnterEvent* ){ showAction(); }
#else
inline void enterEvent( QEvent* ){ showAction(); }
#endif
inline void leaveEvent( QEvent* ){ hideAction(); }
QTreeWidgetItem* qitem;
......
......@@ -538,7 +538,7 @@ void StandardPLPanel::browseInto()
void StandardPLPanel::wheelEvent( QWheelEvent *e )
{
if( e->modifiers() & Qt::ControlModifier ) {
int numSteps = e->delta() / 8 / 15;
int numSteps = e->angleDelta().y() / QWheelEvent::DefaultDeltasPerStep;
if( numSteps > 0)
increaseZoom();
else if( numSteps < 0)
......
......@@ -83,7 +83,7 @@ QPixmap VLCModel::getArtPixmap( const QModelIndex & index, const QSize & size )
QString key = artUrl + QString("%1%2").arg(size.width()).arg(size.height());
if( !QPixmapCache::find( key, artPix ))
if( !QPixmapCache::find( key, &artPix ))
{
if( artUrl.isEmpty() == false )
{
......@@ -97,7 +97,7 @@ QPixmap VLCModel::getArtPixmap( const QModelIndex & index, const QSize & size )
}
}
key = QString("noart%1%2").arg(size.width()).arg(size.height());
if( !QPixmapCache::find( key, artPix ) )
if( !QPixmapCache::find( key, &artPix ) )
{
artPix = QPixmap( ":/noart" ).scaled( size,
Qt::KeepAspectRatio,
......@@ -206,7 +206,7 @@ void VLCModel::ensureArtRequested( const QModelIndex &index )
QModelIndex child;
for( int row = 0 ; row < nbnodes ; row++ )
{
child = index.child( row, COLUMN_COVER );
child = index.model()->index( row, COLUMN_COVER );
if ( child.isValid() && child.data().toString().isEmpty() )
THEMIM->getIM()->requestArtUpdate( getInputItem( child ), false );
}
......
......@@ -622,8 +622,6 @@ void ModuleListConfigControl::fillGrid( QGridLayout *l, int line )
ModuleListConfigControl::~ModuleListConfigControl()
{
foreach ( checkBoxListItem *it, modules )
free( it->psz_module );
qDeleteAll( modules );
modules.clear();
delete groupBox;
......@@ -653,10 +651,10 @@ void ModuleListConfigControl::checkbox_lists( QString label, QString help, const
cb->setToolTip( formatTooltip( help ) );
cbl->checkBox = cb;
cbl->psz_module = strdup( psz_module );
cbl->psz_module = qfu( psz_module );
modules.append( cbl );
if( p_item->value.psz && strstr( p_item->value.psz, cbl->psz_module ) )
if( p_item->value.psz && strstr( p_item->value.psz, psz_module ) )
cbl->checkBox->setChecked( true );
}
......@@ -1404,7 +1402,7 @@ KeyInputDialog::KeyInputDialog( QTreeWidget *_table,
existingkeys = NULL;
table = _table;
setWindowTitle( ( b_global ? qtr( "Global" ) + QString(" ") : "" )
setWindowTitle( ( b_global ? qtr( "Global" ) + QString(" ") : QStringLiteral("") )
+ qtr( "Hotkey change" ) );
setWindowRole( "vlc-key-input" );
......
......@@ -407,7 +407,7 @@ private:
struct checkBoxListItem {
QCheckBox *checkBox;
char *psz_module;
QString psz_module;
};
class ModuleListConfigControl : public VStringConfigControl
......
......@@ -642,18 +642,21 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
"for DVD, VCD, and CDDA are set.\n"
"You can define a unique one or configure them \n"
"individually in the advanced preferences." ) );
char *psz_dvddiscpath = config_GetPsz( p_intf, "dvd" );
char *psz_vcddiscpath = config_GetPsz( p_intf, "vcd" );
char *psz_cddadiscpath = config_GetPsz( p_intf, "cd-audio" );
if( psz_dvddiscpath && psz_vcddiscpath && psz_cddadiscpath )
if( !strcmp( psz_cddadiscpath, psz_dvddiscpath ) &&
!strcmp( psz_dvddiscpath, psz_vcddiscpath ) )
bool have_cdda = module_exists( "cdda" );
char *dvd_discpath = config_GetPsz( p_intf, "dvd" );
char *vcd_discpath = config_GetPsz( p_intf, "vcd" );
char *cdda_discpath = have_cdda ? config_GetPsz( p_intf, "cd-audio" ) : nullptr;
if( dvd_discpath && vcd_discpath && ( !have_cdda || cdda_discpath ) )
{
ui.DVDDeviceComboBox->setEditText( qfu( psz_dvddiscpath ) );
if( !strcmp( dvd_discpath, vcd_discpath ) &&
( !have_cdda || !strcmp( cdda_discpath, dvd_discpath ) ) )
{
ui.DVDDeviceComboBox->setEditText( qfu( dvd_discpath ) );
}
}
free( psz_cddadiscpath );
free( psz_dvddiscpath );
free( psz_vcddiscpath );
free( cdda_discpath );
free( dvd_discpath );
free( vcd_discpath );
}
#ifndef _WIN32
QStringList DVDDeviceComboBoxStringList = QStringList();
......@@ -1092,9 +1095,10 @@ void SPrefsPanel::apply()
qobject_cast<QComboBox *>(optionWidgets["inputLE"])->currentText().toUtf8();
if( devicepath.size() > 0 )
{
config_PutPsz( p_intf, "dvd", devicepath );
config_PutPsz( p_intf, "vcd", devicepath );
config_PutPsz( p_intf, "cd-audio", devicepath );
config_PutPsz( p_intf, "dvd", devicepath.constData() );
config_PutPsz( p_intf, "vcd", devicepath.constData() );
if( module_exists( "cdda" ) )
config_PutPsz( p_intf, "cd-audio", devicepath.constData() );
}
#define CaC( name, factor ) config_PutInt( p_intf, name, i_comboValue * factor )
......
......@@ -156,7 +156,7 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
void ConvertDialog::fileBrowse()
{
QString fileExtension = ( ! profile->isEnabled() ) ? ".*" : "." + profile->getMux();
QString fileExtension = ( ! profile->isEnabled() ) ? QStringLiteral(".*") : QStringLiteral(".") + profile->getMux();
outgoingMRL = QFileDialog::getSaveFileUrl( this, qtr( "Save file..." ),
p_intf->p_sys->filepath,
......@@ -208,7 +208,7 @@ void ConvertDialog::close()
// Multiple, use the convention.
else
{
QString fileExtension = ( ! profile->isEnabled() ) ? ".*" : "." + profile->getMux();
QString fileExtension = ( ! profile->isEnabled() ) ? QStringLiteral(".*") : QStringLiteral(".") + profile->getMux();
newFileName = incomingMRLs->at(i);
......
......@@ -105,8 +105,8 @@ private:
void DestroyWidget( extension_widget_t *p_widget, bool b_cond = true );
protected:
void closeEvent( QCloseEvent* ) Q_DECL_OVERRIDE;
void keyPressEvent( QKeyEvent* ) Q_DECL_OVERRIDE;
void closeEvent( QCloseEvent* ) override;
void keyPressEvent( QKeyEvent* ) override;
private slots:
int TriggerClick( QObject *object );
......
......@@ -37,8 +37,8 @@ private:
virtual ~GotoTimeDialog();
QTimeEdit *timeEdit;
private slots:
void close() Q_DECL_OVERRIDE;
void cancel() Q_DECL_OVERRIDE;
void close() override;
void cancel() override;
void reset();
friend class Singleton<GotoTimeDialog>;
......
......@@ -306,7 +306,7 @@ void UpdateDialog::updateNotify( bool b_result )
.arg( QString::number( p_release->i_major ) )
.arg( QString::number( p_release->i_minor ) )
.arg( QString::number( p_release->i_revision ) )
.arg( p_release->i_extra == 0 ? "" : "." + QString::number( p_release->i_extra ) );
.arg( p_release->i_extra == 0 ? QStringLiteral("") : QStringLiteral(".") + QString::number( p_release->i_extra ) );
ui.updateNotifyLabel->setText( message );
message = qfu( p_release->psz_desc ).replace( "\n", "<br/>" );
......