Commit 00621d1e authored by Alexander Lohnau's avatar Alexander Lohnau 💬

Fix uncorrect usage of emit keyword

parent b1581bee
......@@ -485,7 +485,7 @@ void kio_krarcProtocol::get(const QUrl &url, int tries)
QMimeDatabase db;
QMimeType mt = db.mimeTypeForFile(arcTempDir + file);
if (mt.isValid())
emit mimeType(mt.name());
mimeType(mt.name());
QString escapedFilename = file;
if(arcType == "zip") // left bracket needs to be escaped
......@@ -557,7 +557,7 @@ void kio_krarcProtocol::get(const QUrl &url, int tries)
QMimeDatabase db;
QMimeType mt = db.mimeTypeForFile(arcTempDir + file);
if (mt.isValid())
emit mimeType(mt.name());
mimeType(mt.name());
KIO::filesize_t processed_size = 0;
......
......@@ -750,7 +750,7 @@ void KrColorCache::refreshColors()
m_impl->m_cachedColors.clear();
m_impl->m_colorSettings = KrColorSettings();
QPixmapCache::clear(); // dimmed icons are cached
colorsRefreshed();
Q_EMIT colorsRefreshed();
}
void KrColorCache::setColors(const KrColorSettings & colorSettings)
......@@ -758,6 +758,6 @@ void KrColorCache::setColors(const KrColorSettings & colorSettings)
m_impl->m_cachedColors.clear();
m_impl->m_colorSettings = colorSettings;
QPixmapCache::clear(); // dimmed icons are cached
colorsRefreshed();
Q_EMIT colorsRefreshed();
}
......@@ -77,7 +77,7 @@ void Combiner::combine()
splURL.toDisplayString(QUrl::PreferLocalFile)));
if (ret == KMessageBox::No) {
emit reject();
reject();
return;
}
......@@ -143,7 +143,7 @@ void Combiner::combineSplitFileFinished(KJob *job)
int ret = KMessageBox::questionYesNo(nullptr,
error + i18n("\nValidity checking is impossible without a good CRC file. Continue combining?"));
if (ret == KMessageBox::No) {
emit reject();
reject();
return;
}
}
......@@ -180,7 +180,7 @@ void Combiner::statDestResult(KJob* job)
openNextFile();
} else {
dynamic_cast<KIO::Job*>(job)->uiDelegate()->showErrorMessage();
emit reject();
reject();
}
} else { // destination already exists
KIO::RenameDialog_Options mode = dynamic_cast<KIO::StatJob*>(job)->statResult().isDir() ?
......@@ -196,7 +196,7 @@ void Combiner::statDestResult(KJob* job)
break;
}
default:
emit reject();
reject();
}
}
}
......@@ -276,7 +276,7 @@ void Combiner::combineReceiveFinished(KJob *job)
combineAbortJobs();
KMessageBox::error(nullptr, i18n("Cannot open the first split file of %1.",
baseURL.toDisplayString(QUrl::PreferLocalFile)));
emit reject();
reject();
} else { // we've received the last file
// write out the remaining part of the file
combineWriteJob->resume();
......@@ -294,7 +294,7 @@ void Combiner::combineReceiveFinished(KJob *job)
} else {
combineAbortJobs();
dynamic_cast<KIO::Job*>(job)->uiDelegate()->showErrorMessage();
emit reject();
reject();
}
} else
openNextFile();
......@@ -319,13 +319,13 @@ void Combiner::combineSendFinished(KJob *job)
if (job->error()) { /* any error occurred? */
combineAbortJobs();
dynamic_cast<KIO::Job*>(job)->uiDelegate()->showErrorMessage();
emit reject();
reject();
} else if (!error.isEmpty()) { /* was any error message at reading ? */
combineAbortJobs(); /* we cannot write out it in combineReceiveFinished */
KMessageBox::error(nullptr, error); /* because emit accept closes it in this function */
emit reject();
reject();
} else
emit accept();
accept();
}
void Combiner::combineAbortJobs()
......
......@@ -132,7 +132,7 @@ void Splitter::splitReceiveFinished(KJob *job)
splitAbortJobs();
KMessageBox::error(nullptr, i18n("Error reading file %1: %2", fileName.toDisplayString(QUrl::PreferLocalFile),
job->errorString()));
emit reject();
reject();
return;
}
......@@ -186,7 +186,7 @@ void Splitter::statOutputFileResult(KJob* job)
openOutputFile();
else {
dynamic_cast<KIO::Job*>(job)->uiDelegate()->showErrorMessage();
emit reject();
reject();
}
} else { // destination already exists
KIO::RenameDialog dlg(this, i18n("File Already Exists"), QUrl(), writeURL,
......@@ -200,7 +200,7 @@ void Splitter::statOutputFileResult(KJob* job)
openOutputFile();
break;
default:
emit reject();
reject();
}
}
}
......@@ -247,7 +247,7 @@ void Splitter::splitSendFinished(KJob *job)
splitAbortJobs();
KMessageBox::error(nullptr, i18n("Error writing file %1: %2", writeURL.toDisplayString(QUrl::PreferLocalFile),
job->errorString()));
emit reject();
reject();
return;
}
......@@ -292,10 +292,10 @@ void Splitter::splitFileFinished(KJob *job)
if (job->error()) { /* any error occurred? */
KMessageBox::error(nullptr, i18n("Error writing file %1: %2", writeURL.toDisplayString(QUrl::PreferLocalFile),
job->errorString()));
emit reject();
reject();
return;
}
emit accept();
accept();
}
......@@ -249,7 +249,7 @@ void SplitterGUI::splitPressed()
return;
}
if(getSplitSize() > 0)
emit accept();
accept();
}
void SplitterGUI::keyPressEvent(QKeyEvent *e)
......@@ -257,7 +257,7 @@ void SplitterGUI::keyPressEvent(QKeyEvent *e)
switch (e->key()) {
case Qt::Key_Enter :
case Qt::Key_Return :
emit splitPressed();
splitPressed();
return;
default:
QDialog::keyPressEvent(e);
......
......@@ -155,7 +155,7 @@ ListPanel* PanelManager::createPanel(const KConfigGroup& cfg)
void PanelManager::connectPanel(ListPanel *p)
{
connect(p, &ListPanel::activate, this, &PanelManager::activate);
connect(p, &ListPanel::pathChanged, this, [=]() { pathChanged(p); });
connect(p, &ListPanel::pathChanged, this, [=]() { Q_EMIT pathChanged(p); });
connect(p, &ListPanel::pathChanged, this, [=]() { _tabbar->updateTab(p); });
}
......
Markdown is supported
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