Commit f92b1f3f authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Port some Qt4 style connects

parent 54762a17
...@@ -24,7 +24,7 @@ DlgWebinterface::DlgWebinterface(QDialog *parent) ...@@ -24,7 +24,7 @@ DlgWebinterface::DlgWebinterface(QDialog *parent)
readConfig(); readConfig();
connect(parent, SIGNAL(accepted()), SLOT(saveSettings())); connect(parent, &QDialog::accepted, this, &DlgWebinterface::saveSettings);
connect(webinterfacePwd, &KLineEdit::textChanged, this, &DlgWebinterface::changed); connect(webinterfacePwd, &KLineEdit::textChanged, this, &DlgWebinterface::changed);
} }
......
...@@ -30,8 +30,8 @@ PluginSelector::PluginSelector(QDialog * parent) ...@@ -30,8 +30,8 @@ PluginSelector::PluginSelector(QDialog * parent)
load(); load();
connect(parent, SIGNAL(accepted()), SLOT(saveState())); connect(parent, &QDialog::accepted, this, &PluginSelector::saveState);
connect(parent, SIGNAL(rejected()), SLOT(loadDefaults())); connect(parent, &QDialog::rejected, this, &PluginSelector::loadDefaults);
} }
PluginSelector::~PluginSelector() PluginSelector::~PluginSelector()
......
...@@ -91,7 +91,7 @@ void DataSourceFactory::init() ...@@ -91,7 +91,7 @@ void DataSourceFactory::init()
{ {
m_speedTimer = new QTimer(this); m_speedTimer = new QTimer(this);
m_speedTimer->setInterval(SPEEDTIMER); m_speedTimer->setInterval(SPEEDTIMER);
connect(m_speedTimer, SIGNAL(timeout()), this, SLOT(speedChanged())); connect(m_speedTimer, &QTimer::timeout, this, &DataSourceFactory::speedChanged);
} }
if (m_segSize && m_size) if (m_segSize && m_size)
...@@ -122,8 +122,8 @@ void DataSourceFactory::findFileSize() ...@@ -122,8 +122,8 @@ void DataSourceFactory::findFileSize()
if (!m_size && !m_dest.isEmpty() && !m_sources.isEmpty()) { if (!m_size && !m_dest.isEmpty() && !m_sources.isEmpty()) {
foreach (TransferDataSource *source, m_sources) { foreach (TransferDataSource *source, m_sources) {
if (source->capabilities() & Transfer::Cap_FindFilesize) { if (source->capabilities() & Transfer::Cap_FindFilesize) {
connect(source, SIGNAL(foundFileSize(TransferDataSource*,KIO::filesize_t,QPair<int,int>)), this, SLOT(slotFoundFileSize(TransferDataSource*,KIO::filesize_t,QPair<int,int>))); connect(source, &TransferDataSource::foundFileSize, this, &DataSourceFactory::slotFoundFileSize);
connect(source, SIGNAL(finishedDownload(TransferDataSource*,KIO::filesize_t)), this, SLOT(slotFinishedDownload(TransferDataSource*,KIO::filesize_t))); connect(source, &TransferDataSource::finishedDownload, this, &DataSourceFactory::slotFinishedDownload);
m_speedTimer->start(); m_speedTimer->start();
source->findFileSize(m_segSize); source->findFileSize(m_segSize);
...@@ -220,8 +220,8 @@ void DataSourceFactory::start() ...@@ -220,8 +220,8 @@ void DataSourceFactory::start()
if (checkLocalFile()) { if (checkLocalFile()) {
if (!m_putJob) { if (!m_putJob) {
m_putJob = KIO::open(m_dest, QIODevice::WriteOnly | QIODevice::ReadOnly); m_putJob = KIO::open(m_dest, QIODevice::WriteOnly | QIODevice::ReadOnly);
connect(m_putJob, SIGNAL(open(KIO::Job*)), this, SLOT(slotOpen(KIO::Job*))); connect(m_putJob, &KIO::FileJob::open, this, &DataSourceFactory::slotOpen);
connect(m_putJob, SIGNAL(destroyed(QObject*)), this, SLOT(slotPutJobDestroyed(QObject*))); connect(m_putJob, &QObject::destroyed, this, &DataSourceFactory::slotPutJobDestroyed);
m_startTried = true; m_startTried = true;
return; return;
} }
...@@ -314,8 +314,8 @@ void DataSourceFactory::slotOpen(KIO::Job *job) ...@@ -314,8 +314,8 @@ void DataSourceFactory::slotOpen(KIO::Job *job)
init(); init();
} }
connect(m_putJob, SIGNAL(position(KIO::Job*,KIO::filesize_t)), this, SLOT(slotOffset(KIO::Job*,KIO::filesize_t))); connect(m_putJob, &KIO::FileJob::position, this, &DataSourceFactory::slotOffset);
connect(m_putJob, SIGNAL(written(KIO::Job*,KIO::filesize_t)), this, SLOT(slotDataWritten(KIO::Job*,KIO::filesize_t))); connect(m_putJob, &KIO::FileJob::written, this, &DataSourceFactory::slotDataWritten);
m_open = true; m_open = true;
if (m_startTried) if (m_startTried)
...@@ -441,14 +441,14 @@ void DataSourceFactory::addMirror(const QUrl &url, bool used, int numParallelCon ...@@ -441,14 +441,14 @@ void DataSourceFactory::addMirror(const QUrl &url, bool used, int numParallelCon
source->setSupposedSize(m_size); source->setSupposedSize(m_size);
} }
connect(source, SIGNAL(capabilitiesChanged()), this, SLOT(slotUpdateCapabilities())); connect(source, &TransferDataSource::capabilitiesChanged, this, &DataSourceFactory::slotUpdateCapabilities);
connect(source, SIGNAL(brokenSegments(TransferDataSource*,QPair<int,int>)), this, SLOT(brokenSegments(TransferDataSource*,QPair<int,int>))); connect(source, SIGNAL(brokenSegments(TransferDataSource*,QPair<int,int>)), this, SLOT(brokenSegments(TransferDataSource*,QPair<int,int>)));
connect(source, SIGNAL(broken(TransferDataSource*,TransferDataSource::Error)), this, SLOT(broken(TransferDataSource*,TransferDataSource::Error))); connect(source, &TransferDataSource::broken, this, &DataSourceFactory::broken);
connect(source, SIGNAL(finishedSegment(TransferDataSource*,int,bool)), this, SLOT(finishedSegment(TransferDataSource*,int,bool))); connect(source, &TransferDataSource::finishedSegment, this, &DataSourceFactory::finishedSegment);
connect(source, SIGNAL(data(KIO::fileoffset_t,QByteArray,bool&)), this, SLOT(slotWriteData(KIO::fileoffset_t,QByteArray,bool&))); connect(source, SIGNAL(data(KIO::fileoffset_t,QByteArray,bool&)), this, SLOT(slotWriteData(KIO::fileoffset_t,QByteArray,bool&)));
connect(source, SIGNAL(freeSegments(TransferDataSource*,QPair<int,int>)), this, SLOT(slotFreeSegments(TransferDataSource*,QPair<int,int>))); connect(source, SIGNAL(freeSegments(TransferDataSource*,QPair<int,int>)), this, SLOT(slotFreeSegments(TransferDataSource*,QPair<int,int>)));
connect(source, SIGNAL(log(QString,Transfer::LogLevel)), this, SIGNAL(log(QString,Transfer::LogLevel))); connect(source, &TransferDataSource::log, this, &DataSourceFactory::log);
connect(source, SIGNAL(urlChanged(QUrl, QUrl)), this, SLOT(slotUrlChanged(QUrl, QUrl))); connect(source, &TransferDataSource::urlChanged, this, &DataSourceFactory::slotUrlChanged);
slotUpdateCapabilities(); slotUpdateCapabilities();
...@@ -849,7 +849,7 @@ bool DataSourceFactory::setNewDestination(const QUrl &newDestination) ...@@ -849,7 +849,7 @@ bool DataSourceFactory::setNewDestination(const QUrl &newDestination)
//still a write in progress //still a write in progress
if (m_blocked) if (m_blocked)
{ {
QTimer::singleShot(1000, this, SLOT(startMove())); QTimer::singleShot(1000, this, &DataSourceFactory::startMove);
} }
else else
{ {
...@@ -866,7 +866,7 @@ void DataSourceFactory::startMove() ...@@ -866,7 +866,7 @@ void DataSourceFactory::startMove()
killPutJob(); killPutJob();
KIO::Job *move = KIO::file_move(m_dest, m_newDest, -1, KIO::HideProgressInfo); KIO::Job *move = KIO::file_move(m_dest, m_newDest, -1, KIO::HideProgressInfo);
connect(move, SIGNAL(result(KJob*)), this, SLOT(newDestResult(KJob*))); connect(move, &KJob::result, this, &DataSourceFactory::newDestResult);
connect(move, SIGNAL(percent(KJob*,ulong)), this, SLOT(slotPercent(KJob*,ulong))); connect(move, SIGNAL(percent(KJob*,ulong)), this, SLOT(slotPercent(KJob*,ulong)));
m_dest = m_newDest; m_dest = m_newDest;
......
...@@ -20,8 +20,8 @@ Download::Download(const QUrl &srcUrl, const QUrl &destUrl) ...@@ -20,8 +20,8 @@ Download::Download(const QUrl &srcUrl, const QUrl &destUrl)
{ {
qCDebug(KGET_DEBUG) << "DownloadFile: " << m_srcUrl.url() << " to dest: " << m_destUrl.url(); qCDebug(KGET_DEBUG) << "DownloadFile: " << m_srcUrl.url() << " to dest: " << m_destUrl.url();
m_copyJob = KIO::get(m_srcUrl, KIO::NoReload, KIO::HideProgressInfo); m_copyJob = KIO::get(m_srcUrl, KIO::NoReload, KIO::HideProgressInfo);
connect(m_copyJob, SIGNAL(data(KIO::Job*,QByteArray)), SLOT(slotData(KIO::Job*,QByteArray))); connect(m_copyJob, &KIO::TransferJob::data, this, &Download::slotData);
connect(m_copyJob, SIGNAL(result(KJob*)), SLOT(slotResult(KJob*))); connect(m_copyJob, &KJob::result, this, &Download::slotResult);
} }
Download::~Download() Download::~Download()
......
...@@ -110,7 +110,7 @@ void KeyDownloader::downloadKey(QString fingerprint, Signature *sig, bool mirror ...@@ -110,7 +110,7 @@ void KeyDownloader::downloadKey(QString fingerprint, Signature *sig, bool mirror
KIO::StoredTransferJob *job = KIO::storedGet(url, KIO::Reload, KIO::HideProgressInfo); KIO::StoredTransferJob *job = KIO::storedGet(url, KIO::Reload, KIO::HideProgressInfo);
m_jobs[job] = fingerprint; m_jobs[job] = fingerprint;
connect(job, SIGNAL(finished(KJob*)), this, SLOT(slotDownloaded(KJob*))); connect(job, &KJob::finished, this, &KeyDownloader::slotDownloaded);
} }
} }
......
...@@ -832,8 +832,8 @@ KGet::KGet() ...@@ -832,8 +832,8 @@ KGet::KGet()
QObject::connect(m_transferTreeModel, SIGNAL(transfersAddedEvent(QList<TransferHandler*>)), QObject::connect(m_transferTreeModel, SIGNAL(transfersAddedEvent(QList<TransferHandler*>)),
m_jobManager, SLOT(slotTransfersAdded(QList<TransferHandler*>))); m_jobManager, SLOT(slotTransfersAdded(QList<TransferHandler*>)));
QObject::connect(m_transferTreeModel, SIGNAL(transfersAboutToBeRemovedEvent(QList<TransferHandler*>)), QObject::connect(m_transferTreeModel, &TransferTreeModel::transfersAboutToBeRemovedEvent,
m_jobManager, SLOT(slotTransfersAboutToBeRemoved(QList<TransferHandler*>))); m_jobManager, &KUiServerJobs::slotTransfersAboutToBeRemoved);
QObject::connect(m_transferTreeModel, SIGNAL(transfersChangedEvent(QMap<TransferHandler*,Transfer::ChangesFlags>)), QObject::connect(m_transferTreeModel, SIGNAL(transfersChangedEvent(QMap<TransferHandler*,Transfer::ChangesFlags>)),
m_jobManager, SLOT(slotTransfersChanged(QMap<TransferHandler*,Transfer::ChangesFlags>))); m_jobManager, SLOT(slotTransfersChanged(QMap<TransferHandler*,Transfer::ChangesFlags>)));
...@@ -1175,7 +1175,7 @@ void KGet::loadPlugins() ...@@ -1175,7 +1175,7 @@ void KGet::loadPlugins()
const KConfigGroup plugins = KConfigGroup(KSharedConfig::openConfig(), "Plugins"); const KConfigGroup plugins = KConfigGroup(KSharedConfig::openConfig(), "Plugins");
for (const KPluginMetaData& md : sortedOffers) for (const KPluginMetaData& md : qAsConst(sortedOffers))
{ {
KPluginInfo info(md); KPluginInfo info(md);
info.load(plugins); info.load(plugins);
...@@ -1290,20 +1290,20 @@ GenericObserver::GenericObserver(QObject *parent) ...@@ -1290,20 +1290,20 @@ GenericObserver::GenericObserver(QObject *parent)
//check if there is a connection //check if there is a connection
KGet::setHasNetworkConnection(m_networkConfig.isOnline()); KGet::setHasNetworkConnection(m_networkConfig.isOnline());
connect(KGet::model(), SIGNAL(groupRemovedEvent(TransferGroupHandler*)), SLOT(groupRemovedEvent(TransferGroupHandler*))); connect(KGet::model(), &TransferTreeModel::groupRemovedEvent, this, &GenericObserver::groupRemovedEvent);
connect(KGet::model(), SIGNAL(transfersAddedEvent(QList<TransferHandler*>)), connect(KGet::model(), SIGNAL(transfersAddedEvent(QList<TransferHandler*>)),
SLOT(transfersAddedEvent(QList<TransferHandler*>))); SLOT(transfersAddedEvent(QList<TransferHandler*>)));
connect(KGet::model(), SIGNAL(groupAddedEvent(TransferGroupHandler*)), SLOT(groupAddedEvent(TransferGroupHandler*))); connect(KGet::model(), &TransferTreeModel::groupAddedEvent, this, &GenericObserver::groupAddedEvent);
connect(KGet::model(), SIGNAL(transfersRemovedEvent(QList<TransferHandler*>)), connect(KGet::model(), &TransferTreeModel::transfersRemovedEvent,
SLOT(transfersRemovedEvent(QList<TransferHandler*>))); this, &GenericObserver::transfersRemovedEvent);
connect(KGet::model(), SIGNAL(transfersChangedEvent(QMap<TransferHandler*,Transfer::ChangesFlags>)), connect(KGet::model(), SIGNAL(transfersChangedEvent(QMap<TransferHandler*,Transfer::ChangesFlags>)),
SLOT(transfersChangedEvent(QMap<TransferHandler*,Transfer::ChangesFlags>))); SLOT(transfersChangedEvent(QMap<TransferHandler*,Transfer::ChangesFlags>)));
connect(KGet::model(), SIGNAL(groupsChangedEvent(QMap<TransferGroupHandler*,TransferGroup::ChangesFlags>)), connect(KGet::model(), SIGNAL(groupsChangedEvent(QMap<TransferGroupHandler*,TransferGroup::ChangesFlags>)),
SLOT(groupsChangedEvent(QMap<TransferGroupHandler*,TransferGroup::ChangesFlags>))); SLOT(groupsChangedEvent(QMap<TransferGroupHandler*,TransferGroup::ChangesFlags>)));
connect(KGet::model(), SIGNAL(transferMovedEvent(TransferHandler*,TransferGroupHandler*)), connect(KGet::model(), &TransferTreeModel::transferMovedEvent,
SLOT(transferMovedEvent(TransferHandler*,TransferGroupHandler*))); this, &GenericObserver::transferMovedEvent);
connect(&m_networkConfig, SIGNAL(onlineStateChanged(bool)), connect(&m_networkConfig, &QNetworkConfigurationManager::onlineStateChanged,
this, SLOT(slotNetworkStatusChanged(bool))); this, &GenericObserver::slotNetworkStatusChanged);
} }
...@@ -1352,7 +1352,7 @@ void GenericObserver::requestSave() ...@@ -1352,7 +1352,7 @@ void GenericObserver::requestSave()
if (!m_save) { if (!m_save) {
m_save = new QTimer(this); m_save = new QTimer(this);
m_save->setInterval(5000); m_save->setInterval(5000);
connect(m_save, SIGNAL(timeout()), this, SLOT(slotSave())); connect(m_save, &QTimer::timeout, this, &GenericObserver::slotSave);
} }
//save regularly if there are running jobs //save regularly if there are running jobs
...@@ -1395,8 +1395,8 @@ void GenericObserver::transfersChangedEvent(QMap<TransferHandler*, Transfer::Cha ...@@ -1395,8 +1395,8 @@ void GenericObserver::transfersChangedEvent(QMap<TransferHandler*, Transfer::Cha
if (transfer->error().type == Job::ManualSolve) { if (transfer->error().type == Job::ManualSolve) {
m_notifications.insert(notification, transfer); m_notifications.insert(notification, transfer);
notification->setActions(QStringList() << i18n("Resolve")); notification->setActions(QStringList() << i18n("Resolve"));
connect(notification, SIGNAL(action1Activated()), SLOT(slotResolveTransferError())); connect(notification, &KNotification::action1Activated, this, &GenericObserver::slotResolveTransferError);
connect(notification, SIGNAL(closed()), SLOT(slotNotificationClosed())); connect(notification, &KNotification::closed, this, &GenericObserver::slotNotificationClosed);
} }
} }
} }
...@@ -1465,8 +1465,8 @@ void GenericObserver::transfersChangedEvent(QMap<TransferHandler*, Transfer::Cha ...@@ -1465,8 +1465,8 @@ void GenericObserver::transfersChangedEvent(QMap<TransferHandler*, Transfer::Cha
if (notification) { if (notification) {
notification->setActions(QStringList() << i18nc("abort the proposed action", "Abort")); notification->setActions(QStringList() << i18nc("abort the proposed action", "Abort"));
connect(notification, SIGNAL(action1Activated()), this, SLOT(slotAbortAfterFinishAction())); connect(notification, &KNotification::action1Activated, this, &GenericObserver::slotAbortAfterFinishAction);
connect(m_finishAction, SIGNAL(timeout()), notification, SLOT(close())); connect(m_finishAction, &QTimer::timeout, notification, &KNotification::close);
if (!m_finishAction->isActive()) { if (!m_finishAction->isActive()) {
m_finishAction->start(); m_finishAction->start();
......
...@@ -122,9 +122,9 @@ void KUiServerJobs::registerJob(KGetKJobAdapter *job, TransferHandler *transfer) ...@@ -122,9 +122,9 @@ void KUiServerJobs::registerJob(KGetKJobAdapter *job, TransferHandler *transfer)
if (m_registeredJobs.contains(transfer) || !job) { if (m_registeredJobs.contains(transfer) || !job) {
return; return;
} }
connect(job, SIGNAL(requestStop(KJob*,TransferHandler*)), this, SLOT(slotRequestStop(KJob*,TransferHandler*))); connect(job, &KGetKJobAdapter::requestStop, this, &KUiServerJobs::slotRequestStop);
connect(job, SIGNAL(requestSuspend(KJob*,TransferHandler*)), this, SLOT(slotRequestSuspend(KJob*,TransferHandler*))); connect(job, &KGetKJobAdapter::requestSuspend, this, &KUiServerJobs::slotRequestSuspend);
connect(job, SIGNAL(requestResume(KJob*,TransferHandler*)), this, SLOT(slotRequestResume(KJob*,TransferHandler*))); connect(job, &KGetKJobAdapter::requestResume, this, &KUiServerJobs::slotRequestResume);
KJob *j = job; KJob *j = job;
registerJob(j, transfer); registerJob(j, transfer);
...@@ -203,7 +203,7 @@ KGetGlobalJob * KUiServerJobs::globalJob() ...@@ -203,7 +203,7 @@ KGetGlobalJob * KUiServerJobs::globalJob()
{ {
if (!m_globalJob) { if (!m_globalJob) {
m_globalJob = new KGetGlobalJob(); m_globalJob = new KGetGlobalJob();
connect(m_globalJob, SIGNAL(requestStop(KJob*,TransferHandler*)), this, SLOT(slotRequestStop(KJob*,TransferHandler*))); connect(m_globalJob, &KGetGlobalJob::requestStop, this, &KUiServerJobs::slotRequestStop);
} }
return m_globalJob; return m_globalJob;
} }
......
...@@ -104,7 +104,7 @@ Signature::Signature(const QUrl &dest, QObject *object) ...@@ -104,7 +104,7 @@ Signature::Signature(const QUrl &dest, QObject *object)
d->dest = dest; d->dest = dest;
#ifdef HAVE_QGPGME #ifdef HAVE_QGPGME
qRegisterMetaType<GpgME::VerificationResult>("GpgME::VerificationResult"); qRegisterMetaType<GpgME::VerificationResult>("GpgME::VerificationResult");
connect(&d->thread, SIGNAL(verified(GpgME::VerificationResult)), this, SLOT(slotVerified(GpgME::VerificationResult))); connect(&d->thread, &SignatureThread::verified, this, &Signature::slotVerified);
#endif //HAVE_QGPGME #endif //HAVE_QGPGME
} }
......
...@@ -36,7 +36,7 @@ TransferHandler::TransferHandler(Transfer * parent, Scheduler * scheduler) ...@@ -36,7 +36,7 @@ TransferHandler::TransferHandler(Transfer * parent, Scheduler * scheduler)
m_kjobAdapter = new KGetKJobAdapter(this, this); m_kjobAdapter = new KGetKJobAdapter(this, this);
connect(m_transfer, SIGNAL(capabilitiesChanged()), this, SIGNAL(capabilitiesChanged())); connect(m_transfer, &Transfer::capabilitiesChanged, this, &TransferHandler::capabilitiesChanged);
} }
TransferHandler::~TransferHandler() TransferHandler::~TransferHandler()
......
...@@ -203,11 +203,11 @@ void XmlStore::load() ...@@ -203,11 +203,11 @@ void XmlStore::load()
// TODO: only load if necessary // TODO: only load if necessary
m_loadThread = new XmlStore::LoadThread(this, m_storeUrl); m_loadThread = new XmlStore::LoadThread(this, m_storeUrl);
connect(m_loadThread, SIGNAL(finished()), SIGNAL(loadFinished())); connect(m_loadThread, &QThread::finished, this, &TransferHistoryStore::loadFinished);
connect(m_loadThread, SIGNAL(elementLoaded(int,int,TransferHistoryItem)), connect(m_loadThread, &LoadThread::elementLoaded,
SIGNAL(elementLoaded(int,int,TransferHistoryItem))); this, &TransferHistoryStore::elementLoaded);
connect(m_loadThread, SIGNAL(elementLoaded(int,int,TransferHistoryItem)), connect(m_loadThread, &LoadThread::elementLoaded,
SLOT(slotLoadElement(int,int,TransferHistoryItem))); this, &XmlStore::slotLoadElement);
m_loadThread->start(); m_loadThread->start();
} }
...@@ -220,9 +220,9 @@ void XmlStore::saveItem(const TransferHistoryItem &item) ...@@ -220,9 +220,9 @@ void XmlStore::saveItem(const TransferHistoryItem &item)
{ {
m_saveThread = new XmlStore::SaveThread(this, m_storeUrl, item); m_saveThread = new XmlStore::SaveThread(this, m_storeUrl, item);
connect(m_saveThread, SIGNAL(finished()), SIGNAL(saveFinished())); connect(m_saveThread, &QThread::finished, this, &TransferHistoryStore::saveFinished);
connect(m_saveThread, SIGNAL(elementLoaded(int,int,TransferHistoryItem)), connect(m_saveThread, &SaveThread::elementLoaded,
SIGNAL(elementLoaded(int,int,TransferHistoryItem))); this, &TransferHistoryStore::elementLoaded);
m_saveThread->start(); m_saveThread->start();
} }
...@@ -232,7 +232,7 @@ void XmlStore::deleteItem(const TransferHistoryItem &item) ...@@ -232,7 +232,7 @@ void XmlStore::deleteItem(const TransferHistoryItem &item)
m_deleteThread = new XmlStore::DeleteThread(this, m_storeUrl, item); m_deleteThread = new XmlStore::DeleteThread(this, m_storeUrl, item);
connect(m_deleteThread, SIGNAL(finished()), SLOT(slotDeleteElement())); connect(m_deleteThread, &QThread::finished, this, &XmlStore::slotDeleteElement);
m_deleteThread->start(); m_deleteThread->start();
} }
......
...@@ -45,7 +45,7 @@ DBusKGetWrapper::DBusKGetWrapper(MainWindow *parent) ...@@ -45,7 +45,7 @@ DBusKGetWrapper::DBusKGetWrapper(MainWindow *parent)
TransferTreeModel *model = KGet::model(); TransferTreeModel *model = KGet::model();
connect(model, SIGNAL(transfersAddedEvent(QList<TransferHandler*>)), this, SLOT(slotTransfersAdded(QList<TransferHandler*>))); connect(model, SIGNAL(transfersAddedEvent(QList<TransferHandler*>)), this, SLOT(slotTransfersAdded(QList<TransferHandler*>)));
connect(model, SIGNAL(transfersRemovedEvent(QList<TransferHandler*>)), this, SLOT(slotTransfersRemoved(QList<TransferHandler*>))); connect(model, &TransferTreeModel::transfersRemovedEvent, this, &DBusKGetWrapper::slotTransfersRemoved);
} }
DBusKGetWrapper::~DBusKGetWrapper() DBusKGetWrapper::~DBusKGetWrapper()
......
...@@ -16,8 +16,8 @@ DBusTransferWrapper::DBusTransferWrapper(TransferHandler *parent) ...@@ -16,8 +16,8 @@ DBusTransferWrapper::DBusTransferWrapper(TransferHandler *parent)
: QObject(parent), : QObject(parent),
m_transfer(parent) m_transfer(parent)
{ {
connect(m_transfer, SIGNAL(transferChangedEvent(TransferHandler*,TransferHandler::ChangesFlags)), this, SLOT(slotTransferChanged(TransferHandler*,TransferHandler::ChangesFlags))); connect(m_transfer, &TransferHandler::transferChangedEvent, this, &DBusTransferWrapper::slotTransferChanged);
connect(m_transfer, SIGNAL(capabilitiesChanged()), this, SIGNAL(capabilitiesChanged())); connect(m_transfer, &TransferHandler::capabilitiesChanged, this, &DBusTransferWrapper::capabilitiesChanged);
} }
DBusTransferWrapper::~DBusTransferWrapper() DBusTransferWrapper::~DBusTransferWrapper()
......
...@@ -26,7 +26,7 @@ DBusVerifierWrapper::DBusVerifierWrapper(Verifier *verifier) ...@@ -26,7 +26,7 @@ DBusVerifierWrapper::DBusVerifierWrapper(Verifier *verifier)
m_verifier(verifier) m_verifier(verifier)
{ {
connect(m_verifier, SIGNAL(brokenPieces(QList<KIO::fileoffset_t>,KIO::filesize_t)), this, SLOT(slotBrokenPieces(QList<KIO::fileoffset_t>,KIO::filesize_t))); connect(m_verifier, SIGNAL(brokenPieces(QList<KIO::fileoffset_t>,KIO::filesize_t)), this, SLOT(slotBrokenPieces(QList<KIO::fileoffset_t>,KIO::filesize_t)));
connect(m_verifier, SIGNAL(verified(bool)), this, SIGNAL(verified(bool))); connect(m_verifier, &Verifier::verified, this, &DBusVerifierWrapper::verified);
} }
DBusVerifierWrapper::~DBusVerifierWrapper() DBusVerifierWrapper::~DBusVerifierWrapper()
......
...@@ -56,22 +56,22 @@ KGetPlugin::KGetPlugin(QObject *parent, const QVariantList&) ...@@ -56,22 +56,22 @@ KGetPlugin::KGetPlugin(QObject *parent, const QVariantList&)
actionCollection()->addAction("kget_menu", menu); actionCollection()->addAction("kget_menu", menu);
menu->setDelayed( false ); menu->setDelayed( false );
connect( menu->menu(), SIGNAL(aboutToShow()), SLOT(showPopup())); connect( menu->menu(), &QMenu::aboutToShow, this, &KGetPlugin::showPopup);
m_dropTargetAction = new KToggleAction(i18n("Show Drop Target"), actionCollection()); m_dropTargetAction = new KToggleAction(i18n("Show Drop Target"), actionCollection());
connect(m_dropTargetAction, SIGNAL(triggered()), this, SLOT(slotShowDrop())); connect(m_dropTargetAction, &QAction::triggered, this, &KGetPlugin::slotShowDrop);
actionCollection()->addAction(QL1S("show_drop"), m_dropTargetAction); actionCollection()->addAction(QL1S("show_drop"), m_dropTargetAction);
menu->addAction(m_dropTargetAction); menu->addAction(m_dropTargetAction);
QAction *showLinksAction = actionCollection()->addAction(QL1S("show_links")); QAction *showLinksAction = actionCollection()->addAction(QL1S("show_links"));
showLinksAction->setText(i18n("List All Links")); showLinksAction->setText(i18n("List All Links"));
connect(showLinksAction, SIGNAL(triggered()), SLOT(slotShowLinks())); connect(showLinksAction, &QAction::triggered, this, &KGetPlugin::slotShowLinks);
menu->addAction(showLinksAction); menu->addAction(showLinksAction);
QAction *showSelectedLinksAction = actionCollection()->addAction(QL1S("show_selected_links")); QAction *showSelectedLinksAction = actionCollection()->addAction(QL1S("show_selected_links"));
showSelectedLinksAction->setText(i18n("List Selected Links")); showSelectedLinksAction->setText(i18n("List Selected Links"));
connect(showSelectedLinksAction, SIGNAL(triggered()), SLOT(slotShowSelectedLinks())); connect(showSelectedLinksAction, &QAction::triggered, this, &KGetPlugin::slotShowSelectedLinks);
menu->addAction(showSelectedLinksAction); menu->addAction(showSelectedLinksAction);
// Hide this plugin if the parent part does not support either // Hide this plugin if the parent part does not support either
......
...@@ -149,73 +149,73 @@ void MainWindow::setupActions() ...@@ -149,73 +149,73 @@ void MainWindow::setupActions()
newDownloadAction->setIcon(QIcon::fromTheme("document-new")); newDownloadAction->setIcon(QIcon::fromTheme("document-new"));
//newDownloadAction->setHelpText(i18n("Opens a dialog to add a transfer to the list")); //newDownloadAction->setHelpText(i18n("Opens a dialog to add a transfer to the list"));
actionCollection()->setDefaultShortcut(newDownloadAction, QKeySequence(Qt::CTRL + Qt::Key_N)); actionCollection()->setDefaultShortcut(newDownloadAction, QKeySequence(Qt::CTRL + Qt::Key_N));
connect(newDownloadAction, SIGNAL(triggered()), SLOT(slotNewTransfer())); connect(newDownloadAction, &QAction::triggered, this, &MainWindow::slotNewTransfer);
QAction *openAction = actionCollection()->addAction("import_transfers"); QAction *openAction = actionCollection()->addAction("import_transfers");
openAction->setText(i18n("&Import Transfers...")); openAction->setText(i18n("&Import Transfers..."));
openAction->setIcon(QIcon::fromTheme("document-open")); openAction->setIcon(QIcon::fromTheme("document-open"));
//openAction->setHelpText(i18n("Imports a list of transfers")); //openAction->setHelpText(i18n("Imports a list of transfers"));
actionCollection()->setDefaultShortcut(openAction, QKeySequence(Qt::CTRL + Qt::Key_I)); actionCollection()->setDefaultShortcut(openAction, QKeySequence(Qt::CTRL + Qt::Key_I));
connect(openAction, SIGNAL(triggered()), SLOT(slotImportTransfers())); connect(openAction, &QAction::triggered, this, &MainWindow::slotImportTransfers);
QAction *exportAction = actionCollection()->addAction("export_transfers"); QAction *exportAction = actionCollection()->addAction("export_transfers");
exportAction->setText(i18n("&Export Transfers List...")); exportAction->setText(i18n("&Export Transfers List..."));
exportAction->setIcon(QIcon::fromTheme("document-export")); exportAction->setIcon(QIcon::fromTheme("document-export"));
//exportAction->setHelpText(i18n("Exports the current transfers into a file")); //exportAction->setHelpText(i18n("Exports the current transfers into a file"));
actionCollection()->setDefaultShortcut(exportAction, QKeySequence(Qt::CTRL + Qt::Key_E)); actionCollection()->setDefaultShortcut(exportAction, QKeySequence(Qt::CTRL + Qt::Key_E));
connect(exportAction, SIGNAL(triggered()), SLOT(slotExportTransfers())); connect(exportAction, &QAction::triggered, this, &MainWindow::slotExportTransfers);
QAction *createMetalinkAction = actionCollection()->addAction("create_metalink"); QAction *createMetalinkAction = actionCollection()->addAction("create_metalink");
createMetalinkAction->setText(i18n("&Create a Metalink...")); createMetalinkAction->setText(i18n("&Create a Metalink..."));
createMetalinkAction->setIcon(QIcon::fromTheme("journal-new")); createMetalinkAction->setIcon(QIcon::fromTheme("journal-new"));
//createMetalinkAction->setHelpText(i18n("Creates or modifies a metalink and saves it on disk")); //createMetalinkAction->setHelpText(i18n("Creates or modifies a metalink and saves it on disk"));
connect(createMetalinkAction, SIGNAL(triggered()), SLOT(slotCreateMetalink())); connect(createMetalinkAction, &QAction::triggered, this, &MainWindow::slotCreateMetalink);
QAction *priorityTop = actionCollection()->addAction("priority_top"); QAction *priorityTop = actionCollection()->addAction("priority_top");
priorityTop->setText(i18n("Top Priority")); priorityTop->setText(i18n("Top Priority"));
priorityTop->setIcon(QIcon::fromTheme("arrow-up-double")); priorityTop->setIcon(QIcon::fromTheme("arrow-up-double"));
//priorityTop->setHelpText(i18n("Download selected transfer first")); //priorityTop->setHelpText(i18n("Download selected transfer first"));