summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Simplify tests.xml filesHEADmasterPekka Vuorela45 hours2-2233/+114
| | | | | | | | | | | | | | | | | | | | | | | | There shouldn't be really point in listing each test case inside a unit test, executing the test binary by default just executes everything within it. That's here lead to excessively verbose files which are painful to maintain and ensure all the tests are there. And evidently these were already missing tst_qmailaccountconfiguration tst_qmailstorageaction and tst_crypto. And no traces or protocol tests, though those don't really work good now. Now just having one test set and cases for each binary there. Removed environment details as those shouldn't really matter. Files identical except other having -qt5 on paths (which we should really handle e.g. via an .in file but that's for later). Disclaimer: not actually tested due to tests not supporting even installation now. Change-Id: I506c61959c0b1960d1056e7b38bbf184b964cb25 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Rename QMailMessageBody::None as UndefinedEncodingPekka Vuorela45 hours3-6/+10
| | | | | | | | | | | | | | | This is a later addition by commit cf8b3f97bbc5 without much explanations. It was left undocument and the naming didn't feel good. Gettingreferred by class prefix it loses the encoding context and what would 'none' even mean as encoding. Just renamed it without providing old name for compatibility. Not expecting much external usage. Change-Id: I34ac65b52e6136dfdc7a8bd38489c14a22fea252 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Clean up service plugin signal connections - minor API changesPekka Vuorela3 days29-368/+384
| | | | | | | | | | | | | | | | | | | | | | | | | | | The states and signals were painful to follow due to bad naming and excessive overloading. Here: - Renamed some API to avoid overloading, help readability and allow new connect() syntax without resolving the overloads. - updateStatus() signals and slots renamed a bit to make it clearer what is a signal and what is a slot. And avoiding overloading QMailMessageService::updateStatus() to simplify signal connection. - Cleaned up QMailTranport API. It's not doing urls but hostnames and the signals were especially hard to follow - Use the new connect() syntax in messageserver side - Avoiding some protected: / virtual methods when there's nothing even able to inherit the class. - At least print SSL errors instead of signal that's not connected anywhere. - Some minor simplifications and code style adjustments. The SSL error handling is still funny but at least a bit easier to track. Change-Id: If168e15ef068fedee46b9401d695ed5dae7962ba Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Rename QMailMessageMetadata::content as contentCategoryPekka Vuorela3 days36-174/+211
| | | | | | | | | | | | | | | | | | | | The related functionality was confusing when setContent() didn't actually set any content but rather the type of it. Also there are other setContent() methods around that actually set the content. Then again calling this contentType() would have collided further in the inheritance tree by method returning a QMailMessageContentType which is referring to header fields. Thus switched this to a third distinct name. Old setter and getter names provided for backwards compatibility which should work at least for the very basic cases of setting and comparing type. Change-Id: I4c54548f3c2c85096fde64b3221e233dd3feefa3 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove action streaming operatorsPekka Vuorela3 days5-92/+16
| | | | | | | | | Shouldn't be reasons anymore to have streaming operators on mail actions. Change-Id: I2de2e6bb810883c0da7260f0083d6a664801b372 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Mark serialize() methods \internalPekka Vuorela3 days9-7/+22
| | | | | | | | | | | | | | | Qdoc is having trouble with the templates and was unable to find content for any of these, instead just complaining. Besides that we don't really even want to promote this functionality and hopefully would get rid of it. Also QMailKeyArgument::ValueList::operator==() documentation didn't work. Just removed that as minor detail. Change-Id: I1956c19cf53ed7ef93478d629755b39fbfdbd4bd Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Fix running tst_qmailmessageheader and one test inside itPekka Vuorela3 days2-12/+8
| | | | | | | | | | | Commit 9da97137adae broke the output test by slightly shorter string. Went unnoticed as the whole test was marked passed no matter how many failures it had. Change-Id: I65d3321541d96bee0d7c56fd2fecaed84bb60b61 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Replace remaining 'Qt Extended' references with 'Qt Messaging Framework'Pekka Vuorela3 days28-34/+34
| | | | | | | Change-Id: I04d2c685c76dc3e72b16a6fb7eb82f2ab0e510c1 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add null protection to QMailServiceConfiguration::id() and service()Pekka Vuorela4 days1-3/+3
| | | | | | | | | Shouldn't crash using these with null configuration. Everything else is already protected. Change-Id: I1d56995764e57260c61c450ee486daf84b4968f7 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Remove QMailServiceAction::Status ErrorCodeMinimum and MaximumPekka Vuorela9 days3-25/+41
| | | | | | | | | | | | | | | | | Can't imagine much use for these, and not finding such even in the history. Furthermore the maximum has been defined wrong for years now. Also don't think there's any real reason externally to start the errors from 1024. Internally the error string handling was comparing socket errors to service status enums but now avoiding that. Also added some missing enum translations. Change-Id: I3cba0043c220e5abb011dbb81904ccc58b75f15d Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Adjust again some smaller code detailsPekka Vuorela9 days77-255/+425
| | | | | | | | | | | | | | | - Wrap some overly long lines - Honor coding conventions better here and there - Use nullptr more instead of '0' - Switch remaining cases of Q_DECL_OVERRIDE and Q_NULLPTR to standard keywords. - Removed some unnecessary #includes - etc. Change-Id: Ia9a01807da88298a6c1c1bbb22c854743ed19429 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Fix tst_crypto and its setupPekka Vuorela9 days4-26/+30
| | | | | | | | | | | | | | The test wasn't included in cmake test, and it had trouble finding its resources in shadow build. The test data needed also a bit of changing which got missing here on commit c1e4c9728f80e36ed. Small other cleanups while at it. Change-Id: I74e38ef32afba1b36cc78cc2c69fde7f79f6b0ce Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Move resource usage configuration out of QMail namespacePekka Vuorela9 days5-55/+32
| | | | | | | | | | | | | | The maximum actions / connections shouldn't be a detail the library side needs to decide or expose. Should be up to the messageserver implementation how it wants to serve. Also not expecting much need to know when the database gets automatically closed outside the database itself. Change-Id: I5af27cbe31fe21049d6afdcb7cd7239112a6b06b Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Remove heartbeat classesPekka Vuorela9 days5-378/+4
| | | | | | | | | Apparently unused since 2011(!) - commit 4a659f06eac Change-Id: Iaa80ce9a1c68bb7431922350c45e9ce0db8807b9 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Fix compiler warnings on crypto sidePekka Vuorela10 days3-5/+4
| | | | | | | | | | | | | | | Was getting warnings on protected QMailCryptoGPGME::decrypt() hiding the base class virtual method for the same name. Just renamed the method to avoid that. QCryptographicHash::addData() was warning about deprecated method, but we don't even need to use the variant with length. The data is already a QByteArray. Change-Id: I6793536c1fede91820127d4a6edd03cffec1c636 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Add some rough missing documentation to QMailThread and QMailCrypto sidePekka Vuorela10 days2-1/+53
| | | | | | | | | Qdoc was complaining about linking to these docs. Added something rough for starters. Change-Id: Iea75dcd00325827898547ab2b6dc0cdd47036352 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Avoid some more qtopia referencesPekka Vuorela10 days2-8/+2
| | | | | | Change-Id: I36c493538d5c8b167e9bddf1979916773fc5f895 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Use zlib with cmake build if availablePekka Vuorela10 days2-0/+10
| | | | | | Change-Id: I3297515d08a316d236061f0a3cfe85501f36617a Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Use module declarations for documentation and further cleanupsPekka Vuorela11 days50-292/+101
| | | | | | | | | | | | | | | | | | The \module & \inmodule fit better the grouping here rather than \group and \ingroup. These are really separate libraries while \group would fit better different aspects inside a library, e.g. ids or mail keys etc. In addition qdoc was complaining for each class that it doesn't know the module and is using the project name instead. Some other cleanups too: - removed yet another ancient changelog - renamed the general qmf file & resulting html - added some warnings about examples being outdated Change-Id: I9717223f54408449e6ad2357c4aa98d392d20ade Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Clean up the doc/ directory contentPekka Vuorela11 days14-1261/+97
| | | | | | | | | | | | | | | | | | | | | | | - Removed CHANGES.qdoc. Like in the removed main CHANGES file, only quite historical changes here. - Removed qtopiamail_qmfutil.qdoc. No such thing anymore. - Removed the .qodcperl file. Not spotting any actual use and rather not touch this perl stuff anyway. - Removed references to files/content which doesn't exist anymore, e.g. the whole utility library. - Removed references to features not really supported, e.g. XMPP or cell phone things. - Simplified some parts. - Removed html footer. "QtSoftware 2010" is hardly the exact content we want there. For the moment we can manage without anything. - Renamed some files to avoid qtopia and to better refer to current libraries. Seems still a mess, but again a bit better maybe. Change-Id: Iadefc726159bc5ec36f6cc28b892e917a1cdbb06 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove trailing spaces from doc/src/*Pekka Vuorela12 days11-166/+166
| | | | | | Change-Id: Ief4b38b510f933bd43952dd4e700121694daefd5 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Fix some more mechanical documentation detailsPekka Vuorela12 days15-226/+225
| | | | | | | | | | | - \bold, \o and \i are deprecated in favor or \b, \li and \e - qdoc complains about \brief not ending in full stop - \sa should end in comma or no punctuation character Change-Id: I6bdc3757d63578c3895e7b1cad8b32773257d965 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Fix most of the local qdoc warnings from .cpp sidePekka Vuorela12 days15-50/+85
| | | | | | | | | | | | | Bunch of parameters not having documentation or using wrong name. Some enums values also missing. Some other small adjustments while at it. Still bunch of warnings from failing to link methods to Qt etc or missing the explicit module. To be addressed separately. Change-Id: Ib6d3c261f9aa7a511dc8b7c0aa2a6357187841f9 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Add a cmake build option for building docs and a crude implementationPekka Vuorela12 days2-0/+10
| | | | | | | | | | | | | | Not pretty but at least this does execute qdoc with 'make generarate_docs'. The cmake module is somewhat kde specific by using such target directory specifier. Also the rule shouldn't really be under one library when it covers everything. But it's a start. Change-Id: Ib917d3e7584fc65b1fbb3d3b7af7d21f6f8ca3b1 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove tests.xml references to removed testsPekka Vuorela12 days2-154/+0
| | | | | | | Change-Id: Id09f957ac460f4fcd68bc2d2c3d85078895e2da2 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Remove public cmake dbus declaration and usage in unit testPekka Vuorela12 days2-37/+2
| | | | | | | | | | | | | | Especially the part at the end of the unit test using QMailStoreNullImplementation seemed pointless when nothing was really checked from it. For the rest, the account addition is already tested so just removing the whole test method. Change-Id: Iec2110df67e66514f4853ea985e8e38fe198f37a Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Create .pc files also on cmake buildPekka Vuorela12 days4-0/+36
| | | | | | | | | | | | | | Using extra-cmake-modules where the functionality can be gotten easily without bigger overhaul on using the qt cmake module declarations more. Result more or less similar to qmake build except here actually marking the internal dependencies better. Using those to build external code not tested but no much risk of regression when nothing was offered on Qt6/cmake so far. Change-Id: I02b422ac3cfe5f7b03b984ffc9e762082f9fd323 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Note on the README how to build tests with qmakePekka Vuorela2025-11-281-0/+2
| | | | | | | Change-Id: Ie3a836f88716b9aeaa15c78d5dece4c3d146df12 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove the obsolete CHANGES filePekka Vuorela2025-11-281-303/+0
| | | | | | | | | | With nokia bugzilla references, latest changes in 2012, etc this doesn't really help anyone at this point. It's just a distraction. Change-Id: Ibb00fbffd36f890fc824b1ef52cb5610bb565c86 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Improve the READMEPekka Vuorela2025-11-281-65/+36
| | | | | | | | | | | | | This hasn't been touched in years, even talking about Qt4. Some quick adjustments for trying to cover the current situation better. Simplified the content by dropping removed features like protocol settings editors, references to examples that unlikely work, and generally some qmake related usage. Change-Id: I16c1496abe685d6445d3237caab9d7c8458482bc Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Avoid cmake warning on symlinkPekka Vuorela2025-11-281-1/+1
| | | | | | | | | Force creating the link so it doesn't warn for such to already exist. Change-Id: I733508fa3d5403edb81c75027367e7acf25a7153 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Make type registration sanerPekka Vuorela2025-11-2711-80/+51
| | | | | | | | | | | | | | | | | | | | | | | | | Much silly things here. Refactored as saner: - Removed Q_DECLARE_USER_METATYPE_ENUM. Just wrapping Q_DECLARE_USER_METATYPE. - Removed pointless Q_DECLARE_USER_METATYPE_TYPEDEF. It was defining some code that got called in the implementation side but there's nothing really needed to be declared outside the .cpp. - Avoiding above registration code also in Q_DECLARE_USER_METATYPE_NO_OPERATORS. Moved to implementation. - Remove unnecessary Q_IMPLEMENT_USER_METATYPE_TYPEDEF. It was just the same type registration duplicated. - Removed pointless _QATOMIC_ONCE. Wasn't doing anything on the most common gcc compiler and outside that there's no reason to have such protection anyway. - Slightly renamed QMetaTypeRegister with Qmf prefix to keep its home clearer. - Made type registration work with Qt5 by using also qRegisterMetaTypeStreamOperators() there. Change-Id: I6f2ef05998747d84d7e59170daab2c92b9aa5965 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Avoid pointless double indirection pointer on writing rfc2822Pekka Vuorela2025-11-272-27/+28
| | | | | | | | | | | | | | | Not following why such existed here. Simplified by just using a plain pointer. Also added a note to the public method that QDataStream is used for writing plain text. Wondered for a while if the data versioning etc would matter. On a glance a bit strange API but guess it keeps control of the encoding etc. Change-Id: I36349123a54893d85a1f0185182fc33300c3a328 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Repurpose .pro files for qt5 support - almost worksPekka Vuorela2025-11-2611-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | There's still need for having qt5 support out there and the .pro files don't anyway compile with qt6 by now. Adjusting those and the code to build on qt5 didn't even require much adjustments. The hack to get _p.h includes work without private prefix, that used to be there for qmake build, is horrible but at least it's relatively small and affecting only .pro files. The examples had some existing issues building there, missing includes and not entirely disabled protocol editor support. The "almost works" part: builds fine but the metatype side is slightly lacking, resulting also a unit test failure. On qt5 qmailipc.h would need qRegisterMetaTypeStreamOperators() call after qRegisterMetaType() but I'm not eager to add qt version ifdeffing inside a macro, at least now. Hoping to clean up the whole metatype registration first. Change-Id: I6e620175383690ce4e6eb4c841e314ccf031026f Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Separate D-Bus serialization from generic serialization APIsPekka Vuorela2025-11-2517-177/+514
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows to better follow and change how D-Bus IPC happens in detail, not implemented somewhere deep there in templated serialization methods. Now only defining d-bus serialization for what's actually needed. Avoids also spreading the D-Bus around. Now it's quite well contained where needed. Allowing to better add more IPC mechanisms for other platforms if needed. Once messagekey serialization is done properly without qt binary data there shouldn't be too much need anymore for the existing serialization and those could be removed, at least to some extend. This paves the way. QMailMessageServer::registerTypes() replaced with QMailIpc::init() which should be more generic and handles now registering all the D-Bus types needed. Some minor adjustments to the D-Bus API: - The message key signatures on xml seemed wrong, more of how the common datastream serialization happened instead of the d-bus specialization. - Some enums used only on classes are not explicitly registered and are passed just by integer value. Not getting the struct container as registered enums. Simplifies the signatures a bit. - On message metadata moved custom fields as second last, and dirty states as last. Seemed more logical that way. Not sure should the dirtyness really even exist on the serialized data. Was hoping to get rid of more struct containers on enums but apparently qdbusxml2cpp ignores type annotation for basic types like strings and integers. Could consider should the signatures be still simplified by, for example, passing named property arrays, but that's for later. Change-Id: Idf55699aebca45e199fe58215df665c8092475c3 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Build messageserver plugin support without configurabilityPekka Vuorela2025-11-205-24/+7
| | | | | | | | | | | | | | | | | | | | | On qmake this needs to be explicitly turned on externally while I wouldn't expect much reasons not to use it. The affected code is small. The MODULE_PLUGIN_TYPES wasn't updated to contain plugin prefix but guess it doesn't necessarily affect much with no actual messageserver plugins here. On cmake build looks like the option wasn't enabled properly. The plugin files are built but nothing did -DMESSAGESERVER_PLUGINS for the actual messageserver. Removed one leftover type declaration from messageserver too. Change-Id: I2f012f1f16f6c5c1d74c8b3b0b3ca50edebf59a1 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Simplify sql store mutex guardPekka Vuorela2025-11-201-17/+8
| | | | | | | | | | No template use for this, it's always ProcessMutex. Always also locked just after created so made the ctor do that. Change-Id: Ic6531b08762256d397c954982ca8c65409cce4ee Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Make LongString construction more explicitPekka Vuorela2025-11-204-6/+14
| | | | | | | | | | | | | Strange API when bytearray parameter on ctor use the content but QString opens a file. Neither were even 'explicit'. Added 'explicit' and made the file opening use even more explicit static method. Change-Id: I41c6f91eba2adcc93aa534e1d4edff5f9fa9f907 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Rename tst_locks as tst_qmailaccountkey to match contentPekka Vuorela2025-11-199-71/+41
| | | | | | | | | | Not much locking here. There used to be one locking test case but the class got removed as unused in 2014, commit 7a314eb53ac. Change-Id: Ifc41ca6db63aab2291cbc4efa6c4d306fbf9a17e Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Make QMail::dataPath() path selection more robustPekka Vuorela2025-11-141-2/+3
| | | | | | | | | | | E.g. on sandboxing case the new path might exist as empty just to get access to it. Try here to ensure better that the selected path is actually already in use. Change-Id: I6c2449bcf9b1508ce01b0f83ea60e051b71d211c Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Fix QMailMessageServer add/update descriptions, simplify sql keyPekka Vuorela2025-11-132-23/+35
| | | | | | | | | | | | Add/update messages had their descriptions reversed. Simplified the sql key class by defining default nullptrs instead of repeating in multiple ctors when not being used. Change-Id: If218ad4d9e2aa38f1148da88542c00da0bb19513 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Wrap some ridiculously long lines in sql and messageserver sidePekka Vuorela2025-11-138-246/+755
| | | | | | | | | Some minor changes too like broken indentation. Change-Id: I2c72f64d4472ca669f339904ff953f2a39118baf Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove qwidgets support from qmfmessageserverPekka Vuorela2025-11-1234-3082/+17
| | | | | | | | | | | | | | | | | | | | | | This has little real life value. Any environment and apps starting to use the framework will or should have their own UI style. Predefined forms for some protocol configuration editing unlikely fits the rest. Moreover the support has been opt-out instead of opt-in, QMF_NO_MESSAGE_SERVICE_EDITOR which the _app_ has needed defined according to how the library has been built. Should have been some config.h provided by the framework according to how it's compiled. QMailMessageServiceConfigurator class without the editor makes little sense so removed altogether. There's qtmail example that was using this. For now just left some TODO comments to reimplement the account configuration. Unknown how the example works these days in general. Change-Id: I4122e2524a61797753999e67ecec36cb46213a7b Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Use more standard paths for user data, remove QMail::tempPath()Pekka Vuorela2025-11-1213-125/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid data root directly in home directory, rather use QStandardPaths. For backwards compatibility the old path is still used if it's there and the new one doesn't exist. QMail::tempPath() got removed. Evidently it's not much needed and shouldn't really exist. The qmfclient doesn't use it al all and generally apps should store their temporary things in their own places. It's rarely wanted that there would be a common place to store such. On the contrary, apps should play mostly in their own sandboxes. TempPath was used on the server side but mostly either wrong or unnecessary: - requests file is messageserver app specific, shouldn't be visible to others. - QMailMessageSource was using it wrong. New messages are added to database, not temp path. - LongStream with public cleanupTempFiles() could be dangerous if it was called by multiple processes and having a common directory. (Another story whether such an api should even exist though) - SMTP, IMAP and LongStream can live with more generic locations. The generic locations for the last ones are borderline whether it should be TempLocation or CacheLocation. For side: interestingly the usage is mostly storing content in files to save memory while Linux world with /tmp as tmpfs has moved to storing files in memory to make them faster. For now made smtp use temp location as that's a quite simple usage, while imap and longstream in cache dir as they do have some more complicated detaches and append usages, and they were earlier out of the actual /tmp. Did some simplifications to LongStream and a proper error case handling to smtp client out of space error while at it. Change-Id: If52de231082085d804939002371f5a407cd0fecd Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Remove dead voice/video mail handlingPekka Vuorela2025-11-124-141/+1
| | | | | | | | | | | | | | Not much done here since the initial commit and the QMailMessageClassifier::classifyMessage(QMailMessageMetaData*) wasn't actually getting even called anywhere. Besides if something like this is wanted in some environment, it's better implemented as external messageserver plugin. Change-Id: Iff3b9616a739345f6dc73f7b8160b83835ece13b Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Remove non-functional NewCountNotifierPekka Vuorela2025-11-128-308/+8
| | | | | | | | | | | This doesn't nor has done anything meaningful. For handling new messages it should be better to just create a plugin, e.g. what SailfishOS has done for making notifications on new emails. Change-Id: I962339b406dd305c38fa11992d1576d6aa668084 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Adjust installation pathsPekka Vuorela2025-11-1120-22/+28
| | | | | | | | | | | | | | | | Install headers and plugins to qt6 directory as it should have been long time already. Didn't touch .pro files as those don't work with current qt6 and are used more with qt5 build. Use common common 'messagingframework' container dir for plugins. The plugin type directly under qt plugins dir was confusing, and possibly even colliding with other qt plugins. Crypto at least seems used by qt itself. Change-Id: I2c674ba184a53d602dc2a1fc24f83a955268a166 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Avoid some more compiler warningsPekka Vuorela2025-11-0612-73/+72
| | | | | | | | | | | | | | | | | | | | | | - Missed earlier one QMessageBox deprecation from separate file - LongStream now doing consistent open() check in all code paths. Also removed unused member variable 'c' and moved internal constants to .cpp. - imapstrategy.h / ImapMessageListStrategy::selectedSectionsAppend() was dead code due to derived class ImapFetchSelectedMessagesStrategy having similar named method with extra parameter and default value. - ImapService was triggering a couple of -Woverloaded-virtual warnings due to having extra methods with same name as base class. These were really used internally so simpler as different named private. - ImapProtocol / QString::lastIndexOf() was complaining about unused return value. Using that should be even simpler than accessing regexp match. - Some small random warnings on unused parameters, missed switch case etc. Change-Id: I243c09ab2d551fe2f8be18f1b3a4df2e3d84b55c Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Use -fvisibility=hidden also on cmake buildPekka Vuorela2025-11-062-2/+4
| | | | | | | Change-Id: Ic04001704e0e367d84179c3059ac9b488498e953 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Fix nullptr warning on QObject::connect()Pekka Vuorela2025-11-064-9/+14
| | | | | | | | | And added couple 'static's to local functions etc while at it. Change-Id: I7b95c08199515f53ab0300117cdd3f1d19761b3b Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>