summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2014-10-05 05:36:05 (GMT)
committerMontel Laurent <montel@kde.org>2014-10-05 05:36:05 (GMT)
commita94b09684a1d7eb8734b39a846ba830602fe6571 (patch)
tree96c75faf66f7c1128c209ee55d406c5294becda0
parent57adb81a031ecf8aeae3b9c03fd402ba7b4124ec (diff)
Use new connect api. Remove not necessary include moc
-rw-r--r--generators/comicbook/unrar.cpp6
-rw-r--r--generators/dvi/dviRenderer.cpp7
-rw-r--r--generators/dvi/dviexport.cpp3
-rw-r--r--generators/dvi/fontpool.cpp4
-rw-r--r--generators/dvi/generator_dvi.cpp6
-rw-r--r--generators/spectre/generator_ghostview.cpp4
6 files changed, 12 insertions, 18 deletions
diff --git a/generators/comicbook/unrar.cpp b/generators/comicbook/unrar.cpp
index adee9aa..58156eb 100644
--- a/generators/comicbook/unrar.cpp
+++ b/generators/comicbook/unrar.cpp
@@ -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"
diff --git a/generators/dvi/dviRenderer.cpp b/generators/dvi/dviRenderer.cpp
index 12d17b3..2a7b592 100644
--- a/generators/dvi/dviRenderer.cpp
+++ b/generators/dvi/dviRenderer.cpp
@@ -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"
diff --git a/generators/dvi/dviexport.cpp b/generators/dvi/dviexport.cpp
index c8db452..c7ed698 100644
--- a/generators/dvi/dviexport.cpp
+++ b/generators/dvi/dviexport.cpp
@@ -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"
diff --git a/generators/dvi/fontpool.cpp b/generators/dvi/fontpool.cpp
index 4c84d21..55b5234 100644
--- a/generators/dvi/fontpool.cpp
+++ b/generators/dvi/fontpool.cpp
@@ -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"
diff --git a/generators/dvi/generator_dvi.cpp b/generators/dvi/generator_dvi.cpp
index 3611e6b..b35d457 100644
--- a/generators/dvi/generator_dvi.cpp
+++ b/generators/dvi/generator_dvi.cpp
@@ -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;
diff --git a/generators/spectre/generator_ghostview.cpp b/generators/spectre/generator_ghostview.cpp
index b71f43f..218fe06 100644
--- a/generators/spectre/generator_ghostview.cpp
+++ b/generators/spectre/generator_ghostview.cpp
@@ -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()