summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove QPrivateImplementationPekka Vuorela2025-10-295-590/+0
| | | | | | | | | Everything is now migrated to common Qt ways. Change-Id: Ic310067bc6ed46743bfcf6c5d667cc65ab6893e3 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Pimplify rest of QMailMessage classesPekka Vuorela2025-10-284-110/+164
| | | | | | | | | | | | | | | | | | | | | | These seem like the real reason why QPrivate existed in this repository. QSharedDataPointer<BasePrivate> holding an instance of DerivedPrivate would by default clone the instance with just the base class type, and everything breaking apart badly. Now instead of having all this QPrivate infrastructure for one private class that gets inherited twice, doing here a small trick used e.g. on qtbase QTimezone. The cloning now done with a virtual method that ensures the proper subtype gets copied. Could be considered is the COW really even needed for the whole QMailMessage and would simpler basic private data be enough here. The contained data is shareable and the copies shouldn't thus cost that much. Change-Id: I845b66a85d8459d7f91cf138133cb8197ee72f70 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Use conventional qt pimplification on QMailMessageMetaDataPekka Vuorela2025-10-284-75/+87
| | | | | | | Change-Id: I934e756c072b55ec9eca85e76a7eb80d458e12ad Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove non-virtual private method overridePekka Vuorela2025-10-282-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | There are quite a lot of these indicativeSize() implementations on public and private side. Making one easily confused. In this case there's basic implementation in QMailMessagePartContainerPrivate base class of QMailMessagePrivate, and then a version doing +1 for header in both non-virtual QMailMessagePrivate method and the public QMailMessage method. I'm guessing this was maybe implementation side confusion whether to do the addition in public method or the private one, ending up both and some vagueness which private method gets really called (should be the QMailMessagePrivate and not the base class as partContainerImpl() returns a qmailmessageprivate pointer, heh). IndicativeSize not having a precise meaning it probably doesn't matter too much but good to get rid of a bit of this mess. Change-Id: I8f8ce6ee459fc98ce56e321a71ae849a65055f5c Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Polish QMailMessage classes, and something small elsewherePekka Vuorela2025-10-2715-131/+121
| | | | | | | | | | | | | | | | | | | | - Made setBody() virtual and avoid dynamic_cast to check which type of instance was used - Cleaned up some cosmetic details, fixed typos etc - Restricted some variable scopes - Renamed some global constants with UpperCase name - Commented out some dead code - Use nullptr instead of NULL or 0 - Renamed vague "void QMailMessagePart::defaultContentType()" - Made attachment methods in QMailMessagePartContainer virtual. The implementation does some dynamic_casts to check the type of the instance, which would rather be better as overridden implementation. Didn't do that yet, but the virtuals should avoid a later ABI break if/when such is done. Change-Id: Ia7dc212a1b609d0b02c2cc269082a0e39667c157 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Use conventional qt pimplification on QMailMessageBodyPekka Vuorela2025-10-274-36/+48
| | | | | | | Change-Id: I1b837dac523837401ee22b876cc46705de461e35 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Use conventional qt pimplification on QMailMessageHeaderPekka Vuorela2025-10-274-26/+31
| | | | | | | Change-Id: I72888473549d46212327668cc262f957cb5de3f9 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Use conventional qt pimplification on QMailMessageHeaderFieldPekka Vuorela2025-10-274-38/+47
| | | | | | | | | | Export on private was added by commit a84920f307cd4 but I think that doesn't matter without QPrivatelyImplemented now. Change-Id: I1ccba0a466beb075d26776de740c867bfec81237 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove deprecated synchronizeAll requestPekka Vuorela2025-10-2711-150/+3
| | | | | | | | | | | | | | | | | | | | | Small leftovers: pop service uses its synchronize() implementation also internally. ImapClient has a strategy for that which is set as ImapClient ctor. To be considered should the IPC / message source API be brought back for QMailRetrievalAction::synchronize(). Currently it ends up doing different sub-actions even if the original rationale was allowing the behavior to do thing in parallel. See commit 3e40ef86ac810. Also to worth note that this didn't possibly even work as the servicehandler code was doing exportUpdates() instead of synchronize(), maybe copy/paste error in commit 9c73f5415ace31 from the above request handler. Change-Id: I044732d63a11524a9b4d3a038123315c477d96e5 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Mark no-op setId() parameters as unusedPekka Vuorela2025-10-201-0/+2
| | | | | | | Change-Id: I1fcc3b8423b277df9bc068acc2b0ee19f98e5eb7 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Move privates in qmailid.h more conventinally after public:Pekka Vuorela2025-10-201-4/+12
| | | | | | | Change-Id: I11fc34b4983a41152f2620584e78569791292afa Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Use pointer for out-parameters in QMailMessageClassifierPekka Vuorela2025-10-204-20/+18
| | | | | | | | | Easier to follow side-effects in caller side. Change-Id: Ife9d9d159bf4aaa3bbeffc858797381839bf03bf Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Remove deprecated retrieveAll requestPekka Vuorela2025-10-1515-166/+12
| | | | | | | Change-Id: I3d973ca81b5dcf532233aa97c1065f93c6bb840e Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Remove QMail::messageServerPath() and messageSettingsPath()Pekka Vuorela2025-10-152-30/+2
| | | | | | | | | | | | | | | | | | | Not used in the library itself and the implementations don't make too much sense: the paths are using QCoreApplication::applicationDirPath() referring the random client app binary path so there's no much idea where the qmf content really is. There is some use for the server path in an example project, perhaps even proving how little it makes sense as it tries to launch a specific hard-coded binary from the directory. If something, the API should have a method for requesting launching the messageserver. Change-Id: I9b4b245e5c17f2e49fe3b9ed8b30cb175c5e8e45 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Use conventional qt pimplification on QMailMessageSetPekka Vuorela2025-10-156-261/+228
| | | | | | | | | | | | | | No much reason here either to use the custom QPrivate. The whole class set is quite funky and IMO subject for deletion, or moving to qwidgets side with FolderModel, but for starters now just avoiding now the custom pimplification in hope of getting rid of that soon. Change-Id: I5fe24574d5b9e3c24e944c6c8ae78b1f2f958bc1 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Remove network status leftover class from SmtpServicePekka Vuorela2025-10-151-11/+2
| | | | | | | | | | | Commit 1ff7dd4c878 removed the usage and made SmtpService attempt fetching the capabilities for 5 minutes before giving up. Kept a TODO item in different form. Change-Id: If09e0f78fed7497f6100bc2c8a465cd9c8c9655f Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Remove ancient SQL table version checkPekka Vuorela2025-10-151-12/+0
| | | | | | | | | | | The "latestinconversation" was introduced in 2011 and then soon enough renamed by commit de4ef974999da04de. The sql version check from commit 056c0c109eae763. Should be all ancient enough to get rid of. Change-Id: I1805c1dccf0394b56e91203c9baf2eac6f4a78bc Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Avoid QTextCodec references on documentationPekka Vuorela2025-10-152-27/+16
| | | | | | | | | | | QTextCodec is in core5compat and would be nice to eventually get rid of that requirement. Here we don't really need to document where internally it's still used. Can be considered an implementation detail. Change-Id: I69e86d95097f5c8e34e8f9a4be5fb5577345bf66 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Make QMailMessageHeaderField::setId() virtual and no-op where neededPekka Vuorela2025-10-152-30/+37
| | | | | | | | | | | | | | | | | Class structure where children move parent public methods to private on their declaration is suspicious, makes one question a bit the whole inheritance. It doesn't either entirely prevent usage if instance is accessed via parent class type. Hopefully making it a bit more conventional by making the method virtual and no-op where it shouldn't be used. Also reordered method declarations to be more consistent. Change-Id: I846686337fc0ba8083786b266bd2a9f0a264b382 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Minor API break: remove QMailMessage CR/LFPekka Vuorela2025-10-145-42/+36
| | | | | | | | | | | | These don't really belong here, and QChar::CarriageReturn and QChar::LineFeed have existed since Qt 5.0. Not even bothering deprecating, the switch to QChar is trivial enough. Change-Id: Ic4d48fcb27436c55f26c9e735b8d1a96d1a5fa9e Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Clean up ImapClientPekka Vuorela2025-10-143-141/+102
| | | | | | | | | | | | | | | | - Some switches were mixing return; and break; without any actual difference between them. - retrieveMessages() accountCheck parameter was named wrong in declaration vs implementation - Some slot parameters were declared const but implementation not having such. - Simplified error handling in a method to consistently handle error first instead of nesting deeper into ifs. Change-Id: I99b2528b20db9bbdf801bc7dbe361cc7b361b9f8 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Replace custom Maybe<T> with std::optionalPekka Vuorela2025-10-142-61/+4
| | | | | | Change-Id: I9b8a7e7d2a420216bc259499e0db1d8a1e58ca6f Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove more unnecessary usage of core5compatPekka Vuorela2025-10-1416-61/+60
| | | | | | | | | | | | | | Besides QTextCodec in a couple places, the remaining use was just - Couple simple QRegExps in protocol plugins. - QLinkedList in messageserver. QList should be good enough for that. Also spotted one ancient symbian test file and cleaned up some minor details. Change-Id: I348fd8d54ca3a6a6fcba1a757f33c7b490661706 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Fix service handler request castsPekka Vuorela2025-10-141-2/+2
| | | | | | | Change-Id: I15b64f07ea04427bd3174aa1ecb587936b35be75 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Avoid custom QPrivatelyImplemented on QMailThread - ABI breakPekka Vuorela2025-10-116-85/+51
| | | | | | | | | | | Similar to removal on QMailServiceAction on commit b3a4d64808b nothing special here requiring the custom code. It's just a simple pimplification here. Also no need for separate _p.h Change-Id: I0c24ae8937a65789575d2173f26381d65865120a Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Remove some dead code and clean up a bitPekka Vuorela2025-10-114-85/+12
| | | | | | | | | | Some internal mail service command helpers have been dead for long time. For USE_ALTERNATE_MAILSTORE_IMPLEMENTATION only some references in 2010. Change-Id: I6bf8efb76f4f4e6b1877e7fe617c5c7b2370d8b3 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Pass function out parameters as pointers instead of refsPekka Vuorela2025-10-111-10/+11
| | | | | | | | | Even if minor internal function, it's easier to follow. Change-Id: I7a13f4c3e36c878213ca668e1895c15f60d4cfeb Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add an API for account email aliasesDamien Caliste2025-10-108-32/+97
| | | | | | | | | | | | Consider the case where the QMailAddress used to store one account address is used as a group. It can then serve to set email aliases to an account. Add an explicit function to get aliases and adjust the documention of fromAddress() and setFromAddress() accordingly. Change-Id: I98fb96d8376ec9d57df70dd4c486fd84aa9067a3 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Replace QmfList usage with QListPekka Vuorela2025-10-0838-261/+139
| | | | | | | | | | | | QmfList was added on Qt6 migration as stopgap because of QList changes on iterator & content pointer details. Most of that seems to related to QMailMessageThreadedModel which now uses internally std::list. Doesn't seem that great stuff to begin with. Change-Id: I7c37cf69256273138e29001688de742c1d7ad40f Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Connect method documentation more consistently to implementationPekka Vuorela2025-10-079-58/+11
| | | | | | | | | And couple minor adjustments. Change-Id: I1fe3ad41253aff1401e92b96b973f4ed5bf289b5 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Avoid pointless const on by-value method return valuesPekka Vuorela2025-10-079-33/+46
| | | | | | | Change-Id: I33c176fca6e6de102e76ef7213b4d94ff1847ecd Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Use common if/else brace and operator stylePekka Vuorela2025-10-0624-286/+241
| | | | | | | | | And couple small simplifications too. Change-Id: Id5fe0a3e991961b9b39c92ab1b9b165c6f450289 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Remove unneeded typedef QMailMessageCountMapPekka Vuorela2025-10-066-14/+7
| | | | | | | | | | Not used anywhere in the qmfclient side since commit d06d3db4dfdc6de or so. Change-Id: I64d341bf56b1e9a887566f06631958eee58677d0 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Rename internal QCharsetDetector to use QMail prefixPekka Vuorela2025-10-016-168/+172
| | | | | | | | | | | | | | | | This was posing as more generic Qt class when it's just an internal helper. Renamed to QMail prefix as all the other files in .../support/. Some minor details fixed while at it: - Some #include guard were somewhat broken here - We don't need to support ICU <4.4 by now, it's ancient. - Some methods were having const QString parameter without the reference part. Change-Id: I6e4ff8037f20cee23107aeec1808ab51b48268f3 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Adjust some cosmetic details, againPekka Vuorela2025-10-0112-13/+22
| | | | | | | Change-Id: I061ae75d0196ee08380cf3763b1b12d55b631795 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Fix up Fwd API deprecationPekka Vuorela2025-10-012-2/+2
| | | | | | | Change-Id: I512329637d8fc2689c87a68e67abdf294dea6cd1 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Fix slightly off indent, adjust enum style and minor detailsPekka Vuorela2025-10-0149-237/+189
| | | | | | | Change-Id: I4ad9396f40535fdf4b010af76e121f1339698e50 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Avoid (explicit) QmfList outside the libraryPekka Vuorela2025-09-293-10/+7
| | | | | | | | | | | | | | | | | Paving the way to get rid of the QmfList which was added sort of stopgap on Qt6 migration because of the QList changes. - Imap plugin using for() loop which should work for any container type returned by the methods. - tst_qmailstore unit test just getting the list of addresses after we are sure those won't change. A few more lines but avoids the custom type. - On previous changed also indexing fully 0 based to keep it more robust. "Hi 0" type of subjects shouldn't really matter on tests. Change-Id: I7a74dbe7654d5f3dd80435d5bf9af110b875b03a Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Avoid failing on expected unit test failures, and some cleanupsPekka Vuorela2025-09-298-17/+10
| | | | | | | | | | | | | | | | - Imap test is marked insignicant in .pro but that allows success also, cmake's WILL_FAIL doesn't. Comment out latter to avoid unexpected failure. - Instead of failing, skip tst_qmailstorageaction if there's no messageserver running as such is not there with simple 'make test'. - Removed some qtopia style file references, adjusted cosmetic details, added/removed #includes depending on whether needed or not. Avoiding some pointless trinary operators. Change-Id: Ia7f2fd8e7c7318a138e1cb043f1da436902943c0 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove pointless prepareaccounts.cppPekka Vuorela2025-09-294-50/+0
| | | | | | | | | | The reason for the file seems more or less gone in 2009 commit 7827d40967a74 Change-Id: I6636c2bc559bebcd179fed8110c58faba6c3f094 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Clean up Smtp client not to use fragile iterators and qmflistPekka Vuorela2025-09-292-90/+74
| | | | | | | | | | | | | | | | | Having an iterator member variable for currently sending email and another iterator for handling its rcpt list was fragily and unconventional. Just storing now the needed data separately and getting rid of the email from the list of to be send after it's done. The rcpt iterator was also badly having a generic name 'it' etc. Bunch of other cleanups while at it and avoiding QmfList when there doesn't seem to be any need. Change-Id: I98b7829ddea36ec30e50ab72cf3f2599e6e60362 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Deprecate Fwd classes in favor of just introducing enums in real classesPekka Vuorela2025-09-2635-758/+533
| | | | | | | | | | | | | | | | | | | | | | | The Fwd classes were inherited by the actual classes, allowing to #include only the fwd and not the bigger real class header. Such a compilation time micro optimization shouldn't really be worth complicating the API. Thus just moved the enum content to actual classes. For some backwards compatibility made the Fwd classes typedeffed to the real ones. Crypto side didn't even have a proper class, only the Fwd and suppose all the usage of the code just did include anyway for the whole crypto api. The QMailFolderFwd::PredefinedFolderId was having a cyclic dependency when moved to QMailFolder: QMailFolderId ctor variant was depending on it and QMailFolder was depending on the Id. Moved the predefined id to the Id class which feels like a better home anyway. Change-Id: I9a9aa9c407ae90cc11b37179fe417e3a002ce94b Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Use qDeleteAll() more and some more cosmetic cleanupsPekka Vuorela2025-09-264-61/+54
| | | | | | | | | | For interesting detail ServiceActionQueue::clear() seemed badly done and likely leaking memory. Change-Id: Ibeb429bd46957dc1bac9e56f2bc8889a2e64b191 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove QMailMessageKey::serialize() variant that existed for symbianPekka Vuorela2025-09-262-14/+0
| | | | | | | Change-Id: I2bc7541ae5bcee84a990cf03d8276209771ba094 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Clean up some cosmetic detailsPekka Vuorela2025-09-19107-1135/+613
| | | | | | | | | | | | | | | | | | | Mostly coding conventions here. - Method opening braces to their own lines - Adjusted some inconsistent init list styles - Removed some redundant static declarations inside anon namespace - Replaced one delete loop with qDeleteAll() - Remove some trailing extra new lines - Added some missing spaces after commas - for (), if (), switch as common qt style - Removed some unnecessary scopes within switch cases Etc. Change-Id: Ide9ad7fea6f5fce3b854af2bf05874623c474028 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove support for QT_NO_SSLPekka Vuorela2025-09-1819-219/+10
| | | | | | | | | | In the world of today there shouldn't be much sense in doing email stuff without encryption support. Simplify code a bit by removing the ifdeffing. Change-Id: I90d90cd1ef11eed2ebd625dafee2f78b7d039233 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Simply notify on authentication errorDamien Caliste2025-09-179-31/+158
| | | | | | | | | | | | | | | | Let the credential implementations decide what to do on authentication error: either invalidate or retry. Adjust the API accordingly. Apply this change when caching credential data in the SingleSignOn plug-in: Don't make SSO calls on each service connection, use cached values instead. Only reset the cached values when the authentication fails with wrong credentials. Change-Id: I14fbe416567d552e7729ad8579fd9a763a3f6749 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Refactor ServiceHandler and avoid unnecessary data serializationPekka Vuorela2025-09-122-625/+855
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The serialization of request data is not only ugly but seemed problematic when trying to adjust the IPC serialization. Thus made the code use proper classes for storing the request related data. Was initially aiming at moving also the request code to some 'virtual bool execute()' type of method, but that wasn't trivial due to requests needing some private api to change the ServiceHandler state. But maybe this is a nice first phase anyway, limiting the changes done at once. While at it, did a bunch of other cleanups, simplifications, small fixes and comments for future work: - renamed reportFailures as reportPastFailures() to better indicate what it's about. - renamed Request::description as requestType which should better describe the member. - Moved internal ExpirySeconds from header to cpp - simplified markFailedMessage() to mark the failed message with the check for such need on calling place - minor functional change: retrieveNewMessages() wasn't doing the usual usesConcurrentActions() thing properly. Now passing the action id as rest. Change-Id: I8261c50492d7d496df777e69dbbc22f5485a87fa Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Handle API TODO item from ImapTransportPekka Vuorela2025-09-033-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a note for making some methods virtual in the base class so the 'imap' prefix could be avoided. Did that first but then reviewing the situation it felt better to keep the prefix on imap side and on QMailTransport exposing socket and stream means that overriden methods can be too easily side-stepped. Originally the TODO was referring to a) imapReadLine() but base has an optional parameter which would have needed to be implemented, even if not needed, b) imapCanReadLine() where matching base is const while this one needs non-const access to consume compressed data, and c) imapWrite() which doesn't have a matching parent method. Later added bytesAvailable() / imapBytesAvailable() and readAll() / imapReadAll() could have been made virtual but it would have been also confusing if some reads were having special methods and some not. For suspicious earlier behavior, ImapProtocol was having one place where it was calling bytesAvailable() and readAll() instead of the imap variants, avoiding the potential decompression. Coming from commit 37164dc1b which did even introduce the new methods in ImapTransport but no usage for them. Change-Id: I3eec5034b8393b26f288bf0a158c8c1b1d520445 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add a timeout to credential fetching with SSODamien Caliste2025-08-042-0/+35
| | | | | | | | | | | | | | | In case SSO is too long to respond, this timeout avoids to stay indefinetely in the fetching state. It also allows to re-initialize the session process. Without it, it's not possible to restart credential fetching, getting errors when calling process() like: SSO error 305: AuthSession(password) is busy Change-Id: Ia2bbffbdb1510780a6db33a2b55450d69c9fc882 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>