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>
using namespace std;
using namespace IoUtilities;
using namespace ConversionUtilities;
using namespace CppUtilities;
namespace DBusSoundRecorder {
@ -53,7 +52,15 @@ FfmpegLauncher::FfmpegLauncher(PlayerWatcher &watcher, QObject *parent)
connect(&watcher, &PlayerWatcher::nextSong, this, &FfmpegLauncher::nextSong);
connect(&watcher, &PlayerWatcher::playbackStopped, this, &FfmpegLauncher::stopFfmpeg);
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);
m_ffmpeg->setProgram(QStringLiteral("ffmpeg"));
m_ffmpeg->setProcessChannelMode(QProcess::ForwardedChannels);

View File

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

View File

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

View File

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