summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix slightly off indent, adjust enum style and minor detailsPekka Vuorela2025-10-0151-240/+194
| | | | | | | 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-294-34/+38
| | | | | | | | | | | | | | | | | 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-2917-48/+18
| | | | | | | | | | | | | | | | - 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-2649-825/+599
| | | | | | | | | | | | | | | | | | | | | | | 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-266-67/+57
| | | | | | | | | | 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-19132-1309/+722
| | | | | | | | | | | | | | | | | | | 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>
* Adjust tst_qmailmessagepart content-disposition expectationPekka Vuorela2025-09-184-3/+6
| | | | | | | | | | | | | Commit c5a923b12d749 made empty Content-Disposition be skipped but didn't touch the unit test. While at it added some notes to cmake files of unit tests which are expected to fail and have such notice in the .pro file. Change-Id: Ia51777e03598e1e50ed0b29cb98f070357c9865c Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* 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>
* Rename QMailMessage::setInResponseToDamien Caliste2025-07-273-6/+6
| | | | | | | | | | | | Because of automatic conversion from MessageId to Message, the calls to setInResponseTo(id) are interpreted as setInResponseTo(msg), making it infinitely recurring. Avoid this kind of issues by renaming the newly introduced function in QMailMessage to setReplyReferences(). Change-Id: I2acb1b6a7a6277c3685eabe757a6e9b11e798d06 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add a specific logging category for IMAP stateDamien Caliste2025-07-113-7/+9
| | | | | | | | | | | | | Previously to 8e1451a8, the change of state in IMAP protocol was log with MessagingState category which was disabled. Create here a specific new category to avoid having the state changes printed out with the normal IMAP logging by default. It's now possible to get the state logging by using QT_LOGGING_RULES environment variable without recompiling. Change-Id: I7bfee95bd8dd483b2716e60b2866e778861c61ef Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Enforce that transport exists when credentials changeDamien Caliste2025-07-092-2/+2
| | | | | | | | | | It's a follow-up of dd679b32 since the state is not resetted in newConnection() before the credentials are initialised again and their status changes. Change-Id: Id1d94a12b5b2dfd214918347f6f05adb51ef79a9 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add missing imaplog.* sources in benchmarksDamien Caliste2025-07-092-0/+4
| | | | | Change-Id: I73ce2814fe9fce7c9e30278b484768ec357fa060 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Warn on credentials failing to initialize in POPDamien Caliste2025-07-081-2/+2
| | | | | Change-Id: Ie73d59cc11dca6dab1550717b08dfca9feec7b15 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add more debug messages for POP serviceDamien Caliste2025-07-042-2/+8
| | | | | | | | | | Also prefix the send and receive messages with the account number. It helps when several accounts are reporting at the same time to follow the actions of each account. Change-Id: Ie48bea49219cf451a62a2780f2ba122afb67f5d4 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Don't report credentials error after a connection being closedDamien Caliste2025-07-043-13/+15
| | | | | | | | | If the connection already breaks while waiting for the credentials to be fetched, it should not report error or proceed to login. Change-Id: I68a6f95232bdde03cc6cd52a2e0bf3cdfc989772 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Avoid locking credentials in fetching statusDamien Caliste2025-07-031-2/+4
| | | | | | | | | | | | If m_session->process() is immediately failing, without entering the event loop, the error handler is called immediately, setting the status on error. But the status was forced to fetching after the process() call, potentially overriding the error status. Change-Id: I03f7aec6da05a04d74074c7e0a290a947428c759 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Setup references header when replying to a messageDamien Caliste2025-06-233-0/+58
| | | | | | | | | Add a convenient function in QMailMessage to properly compute the In-Reply-to: and References: headers when replying to a message. Change-Id: Ibe962383d95e101b612258eb0ced980fef7e7203 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add a read receipt constructorDamien Caliste2025-06-164-0/+201
| | | | | | | | | | Add a constructor for a QMailMessage as a read receipt for a given message. The message is created according to RFC8098 as a multipart/report message. Change-Id: I41b70fd40e5f7e0a92e04cd92c387542b47686ce Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Rewrite logging with QLoggingCategoryDamien Caliste2025-06-1381-2220/+1080
| | | | | | | | | Replace the custom logging mechanism with QLoggingCategory. Also declare the warnings with the proper category. Change-Id: If87d53d27ea0c65abd434af9f99fe49ce634d6dd Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Don't create a header for ContentDisposition::NoneDamien Caliste2025-06-111-1/+5
| | | | | | | | | When creating a part, if the given content disposition is None, don't create a associated header with an empty value. Change-Id: Id07887c6dda5a495e220e6c9f64e49b2d5214e4b Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Avoid confusing name overloading in messageserver's service handlerPekka Vuorela2025-05-192-124/+137
| | | | | | | | | | | | | | | Quite confusing when the same name is used for multiple slots and signals. Separated these by having slots as emitFoo or onFoo depending on what they do. onFoo is clearly a signal handler while emitFoo might be used directly and merely emits a signal. Would have used the new connect() syntax more but the signal sources also overload the signal names, making it painful to use here. Change-Id: I984c3565656a80dc8723b3c4296e2996e0748861 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Add missing spaces after for/if/while/switchPekka Vuorela2025-05-0954-410/+410
| | | | | | | Change-Id: I57c6ed78099b3359a16ce807da95325e755f0197 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Remove trailing whitespace with sed scriptPekka Vuorela2025-05-09112-2764/+2764
| | | | | | | Change-Id: Iebfffe7a6d5b2db40f0508ecd7c8ccddfa6665a6 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Fix account added twice in list modelDamien Caliste2025-05-091-95/+84
| | | | | | | | | | | | | | If an account is added, while an account list model is still uninitialised, the account was added twice. Correct it by returning when d->initialize() is called. Also exclude current ids when matching new accounts. Also rename init member and initialize() to populated and populate() for clearer meaning. Additional clean-up in the class, polishing spacing and brackets alignments. Change-Id: I1e5e3b8dae15d0b86bfbf26b48085d1d9b599707 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add a mail account manager based on libaccounts-qtDamien Caliste2025-05-0610-4/+1263
| | | | | Change-Id: Ice8819e679da538e484c776138e3a9b101493a5d Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Introduce an API handling external accountsDamien Caliste2025-05-0610-17/+301
| | | | | | | | | | | The new QMailAccountManager API is used by the mail store to deal with accounts, when provided. By default, the existing SQL handling of the accounts is used. Change-Id: Ided2132ce8bfc7a4efebff90cbb2a727134f8fda Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Make account tables optionalDamien Caliste2025-05-064-55/+153
| | | | | | | | | | Add a constructor option to QMailStoreSql to use or not the tables related to accounts. When true, it allows to use an external storage for the accounts, like system-wide accounts. Change-Id: I87d1dc8afafa56889511e25b58505dc5dfe1c89e Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Move handling of standard folders to dedicated routinesDamien Caliste2025-05-062-107/+152
| | | | | | | | | Separate the code dealing with standard folders, so it can be called separately from the code dealing with the account. Change-Id: I65a9ce2c32c5584e4df7f9b339cb4e6d639b5bdd Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Put key first in QMailStorePrivate::Cache templateDamien Caliste2025-05-062-36/+38
| | | | | | | | Use a key, value order when defining the Cache template, to follow QCache ordering. Change-Id: I14b56842a47753669d23d21f7166e8f89b166c0e Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Move SQL-related parts into a dedicated classDamien Caliste2025-05-0614-9725/+10339
| | | | | | | | | | Cut QMailStorePrivate into two: - one new class that is handling SQL-related actions, - the remaining part, containing the cache and the notifications. Change-Id: Ide3f70a5da8e85b465dc0ccd07a4bc15e549f519 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* New connect() api in QMailServiceAction - small api breakPekka Vuorela2025-04-223-107/+115
| | | | | | | | | | | | | | | | | | | | New api better checks the types and we have complex enough ones here. Besides that, the api had overloaded names for QMailSearchAction::remainingMessagesCount() and ::messagesCount(), having same name for both signal and getter. While we could cope with that with some extra code, it's really just bad API so changed the signal names to indicate it's about change. Also the totalProgressChanged() signalling seemed broken. The signal got connected to handler in private class, which emitted a similar signal, but that wasn't connected to the main class. Added such now in QMailActionInfo() ctor. Change-Id: If0264d8de65509cd1be9b5a5d994c57ab9e9f0d5 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Avoid custom QPrivatelyNoncopyable on QMailServiceAction - ABI breakPekka Vuorela2025-04-224-241/+301
| | | | | | | | | | | | | | | Just use the common Q_Q and Q_DECLARE_PRIVATE. Not seeing a point in the custom code that makes it harder to follow. The QPrivateImplementation talks about QSharedDataPointer. I'm not entirely following what's really the problem but in this direction such is not even used. Small ABI break: apps using QMailServiceAction likely need to be recompiled due to instance size change. Change-Id: I0fe87f277ff1c2383331dfe9e9e29377ff608479 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Adjust and fix protocolRequest API - minor API breakPekka Vuorela2025-04-0710-67/+88
| | | | | | | | | | | | | | | | | | | | | | | | | QMailProtocolAction::protocolRequest() is specified "The request may have associated \a data, in a protocol-specific form", which should mean that invalid QVariant() is allowed to indicate no data. This worked earlier but the D-Bus IPC broke it due to D-Bus wire protocol not allowing invalid variant, and QDBus was refusing to handle such: 'QDBusConnection: error: could not send message to service "org.qt.messageserver" path "/messageserver" interface "org.qt.messageserver" member "protocolRequest": Marshalling failed: Variant containing QVariant::Invalid passed in arguments' Side-stepped the problem by switching type to QVariantMap, which is simple to serialize empty and named parameters can be passed now without extra hassle. It's a small API break but the protocol requests are quite an advanced feature, and not used with the QMailMessageSource instances in this repository. Change-Id: I0a44026938d6e77bc7a89640cffe6efa38cc5616 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Declare tests in the build systemDamien Caliste2025-04-0238-18/+174
| | | | | | | | | | | | | | | | | | Tests can be run with `ctest`. The `--verbose` option makes the output of each test visible. Fix also minor failures: - make qlogsystem test locale independent, - make qmailstore test properly listening to the messagePropertyUpdated() signal. IMAP, POP and SMTP tests are declared as always failing for the moment, since they try to connect to a mail server (but they are still useful for debug purposes). Change-Id: I7ae548110a8eeb37bd07b031a8433d38ea53529e Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Always compile logging capabilitiesDamien Caliste2025-04-022-46/+6
| | | | | | | | | | | | Don't turn on logging compilation with a CPP macro anymore. Logging can still be disabled at runtime if necessary. Also disable only Syslog under Windows and not all other loggers like files. Change-Id: Ib480b40be9892f41110f2d2ee9c7211c4e34d9fb Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Define D-Bus signals for store IPCDamien Caliste2025-03-2612-526/+463
| | | | | | | Also use serialized arguments via QDBusArgument. Change-Id: I568ed4e2a312817fba8d392f2e33fa6eac7df2f9 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Move store IPC into a dedicated classDamien Caliste2025-03-268-1027/+1017
| | | | | Change-Id: If9241c299ef9e88b01e49e49ee72b56409fd2ada Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add signal testing for QMailStoreDamien Caliste2025-03-261-0/+41
| | | | | Change-Id: I2f3a3e790480b37e7c85d536b88e8621036fd2b5 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Decode password in plain credentialsDamien Caliste2025-03-261-6/+25
| | | | | | | | | | | | SMTP, POP and IMAP service configurations are base64 encoding the password in storage. The PlainCredentials using such values from storage should thus decode the password before returning it. Change-Id: I255fc78cff29a2cc4eeb973ad36a918ca60cd9b8 Reviewed-by: Guido Berhoerster <guido+qt@berhoerster.name> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Continue login when there is no valid push foldersDamien Caliste2025-03-262-3/+6
| | | | | | | | | | | | | | | | | Currently, login is deferred until all configured push folders have been established (or failed), when push email is enabled. This does not work for a newly created account where there is no folder registered. This patch ensures that the code continues to the login when push email is enabled but when there is no valid configured folders. Change-Id: I397d4d2616c3c6cebc9a3f4dcc03f4b5e3564ebe Reviewed-by: Guido Berhoerster <guido+qt@berhoerster.name> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Return an invalid service when not foundDamien Caliste2025-03-172-0/+8
| | | | | | | | | | | | If a QMailAccountConfiguration does not have a given service, and does not have the configuration to create it, it must return an invalid ::ServiceConfiguration object, instead of the undefined value of the terminated iterator. Change-Id: Ic7dd5b56ddd876ef8a48ea00fbb8f279f765062d Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Guido Berhoerster <guido+qt@berhoerster.name>
* Fix crash on imap search without supported keysPekka Vuorela2025-03-031-0/+6
| | | | | | | | | | | | | Just passing QMailMessageKey() ended up with empty search query and then crashing on QStringList::takeFirst(). Added similar error handling as CreateState::transmit() and RenameState::transmit() have. Change-Id: I6fdaa8ac11507dd880676d1f020c53d4964c85aa Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Don't continue on log-in after idle renewalDamien Caliste2025-02-281-3/+5
| | | | | | | | | Fix a regression introduced in 679b6a2d. The setIdlingForFolder() is also called on idle renewal, when the main session is in logout state. There is no need to ask for a login then. Change-Id: Iec6649a529a2d2b5b9b9d817f0ea2df5ff03f383 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>