Use new connect api. Remove not necessary include moc

This commit is contained in:
Montel Laurent 2014-10-05 07:36:05 +02:00
parent 57adb81a03
commit a94b09684a
6 changed files with 12 additions and 18 deletions

View file

@ -223,10 +223,11 @@ int Unrar::startSyncProcess( const QStringList &args )
mProcess->setOutputChannelMode( KProcess::SeparateChannels );
#endif
connect( mProcess, SIGNAL(readyReadStandardOutput()), SLOT(readFromStdout()) );
connect( mProcess, SIGNAL(readyReadStandardError()), SLOT(readFromStderr()) );
connect(mProcess, &KPtyProcess::readyReadStandardOutput, this, &Unrar::readFromStdout);
connect(mProcess, &KPtyProcess::readyReadStandardError, this, &Unrar::readFromStderr);
connect( mProcess, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(finished(int,QProcess::ExitStatus)) );
#if defined(Q_OS_WIN)
mProcess->start( helper->unrarPath, args, QIODevice::ReadWrite | QIODevice::Unbuffered );
ret = mProcess->waitForFinished( -1 ) ? 0 : 1;
@ -258,4 +259,3 @@ void Unrar::writeToProcess( const QByteArray &data )
#endif
}
#include "unrar.moc"

View file

@ -72,9 +72,9 @@ dviRenderer::dviRenderer(bool useFontHinting)
//qCDebug(OkularDviDebug) << "dviRenderer( parent=" << par << " )";
#endif
connect( &font_pool, SIGNAL( error(QString,int) ), this, SIGNAL( error(QString,int) ) );
connect( &font_pool, SIGNAL( warning(QString,int) ), this, SIGNAL( warning(QString,int) ) );
connect( PS_interface, SIGNAL( error(QString,int) ), this, SIGNAL( error(QString,int) ) );
connect(&font_pool, &fontPool::error, this, &dviRenderer::error);
connect(&font_pool, &fontPool::warning, this, &dviRenderer::warning);
connect(PS_interface, &ghostscript_interface::error, this, &dviRenderer::error);
}
@ -764,4 +764,3 @@ void dviRenderer::setEventLoop(QEventLoop *el)
m_eventLoop = el;
}
#include "dviRenderer.moc"

View file

@ -65,7 +65,7 @@ void DVIExport::start(const QString& command,
process_ = new KProcess;
process_->setOutputChannelMode(KProcess::MergedChannels);
process_->setNextOpenMode(QIODevice::Text);
connect(process_, SIGNAL(readyReadStandardOutput()), this, SLOT(output_receiver()));
connect(process_, &KProcess::readyReadStandardOutput, this, &DVIExport::output_receiver);
connect(process_, SIGNAL(finished(int)), this, SLOT(finished(int)));
*process_ << command << args;
@ -323,4 +323,3 @@ void DVIExportToPS::abort_process_impl()
}
#include "dviexport.moc"

View file

@ -263,8 +263,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
// the output of MetaFont into its stderr. Here we make sure this
// output is intercepted and parsed.
kpsewhich_ = new QProcess();
connect(kpsewhich_, SIGNAL(readyReadStandardError()),
this, SLOT(mf_output_receiver()));
connect(kpsewhich_, &QProcess::readyReadStandardError, this, &fontPool::mf_output_receiver);
// Now run... kpsewhich. In case of error, kick up a fuss.
// This string is not going to be quoted, as it might be were it
@ -480,4 +479,3 @@ void fontPool::mf_output_receiver()
}
}
#include "fontpool.moc"

View file

@ -80,9 +80,9 @@ bool DviGenerator::loadDocument( const QString & fileName, QVector< Okular::Page
(void)userMutex();
m_dviRenderer = new dviRenderer(documentMetaData("TextHinting", QVariant()).toBool());
connect( m_dviRenderer, SIGNAL( error(QString,int) ), this, SIGNAL( error(QString,int) ) );
connect( m_dviRenderer, SIGNAL( warning(QString,int) ), this, SIGNAL( warning(QString,int) ) );
connect( m_dviRenderer, SIGNAL( notice(QString,int) ), this, SIGNAL( notice(QString,int) ) );
connect(m_dviRenderer, &dviRenderer::error, this, &DviGenerator::error);
connect(m_dviRenderer, &dviRenderer::warning, this, &DviGenerator::warning);
connect(m_dviRenderer, &dviRenderer::notice, this, &DviGenerator::notice);
#ifdef DVI_OPEN_BUSYLOOP
static const ushort s_waitTime = 800; // milliseconds
static const int s_maxIterations = 10;

View file

@ -61,9 +61,7 @@ GSGenerator::GSGenerator( QObject *parent, const QVariantList &args ) :
GSRendererThread *renderer = GSRendererThread::getCreateRenderer();
if (!renderer->isRunning()) renderer->start();
connect(renderer, SIGNAL(imageDone(QImage*,Okular::PixmapRequest*)),
SLOT(slotImageGenerated(QImage*,Okular::PixmapRequest*)),
Qt::QueuedConnection);
connect(renderer, &GSRendererThread::imageDone, this, &GSGenerator::slotImageGenerated, Qt::QueuedConnection);
}
GSGenerator::~GSGenerator()