Trojitá merge requestshttps://invent.kde.org/pim/trojita/-/merge_requests2023-10-13T15:43:19Zhttps://invent.kde.org/pim/trojita/-/merge_requests/37Fix typo in varname m_availableSpellcheckPlugins.2023-10-13T15:43:19ZOskar RoeslerFix typo in varname m_availableSpellcheckPlugins.Just a typo fix, tested and runs without issue for a month now since I forgot to push it.Just a typo fix, tested and runs without issue for a month now since I forgot to push it.https://invent.kde.org/pim/trojita/-/merge_requests/36Use @stable for allowing to switch Pim to Qt6 in master2023-09-18T20:40:25ZLaurent MontelUse @stable for allowing to switch Pim to Qt6 in masterLaurent MontelLaurent Montelhttps://invent.kde.org/pim/trojita/-/merge_requests/31Fix segfault on malformed message-part paths2023-03-31T09:56:35ZJan KundrátFix segfault on malformed message-part paths### Fix segfault on malformed message-part paths
When the part path is multilevel and a non-terminal index is out-of-range, the code would try obtain a `QAbstractItemModel *` from an empty `QModelIndex`, which is a `nullptr`, and th...### Fix segfault on malformed message-part paths
When the part path is multilevel and a non-terminal index is out-of-range, the code would try obtain a `QAbstractItemModel *` from an empty `QModelIndex`, which is a `nullptr`, and then try to call something through that model. That's a segfault.
### call pathToPart() on Trojita-specific URLs only
The code was feeding all URLs through the `MsgPartNetAccessManager::pathToPart()`. This had a side effect that those URLs whose paths looked like a path from a valid Trojita-specific URL would try to walk the part tree. This in itself is not a problem (`pathToPart()` is public API and therefore it should not make any assumptions about URL validity), but as the previous commit shows, sometimes mistakes happen. The funny URL looks like this one:
```
http://example.org/2022/06/11/foo.png
```
Since `pathToPart()` only makes sense on Trojita-specific URLs, call that just in that case.
### refactor: pathToPart: simplify
The "not a number" case is not special in any way, so let's reflect that in the code.
### refactor: pathToPart: there's no special handling for empty paths
The comments would try to imply that there's some magic for a path that's just `/`. There's no such check, so let's remove that comment.
Also, don't talk about `QString::SkipEmptyParts` which the code used to use many, many years ago.
Also move the `ok` to where it belongs.
Fixes: 35ff866ef Use QByteArray for various IMAP-related pathshttps://invent.kde.org/pim/trojita/-/merge_requests/30Add override specifiers as suggested by cppcheck2023-03-31T09:12:54ZErik QuaeghebeurAdd override specifiers as suggested by cppcheckA run of cppcheck on the codebase resulted, among other things,
in a long list of suggestions about adding override specifiers
when overriding ancestor class methods. This commit applies those
(and removes the then implied virtual) to ge...A run of cppcheck on the codebase resulted, among other things,
in a long list of suggestions about adding override specifiers
when overriding ancestor class methods. This commit applies those
(and removes the then implied virtual) to get the possible (minor)
advantage associated to that and get a better overview of other
suggestions made by cppcheck.Erik QuaeghebeurErik Quaeghebeurhttps://invent.kde.org/pim/trojita/-/merge_requests/22Replace deprecated std::bind2nd2023-03-31T08:56:50ZErik QuaeghebeurReplace deprecated std::bind2ndstd::bind2nd has been deprecated since C++11 and removed in C++17.
The standard way to replace it in code is to use std:bind with
std::placeholders::_1 (see, e.g., https://stackoverflow.com/a/32739105),
which is what is done in this comm...std::bind2nd has been deprecated since C++11 and removed in C++17.
The standard way to replace it in code is to use std:bind with
std::placeholders::_1 (see, e.g., https://stackoverflow.com/a/32739105),
which is what is done in this commit. This makes the code future-proof
and removes a few warnings when compiling.Erik QuaeghebeurErik Quaeghebeurhttps://invent.kde.org/pim/trojita/-/merge_requests/33XtConnect removal2023-03-31T08:40:25ZErik QuaeghebeurXtConnect removalThe XtConnect code was not compilable anymore. These commits remove the related files and code sections.The XtConnect code was not compilable anymore. These commits remove the related files and code sections.https://invent.kde.org/pim/trojita/-/merge_requests/34Fix SMTP auth login username base64 encoding and clazy warning.2023-03-31T08:27:28ZEspen Sandøy HustadFix SMTP auth login username base64 encoding and clazy warning.Auto deduces buf to be QStringBuilder. This breaks base64 encoding of
the username, which makes auth login fail.
This also fixes a clazy warning: auto-unexpected-qstringbuilder.
Thanks to Marcel Bosling for finding the issue, and provi...Auto deduces buf to be QStringBuilder. This breaks base64 encoding of
the username, which makes auth login fail.
This also fixes a clazy warning: auto-unexpected-qstringbuilder.
Thanks to Marcel Bosling for finding the issue, and providing this
patch.
BUG: 428078https://invent.kde.org/pim/trojita/-/merge_requests/32Fix CI build failing/building with GCC 132023-03-30T21:23:31ZEspen Sandøy HustadFix CI build failing/building with GCC 13Build fails with:
```
g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtSql -isystem /usr/include/gpgme++ -pthread -Wall -Wsign-compare -O2 -fvisibility=hidden -fvisibility-inlines-hidden -O2 -g -DNDEBUG -std=gnu++11 -fPIC...Build fails with:
```
g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtSql -isystem /usr/include/gpgme++ -pthread -Wall -Wsign-compare -O2 -fvisibility=hidden -fvisibility-inlines-hidden -O2 -g -DNDEBUG -std=gnu++11 -fPIC -fPIC -MD -MT CMakeFiles/Cryptography.dir/src/Cryptography/LocalMimeParser.cpp.o -MF CMakeFiles/Cryptography.dir/src/Cryptography/LocalMimeParser.cpp.o.d -o CMakeFiles/Cryptography.dir/src/Cryptography/LocalMimeParser.cpp.o -c /home/espen/development/trojita/src/Cryptography/LocalMimeParser.cpp
In file included from /usr/include/mimetic/rfc822/header.h:18,
from /usr/include/mimetic/header.h:11,
from /usr/include/mimetic/mimetic.h:18,
from /home/espen/development/trojita/src/Cryptography/LocalMimeParser.cpp:23:
/usr/include/mimetic/rfc822/messageid.h:29:23: error: expected ‘)’ before ‘thread_id’
29 | MessageId(uint32_t thread_id = 0 );
| ~ ^~~~~~~~~~
| )
```
This MR fixes building with GCC 13. See also the issue created upstream:
https://github.com/tat/mimetic/issues/28https://invent.kde.org/pim/trojita/-/merge_requests/23Replace deprecated std::ptr_fun2023-03-12T21:16:27ZErik QuaeghebeurReplace deprecated std::ptr_funstd::ptr_fun has been deprecated since C++11 and removed in C++17.
A (not very elegant) way to replace it in code is to use std::function
(see, e.g., https://stackoverflow.com/a/40576028), which is what is
done in this commit. This makes...std::ptr_fun has been deprecated since C++11 and removed in C++17.
A (not very elegant) way to replace it in code is to use std::function
(see, e.g., https://stackoverflow.com/a/40576028), which is what is
done in this commit. This makes the code future-proof and removes
a warning when compiling.https://invent.kde.org/pim/trojita/-/merge_requests/21Replace deprecated std::unary_function2023-03-12T01:06:50ZErik QuaeghebeurReplace deprecated std::unary_functionstd::unary_function has been deprecated since C++11 and
removed in C++17. A standard way to replace it in code
is to explicitly list the member typedefs (see, e.g.,
https://stackoverflow.com/a/33115140 for std::binary_function),
which is...std::unary_function has been deprecated since C++11 and
removed in C++17. A standard way to replace it in code
is to explicitly list the member typedefs (see, e.g.,
https://stackoverflow.com/a/33115140 for std::binary_function),
which is what is done in this commit. This makes the code
future-proof and removes a lot of warnings when compiling.https://invent.kde.org/pim/trojita/-/merge_requests/16Added mandatory fields to AppStream metadata2023-03-11T20:26:24ZMatthias MailänderAdded mandatory fields to AppStream metadataSee https://freedesktop.org/software/appstream/docs/ and https://hughsie.github.io/oars/See https://freedesktop.org/software/appstream/docs/ and https://hughsie.github.io/oars/https://invent.kde.org/pim/trojita/-/merge_requests/27Resolve "Outdated path for *.po files in «l10n-fetch-po-files.py»"2023-03-08T22:26:06ZErik QuaeghebeurResolve "Outdated path for *.po files in «l10n-fetch-po-files.py»"Closes #1Closes #1Erik QuaeghebeurErik Quaeghebeurhttps://invent.kde.org/pim/trojita/-/merge_requests/19Port away from deprecated stuff, part 32022-11-18T20:15:55ZHeiko BeckerPort away from deprecated stuff, part 3 This should take care of all deprecations from Qt 5 and make porting to Qt6 relatively easy (ignoring the need to move from QtWebKit to QtWebEngine for the moment).
The QModelIndex::child() -> QAbstractModelItem::index() commit is a bi... This should take care of all deprecations from Qt 5 and make porting to Qt6 relatively easy (ignoring the need to move from QtWebKit to QtWebEngine for the moment).
The QModelIndex::child() -> QAbstractModelItem::index() commit is a bit scary, but at least the tests helped me to fix a few screw-ups. And I've been using a build with these commits as a daily driver without issues so far.https://invent.kde.org/pim/trojita/-/merge_requests/18Fix build with gpgme >=1.18.02022-09-04T16:49:35ZHeiko BeckerFix build with gpgme >=1.18.0In previous versions GpgmeppConfig.cmake had a find_package(QGpme) call
for compatibility reasons. It was dropped for 1.18.0 though [1].
[1] https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=6e45da30ae787dd45836e55d34f7aa4...In previous versions GpgmeppConfig.cmake had a find_package(QGpme) call
for compatibility reasons. It was dropped for 1.18.0 though [1].
[1] https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=6e45da30ae787dd45836e55d34f7aa4e001b641chttps://invent.kde.org/pim/trojita/-/merge_requests/9Port away from deprecated stuff, Part 22022-09-04T16:44:21ZHeiko BeckerPort away from deprecated stuff, Part 2https://invent.kde.org/pim/trojita/-/merge_requests/17Adjust to changed header location of akonadi-contact>=22.04.x2022-09-04T14:04:57ZHeiko BeckerAdjust to changed header location of akonadi-contact>=22.04.xc.f.
https://invent.kde.org/pim/akonadi-contacts/-/commit/4a5861f12c96995ef5b4729175fdd8ccbf2ce016c.f.
https://invent.kde.org/pim/akonadi-contacts/-/commit/4a5861f12c96995ef5b4729175fdd8ccbf2ce016https://invent.kde.org/pim/trojita/-/merge_requests/15Fix build with ragel 72022-08-23T20:38:34ZHeiko BeckerFix build with ragel 7https://invent.kde.org/pim/trojita/-/merge_requests/12Add manual page and let cmake install it2022-03-03T11:35:45ZCaspar SchutijserAdd manual page and let cmake install itI verified on OpenBSD that the manual page is installed in the expected location.
Let me know if you have any suggestions for tweaks to the text, stuff that should be removed or information that can be added.
I choose to mention the or...I verified on OpenBSD that the manual page is installed in the expected location.
Let me know if you have any suggestions for tweaks to the text, stuff that should be removed or information that can be added.
I choose to mention the organization name "flaska.net" in the FILES section because on IRC we sometimes get questions about the location of the configuration file. This allows people to find it themselves. Perhaps the text could be improved though.
This is what the manpage looks like when it's rendered:
```
TROJITA(1) General Commands Manual TROJITA(1)
NAME
trojita - fast Qt IMAP e-mail client
SYNOPSIS
trojita [-achlmv] [-p profile] [url]
DESCRIPTION
trojita is a fast Qt IMAP e-mail client. Optionally, an RFC2368 mailto
url may be specified. This will open the compose window with a message
constructed from the specified URL.
trojita supports multiple profiles which allows the use of multiple IMAP
accounts. Multiple instances of trojita, each using a different profile,
may be started concurrently. A profile may be specified using -p.
The options are as follows:
-a, --addressbook
Show the addressbook window.
-c, --compose
Compose a new e-mail (default when url is provided).
-h, --help
Show help text.
-l, --log-to-disk
Activate debug traffic logging to disk immediately on startup.
-m, --mainwindow
Show the main window (default when no option is provided).
-p, --profile profile
Use the specified profile.
-v, --version
Show the version of trojita.
FILES
trojita stores its configuration in a configuration file. Additionally,
trojita maintains a cache. Where those files are stored is determined by
Qt. The organization name of trojita is "flaska.net". Often, the cache
and configuration file can be found in a directory named after this
organization name.
EXAMPLES
Compose a new e-mail to alice@example.net:
$ trojita -c 'mailto:alice@example.net?subject=Hi&body=Message.'
Launch trojita using a profile:
$ trojita -p work
SEE ALSO
http://trojita.flaska.net/
OpenBSD 7.0 February 16, 2022 OpenBSD 7.0
```https://invent.kde.org/pim/trojita/-/merge_requests/14A bit of cmake modernisation2022-03-03T11:30:58ZHeiko BeckerA bit of cmake modernisationhttps://invent.kde.org/pim/trojita/-/merge_requests/13Use a reference to avoid a copy for the loop variable2022-03-03T11:17:31ZHeiko BeckerUse a reference to avoid a copy for the loop variableNot a very hot code path but easily avoidable.Not a very hot code path but easily avoidable.