Support Qt 6 (commit 174154b)

This commit is contained in:
Martchus 2020-09-04 00:47:41 +02:00
parent 52e8b39207
commit e3b15b0768
2 changed files with 9 additions and 8 deletions

View File

@ -53,14 +53,15 @@ FfmpegLauncher::FfmpegLauncher(PlayerWatcher &watcher, QObject *parent)
connect(&watcher, &PlayerWatcher::playbackStopped, this, &FfmpegLauncher::stopFfmpeg); connect(&watcher, &PlayerWatcher::playbackStopped, this, &FfmpegLauncher::stopFfmpeg);
connect(m_ffmpeg, &QProcess::started, this, &FfmpegLauncher::ffmpegStarted); connect(m_ffmpeg, &QProcess::started, this, &FfmpegLauncher::ffmpegStarted);
connect(m_ffmpeg, connect(m_ffmpeg,
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) || QT_DEPRECATED_SINCE(5, 6) #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) || (QT_DEPRECATED_SINCE(5, 6) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
static_cast<void (QProcess::*)(QProcess::ProcessError)>( static_cast<void (QProcess::*)(QProcess::ProcessError)>(
#endif #endif
&QProcess::error &QProcess::error
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) || QT_DEPRECATED_SINCE(5, 6) #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) || (QT_DEPRECATED_SINCE(5, 6) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
) )
#endif #endif
, this, &FfmpegLauncher::ffmpegError); ,
this, &FfmpegLauncher::ffmpegError);
connect(m_ffmpeg, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &FfmpegLauncher::ffmpegFinished); connect(m_ffmpeg, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &FfmpegLauncher::ffmpegFinished);
m_ffmpeg->setProgram(QStringLiteral("ffmpeg")); m_ffmpeg->setProgram(QStringLiteral("ffmpeg"));
m_ffmpeg->setProcessChannelMode(QProcess::ForwardedChannels); m_ffmpeg->setProcessChannelMode(QProcess::ForwardedChannels);

View File

@ -45,7 +45,7 @@ inline void FfmpegLauncher::setSink(const QString &sinkName)
inline void FfmpegLauncher::setFFmpegInputOptions(const QString &options) inline void FfmpegLauncher::setFFmpegInputOptions(const QString &options)
{ {
m_inputOptions = options.split(QChar(' '), QString::SkipEmptyParts); m_inputOptions = options.split(QChar(' '), Qt::SkipEmptyParts);
} }
inline void FfmpegLauncher::setFFmpegBinary(const QString &path) inline void FfmpegLauncher::setFFmpegBinary(const QString &path)
@ -55,7 +55,7 @@ inline void FfmpegLauncher::setFFmpegBinary(const QString &path)
inline void FfmpegLauncher::setFFmpegOptions(const QString &options) inline void FfmpegLauncher::setFFmpegOptions(const QString &options)
{ {
m_options = options.split(QChar(' '), QString::SkipEmptyParts); m_options = options.split(QChar(' '), Qt::SkipEmptyParts);
} }
inline void FfmpegLauncher::setTargetDir(const QString &path) inline void FfmpegLauncher::setTargetDir(const QString &path)