Commit 16a4f1e5 authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Port deprecated QTextStream::endl/flush -> Qt::endl/flush

Therefore requiring Qt minimum version 5.14.
parent 9368a59e
Pipeline #169364 passed with stage
in 3 minutes and 19 seconds
......@@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project(k3b VERSION ${RELEASE_SERVICE_VERSION})
set (QT_MIN_VERSION "5.10.0")
set (QT_MIN_VERSION "5.14.0")
set (KF5_MIN_VERSION "5.88.0")
set (KDE_COMPILERSETTINGS_LEVEL "5.84")
......
......@@ -79,11 +79,11 @@ void K3b::Thread::slotEnsureDoneTimeout()
void K3b::Thread::waitUntilFinished()
{
foreach( K3b::Thread* thread, s_threads ) {
qDebug() << "Waiting for thread " << thread << endl;
qDebug() << "Waiting for thread " << thread << Qt::endl;
thread->wait();
}
qDebug() << "Thread waiting done." << endl;
qDebug() << "Thread waiting done." << Qt::endl;
}
......@@ -136,7 +136,7 @@ void K3b::CloneTocReader::readFile()
qDebug() << "(K3b::CloneTocReader) invalid track start: "
<< (int)ft->pmin << "."
<< (int)ft->psec << "."
<< (int)ft->pframe << endl;
<< (int)ft->pframe << Qt::endl;
return;
}
}
......
......@@ -253,11 +253,11 @@ bool K3b::DataTrackReader::run()
unsigned char* buffer = new unsigned char[d->usedSectorSize*s_bufferSizeSectors];
while( s_bufferSizeSectors > 0 && read( buffer, d->firstSector.lba(), s_bufferSizeSectors ) < 0 ) {
qDebug() << "(K3b::DataTrackReader) determine max read sectors: "
<< s_bufferSizeSectors << " too high." << endl;
<< s_bufferSizeSectors << " too high." << Qt::endl;
s_bufferSizeSectors /= 2;
}
qDebug() << "(K3b::DataTrackReader) determine max read sectors: "
<< s_bufferSizeSectors << " is max." << endl;
<< s_bufferSizeSectors << " is max." << Qt::endl;
// s_bufferSizeSectors = K3b::Device::determineMaxReadingBufferSize( d->device, d->firstSector );
if( s_bufferSizeSectors <= 0 ) {
......@@ -305,7 +305,7 @@ bool K3b::DataTrackReader::run()
if( d->ioDevice ) {
if( d->ioDevice->write( reinterpret_cast<char*>(buffer ), readBytes ) != readBytes ) {
qDebug() << "(K3b::DataTrackReader::WorkThread) error while writing to dev " << d->ioDevice
<< " current sector: " << (currentSector.lba()-d->firstSector.lba()) << endl;
<< " current sector: " << (currentSector.lba()-d->firstSector.lba()) << Qt::endl;
emit debuggingOutput( "K3b::DataTrackReader",
QString("Error while writing to IO device. Current sector is %2.")
.arg(currentSector.lba()-d->firstSector.lba()) );
......@@ -316,7 +316,7 @@ bool K3b::DataTrackReader::run()
else {
if( file.write( reinterpret_cast<char*>(buffer), readBytes ) != readBytes ) {
qDebug() << "(K3b::DataTrackReader::WorkThread) error while writing to file " << d->imagePath
<< " current sector: " << (currentSector.lba()-d->firstSector.lba()) << endl;
<< " current sector: " << (currentSector.lba()-d->firstSector.lba()) << Qt::endl;
emit debuggingOutput( "K3b::DataTrackReader",
QString("Error while writing to file %1. Current sector is %2.")
.arg(d->imagePath).arg(currentSector.lba()-d->firstSector.lba()) );
......
......@@ -317,7 +317,7 @@ void K3b::DvdBooktypeJob::startBooktypeChange()
qDebug() << "***** dvd+rw-booktype parameters:\n";
QString s = d->process->joinedArgs();
qDebug() << s << endl << flush;
qDebug() << s << Qt::endl << Qt::flush;
emit debuggingOutput( "dvd+rw-booktype command:", s );
if( !d->process->start( KProcess::OnlyStderrChannel ) ) {
......
......@@ -186,7 +186,7 @@ void K3b::DvdCopyJob::slotDiskInfoReady( K3b::Device::DeviceHandler* dh )
if( K3b::LibDvdCss* libcss = K3b::LibDvdCss::create() ) {
qDebug() << "(K3b::DvdCopyJob) succeeded.";
qDebug() << "(K3b::DvdCopyJob) dvdcss_open(" << m_readerDevice->blockDeviceName() << ") = "
<< libcss->open(m_readerDevice) << endl;
<< libcss->open(m_readerDevice) << Qt::endl;
haveLibdvdcss = true;
delete libcss;
......
......@@ -486,7 +486,7 @@ void K3b::DvdFormattingJob::startFormatting( const Device::DiskInfo& diskInfo )
qDebug() << "***** dvd+rw-format parameters:\n";
QString s = d->process->joinedArgs();
qDebug() << s << endl << flush;
qDebug() << s << Qt::endl << Qt::flush;
emit debuggingOutput( "dvd+rw-format command:", s );
if( !d->process->start( KProcess::OnlyStderrChannel ) ) {
......
......@@ -186,7 +186,7 @@ void K3b::ReadcdReader::start()
qDebug() << "***** readcd parameters:\n";
QString s = d->process->joinedArgs();
qDebug() << s << endl << flush;
qDebug() << s << Qt::endl << Qt::flush;
emit debuggingOutput("readcd command:", s);
d->canceled = false;
......@@ -194,7 +194,7 @@ void K3b::ReadcdReader::start()
if( !d->process->start( KProcess::SeparateChannels ) ) {
// something went wrong when starting the program
// it "should" be the executable
qCritical() << "(K3b::ReadcdReader) could not start readcd" << endl;
qCritical() << "(K3b::ReadcdReader) could not start readcd" << Qt::endl;
emit infoMessage( i18n("Could not start readcd."), K3b::Job::MessageError );
jobFinished( false );
}
......@@ -225,7 +225,7 @@ void K3b::ReadcdReader::slotStderrLine( const QString& line )
d->blocksToRead -= d->firstSector.lba();
if( !ok )
qCritical() << "(K3b::ReadcdReader) blocksToRead parsing error in line: "
<< line.mid(4) << endl;
<< line.mid(4) << Qt::endl;
}
else if( line.startsWith( "addr:" ) ) {
......@@ -247,7 +247,7 @@ void K3b::ReadcdReader::slotStderrLine( const QString& line )
}
else
qCritical() << "(K3b::ReadcdReader) currentReadBlock parsing error in line: "
<< line.mid( 6, line.indexOf("cnt")-7 ) << endl;
<< line.mid( 6, line.indexOf("cnt")-7 ) << Qt::endl;
}
else if( line.contains("Cannot read source disk") ) {
......@@ -261,7 +261,7 @@ void K3b::ReadcdReader::slotStderrLine( const QString& line )
int problemSector = line.mid( pos, line.indexOf( QRegExp("\\D"), pos )-pos ).toInt(&ok);
if( !ok ) {
qCritical() << "(K3b::ReadcdReader) problemSector parsing error in line: "
<< line.mid( pos, line.indexOf( QRegExp("\\D"), pos )-pos ) << endl;
<< line.mid( pos, line.indexOf( QRegExp("\\D"), pos )-pos ) << Qt::endl;
}
emit infoMessage( i18n("Retrying from sector %1.",problemSector), MessageInfo );
}
......@@ -274,7 +274,7 @@ void K3b::ReadcdReader::slotStderrLine( const QString& line )
int problemSector = line.mid( pos, line.indexOf( QRegExp("\\D"), pos )-pos ).toInt(&ok);
if( !ok ) {
qCritical() << "(K3b::ReadcdReader) problemSector parsing error in line: "
<< line.mid( pos, line.indexOf( QRegExp("\\D"), pos )-pos ) << endl;
<< line.mid( pos, line.indexOf( QRegExp("\\D"), pos )-pos ) << Qt::endl;
}
if( line.contains( "not corrected") ) {
......
......@@ -164,7 +164,7 @@ void K3b::VideoDVDTitleDetectClippingJob::startTranscode( int chapter )
// produce some debugging output
qDebug() << "***** transcode parameters:\n";
QString s = d->process->joinedArgs();
qDebug() << s << flush;
qDebug() << s << Qt::flush;
emit debuggingOutput( d->usedTranscodeBin->name() + " command:", s);
// start the process
......
......@@ -366,7 +366,7 @@ void K3b::VideoDVDTitleTranscodingJob::startTranscode( int pass )
// produce some debugging output
qDebug() << "***** transcode parameters:\n";
QString s = d->process->joinedArgs();
qDebug() << s << flush;
qDebug() << s << Qt::flush;
emit debuggingOutput( d->usedTranscodeBin->name() + " command:", s);
// start the process
......
......@@ -308,7 +308,7 @@ int K3b::AudioDecoder::decode( char* _data, int maxLen )
if( bytesToPad > 0 ) {
qDebug() << "(K3b::AudioDecoder) track length: " << lengthToDecode
<< "; decoded module data: " << d->alreadyDecoded
<< "; we need to pad " << bytesToPad << " bytes." << endl;
<< "; we need to pad " << bytesToPad << " bytes." << Qt::endl;
if( DECODING_BUFFER_SIZE < bytesToPad )
bytesToPad = DECODING_BUFFER_SIZE;
......@@ -329,7 +329,7 @@ int K3b::AudioDecoder::decode( char* _data, int maxLen )
// check if we decoded too much
if( d->alreadyDecoded + read > lengthToDecode ) {
qDebug() << "(K3b::AudioDecoder) we decoded too much. Cutting output by "
<< (read + d->alreadyDecoded - lengthToDecode) << endl;
<< (read + d->alreadyDecoded - lengthToDecode) << Qt::endl;
read = lengthToDecode - d->alreadyDecoded;
}
}
......@@ -464,7 +464,7 @@ void K3b::AudioDecoder::from8BitTo16BitBeSigned( char* src, char* dest, int samp
bool K3b::AudioDecoder::seek( const K3b::Msf& pos )
{
qDebug() << "(K3b::AudioDecoder) seek from " << d->currentPos.toString() << " (+" << d->currentPosOffset
<< ") to " << pos.toString() << endl;
<< ") to " << pos.toString() << Qt::endl;
if( pos > length() )
return false;
......@@ -493,7 +493,7 @@ bool K3b::AudioDecoder::seek( const K3b::Msf& pos )
&&
( pos - d->currentPos < K3b::Msf(0,10,0) ) ) { // < 10 seconds is ok
qDebug() << "(K3b::AudioDecoder) performing perfect seek from " << d->currentPos.toString()
<< " to " << pos.toString() << ". :)" << endl;
<< " to " << pos.toString() << ". :)" << Qt::endl;
qint64 bytesToDecode = pos.audioBytes() - d->currentPos.audioBytes() - d->currentPosOffset;
qDebug() << "(K3b::AudioDecoder) seeking " << bytesToDecode << " bytes.";
......
......@@ -346,7 +346,7 @@ void K3b::AudioDoc::addSources( K3b::AudioTrack* parent,
{
qDebug() << "(K3b::AudioDoc::addSources( " << parent << ", "
<< urls.first().toLocalFile() << ", "
<< sourceAfter << " )" << endl;
<< sourceAfter << " )" << Qt::endl;
QList<QUrl> allUrls = extractUrlList( urls );
QList<QUrl>::const_iterator end(allUrls.constEnd());
for( QList<QUrl>::const_iterator it = allUrls.constBegin(); it != end; ++it ) {
......@@ -444,7 +444,7 @@ K3b::AudioDecoder* K3b::AudioDoc::getDecoderForUrl( const QUrl& url, bool* reuse
}
else if( (decoder = K3b::AudioDecoderFactory::createDecoder( url )) ) {
qDebug() << "(K3b::AudioDoc) using " << decoder->metaObject()->className()
<< " for decoding of " << url.toLocalFile() << endl;
<< " for decoding of " << url.toLocalFile() << Qt::endl;
decoder->setFilename( url.toLocalFile() );
*reused = false;
......@@ -914,7 +914,7 @@ bool K3b::AudioDoc::saveDocumentData( QDomElement* docElem )
sourcesParent.appendChild( sourceElem );
}
else {
qCritical() << "(K3b::AudioDoc) saving sources other than file or zero not supported yet." << endl;
qCritical() << "(K3b::AudioDoc) saving sources other than file or zero not supported yet." << Qt::endl;
return false;
}
}
......
......@@ -139,7 +139,7 @@ bool K3b::AudioImager::run()
if( read < 0 ) {
emit infoMessage( i18n("Error while decoding track %1.", track->trackNumber()), K3b::Job::MessageError );
qDebug() << "(K3b::AudioImager::WorkThread) read error on track " << track->trackNumber()
<< " at pos " << K3b::Msf(trackRead/2352) << endl;
<< " at pos " << K3b::Msf(trackRead/2352) << Qt::endl;
d->lastError = K3b::AudioImager::ERROR_DECODING_TRACK;
return false;
}
......
......@@ -74,7 +74,7 @@ int K3b::AudioMaxSpeedJob::Private::speedTest( K3b::AudioDataSource* source, QIO
// KB/sec (add 1 millisecond to avoid division by 0)
int throughput = (dataRead*1000+usedT)/(usedT+1)/1024;
qDebug() << "(K3b::AudioMaxSpeedJob) throughput: " << throughput
<< " (" << dataRead << "/" << usedT << ")" << endl;
<< " (" << dataRead << "/" << usedT << ")" << Qt::endl;
return throughput;
......
......@@ -122,7 +122,7 @@ void K3b::AudioNormalizeJob::slotStdLine( const QString& line )
<< m_currentTrack
<< " "
<< m_files.at(m_currentTrack-1)
<< endl;
<< Qt::endl;
}
else {
emit newTask( i18n("Computing level for track %1 of %2",m_currentTrack,m_files.count()) );
......@@ -130,7 +130,7 @@ void K3b::AudioNormalizeJob::slotStdLine( const QString& line )
<< m_currentTrack
<< " "
<< m_files.at(m_currentTrack-1)
<< endl;
<< Qt::endl;
}
m_currentTrack++;
......@@ -147,7 +147,7 @@ void K3b::AudioNormalizeJob::slotStdLine( const QString& line )
emit subPercent( p );
else
qDebug() << "(K3b::AudioNormalizeJob) subPercent parsing error at pos "
<< 19 << " in line '" << line.mid( 19, 3 ) << "'" << endl;
<< 19 << " in line '" << line.mid( 19, 3 ) << "'" << Qt::endl;
// batch progress starts at position 50 in version 0.7.6
p = line.mid( 50, 3 ).toInt(&ok);
......@@ -157,7 +157,7 @@ void K3b::AudioNormalizeJob::slotStdLine( const QString& line )
emit percent( 50 + (int)((double)p/2.0) );
else
qDebug() << "(K3b::AudioNormalizeJob) percent parsing error at pos "
<< 50 << " in line '" << line.mid( 50, 3 ) << "'" << endl;
<< 50 << " in line '" << line.mid( 50, 3 ) << "'" << Qt::endl;
}
}
......
......@@ -530,7 +530,7 @@ void K3b::AudioTrack::merge( K3b::AudioTrack* trackToMerge, K3b::AudioDataSource
while( trackToMerge->firstSource() ) {
K3b::AudioDataSource* s = trackToMerge->firstSource();
qDebug() << "(K3b::AudioTrack::merge) merging source " << s << " from track " << s->track() << " into track "
<< this << " after source " << sourceAfter << endl;
<< this << " after source " << sourceAfter << Qt::endl;
s->moveAfter( sourceAfter );
sourceAfter = s;
}
......@@ -712,10 +712,10 @@ K3b::Device::Track K3b::AudioTrack::toCdTrack() const
void K3b::AudioTrack::debug()
{
qDebug() << "Track " << this << endl
<< " Prev: " << d->prev << endl
<< " Next: " << d->next << endl
<< " Sources:" << endl;
qDebug() << "Track " << this << Qt::endl
<< " Prev: " << d->prev << Qt::endl
<< " Next: " << d->next << Qt::endl
<< " Sources:" << Qt::endl;
K3b::AudioDataSource* s = d->firstSource;
while( s ) {
qDebug() << " " << s << " - Prev: " << s->prev() << " Next: " << s->next();
......
......@@ -619,7 +619,7 @@ bool K3b::DataDoc::loadDataItem( QDomElement& elem, K3b::DirItem* parent )
newDirItem = static_cast<K3b::DirItem*>(item);
}
else {
qCritical() << "(K3b::DataDoc) INVALID DOCUMENT: item " << item->k3bPath() << " saved twice" << endl;
qCritical() << "(K3b::DataDoc) INVALID DOCUMENT: item " << item->k3bPath() << " saved twice" << Qt::endl;
return false;
}
}
......
......@@ -741,7 +741,7 @@ bool K3b::DataJob::waitForBurnMedium()
qDebug() << "(K3b::DataJob) using datamode: "
<< (d->usedDataMode == K3b::DataMode1 ? "mode1" : "mode2")
<< endl;
<< Qt::endl;
}
}
else if( usedMultiSessionMode() == K3b::DataDoc::NONE )
......
......@@ -106,11 +106,11 @@ public:
if( !inodeInfo.items.contains( item ) ) {
qCritical() << "(K3b::FileCompilationSizeHandler) "
<< item->localPath()
<< " has been removed without being added!" << endl;
<< " has been removed without being added!" << Qt::endl;
}
else {
if( item->itemSize(followSymlinks) != inodeInfo.savedSize ) {
qCritical() << "(K3b::FileCompilationSizeHandler) savedSize differs!" << endl;
qCritical() << "(K3b::FileCompilationSizeHandler) savedSize differs!" << Qt::endl;
}
inodeInfo.items.removeOne( item );
......@@ -128,7 +128,7 @@ public:
if( !specialItems.contains( item ) ) {
qCritical() << "(K3b::FileCompilationSizeHandler) Special item "
<< item->k3bName()
<< " has been removed without being added!" << endl;
<< " has been removed without being added!" << Qt::endl;
}
else {
specialItems.removeOne( item );
......
......@@ -63,17 +63,17 @@ K3b::FileItem::FileItem( const QString& filePath, K3b::DataDoc& doc, const QStri
}
else {
init( filePath, k3bName, doc, &statBuf, 0 );
qCritical() << "(KFileItem) stat failed: " << QString::fromLocal8Bit( ::strerror(errno) ) << endl;
qCritical() << "(KFileItem) stat failed: " << QString::fromLocal8Bit( ::strerror(errno) ) << Qt::endl;
}
}
else {
qCritical() << "(KFileItem) lstat failed: " << QString::fromLocal8Bit( ::strerror(errno) ) << endl;
qCritical() << "(KFileItem) lstat failed: " << QString::fromLocal8Bit( ::strerror(errno) ) << Qt::endl;
if( k3b_stat( QFile::encodeName(filePath), &followedStatBuf ) == 0 ) {
init( filePath, k3bName, doc, 0, &followedStatBuf );
}
else {
init( filePath, k3bName, doc, 0, 0 );
qCritical() << "(KFileItem) stat failed: " << QString::fromLocal8Bit( ::strerror(errno) ) << endl;
qCritical() << "(KFileItem) stat failed: " << QString::fromLocal8Bit( ::strerror(errno) ) << Qt::endl;
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment