Adapt to changes in c++utilities

This commit is contained in:
Martchus 2019-06-10 23:01:04 +02:00
parent 7f104eb525
commit bdaac6db2d
4 changed files with 16 additions and 9 deletions

View File

@ -10,8 +10,7 @@
#include <iostream> #include <iostream>
using namespace std; using namespace std;
using namespace IoUtilities; using namespace CppUtilities;
using namespace ConversionUtilities;
namespace DBusSoundRecorder { namespace DBusSoundRecorder {
@ -53,7 +52,15 @@ FfmpegLauncher::FfmpegLauncher(PlayerWatcher &watcher, QObject *parent)
connect(&watcher, &PlayerWatcher::nextSong, this, &FfmpegLauncher::nextSong); connect(&watcher, &PlayerWatcher::nextSong, this, &FfmpegLauncher::nextSong);
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, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this, &FfmpegLauncher::ffmpegError); connect(m_ffmpeg,
#if QT_DEPRECATED_SINCE(5,6)
static_cast<void (QProcess::*)(QProcess::ProcessError)>(
#endif
&QProcess::error
#if QT_DEPRECATED_SINCE(5,6)
)
#endif
, this, &FfmpegLauncher::ffmpegError);
connect(m_ffmpeg, static_cast<void (QProcess::*)(int)>(&QProcess::finished), this, &FfmpegLauncher::ffmpegFinished); connect(m_ffmpeg, static_cast<void (QProcess::*)(int)>(&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

@ -11,7 +11,7 @@
#include <iostream> #include <iostream>
using namespace std; using namespace std;
using namespace ApplicationUtilities; using namespace CppUtilities;
using namespace DBusSoundRecorder; using namespace DBusSoundRecorder;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
@ -55,7 +55,7 @@ int main(int argc, char *argv[])
{ &applicationArg, &sinkArg, &ffmpegInputOptions, &targetDirArg, &targetExtArg, &ignorePlaybackStatusArg, &ffmpegBinArg, &ffmpegOptions }); { &applicationArg, &sinkArg, &ffmpegInputOptions, &targetDirArg, &targetExtArg, &ignorePlaybackStatusArg, &ffmpegBinArg, &ffmpegOptions });
parser.setMainArguments({ &helpArg, &recordArg }); parser.setMainArguments({ &helpArg, &recordArg });
// parse command line arguments // parse command line arguments
parser.parseArgsOrExit(argc, argv); parser.parseArgs(argc, argv);
try { try {
if (recordArg.isPresent()) { if (recordArg.isPresent()) {
// start watching/recording // start watching/recording

View File

@ -9,7 +9,7 @@
#include <iostream> #include <iostream>
using namespace std; using namespace std;
using namespace ChronoUtilities; using namespace CppUtilities;
namespace DBusSoundRecorder { namespace DBusSoundRecorder {

View File

@ -32,7 +32,7 @@ public:
const QString &genre() const; const QString &genre() const;
unsigned int trackNumber() const; unsigned int trackNumber() const;
unsigned int diskNumber() const; unsigned int diskNumber() const;
ChronoUtilities::TimeSpan length() const; CppUtilities::TimeSpan length() const;
void setSilent(bool silent); void setSilent(bool silent);
signals: signals:
@ -62,7 +62,7 @@ private:
QString m_genre; QString m_genre;
unsigned int m_trackNumber; unsigned int m_trackNumber;
unsigned int m_diskNumber; unsigned int m_diskNumber;
ChronoUtilities::TimeSpan m_length; CppUtilities::TimeSpan m_length;
bool m_silent; bool m_silent;
bool m_ignorePlaybackStatus; bool m_ignorePlaybackStatus;
}; };
@ -117,7 +117,7 @@ inline unsigned int PlayerWatcher::diskNumber() const
return m_diskNumber; return m_diskNumber;
} }
inline ChronoUtilities::TimeSpan PlayerWatcher::length() const inline CppUtilities::TimeSpan PlayerWatcher::length() const
{ {
return m_length; return m_length;
} }