Commit 60a3fc3d authored by Laurent Montel's avatar Laurent Montel
Browse files

It's already defined in KAboutData

parent e40410de
Pipeline #226111 passed with stage
in 5 minutes and 11 seconds
......@@ -36,7 +36,6 @@ int main(int argc, char **argv)
i18n("(c) 2019-2022 Laurent Montel <montel@kde.org>"));
aboutData.addAuthor(i18n("Laurent Montel"), i18n("Author"), QStringLiteral("montel@kde.org"));
app.setOrganizationDomain(QStringLiteral("kde.org"));
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kontact")));
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
......
......@@ -492,17 +492,7 @@ void SearchWindow::doSearch()
KConfigGroup cfg = config.group("General");
const bool respectDiacriticAndAccents = cfg.readEntry("respectDiacriticAndAccents", true);
if (!mFolder.isValid()) {
const QString searchString =
respectDiacriticAndAccents ? mUi.mSearchFolderEdt->text() : MessageCore::StringUtil::normalize(mUi.mSearchFolderEdt->text());
qCDebug(KMAIL_LOG) << " create new folder " << searchString;
auto searchJob = new Akonadi::SearchCreateJob(searchString, mQuery, this);
searchJob->setSearchMimeTypes(QStringList() << QStringLiteral("message/rfc822"));
searchJob->setSearchCollections(searchCollections);
searchJob->setRecursive(recursive);
searchJob->setRemoteSearchEnabled(false);
mSearchJob = searchJob;
} else {
if (mFolder.isValid()) {
qCDebug(KMAIL_LOG) << " use existing folder " << mFolder.id();
auto attribute = new Akonadi::PersistentSearchAttribute();
mFolder.setContentMimeTypes(QStringList() << QStringLiteral("message/rfc822"));
......@@ -512,6 +502,18 @@ void SearchWindow::doSearch()
attribute->setRemoteSearchEnabled(false);
mFolder.addAttribute(attribute);
mSearchJob = new Akonadi::CollectionModifyJob(mFolder, this);
qDebug() << " CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC";
} else {
const QString searchString =
respectDiacriticAndAccents ? mUi.mSearchFolderEdt->text() : MessageCore::StringUtil::normalize(mUi.mSearchFolderEdt->text());
qCDebug(KMAIL_LOG) << " create new folder " << searchString;
auto searchJob = new Akonadi::SearchCreateJob(searchString, mQuery, this);
searchJob->setSearchMimeTypes(QStringList() << QStringLiteral("message/rfc822"));
searchJob->setSearchCollections(searchCollections);
searchJob->setRecursive(recursive);
searchJob->setRemoteSearchEnabled(false);
mSearchJob = searchJob;
qDebug() << " SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSss";
}
connect(mSearchJob, &Akonadi::CollectionModifyJob::result, this, &SearchWindow::searchDone);
......@@ -522,6 +524,7 @@ void SearchWindow::doSearch()
void SearchWindow::searchDone(KJob *job)
{
qDebug() << " void SearchWindow::searchDone(KJob *job)";
Q_ASSERT(job == mSearchJob);
mSearchJob = nullptr;
QMetaObject::invokeMethod(this, &SearchWindow::enableGUI, Qt::QueuedConnection);
......
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