summaryrefslogtreecommitdiffstats
path: root/src/libraries
Commit message (Collapse)AuthorAgeFilesLines
* Rename QMailMessageBody::None as UndefinedEncodingPekka Vuorela4 days3-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 Vuorela6 days7-83/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Vuorela6 days13-65/+100
| | | | | | | | | | | | | | | | | | | | 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 Vuorela6 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 Vuorela6 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>
* Replace remaining 'Qt Extended' references with 'Qt Messaging Framework'Pekka Vuorela6 days19-24/+24
| | | | | | | 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 Vuorela6 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 Vuorela11 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 Vuorela11 days34-173/+338
| | | | | | | | | | | | | | | - 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>
* Move resource usage configuration out of QMail namespacePekka Vuorela12 days4-52/+11
| | | | | | | | | | | | | | 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 Vuorela12 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>
* Add some rough missing documentation to QMailThread and QMailCrypto sidePekka Vuorela12 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>
* Use module declarations for documentation and further cleanupsPekka Vuorela13 days44-208/+84
| | | | | | | | | | | | | | | | | | 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 Vuorela13 days3-470/+0
| | | | | | | | | | | | | | | | | | | | | | | - 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>
* Fix some more mechanical documentation detailsPekka Vuorela2025-12-027-15/+14
| | | | | | | | | | | - \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 Vuorela2025-12-0215-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 Vuorela2025-12-021-0/+7
| | | | | | | | | | | | | | 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 public cmake dbus declaration and usage in unit testPekka Vuorela2025-12-021-2/+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 Vuorela2025-12-023-0/+26
| | | | | | | | | | | | | | 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>
* 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-263-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | 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-2516-176/+511
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-202-14/+6
| | | | | | | | | | | | | | | | | | | | | 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-203-5/+13
| | | | | | | | | | | | | 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>
* 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-137-182/+463
| | | | | | | | | 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-124-154/+0
| | | | | | | | | | | | | | | | | | | | | | 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-125-93/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-122-67/+0
| | | | | | | | | | | | | | 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>
* Adjust installation pathsPekka Vuorela2025-11-116-9/+12
| | | | | | | | | | | | | | | | 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-062-27/+35
| | | | | | | | | | | | | | | | | | | | | | - 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-061-4/+5
| | | | | | | | | 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>
* Remove obsolete translations and adjust the setupPekka Vuorela2025-11-0134-5201/+265
| | | | | | | | | | | | | | | | | | | | | | Practically not touched since initial commit. There is no QTranslator used in the whole repository so they shouldn't be much of help either. Library's .ts file contain lot of content coming from examples or deleted files. Translation are more or less empty except for some (mostly obsolete) German translations and a couple arabic words. Using strange names for translation files. The problems here are endless. Just removed the majority of the .ts files as crap. Kept -de and en_US as some basis for later adding these back, hoping that the -de as best translated earlier would have kept something but even that was basically nothing. Executed "lupdate -no-obsolete *.pro" to at least update the .ts files to match the current sources. Change-Id: I11e5fe8c84d1e17ab8e4fcf158594815261acfe0 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Clean up QMailPluginLoaderPekka Vuorela2025-11-012-26/+18
| | | | | | | | | | | | | | | | | Different parts were calling the ctor parameter directory, path or identifier. Let's just call it consistently subdir as that's how it's used. Removed also LOAD_DEBUG_VERSION leftover which seemed like some win32 thing, most of that already gone in commit 70702bfb9c3f0efec. We should probably also define a specific directory where the plugins should be placed instead of the generic libraries and qt plugins, but that's for a separate commit. Change-Id: I12b6ac3129f7c3c5465d51845323c1b03821daa5 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* Avoid qFatal in imap clientPekka Vuorela2025-11-011-1/+1
| | | | | | | | | | | Nicer if plugins don't try to make the whole messagingserver to exit. Removed also a couple qtopia references, an if() check that's guaranteed to succeed and did some more simplifications on servicehandler. Change-Id: Ibf98d57d86cd4f183f40d71b712ca1539f17b755 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Fix some more compiler warningsPekka Vuorela2025-10-302-4/+4
| | | | | | | | | | | | | | | Disclaimer: didn't actually test the example as those are not in good shape, but the migration to non-deprecated API should be straightforward enough: mostly question() having default yes/no, and warning() having ok button is enough to skip explicit button declarations. For minor change not having now "no" as option when there is no question in verifyAccount(). checkMailConflict() removed as unused. Change-Id: I15067e1222264a685ba8c83c50e6ae06d4c51c38 Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Avoid translation on sqlstorage initStore()Pekka Vuorela2025-10-304-5/+5
| | | | | | | | | | | | This has been ok since the translations haven't been used but regardless of that the language might change at any point and we shouldn't store the first used translation into sql. Better let the client app handle that. Change-Id: Ifd919b853c51e704ac1de07787ef886db982c527 Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
* Clean up some QList usage on qmailmessageheaderfieldPekka Vuorela2025-10-301-21/+23
| | | | | | | | | | | | | | | | These mostly should have worked but cleaning up to avoid suspicion and enhance readability. QMailMessageHeaderPrivate::remove() was pointlessly first getting matches and afterwards removing them. QMailMessageHeaderFieldPrivate::setParameter() was annoying to follow with generic names 'it' and 'end' used outside a loop. In theory the end iterator could be considered invalidated after item removals. But we don't even need a separately stored end iterator. Change-Id: I7192d8223ca9b50b877d54c9c6b45f9b35a007b3 Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: <matti.viljanen@kapsi.fi>
* Avoid compiler warnings on implicitly defined operators etcPekka Vuorela2025-10-292-1/+18
| | | | | | | Change-Id: Iae14dd91c21d1351a6935bbd96e7bd955eef9d3f Reviewed-by: Damien Caliste <dcaliste@free.fr> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: <matti.viljanen@kapsi.fi>
* Simplify helper function, avoiding non-const reference parameterPekka Vuorela2025-10-291-9/+12
| | | | | | | Change-Id: I2ec19175bce6df5ed78d7e5783b30a9d2a67fb6e Reviewed-by: <matti.viljanen@kapsi.fi> Reviewed-by: Pekka Vuorela <pvuorela@iki.fi> Reviewed-by: Damien Caliste <dcaliste@free.fr>
* 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-2712-126/+117
| | | | | | | | | | | | | | | | | | | | - 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>