Messagelib
stringutil.cpp
61 (c == QLatin1Char('>')) || (c == QLatin1Char(':')) || (c == QLatin1Char('|')) || (c == QLatin1Char(' ')) || (c == QLatin1Char('\t'));
99// together into a single line in some cases. This is basically the main difference to flowText().
111static bool flushPart(QString &msg, QStringList &textParts, const QString &indent, int maxLength)
262 || (!prefix.isEmpty() && line.startsWith(prefix) && line.mid(prefix.size()).indexOf(commonReplySearch) < 0)) {
413 KIdentityManagementCore::IdentityManager *im = KIdentityManagementCore::IdentityManager::self();
421 if (expandable == ExpandableAddresses && !expandableInserted && numberAddresses > collapseNumber) {
427 result = QStringLiteral("<span><input type=\"checkbox\" class=\"addresslist_checkbox\" id=\"%1\" checked=\"checked\"/><span class=\"short%1\">")
430 result += QStringLiteral("<label class=\"addresslist_label_short\" for=\"%1\"></label></span>").arg(fieldName);
438 QUrl::toPercentEncoding(KEmailAddress::encodeMailtoUrl(mailbox.prettyAddress(KMime::Types::Mailbox::QuoteWhenNecessary)).path()))
441 const bool foundMe = !MessageCore::MessageCoreSettings::self()->displayOwnIdentity() && onlyOneIdentity
451 result += foundMe ? i18nMe : quoteHtmlChars(mailbox.prettyAddress(KMime::Types::Mailbox::QuoteWhenNecessary), true);
464 result += QStringLiteral("<label class=\"addresslist_label_full\" for=\"%1\"></label></span></span>").arg(fieldName);
478 return emailAddrAsAnchor(mailboxList->mailboxes(), display, cssStyle, link, expandable, fieldName, collapseNumber);
490 return emailAddrAsAnchor(addressList->mailboxes(), display, cssStyle, link, expandable, fieldName, collapseNumber);
499 if (qstricmp(addrSpec.toUtf8().data(), KEmailAddress::extractEmailAddress(*it).toUtf8().data()) == 0) {
521 address = KEmailAddress::quoteNameIfNecessary(fullName) + QLatin1StringView(" <") + address + QLatin1Char('>');
546 for (; needToContinue; lineStart = lineEnd + 1, lineEnd = msg.indexOf(QLatin1Char('\n'), lineStart)) {
729QString cleanSubject(KMime::Message *msg, const QStringList &prefixRegExps, bool replace, const QString &newPrefix)
754QString replacePrefixes(const QString &str, const QStringList &prefixRegExps, bool replace, const QString &newPrefix)
static IdentityManager * self()
QStringList identities() const
const Identity & identityForAddress(const QString &addresses) const
constexpr bool isEmpty() const
Types::Mailbox::List mailboxes() const
Types::Mailbox::List mailboxes() const
const KMime::Headers::Subject * subject() const
QuoteWhenNecessary
QVariant property(UserProperty which) const
bool isValid() const
KCODECS_EXPORT QByteArray extractEmailAddress(const QByteArray &address)
KCODECS_EXPORT QString quoteNameIfNecessary(const QString &str)
KCODECS_EXPORT QString toIdn(const QString &addrSpec)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
KCODECS_EXPORT QString decodeRFC2047String(QByteArrayView src, QByteArray *usedCS, const QByteArray &defaultCS=QByteArray(), CharsetOption option=NoOption)
KCODECS_EXPORT QUrl encodeMailtoUrl(const QString &mailbox)
KCODECS_EXPORT QString decodeMailtoUrl(const QUrl &mailtoUrl)
KPIMTEXTEDIT_EXPORT QString flowText(QString &text, const QString &indent, int maxLength)
QString replacePrefixes(const QString &str, const QStringList &prefixRegExps, bool replace, const QString &newPrefix)
Check for prefixes prefixRegExps in str.
Definition stringutil.cpp:754
bool addressIsInAddressList(const QString &address, const QStringList &addresses)
Returns true if the given address is contained in the given address list.
Definition stringutil.cpp:493
QList< QPair< QString, QString > > parseMailtoUrl(const QUrl &url)
Parses a mailto: url and extracts the information in the QMap (field name as key).
Definition stringutil.cpp:159
QString stripOffPrefixes(const QString &subject)
Removes the forward and reply marks (e.g.
Definition stringutil.cpp:785
QString guessEmailAddressFromLoginName(const QString &loginName)
Uses the hostname as domain part and tries to determine the real name from the entries in the passwor...
Definition stringutil.cpp:507
QString formatQuotePrefix(const QString &wildString, const QString &fromDisplayString)
Convert quote wildcards into the final quote prefix.
Definition stringutil.cpp:633
QByteArray headerAsSendableString(const KMime::Message::Ptr &originalMessage)
Return the message header with the headers that should not be sent stripped off.
Definition stringutil.cpp:391
QString cleanSubject(KMime::Message *msg)
Return this mails subject, with all "forward" and "reply" prefixes removed.
Definition stringutil.cpp:720
QString stripSignature(const QString &msg)
Strips the signature blocks from a message text.
Definition stringutil.cpp:220
AddressMode
Used to determine if the address field should be expandable/collapsible.
Definition stringutil.h:108
Display
Used to determine if the visible part of the anchor contains only the name part and not the given ema...
Definition stringutil.h:92
QString smartQuote(const QString &msg, int maxLineLength)
Relayouts the given string so that the individual lines don't exceed the given maximal length.
Definition stringutil.cpp:527
void removePrivateHeaderFields(const KMime::Message::Ptr &message, bool cleanUpHeader)
Removes all private header fields (e.g.
Definition stringutil.cpp:351
QString cleanFileName(const QString &name)
Cleans a filename by replacing characters not allowed or wanted on the filesystem e....
Definition stringutil.cpp:684
AddressList splitAddressField(const QByteArray &text)
Splits the given address list text into separate addresses.
Definition stringutil.cpp:280
QByteArray asSendableString(const KMime::Message::Ptr &originalMessage)
Returns the message contents with the headers that should not be sent stripped off.
Definition stringutil.cpp:380
QString replySubject(KMime::Message *msg)
Return this mails subject, formatted for "reply" mails.
Definition stringutil.cpp:746
QString generateMessageId(const QString &address, const QString &suffix)
Generates the Message-Id.
Definition stringutil.cpp:297
QString quoteHtmlChars(const QString &str, bool removeLineBreaks)
Quotes the following characters which have a special meaning in HTML: '<' '>' '&' '"'....
Definition stringutil.cpp:314
QString forwardSubject(KMime::Message *msg)
Return this mails subject, formatted for "forward" mails.
Definition stringutil.cpp:738
char * data()
char toLatin1() const const
QDateTime currentDateTime()
QString toString(QStringView format, QCalendar cal) const const
QString localHostName()
ConstIterator
void append(QList< T > &&value)
const_iterator constBegin() const const
const_iterator constEnd() const const
qsizetype count() const const
T & first()
iterator insert(const_iterator before, parameter_type value)
bool isEmpty() const const
T & last()
void prepend(parameter_type value)
void removeAt(qsizetype i)
void removeLast()
QRegularExpressionMatch match(QStringView subjectView, qsizetype offset, MatchType matchType, MatchOptions matchOptions) const const
CaseInsensitiveOption
bool isValid() const const
QString pattern() const const
void setPattern(const QString &pattern)
void setPatternOptions(PatternOptions options)
QString arg(Args &&... args) const const
const QChar at(qsizetype position) const const
void chop(qsizetype n)
void clear()
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
QString fromLatin1(QByteArrayView str)
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
qsizetype lastIndexOf(QChar ch, Qt::CaseSensitivity cs) const const
QString left(qsizetype n) const const
qsizetype length() const const
QString mid(qsizetype position, qsizetype n) const const
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
void reserve(qsizetype size)
qsizetype size() const const
void squeeze()
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QByteArray toUtf8() const const
QString trimmed() const const
void truncate(qsizetype position)
QString join(QChar separator) const const
FullyDecoded
QUrl fromUserInput(const QString &userInput, const QString &workingDirectory, UserInputResolutionOptions options)
QString path(ComponentFormattingOptions options) const const
QString scheme() const const
void setQuery(const QString &query, ParsingMode mode)
QByteArray toPercentEncoding(const QString &input, const QByteArray &exclude, const QByteArray &include)
QString toString(FormattingOptions options) const const
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.