LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
LC::Util Namespace Reference

Namespaces

namespace  AN
 
namespace  CacheStrat
 
namespace  detail
 
namespace  IntSeq
 
namespace  oral
 
namespace  SvcAuth
 
namespace  SysInfo
 
namespace  Tags
 
namespace  Views
 
namespace  XDG
 

Classes

struct  AddContextObject
 
class  AddressesModelManager
 Manages an XML settings model with a list of network interfaces selected by the user from the list of available ones. More...
 
class  ApplicativeTest
 
class  AssocCache
 
struct  AsTypelist
 
struct  AsTypelist< OtherList< Args... > >
 
class  AutoResizeMixin
 Automatically moves a widget to fit a rectangle on resize. More...
 
class  BackendSelector
 A common dialog to select storage backend. More...
 
class  BaseHookInterconnector
 Base class for signal-slot relays in plugin APIs. More...
 
class  BasicDeletePolicy
 
class  BitFlags
 
struct  Caster
 
class  CategorySelector
 The CategorySelector widget provides a way to select amongst a group of items. More...
 
class  ChannelDevice
 
class  ChoiceDeletePolicy
 Delegates the SlotClosure deletion decision to the signal handler. More...
 
class  ClearLineEditAddon
 Provides a "clear text" action for line edits. More...
 
class  ClosingDB
 
class  ColorButton
 A button for choosing a color. More...
 
class  ColorThemeProxy
 Proxy for QML files to use colors from current color theme. More...
 
class  ConcurrentException
 A concurrent exception that plays nicely with Qt. More...
 
class  ConsistencyChecker
 
class  ContextDeadException
 
struct  ContextExtensions
 
class  CoroTaskTest
 
class  CpuFeatures
 
struct  CtString
 
class  CtStringTest
 
class  CurryImpl
 
class  CurryTest
 
class  CustomCookieJar
 A customized cookie jar with additional features. More...
 
class  CustomNetworkReply
 A network reply with customizable content and reply headers. More...
 
class  DBLock
 Provides database transaction lock. More...
 
class  DefaultHookProxy
 Standard implementation of IHookProxy. More...
 
class  DeleteLaterPolicy
 Deletes a SlotClosure object after its signal has fired. More...
 
class  DetectorTest
 
class  DndActionsMixin
 Abstracts away differences between Qt4 and Qt5 in model DnD support. More...
 
class  DomChildrenRangeTest
 
struct  DownloadParams
 
class  DummyObject
 
class  Dumper
 
class  Either
 
class  EitherCont
 A peir of two functions, typically a continuation and an error handler. More...
 
class  EitherTest
 
struct  ErrorInfo
 
class  ExtensionsData
 
struct  Factors
 
class  FailedImpl
 
class  FancyTrayIcon
 
class  FancyTrayIconFallback
 
class  FancyTrayIconFreedesktop
 
class  FancyTrayIconImpl
 
class  FDGuard
 
class  FindNotification
 A horizontal bar with typical widgets for text search. More...
 
class  FindNotificationWE
 A helper class to aid connecting FindNotification with QtWebEngine. More...
 
class  FindNotificationWk
 A helper class to aid connecting FindNotification with Qt WebKit. More...
 
class  FlatItemsModel
 
class  FlatItemsModelBase
 
class  FlatItemsModelTypedBase
 
class  FlattenFilterModel
 Proxy model flattening a hierarchical model. More...
 
class  FlatToFoldersProxyModel
 
struct  FlatTreeItem
 
class  FlowLayout
 A simple flow layout implementation. More...
 
class  FontChooserWidget
 Provides a widget for choosing a font. More...
 
struct  FontSizeChangerMethods
 
class  FunctorTest
 
class  FuturesTest
 
struct  Head
 
struct  Head< List< H, T... > >
 
class  IDPool
 A simple pool of identificators of the given type. More...
 
struct  IgnoreLeft
 
struct  InstanceApplicative
 
struct  InstanceApplicative< Either< L, R > >
 
struct  InstanceApplicative< std::optional< T > >
 
struct  InstanceFunctor
 The Functor class is used for types that can be mapped over. More...
 
struct  InstanceFunctor< Either< L, R > >
 
struct  InstanceFunctor< QFuture< T > >
 
struct  InstanceFunctor< std::optional< T > >
 Implementation of the Functor class for std::optional. More...
 
struct  InstanceMonad
 
struct  InstanceMonad< Either< L, R > >
 
struct  InstanceMonad< std::optional< T > >
 
struct  InstanceMonadPlus
 
struct  InstanceMonadPlus< std::optional< T > >
 
class  Introspectable
 
class  LazyInitializer
 Provides lazy initialization on first access to an object. More...
 
class  LineEditButtonManager
 Manages additional overlay buttons in a QLineEdit. More...
 
struct  Literal
 
class  MassFontChangeDialog
 
class  MergeModel
 
struct  MimeDetector
 
class  ModelItem
 Provides a proxying API on top of an QAbstractItemModel. More...
 
class  ModelItemBase
 Base class for model items for tree-like models. More...
 
class  ModelIterator
 Provides an iterator-based API to a Qt model. More...
 
class  MonadicFuturesTest
 
class  MonadPlusTest
 
class  MonadTest
 
class  NetworkDiskCache
 A thread-safe garbage-collected network disk cache. More...
 
class  NetworkDiskCacheGC
 Garbage collection for a set of network disk caches. More...
 
struct  NetworkReplyError
 
class  NetworkReplyErrorException
 
struct  NetworkReplySuccess
 
class  NetworkResult
 
class  NewType
 A somewhat "strong" typedef. More...
 
struct  NoDefaultCtor
 
class  NoDeletePolicy
 Does not delete a SlotClosure object. More...
 
struct  Not
 
class  NotificationActionHandler
 Aids in adding actions to notifications. More...
 
class  OralFKeyTest
 
class  OralTest
 
class  OralTest_SimpleRecord
 
class  OralTest_SimpleRecord_Bench
 
class  PageNotification
 A horizontal widget embedding into the parent layout of the passed parent widget. More...
 
class  PlotItem
 
class  PreludeTest
 
struct  QStringToLower
 
struct  QStringTrimmed
 
class  QtUtilTest
 
class  QueueManager
 A simple scheduling manager for a queue of functors. More...
 
class  RegExp
 
struct  RegExpImpl
 
struct  ReplyError
 
struct  ReplyWithHeaders
 
struct  RequiresInit
 
class  ResourceLoader
 Utility class for loading a file from a set of locations. More...
 
struct  ResultInfo
 
class  RoledItemsModel
 
struct  RoledMemberField
 
class  RoleNamesMixin
 Wraps differences between role names handling in Qt4 and Qt5. More...
 
struct  S1
 
struct  S2
 
class  ScopeGuardTest
 
class  ScreensaverProhibitor
 
class  SelectableBrowser
 A "browser" that shows HTML either via QTextBrowser or a browser plugin. More...
 
struct  ServiceInfo
 
class  SettableIconProvider
 QML image provider with settable icons for each path. More...
 
class  ShortcutManager
 Aids in providing configurable shortcuts. More...
 
class  SlotClosure
 Executes a given functor upon a signal (or a list of signals). More...
 
class  SlotClosureBase
 Base class for SlotClosure. More...
 
class  SlotClosureTest
 
struct  SpaceInfo
 Contains information about a partition's disk space. More...
 
class  SslCertificateInfoWidget
 
class  StandardNAMFactory
 A standard QML QNetworkAccessManager factory. More...
 
struct  StateSaverParams
 
class  StdDataFilterMenuCreator
 Adds actions to handle some data with relevant IDataFilter plugins to a menu. More...
 
class  StlizeTest
 
class  StringPathTrie
 
class  StringPathTrieTest
 
struct  Tag
 
class  TagsCompleter
 Completer suitable for tag completion. More...
 
class  TagsCompletionModel
 A QStringListModel providing additional methods for tags. More...
 
class  TagsFilterModel
 Provides filter model with additional tags filter mode. More...
 
class  TagsLineEdit
 A line edit class suitable for use with TagsCompleter. More...
 
class  Task
 
class  ThemeImageProvider
 Provides icons from the current theme by their FDO name. More...
 
class  Throttle
 
class  Timer
 
struct  Tokenize
 
class  TokenizeTest
 
class  ToolTipItem
 ToolTip for Qml objects. More...
 
class  TypeGetterTest
 
struct  Typelist
 
class  TypelistTest
 
class  UnexpectedJson
 
class  UnhideListModel
 A model to be used with UnhideListViewBase. More...
 
class  UnhideListViewBase
 Base class for a view of a list of items to be unclosed. More...
 
class  UnhoverDeleteMixin
 Allows to hide a widget or popup after mouse leave. More...
 
struct  Upcaster
 
struct  Upcaster< To * >
 
class  UrlAccessor
 
class  UrlOperator
 Manipulates query part of an QUrl object. More...
 
class  UtilTest
 
class  ViewsTest
 
class  Visitor
 
class  VisitorTest
 
struct  Void
 A proper void type, akin to unit (or ()) type in functional languages. More...
 
class  WidthIconProvider
 Provides scalable icons to QML. More...
 
struct  Widths
 
struct  WithPrecision
 
class  WkFontsWidget
 A settings widget for configuring WebKit fonts. More...
 
struct  Worker
 
class  WorkerThread
 
class  WorkerThreadBase
 
class  WorkerThreadTest
 
struct  WrapType
 
struct  WrapType< QList< QString > >
 
class  XWrapper
 

Concepts

concept  StringViewContainer
 
concept  SomeInvokable
 
concept  HtmlRepr
 

Typedefs

typedef std::shared_ptr< XmlSettingsDialogXmlSettingsDialog_ptr
 
using PixelBasedParams = FontSizeChangerMethods<int>
 
using FontBasedParams = FontSizeChangerMethods<QFont>
 
using FontSizeChangerParams = std::variant<PixelBasedParams, FontBasedParams>
 
using InitialDistr = std::variant<Widths, Factors>
 
using FlatTreeItem_ptr = std::shared_ptr<FlatTreeItem>
 
typedef std::shared_ptr< ModelItemModelItem_ptr
 
typedef std::weak_ptr< ModelItemModelItem_wtr
 
typedef QVector< ModelItem_ptrModelItemsList_t
 
typedef std::shared_ptr< const ModelItemModelItem_cptr
 
typedef QList< QPair< QString, QString > > AddrList_t
 
template<typename AF , typename AV >
using GSLResult_t = typename InstanceApplicative<AF>::template GSLResult<AV>::Type_t
 
template<size_t N, typename Char = char>
using RawStr = const Char (&) [N]
 
template<typename Type , template< typename... > class Op, typename... Args>
using IsDetected_t = typename detail::IsDetected<Type, void, Op, Args...>::type
 
template<typename T , typename F >
using FmapResult_t = typename InstanceFunctor<T>::template FmapResult_t<F>
 The result type of the contents of the functor T mapped by function F.
 
template<typename T >
using Lazy_t = std::function<T ()>
 
template<typename MV , typename F >
using BindResult_t = typename InstanceMonad<MV>::template BindResult_t<F>
 
template<typename T >
using WrapType_t = typename WrapType<T>::type
 
using SerializeResult_t = Either<QString, Void>
 
template<typename T >
using DoSmthDetector = decltype (std::declval<T> ().DoSmth (QString {}))
 
using SomeEither_t = Either<int, QString>
 
using IntTrie = StringPathTrie<int>
 
using FindResult = IntTrie::FindResult
 
using QSVV = QList<QStringView>
 
template<typename T >
using IsVoid_t = std::is_same<T, void>
 
using Variant_t = std::variant<int, char, std::string, QString, double, float>
 
using SVariant_t = std::variant<S1, S2>
 
template<SomeInvokable F, size_t Idx>
using ArgType_t = std::tuple_element_t<Idx + 1, detail::CallTypeGetter_t<F>>
 
template<SomeInvokable F>
using RetType_t = std::tuple_element_t<0, detail::CallTypeGetter_t<F>>
 
template<typename PtrType >
using MemberTypeType_t = typename detail::DecomposeMemberPtr<PtrType>::Value_t
 
template<typename PtrType >
using MemberTypeStruct_t = typename detail::DecomposeMemberPtr<PtrType>::StructType_t
 
template<auto Ptr>
using MemberPtrType_t = MemberTypeType_t<decltype (Ptr)>
 
template<auto Ptr>
using MemberPtrStruct_t = MemberTypeStruct_t<decltype (Ptr)>
 
template<typename List >
using Head_t = typename Head<List>::Head_t
 
template<template< typename > class Pred, typename List >
using Filter_t = typename detail::Filter<Pred, List>::Result_t
 
template<typename T >
using AsTypelist_t = typename AsTypelist<T>::Result_t
 
template<template< typename > class Name, typename Def , typename... Args>
using Find = typename detail::Find<Name, Def, Args...>::type
 
using DefaultScopeGuard = detail::ScopeGuard<detail::DefaultScopeGuardDeleter>
 
using TagAttrs = QVector<std::pair<QString, QString>>
 
using Node = std::variant<Tag, QString>
 
using Nodes = QVector<Node>
 
using QIODevice_ptr = std::shared_ptr<QIODevice>
 
using QtException_t = QException
 
using QtException_ptr = std::shared_ptr<QtException_t>
 
using ConcurrentStdException = Util::ConcurrentException<Util::NewType<std::exception, struct StdException>>
 
using NRBase_t = std::variant<NetworkReplyError, NetworkReplySuccess>
 
template<typename R = void>
using ContextTask = Task<R, ContextExtensions>
 
using Throttle_ptr = std::shared_ptr<Throttle>
 
using Precisely = WithPrecision<Qt::PreciseTimer>
 
using Coarsely = WithPrecision<Qt::CoarseTimer>
 
using VeryCoarsely = WithPrecision<Qt::VeryCoarseTimer>
 
using DefaultHookProxy_ptr = std::shared_ptr<DefaultHookProxy>
 
using TempResultType_t = Util::Either<IDownload::Error, QByteArray>
 
using Introspect_f = std::function<QVariantMap (QVariant)>
 
using LazyNotificationPixmap_t = std::function<std::optional<QFuture<QImage>> ()>
 

Enumerations

enum  FitFlag {
  NoFlags ,
  NoOverlap = 0x01
}
 
enum class  QueuePriority {
  Normal ,
  High
}
 The priority of the action in the queue. More...
 
enum class  SysPath {
  QML ,
  Share
}
 Describes various root paths recognized by GetSysPath(). More...
 
enum class  UserDir {
  Cache ,
  LC
}
 Describes various user-specific paths. More...
 
enum  WinStateFlag {
  NoState = 0 ,
  Modal = 1 << 0 ,
  Sticky = 1 << 1 ,
  MaximizedVert = 1 << 2 ,
  MaximizedHorz = 1 << 3 ,
  Shaded = 1 << 4 ,
  SkipTaskbar = 1 << 5 ,
  SkipPager = 1 << 6 ,
  Hidden = 1 << 7 ,
  Fullscreen = 1 << 8 ,
  OnTop = 1 << 9 ,
  OnBottom = 1 << 10 ,
  Attention = 1 << 11
}
 
enum  AllowedActionFlag {
  NoAction = 0 ,
  Move = 1 << 0 ,
  Resize = 1 << 1 ,
  Minimize = 1 << 2 ,
  Shade = 1 << 3 ,
  Stick = 1 << 4 ,
  MaximizeHorz = 1 << 5 ,
  MaximizeVert = 1 << 6 ,
  ShowFullscreen = 1 << 7 ,
  ChangeDesktop = 1 << 8 ,
  Close = 1 << 9 ,
  MoveToTop = 1 << 10 ,
  MoveToBottom = 1 << 11
}
 

Functions

QSqlDatabase MakeDatabase (const QString &name=":memory:")
 
template<typename T >
auto PrepareRecords (QSqlDatabase db, int count=3)
 
QSqlQuery RunTextQuery (const QSqlDatabase &db, const QString &text)
 Runs the given query text on the given db.
 
QString LoadQuery (const QString &plugin, const QString &filename)
 Loads the query text from the given resource file.
 
void RunQuery (const QSqlDatabase &db, const QString &plugin, const QString &filename)
 Loads the query from the given resource file and runs it.
 
QString GenConnectionName (const QString &base)
 Generates an unique thread-safe connection name.
 
template<typename T = int>
GetLastId (const QSqlQuery &query)
 Gets the last insert ID for the given query.
 
void InstallFontSizeChanger (QWidget &widget, const FontSizeChangerParams &params)
 
QPoint FitRectScreen (QPoint pos, const QSize &size, FitFlags flags=NoFlags, const QPoint &shiftAdd=QPoint(0, 0))
 Tries to fit a rectangle (like a dialog or popup) into screen.
 
QPoint FitRect (QPoint pos, const QSize &size, const QRect &geometry, FitFlags flags=NoFlags, const QPoint &shiftAdd=QPoint(0, 0))
 Tries to fit a rectangle (like a dialog or popup) into geometry.
 
QScreenGetScreenWithFallback (const QPoint &p)
 
QRect AvailableGeometry (const QPoint &p)
 
QRect ScreenGeometry (const QPoint &p)
 
 Q_DECLARE_FLAGS (FitFlags, FitFlag)
 
QDialog * MakeCertificateViewerDialog (const QSslCertificate &cert, QWidget *parent)
 
void SetupStateSaver (QSplitter &splitter, const StateSaverParams &params)
 
void SetupStateSaver (QHeaderView &header, const StateSaverParams &params)
 
QLabelShowPixmapLabel (const QPixmap &pixmap, const QPoint &pos=QPoint())
 Shows a pixmap at the given pos.
 
QColor TintColors (const QColor &c1, const QColor &c2, double alpha=0.5)
 Mixes two colors with the given weights.
 
QString ElideProgressBarText (const QString &text, const QStyleOptionViewItem &option)
 
void TintPalette (QWidget *widget, const QColor &color, double alpha=0.5, const QList< QPalette::ColorRole > &roles={ QPalette::ColorRole::Text, QPalette::ColorRole::WindowText })
 Mixes some of the widget's palette roles with the given color.
 
QString FormatName (const QString &name)
 HTML-formats the name to let the user know it is not a part of the fixed dialog text.
 
QPixmap DrawOverlayText (QPixmap px, const QString &text, QFont font, const QPen &pen, const QBrush &brush)
 
QIcon FixupTrayIcon (const QIcon &icon)
 
template<typename T >
void Save2MimeData (QMimeData *mimeData, const QString &name, const T &t)
 
FlatTreeItemToFlat (const QModelIndex &idx)
 
bool operator== (const ModelIterator &left, const ModelIterator &right)
 
bool operator!= (const ModelIterator &left, const ModelIterator &right)
 
template<typename F >
void EnumerateChildren (const QModelIndex &idx, bool includingRoot, F &&f)
 
AddrList_t GetLocalAddresses (int port=0)
 Returns all local addresses.
 
QList< QHostAddressGetAllAddresses ()
 Returns all addresses likely accessible "from the outside".
 
template<typename F >
void HandleNetworkReply (QObject *context, QNetworkReply *reply, F f)
 
template<typename... Args>
auto HandleReply (QNetworkReply *reply, QObject *context)
 
template<typename... Args>
auto HandleReplySeq (QNetworkReply *reply, QObject *context)
 
QString GetServiceUrl (const ServiceInfo &info, const QString &path)
 
QString GetSocketErrorString (QAbstractSocket::SocketError error)
 Returns an error string for the given socket error.
 
QTreeWidgetItemSslError2TreeItem (const QSslError &error)
 Builds a tree widget representation of the given SSL error.
 
void EnableTransparency (QQuickWidget &widget)
 
void SetupFullscreenView (QQuickWidget &widget)
 
void WatchQmlErrors (QQuickWidget &view)
 Logs errors from a QML view.
 
void CreateShortcuts (const QList< QKeySequence > &seqs, const std::function< void()> &func, QWidget *parent)
 Makes func invokable with shortcuts in seq.
 
void CreateShortcuts (const QList< QKeySequence > &seqs, QObject *object, const char *metamethod, QWidget *parent)
 Makes metamethod invokable with shortcuts in seq.
 
template<typename Obj >
void CreateShortcuts (const QList< QKeySequence > &seqs, Obj *obj, void(Obj::*member)(), QWidget *parent)
 
template<template< typename... > class Applicative, typename... Args, typename T >
auto Pure (const T &v)
 
template<typename Applicative , typename T >
auto Pure (const T &v) -> decltype(InstanceApplicative< Applicative >::Pure(v))
 
template<typename AF , typename AV >
GSLResult_t< AF, AVGSL (const AF &af, const AV &av)
 
template<typename AF , typename AV >
auto operator* (const AF &af, const AV &av) -> decltype(GSL(af, av))
 
QDomElement BuildTagsTree (QStringList tags, QDomNode &node, QDomDocument &document, const QString &elementName, const std::function< QString(QDomElement)> &tagGetter, const std::function< void(QDomElement &, QString)> &tagSetter)
 Builds a nested sequence of DOM elements representing a list of tags.
 
template<typename T >
auto AsSet (const T &cont)
 
template<CtString Str>
QByteArray ToByteArray ()
 
template<CtString Str>
QString ToString ()
 
template<size_t N1, size_t N2, typename Char >
constexpr auto operator+ (RawStr< N1, Char > s1, CtString< N2, Char > s2) noexcept
 
template<typename Char >
constexpr size_t StringBufSize (const Char *str) noexcept
 
template<size_t N, typename Char >
 CtString (RawStr< N, Char >) -> CtString< N - 1, Char >
 
constexpr auto Join (auto &&) noexcept
 
constexpr auto Join (auto &&sep, auto &&first, auto &&... strings) noexcept
 
constexpr auto JoinTup (auto &&stringsTuple, auto &&sep) noexcept
 
template<typename Tup1 , typename Tup2 , size_t Tup1Size = std::tuple_size_v<std::decay_t<Tup1>>, size_t Tup2Size = std::tuple_size_v<std::decay_t<Tup2>>>
requires (Tup1Size == Tup2Size)
constexpr auto ZipWith (Tup1 &&tup1, auto &&sep, Tup2 &&tup2) noexcept
 
template<const auto & F>
constexpr auto Nub ()
 
template<size_t N, typename Char >
QDebug operator<< (QDebug dbg, const CtString< N, Char > &str)
 
template<typename F , typename... Args>
CurryImpl< std::decay_t< F >, Args... > Curry (F &&f, Args &&... args)
 
QVector< QDomElementDomDescendants (const QDomElement &parent, const QString &tag)
 Creates a vector with all descendants of parent named tag.
 
auto DomChildren (const QDomNode &parent, const QString &tag)
 Creates a range iterating over direct children named tag.
 
template<typename F >
detail::Dropper< FDropArgs (const F &f)
 
template<typename L , typename R , typename F , typename = std::result_of_t<F ()>>
R RightOr (const Either< L, R > &either, F &&f)
 
template<typename L , typename R >
R RightOr (const Either< L, R > &either, const R &r)
 
template<template< typename > class Cont, typename L , typename R >
std::pair< Cont< L >, Cont< R > > PartitionEithers (const Cont< Either< L, R > > &eithers)
 
template<typename Left , typename Right , typename... Args>
auto Visit (const Either< Left, Right > &either, Args &&... args)
 
template<typename Left , typename Right , typename... Args>
auto Visit (Either< Left, Right > &&either, Args &&... args)
 
template<typename R , typename B , typename C , typename... Args>
auto BindMemFn (R(B::*fn)(Args...), C *c)
 Binds an instance of an object to its member function.
 
template<typename R , typename B , typename C , typename... Args>
auto BindMemFn (R(B::*fn)(Args...) const, const C *c)
 
template<typename T >
constexpr bool IsFunctor ()
 Checks whether the given type has a Functor instance for it.
 
template<typename T , typename F , typename = std::enable_if_t<IsFunctor<T> ()>>
FmapResult_t< T, FFmap (const T &functor, const F &function)
 Apply the function f to the elements in functor.
 
template<typename T , typename F >
auto operator* (const F &function, const T &functor) -> decltype(Fmap(functor, function))
 An operator-style alias for Fmap().
 
template<typename T , typename F >
auto operator* (const T &functor, const F &function) -> decltype(Fmap(functor, function))
 An operator-style alias for Fmap().
 
Either< QString, QJsonDocumentToJson (const QByteArray &json)
 
template<QJsonValue::Type Expected>
auto As (const QJsonValue &value)
 
template<QJsonValue::Type Expected>
requires (Expected == QJsonValue::Object || Expected == QJsonValue::Array)
auto As (const QJsonDocument &doc)
 
template<QEvent::Type Type = QEvent::None, typename F >
auto MakeLambdaEventFilter (F &&f, QObject &parent)
 
template<typename T >
Lazy_t< T > MakeLazy (const T &t)
 
template<typename R , typename F >
Lazy_t< RMakeLazyF (const F &l)
 
template<template< typename... > class Monad, typename... Args, typename V >
auto Return (const V &v)
 
template<typename MV , typename F >
BindResult_t< MV, FBind (const MV &value, const F &f)
 
template<typename MV , typename F >
auto operator>> (const MV &value, const F &f) -> decltype(Bind(value, f))
 
template<typename MV >
auto Do (const MV &value)
 
template<typename MV , typename FHead , typename... FArgs>
auto Do (const MV &value, const FHead &fHead, const FArgs &... fArgs)
 
template<typename T >
constexpr bool IsMonadPlus ()
 
template<typename MP >
MP Mzero ()
 
template<typename MP >
auto operator+ (const MP &m1, const MP &m2) -> decltype(Mplus(m1)(m2))
 
QVariant ParseJson (const QByteArray &bytes, const char *context)
 Parses JSON content in the given bytearray.
 
QVariant ParseJson (QIODevice *device, const char *context)
 Utility function parsing JSON from the device.
 
template<template< typename U > class Container, typename T1 , typename T2 , typename F >
auto ZipWith (const Container< T1 > &c1, const Container< T2 > &c2, F f) -> WrapType_t< Container< std::decay_t< std::result_of_t< F(T1, T2)> > > >
 
template<typename T1 , typename T2 , template< typename U > class Container, template< typename U1, typename U2 > class Pair = QPair>
auto Zip (const Container< T1 > &c1, const Container< T2 > &c2) -> Container< Pair< T1, T2 > >
 
template<typename Container , typename F >
auto Map (Container &&c, F &&f) noexcept(noexcept(std::is_nothrow_invocable_v< F, decltype(*c.begin())>))
 
template<template< typename... > class Fallback, typename Container , typename F >
auto MapAs (Container &&c, F &&f) noexcept(noexcept(std::is_nothrow_invocable_v< F, decltype(*c.begin())>))
 
template<typename T , template< typename U > class Container, typename F >
Container< T > Filter (const Container< T > &c, F f)
 
template<template< typename > class Container, typename T >
Container< T > Concat (const Container< Container< T > > &containers)
 
template<template< typename > class Container, typename T >
Container< T > Concat (Container< Container< T > > &&containers)
 
template<template< typename... > class Container, typename... ContArgs>
auto Concat (const Container< ContArgs... > &containers) -> std::decay_t< decltype(*containers.begin())>
 
template<typename Cont , typename F >
auto ConcatMap (Cont &&c, F &&f)
 
template<template< typename > class Container, typename T >
Container< Container< T > > SplitInto (size_t numChunks, const Container< T > &container)
 
template<typename Cont >
decltype(autoSorted (Cont &&cont)
 
template<typename R >
auto ComparingBy (R r)
 
template<typename R >
auto EqualityBy (R r)
 
template<typename F >
auto First (F &&f)
 
template<typename F >
auto Second (F &&f)
 
template<typename Assoc >
auto Stlize (Assoc &&assoc) noexcept
 Converts an Qt's associative sequence assoc to an STL-like iteratable range.
 
template<typename Assoc >
auto StlizeKeys (Assoc &&assoc) noexcept
 
QByteArray AsByteArray (std::string_view view) noexcept
 Convert the view into a QByteArray without copying.
 
QByteArray ToByteArray (std::string_view view) noexcept
 Create a QByteArray with the data referenced by the view.
 
std::string_view AsStringView (const QByteArray &arr) noexcept
 Create a std::string_view referring the data within a QByteArray.
 
template<typename T , typename S >
std::pair< T, T > BreakAt (const T &str, S c) noexcept
 
template<typename T >
void ReleaseInto (std::unique_ptr< T > &&ptr, QObject &parent)
 
QString UnsafeFromView (QStringView sv)
 
auto MakeEndGroupScopeGuard (QSettings &settings)
 Creates a scope guard that ends the current group on settings.
 
auto BeginGroup (QSettings &settings, const QString &group)
 Begins the group on settings and returns a scope guard ending that group.
 
QByteArray SerializeJson (const QVariant &var, bool compact=true)
 Serializes the given var to JSON representation.
 
SerializeResult_t SerializeJsonToFile (const QString &filename, const QVariant &var, bool compact)
 
template<typename K >
constexpr uint64_t DefaultHashImpl (K)
 
template<>
constexpr uint64_t DefaultHashImpl (std::string_view name)
 
constexpr uint64_t DefaultHash (auto val)
 
template<typename K , typename V , auto Hasher = DefaultHash<K>>
consteval auto MakeHash (auto &&... commands)
 
template<typename V >
consteval auto MakeStringHash (auto &&... commands)
 
QVector< QStringViewAsRefs (const QVector< QString > &lst)
 
auto TokenizeFwd (QStringView str)
 
auto TokenizeRev (QStringView str)
 
auto Reversed (auto container)
 
template<typename F >
auto Throttled (std::chrono::milliseconds ms, QObject *parent, F &&f)
 
template<template< typename... > class List, typename H , typename... T>
constexpr List< T... > Tail (List< H, T... >)
 
template<int N, template< typename... > class List, typename... Args>
constexpr detail::DropImpl< N, List< Args... > >::Result_t Drop (List< Args... >)
 
template<template< typename... > class List, typename... Args1, typename... Args2>
constexpr List< Args1..., Args2... > Concat (List< Args1... >, List< Args2... >)
 
template<template< typename... > class List>
constexpr List Reverse (List<>)
 
template<template< typename... > class List, typename Head , typename... Tail>
constexpr auto Reverse (List< Head, Tail... >) -> decltype(Concat(Reverse(List< Tail... > {}), List< Head > {}))
 
template<template< typename... > class List, typename... Args>
constexpr auto Init (List< Args... >)
 
template<typename Type , template< typename... > class List, typename... Args>
constexpr bool HasType (List< Args... >)
 
template<typename F , typename G , typename Def , typename Head , typename... Args>
auto FirstMatching (F f, G g, Def def, Util::Typelist< Head, Args... >)
 
void Unreachable ()
 
template<typename F >
detail::ScopeGuard< FMakeScopeGuard (const F &f)
 Returns an object performing passed function on scope exit.
 
template<typename... Vars, typename... Args>
decltype(autoVisit (const std::variant< Vars... > &v, Args &&... args)
 
template<typename... Vars, typename... Args>
decltype(autoVisit (std::variant< Vars... > &v, Args &&... args)
 
template<typename... Vars, typename... Args>
decltype(autoVisit (std::variant< Vars... > &&v, Args &&... args)
 
template<typename... Args>
 Visitor (Args &&...) -> Visitor< Void, Args... >
 
template<typename T , typename... Args>
auto InvokeOn (T &&t, Args &&... args)
 
Nodes operator+ (Node &&node, Nodes &&nodes)
 
Nodes operator+ (Nodes &&nodes, Node &&node)
 
Nodes operator+ (Node &&n1, Node &&n2)
 
void swap (FDGuard &g1, FDGuard &g2)
 
QByteArray DetectFileMime (const QString &path)
 
QStringList GetPathCandidates (SysPath path, QString subfolder)
 Returns possible full paths for the path and subfolder.
 
QString GetSysPath (SysPath path, const QString &subfolder, const QString &filename)
 Returns path to the file in the given root path and subfolder.
 
QUrl GetSysPathUrl (SysPath path, const QString &subfolder, const QString &filename)
 Returns path to the file in the given root path and subfolder.
 
QStringList GetSystemPaths ()
 Returns the components of the system PATH variable.
 
QString FindInSystemPath (const QString &name, const QStringList &paths, const std::function< bool(QFileInfo)> &filter={})
 Searches for a file in system paths according to a filter.
 
QDir GetUserDir (UserDir dir, const QString &subpath)
 
QDir CreateIfNotExists (QString path)
 Creates a path if it doesn't exist.
 
QString GetTemporaryName (const QString &pattern={})
 Returns a temporary filename.
 
SpaceInfo GetSpaceInfo (const QString &path)
 Returns the disk space info of the partition containing path.
 
bool HasSupportedImageExtension (const QString &filename)
 Checks if the given filename has a known image extension.
 
bool IsOSXLoadFromBundle ()
 
QString GetDefaultTagsSeparator ()
 
template<typename L , typename R >
 IgnoreLeft (Either< L, R >) -> IgnoreLeft< L, R >
 
template<typename L , typename R , typename F >
requires std::invocable<F, const L&>
Util::detail::EitherAwaiter< L, R, FWithHandler (const Util::Either< L, R > &either, F &&errorHandler)
 
template<typename T , template< typename > typename... Extensions>
GetTaskResult (Task< T, Extensions... > task)
 
template<typename T , template< typename > typename... Exts>
Task< QVector< T >, Exts... > InParallel (QVector< Task< T, Exts... > > tasks)
 
template<typename Input , typename F >
auto InParallel (QVector< Input > &&inputs, F &&mkTask) -> detail::ParallelTraits< F, Input >::ResultType_t
 
template<typename Input , typename F >
auto InParallelSemigroup (QVector< Input > &&inputs, F &&mkTask) -> detail::ParallelTraits< F, Input >::TaskType_t
 
template<typename... Ts, template< typename > typename... Exts>
Task< std::tuple< Ts... >, Exts... > InParallel (Task< Ts, Exts... >... tasks)
 
QDebug operator<< (QDebug dbg, const NetworkReplyError &error)
 
QDebug operator<< (QDebug dbg, const NetworkReplyErrorException &exception)
 
QDebug operator<< (QDebug dbg, const NetworkResult &result)
 
auto MkWaiter ()
 
template<typename F >
void InObjectThread (QObject &object, F &&function)
 
QString GetAsBase64Src (const QImage &image)
 Returns the given image in a Base64-encoded form.
 
QString MakePrettySize (qint64 sourceSize)
 Makes a formatted size from number.
 
QString MakePrettySizeShort (qint64 size)
 Converts a bytes count to a string representation with appropriately chosen units.
 
QString MakeTimeFromLong (ulong time)
 Makes a formatted time from number.
 
QTranslatorLoadTranslator (const QString &baseName, const QString &localeName, const QString &prefix, const QString &appName)
 
QTranslatorInstallTranslator (const QString &base, const QString &prefix=LCLowercase, const QString &appname=LCLowercase)
 Loads and installs a translator.
 
QString GetLocaleName ()
 Returns the current locale name, like en_US.
 
QString GetInternetLocaleName (const QLocale &locale)
 
QString GetLanguage ()
 Returns the current language name.
 
QModelIndexList GetSummarySelectedRows (QObject *sender)
 
QActionCreateSeparator (QObject *parent)
 Returns the action that is set to act as a separator.
 
QString GetErrorString (IDownload::Error::Type type)
 
std::optional< QFuture< TempResultType_t > > DownloadAsTemporary (IEntityManager *iem, const QUrl &url, DownloadParams params)
 
QString GetPassword (const QString &keyName, const QString &dialogText, const ICoreProxy_ptr &proxy, bool useStore=true)
 Returns password for the key, possibly asking the user.
 
void GetPassword (const QString &key, const QString &diaText, const ICoreProxy_ptr &proxy, const EitherCont< void(), void(QString)> &cont, QObject *depender, bool useStored)
 
void SavePassword (const QString &password, const QString &keyName, const ICoreProxy_ptr &proxy)
 Saves the password to be retrieved later via GetPassword().
 
QList< ANFieldDataGetStdANFields (const QString &category)
 Returns the list of the standard AN fields for the given category.
 
Entity MakeAN (const QString &header, const QString &text, Priority priority, const QString &senderID, const QString &cat, const QString &type, const QString &id, const QStringList &visualPath, int delta=1, int count=0, const QString &fullText=QString(), const QString &extendedText=QString())
 Creates an Advanced Notifications-enabled notify entity.
 
Entity MakeANRule (const QString &title, const QString &senderID, const QString &category, const QStringList &types, AN::NotifyFlags flags=AN::NotifyNone, bool openConfiguration=false, const QList< QPair< QString, ANFieldValue > > &fields={})
 Creates an Entity defining an Advanced Notifications rule.
 
QList< QObject * > GetDataFilters (const QVariant &data, IEntityManager *manager)
 Returns the data filter plugins that can handle data.
 
Entity MakeEntity (const QVariant &entity, const QString &location, TaskParameters tp, const QString &mime)
 
Entity MakeNotification (const QString &header, const QString &text, Priority priority)
 An utility function to make a Entity with notification.
 
Entity MakeANCancel (const Entity &event)
 Makes an event for canceling another Advanced Notifications event.
 
Entity MakeANCancel (const QString &senderId, const QString &eventId)
 Makes an event for canceling another Advanced Notifications event.
 
QVariant GetPersistentData (const QByteArray &key, const ICoreProxy_ptr &proxy)
 Returns persistent data stored under given key.
 
void SetJobHolderProgress (const QList< QStandardItem * > &row, qint64 done, qint64 total, const QString &text)
 Sets the progress values on the given row.
 
void SetJobHolderProgress (QStandardItem *item, qint64 done, qint64 total)
 Sets the done and total progress values on the given item.
 
void InitJobHolderRow (const QList< QStandardItem * > &row)
 
UTIL_XPC_API Entity MakeEntity (const QVariant &entity, const QString &location, LC::TaskParameters tp, const QString &mime=QString())
 An utility function to make a Entity.
 
XmlSettingsDialogOpenXSD (const QString &title, const QString &filename, Util::BaseSettingsManager *bsm)
 Opens XML settings dialog for the given XML filename.
 
UTIL_XSD_API std::shared_ptr< QSettingsMakeGroupSettings (const QString &suffix, const QString &groupName)
 

Variables

template<Literal RoleArg, auto GetterArg>
RoledMemberField< RoleArg, GetterArgRoledMemberField_v
 
template<template< typename... > class Op, typename... Args>
constexpr bool IsDetected_v = detail::IsDetected<void, void, Op, Args...>::value_t::value
 
template<typename To >
constexpr auto Upcast = Upcaster<To> {}
 
struct { 
 
Mplus 
 
struct { 
 
Msum 
 
constexpr auto Id = [] (auto&& t) -> decltype (auto) { return std::forward<decltype (t)> (t); }
 
constexpr auto Apply = [] (const auto& t) { return t (); }
 
constexpr auto Fst = [] (const auto& pair) { return pair.first; }
 
constexpr auto Snd = [] (const auto& pair) { return pair.second; }
 
template<SomeInvokable F>
constexpr auto ArgCount_v = std::tuple_size_v<detail::CallTypeGetter_t<F>> - 1
 
template<template< typename > class Pred, typename... Args>
constexpr auto AllOf = (Pred<Args> {} && ...)
 
template<template< typename > class Pred, typename... Args>
constexpr auto AnyOf = (Pred<Args> {} || ...)
 
const QString LCLowercase = QStringLiteral ("leechcraft")
 The "leechcraft" literal, with no run-time overhead.
 
const int SourcePager = 2
 
const int StateRemove = 0
 
const int StateAdd = 1
 

Typedef Documentation

◆ AddrList_t

◆ ArgType_t

template<SomeInvokable F, size_t Idx>
using LC::Util::ArgType_t = std::tuple_element_t<Idx + 1, detail::CallTypeGetter_t<F>>

Definition at line 40 of file typegetter.h.

◆ AsTypelist_t

Definition at line 140 of file typelist.h.

◆ BindResult_t

◆ Coarsely

Definition at line 43 of file timer.h.

◆ ConcurrentStdException

◆ ContextTask

Definition at line 20 of file taskfwd.h.

◆ DefaultHookProxy_ptr

Definition at line 103 of file defaulthookproxy.h.

◆ DefaultScopeGuard

◆ DoSmthDetector

template<typename T >
using LC::Util::DoSmthDetector = decltype (std::declval<T> ().DoSmth (QString {}))

Definition at line 20 of file detectortest.cpp.

◆ Filter_t

template<template< typename > class Pred, typename List >
using LC::Util::Filter_t = typename detail::Filter<Pred, List>::Result_t

Definition at line 107 of file typelist.h.

◆ Find

template<template< typename > class Name, typename Def , typename... Args>
using LC::Util::Find = typename detail::Find<Name, Def, Args...>::type

Definition at line 176 of file typelist.h.

◆ FindResult

◆ FlatTreeItem_ptr

Definition at line 22 of file flattofoldersproxymodel.h.

◆ FmapResult_t

The result type of the contents of the functor T mapped by function F.

Template Parameters
TThe type of the functor.
FThe type of the function to apply to the elements inside the functor.

Definition at line 105 of file functor.h.

◆ FontBasedParams

◆ FontSizeChangerParams

◆ GSLResult_t

◆ Head_t

template<typename List >
using LC::Util::Head_t = typename Head<List>::Head_t

Definition at line 32 of file typelist.h.

◆ InitialDistr

Definition at line 34 of file statesaver.h.

◆ Introspect_f

Definition at line 19 of file introspectable.h.

◆ IntTrie

◆ IsDetected_t

template<typename Type , template< typename... > class Op, typename... Args>
using LC::Util::IsDetected_t = typename detail::IsDetected<Type, void, Op, Args...>::type

Definition at line 38 of file detector.h.

◆ IsVoid_t

template<typename T >
using LC::Util::IsVoid_t = std::is_same<T, void>

Definition at line 31 of file typelisttest.cpp.

◆ Lazy_t

template<typename T >
using LC::Util::Lazy_t = std::function<T ()>

Definition at line 19 of file lazy.h.

◆ LazyNotificationPixmap_t

using LC::Util::LazyNotificationPixmap_t = std::function<std::optional<QFuture<QImage>> ()>

Definition at line 252 of file util.h.

◆ MemberPtrStruct_t

Definition at line 73 of file typegetter.h.

◆ MemberPtrType_t

Definition at line 70 of file typegetter.h.

◆ MemberTypeStruct_t

◆ MemberTypeType_t

◆ ModelItem_cptr

Definition at line 22 of file modelitem.h.

◆ ModelItem_ptr

Definition at line 19 of file modelitem.h.

◆ ModelItem_wtr

Definition at line 20 of file modelitem.h.

◆ ModelItemsList_t

Definition at line 21 of file modelitem.h.

◆ Node

using LC::Util::Node = std::variant<Tag, QString>

Definition at line 25 of file xmlnode.h.

◆ Nodes

Definition at line 26 of file xmlnode.h.

◆ NRBase_t

Definition at line 33 of file networkresult.h.

◆ PixelBasedParams

◆ Precisely

Definition at line 42 of file timer.h.

◆ QIODevice_ptr

using LC::Util::QIODevice_ptr = std::shared_ptr<QIODevice>

Definition at line 27 of file resourceloader.h.

◆ QSVV

Definition at line 17 of file tokenizetest.cpp.

◆ QtException_ptr

Definition at line 19 of file concurrentexception.h.

◆ QtException_t

◆ RawStr

template<size_t N, typename Char = char>
using LC::Util::RawStr = const Char (&) [N]

Definition at line 19 of file ctstring.h.

◆ RetType_t

template<SomeInvokable F>
using LC::Util::RetType_t = std::tuple_element_t<0, detail::CallTypeGetter_t<F>>

Definition at line 43 of file typegetter.h.

◆ SerializeResult_t

◆ SomeEither_t

Definition at line 23 of file eithertest.cpp.

◆ SVariant_t

using LC::Util::SVariant_t = std::variant<S1, S2>

Definition at line 33 of file visitortest.cpp.

◆ TagAttrs

using LC::Util::TagAttrs = QVector<std::pair<QString, QString>>

Definition at line 21 of file xmlnode.h.

◆ TempResultType_t

◆ Throttle_ptr

Definition at line 43 of file throttle.h.

◆ Variant_t

using LC::Util::Variant_t = std::variant<int, char, std::string, QString, double, float>

Definition at line 19 of file visitortest.cpp.

◆ VeryCoarsely

using LC::Util::VeryCoarsely = WithPrecision<Qt::VeryCoarseTimer>

Definition at line 44 of file timer.h.

◆ WrapType_t

Definition at line 28 of file prelude.h.

◆ XmlSettingsDialog_ptr

Definition at line 19 of file ihavesettings.h.

Enumeration Type Documentation

◆ AllowedActionFlag

Enumerator
NoAction 
Move 
Resize 
Minimize 
Shade 
Stick 
MaximizeHorz 
MaximizeVert 
ShowFullscreen 
ChangeDesktop 
Close 
MoveToTop 
MoveToBottom 

Definition at line 34 of file winflags.h.

◆ QueuePriority

The priority of the action in the queue.

Enumerator
Normal 

Standard priority.

High 

Higher priority.

Definition at line 27 of file queuemanager.h.

◆ SysPath

Describes various root paths recognized by GetSysPath().

See also
GetPathCandidates(), GetSysPath()
Enumerator
QML 

Root path for QML files.

   Plugins are expected to install their files into a
   subdirectory of this directory.
Share 

Directory with shared data files.

   Corresponds to <code>/usr/[local/]share/leechcraft</code> on
   Linux, for example.

Definition at line 25 of file paths.h.

◆ UserDir

Describes various user-specific paths.

Enumerator
Cache 

Cache for volatile data.

LC 

Root LeechCraft directory (something like ~/.leechcraft).

Definition at line 147 of file paths.h.

◆ WinStateFlag

Enumerator
NoState 
Modal 
Sticky 
MaximizedVert 
MaximizedHorz 
Shaded 
SkipTaskbar 
SkipPager 
Hidden 
Fullscreen 
OnTop 
OnBottom 
Attention 

Definition at line 15 of file winflags.h.

Function Documentation

◆ As() [1/2]

template<QJsonValue::Type Expected>
requires (Expected == QJsonValue::Object || Expected == QJsonValue::Array)
auto LC::Util::As ( const QJsonDocument & doc)

Definition at line 54 of file json.h.

References Filter().

+ Here is the call graph for this function:

◆ As() [2/2]

template<QJsonValue::Type Expected>
auto LC::Util::As ( const QJsonValue & value)

Definition at line 35 of file json.h.

References Filter().

+ Here is the call graph for this function:

◆ AsByteArray()

QByteArray LC::Util::AsByteArray ( std::string_view view)
inlinenoexcept

Convert the view into a QByteArray without copying.

The lifetime of the view should be not less than the lifetime of the returned QByteArray and any of its copies.

For a version without this requirement, see ToByteArray()

Parameters
viewAn std::string_view to be represented as a QByteArray.
Returns
A QByteArray referring to the same chunk of memory as the view.
See also
ToByteArray()

Definition at line 87 of file qtutil.h.

References Filter().

Referenced by LC::Util::XWrapper::GetAtom().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AsRefs()

QVector< QStringView > LC::Util::AsRefs ( const QVector< QString > & lst)

Definition at line 22 of file stringpathtrietest.cpp.

References Filter(), and Map().

+ Here is the call graph for this function:

◆ AsSet()

template<typename T >
auto LC::Util::AsSet ( const T & cont)

Definition at line 16 of file containerconversions.h.

References Filter().

+ Here is the call graph for this function:

◆ AsStringView()

std::string_view LC::Util::AsStringView ( const QByteArray & arr)
inlinenoexcept

Create a std::string_view referring the data within a QByteArray.

Parameters
arrA QByteArray.
Returns
An std::string_view referencing the data within arr.

Definition at line 112 of file qtutil.h.

References Filter().

Referenced by LC::Util::XWrapper::GetWindowActions(), and LC::Util::XWrapper::GetWindowState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AvailableGeometry()

UTIL_GUI_API QRect LC::Util::AvailableGeometry ( const QPoint & p)

Definition at line 66 of file geometry.cpp.

References Filter(), and GetScreenWithFallback().

Referenced by ShowPixmapLabel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BeginGroup()

auto LC::Util::BeginGroup ( QSettings & settings,
const QString & group )
inline

Begins the group on settings and returns a scope guard ending that group.

Parameters
[in]settingsThe QSettings object.
[in]groupThe name of the group to begin.
Returns
The scope guard calling QSettings::endGroup() on the settings object on scope exit.
See also
MakeEndGroupScopeGuard()

Definition at line 42 of file scopeguards.h.

References Filter(), and MakeScopeGuard().

+ Here is the call graph for this function:

◆ Bind()

template<typename MV , typename F >
BindResult_t< MV, F > LC::Util::Bind ( const MV & value,
const F & f )

Definition at line 63 of file monad.h.

References Filter().

Referenced by Do(), and operator>>().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BindMemFn() [1/2]

template<typename R , typename B , typename C , typename... Args>
auto LC::Util::BindMemFn ( R(B::*)(Args...) const fn,
const C * c )

Definition at line 37 of file functional.h.

References Filter().

+ Here is the call graph for this function:

◆ BindMemFn() [2/2]

template<typename R , typename B , typename C , typename... Args>
auto LC::Util::BindMemFn ( R(B::*)(Args...) fn,
C * c )

Binds an instance of an object to its member function.

Parameters
[in]fnThe member function of class T.
[in]cThe instance of class T to bind to the member function fn.
Returns
A functor callable with all arguments of fn but the object itself.
Template Parameters
RThe return type of the function.
TThe type of the object.
ArgsThe arguments to the function, besides the object itself.

Definition at line 30 of file functional.h.

References Filter().

+ Here is the call graph for this function:

◆ BreakAt()

template<typename T , typename S >
std::pair< T, T > LC::Util::BreakAt ( const T & str,
S c )
noexcept

Definition at line 118 of file qtutil.h.

References Filter().

+ Here is the call graph for this function:

◆ BuildTagsTree()

QDomElement UTIL_SLL_API LC::Util::BuildTagsTree ( QStringList tags,
QDomNode & node,
QDomDocument & document,
const QString & elementName,
const std::function< QString(QDomElement)> & tagGetter,
const std::function< void(QDomElement &, QString)> & tagSetter )

Builds a nested sequence of DOM elements representing a list of tags.

This function tries to implement projection from tags to a hierarchical structure in form of XML. It traverses the tags list and creates child nodes from the document, appending the hierarchical structure's tree root to the node. It returns the parent element to which the item should be appended.

For empty tags list it just returns node converted to the QDomElement.

Parameters
[in]tagsList of tags.
[in]nodeThe parent-most node to which all other nodes are appended.
[in]documentThe document containing all these nodes.
[in]elementNameThe name of the XML element that carries info about the tags.
[in]tagSetterSetter function for the tags for the given element.
[in]tagGetterGetter function for the tags for the given element.
Returns
Parent element of the item with tags.

Definition at line 14 of file buildtagstree.cpp.

References BuildTagsTree(), and Filter().

Referenced by BuildTagsTree().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ComparingBy()

template<typename R >
auto LC::Util::ComparingBy ( R r)

Definition at line 205 of file prelude.h.

References Filter().

+ Here is the call graph for this function:

◆ Concat() [1/4]

template<template< typename > class Container, typename T >
Container< T > LC::Util::Concat ( const Container< Container< T > > & containers)

Definition at line 128 of file prelude.h.

References Filter().

Referenced by ConcatMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Concat() [2/4]

template<template< typename... > class Container, typename... ContArgs>
auto LC::Util::Concat ( const Container< ContArgs... > & containers) -> std::decay_t<decltype (*containers.begin ())>

Definition at line 158 of file prelude.h.

References LC::Util::detail::Append(), and Filter().

+ Here is the call graph for this function:

◆ Concat() [3/4]

template<template< typename > class Container, typename T >
Container< T > LC::Util::Concat ( Container< Container< T > > && containers)

Definition at line 143 of file prelude.h.

References Filter().

+ Here is the call graph for this function:

◆ Concat() [4/4]

template<template< typename... > class List, typename... Args1, typename... Args2>
constexpr List< Args1..., Args2... > LC::Util::Concat ( List< Args1... > ,
List< Args2... >  )
constexpr

Definition at line 62 of file typelist.h.

◆ ConcatMap()

template<typename Cont , typename F >
auto LC::Util::ConcatMap ( Cont && c,
F && f )

Definition at line 168 of file prelude.h.

References Concat(), Filter(), and Map().

Referenced by LC::Util::XDG::ToPaths().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateIfNotExists()

UTIL_SYS_API QDir LC::Util::CreateIfNotExists ( QString path)

Creates a path if it doesn't exist.

Creates a relative path ~/.leechcraft/path and throws an exception if this could not be done or if such path already exists and it is not readable.

Parameters
[in]pathThe path to create.
Returns
The newly created dir.
Exceptions
std::runtime_errorThrows if the path could not be created.

Definition at line 126 of file paths.cpp.

References Filter().

+ Here is the call graph for this function:

◆ CreateSeparator()

UTIL_API QAction * LC::Util::CreateSeparator ( QObject * parent)

Returns the action that is set to act as a separator.

That is the action with setSeparator(true);

Parameters
[in]parentThe parent of the action.
Returns
The separator action.

Definition at line 214 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ CreateShortcuts()

template<typename Obj >
void LC::Util::CreateShortcuts ( const QList< QKeySequence > & seqs,
Obj * obj,
void(Obj::*)() member,
QWidget * parent )

Definition at line 40 of file util.h.

References Filter().

+ Here is the call graph for this function:

◆ CtString()

template<size_t N, typename Char >
LC::Util::CtString ( RawStr< N, Char > ) -> CtString< N - 1, Char >

◆ Curry()

template<typename F , typename... Args>
CurryImpl< std::decay_t< F >, Args... > LC::Util::Curry ( F && f,
Args &&... args )

Definition at line 72 of file curry.h.

References Filter().

+ Here is the call graph for this function:

◆ DefaultHash()

constexpr uint64_t LC::Util::DefaultHash ( auto val)
constexpr

Definition at line 52 of file statichash.h.

References DefaultHashImpl(), and Filter().

+ Here is the call graph for this function:

◆ DefaultHashImpl() [1/2]

template<typename K >
constexpr uint64_t LC::Util::DefaultHashImpl ( K val)
constexpr

Definition at line 47 of file statichash.h.

References Filter().

Referenced by DefaultHash().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DefaultHashImpl() [2/2]

template<>
constexpr uint64_t LC::Util::DefaultHashImpl ( std::string_view name)
constexpr

Definition at line 38 of file statichash.h.

References Filter().

+ Here is the call graph for this function:

◆ DetectFileMime()

UTIL_SYS_API QByteArray LC::Util::DetectFileMime ( const QString & path)

Definition at line 25 of file mimedetector.cpp.

References Filter().

+ Here is the call graph for this function:

◆ Do() [1/2]

template<typename MV >
auto LC::Util::Do ( const MV & value)

Definition at line 77 of file monad.h.

References Filter().

Referenced by Do().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Do() [2/2]

template<typename MV , typename FHead , typename... FArgs>
auto LC::Util::Do ( const MV & value,
const FHead & fHead,
const FArgs &... fArgs )

Definition at line 83 of file monad.h.

References Bind(), Do(), and Filter().

+ Here is the call graph for this function:

◆ DomChildren()

auto LC::Util::DomChildren ( const QDomNode & parent,
const QString & tag )
inline

Creates a range iterating over direct children named tag.

The returned range is suitable for range-based for loops, in particular. For instance, the following is correct:

doc.setContent (R"(
<root>
<child num="1">first text</child>
<child num="2">second text</child>
<child num="3">third text</child>
</root>
)");
for (const auto& elem : MakeDomSiblingsRange (doc.firstChildElement ("root"), "child"))
qDebug () << elem.text () << elem.attribute ("num");
Container< T > Filter(const Container< T > &c, F f)
Definition prelude.h:118

Modifying the underlying DOM tree will result in the same effects as modifying it during the canonical Qt-way of repeatedly calling QDomElement::nextSiblingElement() until the element becomes null.

Parameters
parentThe parent element whose children should be iterated over.
tagThe tag name of the child nodes (or an empty string for all children).
Returns
The range object representing the collection of the child nodes.
See also
DomDescendants()

Definition at line 43 of file domchildrenrange.h.

◆ DomDescendants()

UTIL_SLL_API QVector< QDomElement > LC::Util::DomDescendants ( const QDomElement & parent,
const QString & tag )

Creates a vector with all descendants of parent named tag.

The returned vector is not a live DOM node list, so modifying its elements does not modify the vector. Thus it is also faster to iterate in case of modifications.

Parameters
parentThe parent element whose children should be iterated over.
tagThe name of the tag that the returned descendants should have.
Returns
The vector with all descendants named tag.
See also
DomChildren()

Definition at line 28 of file domchildrenrange.cpp.

References DomDescendants(), and Filter().

Referenced by DomDescendants().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DownloadAsTemporary()

◆ DrawOverlayText()

UTIL_GUI_API QPixmap LC::Util::DrawOverlayText ( QPixmap px,
const QString & text,
QFont font,
const QPen & pen,
const QBrush & brush )

Definition at line 110 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ Drop()

template<int N, template< typename... > class List, typename... Args>
constexpr detail::DropImpl< N, List< Args... > >::Result_t LC::Util::Drop ( List< Args... > )
constexpr

Definition at line 56 of file typelist.h.

Referenced by LC::Util::detail::Dropper< F >::operator()().

+ Here is the caller graph for this function:

◆ DropArgs()

template<typename F >
detail::Dropper< F > LC::Util::DropArgs ( const F & f)

Definition at line 103 of file dropargs.h.

◆ ElideProgressBarText()

UTIL_GUI_API QString LC::Util::ElideProgressBarText ( const QString & text,
const QStyleOptionViewItem & option )

Definition at line 92 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ EnableTransparency()

UTIL_QML_API void LC::Util::EnableTransparency ( QQuickWidget & widget)

Definition at line 17 of file util.cpp.

References Filter().

Referenced by LC::Util::UnhideListViewBase::UnhideListViewBase().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnumerateChildren()

template<typename F >
void LC::Util::EnumerateChildren ( const QModelIndex & idx,
bool includingRoot,
F && f )

Definition at line 16 of file util.h.

References EnumerateChildren(), and Filter().

Referenced by EnumerateChildren().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EqualityBy()

template<typename R >
auto LC::Util::EqualityBy ( R r)

Definition at line 211 of file prelude.h.

References Filter().

+ Here is the call graph for this function:

◆ Filter()

template<typename T , template< typename U > class Container, typename F >
Container< T > LC::Util::Filter ( const Container< T > & c,
F f )

Definition at line 118 of file prelude.h.

References LC::Util::detail::Append(), and Filter().

Referenced by LC::Util::oral::detail::AdaptDelete< Seq >::AdaptDelete(), LC::Util::oral::detail::AdaptInsert< Seq >::AdaptInsert(), LC::Util::AddressesModelManager::AddressesModelManager(), LC::Util::oral::detail::AssignList< L, R >::AssignList(), LC::Util::AutoResizeMixin::AutoResizeMixin(), LC::Util::AutoResizeMixin::AutoResizeMixin(), LC::Util::BackendSelector::BackendSelector(), LC::Util::BitFlags< T >::BitFlags(), LC::Util::CategorySelector::CategorySelector(), LC::Util::ClearLineEditAddon::ClearLineEditAddon(), LC::Util::ColorButton::ColorButton(), LC::Util::ColorThemeProxy::ColorThemeProxy(), LC::Util::ConcurrentException< T >::ConcurrentException(), LC::Util::CpuFeatures::CpuFeatures(), LC::Util::CtString< N, Char >::CtString(), LC::Util::CustomNetworkReply::CustomNetworkReply(), LC::Util::Dumper::Dumper(), LC::Util::FancyTrayIconFallback::FancyTrayIconFallback(), LC::Util::FancyTrayIconFreedesktop::FancyTrayIconFreedesktop(), LC::Util::FDGuard::FDGuard(), LC::Util::FindNotification::FindNotification(), LC::Util::FlowLayout::FlowLayout(), LC::Util::FontChooserWidget::FontChooserWidget(), LC::Util::XDG::ItemsDatabase::ItemsDatabase(), LC::Util::LazyInitializer< Source, Object >::LazyInitializer(), LC::Util::LineEditButtonManager::LineEditButtonManager(), LC::Util::Literal< N >::Literal(), LC::Util::MassFontChangeDialog::MassFontChangeDialog(), LC::Util::NetworkDiskCache::NetworkDiskCache(), LC::Util::NotificationActionHandler::NotificationActionHandler(), LC::Util::PageNotification::PageNotification(), LC::Util::PlotItem::PlotItem(), LC::Util::QueueManager::QueueManager(), LC::Util::RegExp::RegExp(), LC::Util::ReplyWithHeaders::ReplyWithHeaders(), LC::Util::ResourceLoader::ResourceLoader(), LC::Util::RoledItemsModel< T >::RoledItemsModel(), LC::Util::detail::ScopeGuard< F >::ScopeGuard(), LC::Util::SelectableBrowser::SelectableBrowser(), LC::Util::oral::detail::SelectWrapperCommon::SelectWrapperCommon(), LC::Util::SlotClosure< FireDestrPolicy >::SlotClosure(), LC::Util::SlotClosure< FireDestrPolicy >::SlotClosure(), LC::Util::detail::SNIAdaptor::SNIAdaptor(), LC::Util::StandardNAMFactory::StandardNAMFactory(), LC::Util::StdDataFilterMenuCreator::StdDataFilterMenuCreator(), LC::Util::TagsCompleter::TagsCompleter(), LC::Util::Task< R, Extensions >::Task(), LC::Util::Task< R, Extensions >::Task(), LC::Util::ToolTipItem::ToolTipItem(), LC::Util::UnhideListModel::UnhideListModel(), LC::Util::UnhideListViewBase::UnhideListViewBase(), LC::Util::UnhoverDeleteMixin::UnhoverDeleteMixin(), LC::Util::SvcAuth::VkAuthManager::VkAuthManager(), LC::Util::SvcAuth::VkCaptchaDialog::VkCaptchaDialog(), LC::Util::SvcAuth::VkCaptchaDialog::VkCaptchaDialog(), LC::Util::WkFontsWidget::WkFontsWidget(), LC::Util::DBLock::~DBLock(), LC::Util::FDGuard::~FDGuard(), LC::Util::FlowLayout::~FlowLayout(), LC::Util::Timer::~Timer(), LC::Util::StringPathTrie< V >::Add(), LC::Util::StringPathTrie< V >::Add(), LC::Util::LineEditButtonManager::Add(), LC::Util::NotificationActionHandler::AddDependentObject(), LC::Util::NotificationActionHandler::AddFunction(), LC::Util::ResourceLoader::AddGlobalPrefix(), LC::Util::FlatItemsModelTypedBase< T >::AddItem(), LC::Util::FlowLayout::addItem(), LC::Util::oral::detail::ExprTree< Type, L, R >::AdditionalTables(), LC::Util::oral::detail::ExprTree< ExprType::LeafStaticPlaceholder, MemberPtrs< Ptr >, void >::AdditionalTables(), LC::Util::ResourceLoader::AddLocalPrefix(), LC::Util::MergeModel::AddModel(), LC::Util::BaseHookInterconnector::AddPlugin(), LC::Util::AddressesModelManager::addRequested(), LC::Util::TagsLineEdit::AddSelector(), LC::Util::TagsLineEdit::AddSelector(), LC::Util::ShortcutManager::AnnounceGlobalShorcuts(), LC::Util::ModelItemBase< T >::AppendChild(), LC::Util::ModelItemBase< T >::AppendExisting(), LC::Util::ModelItemBase< T >::AppendExisting(), LC::Util::InstanceFunctor< Either< L, R > >::Apply(), LC::Util::InstanceFunctor< QFuture< T > >::Apply(), LC::Util::InstanceFunctor< std::optional< T > >::Apply(), As(), As(), AsByteArray(), LC::Util::oral::detail::AsLeafData(), AsRefs(), AsSet(), AsStringView(), LC::Util::ChannelDevice::atEnd(), AvailableGeometry(), LC::Util::Throttle::await_ready(), LC::Util::IgnoreLeft< L, R >::await_resume(), LC::Util::AddContextObject::await_suspend(), LC::Util::detail::NRAwaiter::await_suspend(), LC::Util::Throttle::await_suspend(), LC::Util::ContextExtensions< typename >::await_transform(), LC::Util::detail::Awaiter(), LC::Util::Tokenize::begin(), BeginGroup(), LC::Util::InstanceMonad< Either< L, R > >::Bind(), Bind(), LC::Util::InstanceMonad< std::optional< T > >::Bind(), LC::Util::oral::detail::BindAtIndex(), LC::Util::oral::detail::BindExprTree(), LC::Util::oral::detail::BindLimitOffset(), BindMemFn(), BindMemFn(), LC::Util::oral::detail::AssignList< L, R >::BindValues(), LC::Util::oral::detail::ExprTree< Type, L, R >::BindValues(), LC::Util::oral::detail::ExprTree< ExprType::LeafData, T, void >::BindValues(), LC::Util::Tags::Body(), BreakAt(), BuildTagsTree(), LC::Util::Tags::Charset(), LC::Util::SvcAuth::VkAuthManager::ClearAuthData(), LC::Util::SettableIconProvider::ClearIcon(), LC::Util::CustomCookieJar::CollectGarbage(), LC::Util::MergeModel::columnCount(), LC::Util::oral::detail::Combine(), LC::Util::oral::detail::Combine(), LC::Util::oral::detail::Combine(), LC::Util::oral::detail::Combine(), ComparingBy(), Concat(), Concat(), Concat(), ConcatMap(), LC::Util::SelectableBrowser::Construct(), LC::Util::AssocCache< K, V, CS >::contains(), LC::Util::detail::SNIAdaptor::ContextMenu(), LC::Util::TagsLineEdit::contextMenuEvent(), LC::Util::CustomCookieJar::cookiesForUrl(), LC::Util::StandardNAMFactory::create(), LC::Util::ConsistencyChecker::Create(), CreateIfNotExists(), CreateSeparator(), CreateShortcuts(), CreateShortcuts(), CreateShortcuts(), Curry(), LC::Util::FlatToFoldersProxyModel::data(), LC::Util::MergeModel::data(), LC::Util::FlatItemsModelBase::data(), LC::Util::CategorySelector::SelectorTagsModel::data(), LC::Util::FlattenFilterModel::data(), LC::Util::NetworkDiskCache::data(), LC::Util::XDG::Item::DebugPrint(), DefaultHash(), DefaultHashImpl(), DefaultHashImpl(), LC::Util::MimeDetector::Detect(), DetectFileMime(), Do(), Do(), LC::Util::oral::detail::DoInsert(), DomDescendants(), LC::Util::SvcAuth::VkCaptchaDialog::done(), DownloadAsTemporary(), DrawOverlayText(), LC::Util::FlatToFoldersProxyModel::dropMimeData(), LC::Util::DBLock::DumpError(), LC::Util::DBLock::DumpError(), LC::Util::FlatItemsModelTypedBase< T >::EditItem(), ElideProgressBarText(), LC::Util::Either< L, R >::EmbeddingLeft(), LC::Util::DummyObject::EmitSignal(), EnableTransparency(), LC::Util::CtString< N, Char >::EndsWith(), LC::Util::ModelItem::EnsureChild(), EnumerateChildren(), EqualityBy(), LC::Util::ModelItemBase< T >::EraseChild(), LC::Util::AutoResizeMixin::eventFilter(), LC::Util::LineEditButtonManager::eventFilter(), LC::Util::UnhoverDeleteMixin::eventFilter(), LC::Util::detail::LambdaEventFilter< Type, F >::eventFilter(), LC::Util::XDG::Item::Execute(), LC::Util::DBLock::Execute(), LC::Util::NetworkDiskCache::expire(), LC::Util::oral::detail::ExprTreeToSql(), LC::Util::oral::detail::ExtractConflictingFields(), LC::Util::oral::detail::FieldIndex(), Filter(), LC::Util::TagsFilterModel::filterAcceptsRow(), LC::Util::Task< R, Extensions >::promise_type::final_suspend(), LC::Util::Visitor< FinallyFunc, Args >::Finally(), LC::Util::ContextExtensions< typename >::FinalSuspend(), LC::Util::StringPathTrie< V >::Find(), LC::Util::StringPathTrie< V >::Find(), LC::Util::ModelItem::FindChild(), FindInSystemPath(), LC::Util::XDG::ItemsFinder::FindItem(), LC::Util::MergeModel::FindModel(), LC::Util::MergeModel::FindModel(), LC::Util::DeleteLaterPolicy::Fired(), FirstMatching(), FitRect(), FitRectScreen(), FixupTrayIcon(), LC::Util::FlatToFoldersProxyModel::flags(), LC::Util::MergeModel::flags(), Fmap(), LC::Util::TagsLineEdit::focusInEvent(), FormatName(), LC::Util::IDPool< T >::FreeID(), LC::Util::oral::AsDataStream< T >::FromBaseType(), LC::Util::XDG::Item::FromDesktopFile(), LC::Util::Either< L, R >::FromMaybe(), LC::Util::detail::IconFrame::FromPixmap(), LC::Util::CtString< N, Char >::FromUnsized(), GenConnectionName(), LC::Util::oral::detail::Get(), LC::Util::oral::detail::Get(), LC::Util::AddressesModelManager::GetAddresses(), GetAllAddresses(), LC::Util::XDG::GetAppIcon(), LC::Util::XDG::GetAppPixmap(), GetAsBase64Src(), LC::Util::SvcAuth::VkAuthManager::GetAuthKey(), LC::Util::SvcAuth::VkAuthManager::GetAuthKeyFuture(), LC::Util::AN::GetCategoryName(), LC::Util::AN::GetCategoryNameMap(), LC::Util::ModelItemBase< T >::GetChild(), LC::Util::StringPathTrie< V >::GetChild(), LC::Util::XDG::Item::GetComment(), LC::Util::NetworkDiskCacheGC::GetCurrentSize(), LC::Util::FlatItemsModel< T >::GetData(), LC::Util::RoledItemsModel< T >::GetData(), GetDataFilters(), GetDefaultTagsSeparator(), LC::Util::SysInfo::Linux::GetEtcName(), LC::Util::SysInfo::Linux::GetEtcOsName(), LC::Util::ExtensionsData::GetExtIcon(), LC::Util::MassFontChangeDialog::GetFamilies(), LC::Util::CpuFeatures::GetFeatureName(), LC::Util::detail::GetFieldImpl(), LC::Util::detail::GetFieldImpl(), LC::Util::detail::GetFieldImpl(), LC::Util::detail::GetFieldImpl(), LC::Util::detail::GetFieldImpl(), LC::Util::detail::GetFieldImpl(), LC::Util::oral::detail::GetFieldName(), LC::Util::oral::detail::GetFieldNamePtr(), LC::Util::detail::GetFieldsCount(), LC::Util::FindNotification::GetFlags(), LC::Util::XDG::Item::GetGenericName(), LC::Util::XDG::Item::GetIcon(), LC::Util::SettableIconProvider::GetIcon(), LC::Util::ResourceLoader::GetIconDevice(), LC::Util::ResourceLoader::GetIconPath(), LC::Util::oral::detail::PostgreSQL::ImplFactory::GetInsertSuffix(), GetInternetLocaleName(), LC::Util::AN::GetKnownEventTypes(), GetLastId(), GetLocalAddresses(), GetLocaleName(), LC::Util::SysInfo::Linux::GetLSBName(), LC::Util::ExtensionsData::GetMime(), LC::Util::ExtensionsData::GetMimeIcon(), LC::Util::PlotItem::GetMultipoints(), LC::Util::XDG::Item::GetName(), LC::Util::SysInfo::GetOSInfo(), LC::Util::SysInfo::GetOSName(), GetPassword(), GetPassword(), LC::Util::ResourceLoader::GetPath(), GetPathCandidates(), GetPersistentData(), LC::Util::oral::detail::GetQualifiedFieldNamePtr(), LC::Util::WorkerThreadBase::GetQueueSize(), LC::Util::oral::detail::GetReplaceTupleElem(), LC::Util::NetworkResult::GetReplyData(), LC::Util::ModelItemBase< T >::GetRow(), LC::Util::ModelItemBase< T >::GetRow(), LC::Util::ModelItemBase< T >::GetRow(), GetScreenWithFallback(), LC::Util::CategorySelector::GetSelectedIndexes(), LC::Util::CategorySelector::GetSelections(), GetServiceUrl(), GetSpaceInfo(), LC::Util::MergeModel::GetStartingRow(), GetStdANFields(), GetSummarySelectedRows(), GetSysPath(), GetSysPathUrl(), GetSystemPaths(), GetTaskResult(), GetTemporaryName(), LC::Util::AN::GetTypeName(), GetUserDir(), LC::Util::DefaultHookProxy::GetValue(), GSL(), LC::Util::InstanceApplicative< std::optional< T > >::GSL(), LC::Util::InstanceApplicative< Either< L, R > >::GSL(), HandleNetworkReply(), HandleReply(), HandleReplySeq(), LC::Util::oral::detail::ExprTree< Type, L, R >::HasAdditionalTables(), LC::Util::oral::detail::HasAutogenPKey(), LC::Util::CpuFeatures::HasFeature(), HasSupportedImageExtension(), LC::Util::FlatItemsModelBase::headerData(), LC::Util::CategorySelector::SelectorTagsModel::headerData(), LC::Util::FlatToFoldersProxyModel::headerData(), LC::Util::MergeModel::headerData(), LC::Util::FlowLayout::heightForWidth(), LC::Util::ToolTipItem::hoverEnterEvent(), LC::Util::ToolTipItem::hoverLeaveEvent(), LC::Util::Tags::Html(), LC::Util::detail::IconToFrames(), LC::Util::Tags::Image(), LC::Util::Tags::Image(), LC::Util::Worker::Increment(), LC::Util::FlatItemsModelBase::index(), LC::Util::MergeModel::index(), LC::Util::FlattenFilterModel::index(), LC::Util::FlatToFoldersProxyModel::index(), LC::Util::DBLock::Init(), Init(), LC::Util::oral::detail::InitializeFromQuery(), InitJobHolderRow(), InObjectThread(), InParallel(), InParallel(), InParallel(), InParallelSemigroup(), LC::Util::NetworkDiskCache::insert(), LC::Util::ModelItemBase< T >::InsertChild(), InstallFontSizeChanger(), InstallTranslator(), LC::Util::NetworkDiskCacheGC::Instance(), LC::Util::ExtensionsData::Instance(), LC::Util::Introspectable::Instance(), LC::Util::ChoiceDeletePolicy::Invoke(), InvokeOn(), LC::Util::detail::IsCompatibleMonadImpl(), LC::Util::NetworkResult::IsError(), IsOSXLoadFromBundle(), LC::Util::FlowLayout::itemAt(), LC::Util::detail::JMEq(), Join(), JoinTup(), LC::Util::TagsLineEdit::keyPressEvent(), LC::Util::EitherCont< LeftSig, RightSig >::Left(), LC::Util::Either< L, R >::Left(), LC::Util::Either< L, R >::LeftLift(), LC::Util::Either< L, R >::LeftLift(), LC::Util::Either< L, R >::LeftLift(), LC::Util::detail::Length(), LC::Util::Tags::Li(), LC::Util::ResourceLoader::List(), LC::Util::CustomCookieJar::Load(), LC::Util::ResourceLoader::Load(), LC::Util::ResourceLoader::Load(), LC::Util::ResourceLoader::LoadPixmap(), LoadQuery(), LC::Util::IDPool< T >::LoadState(), LoadTranslator(), MakeAN(), MakeANCancel(), MakeANCancel(), MakeANRule(), MakeCertificateViewerDialog(), MakeEndGroupScopeGuard(), MakeEntity(), LC::Util::oral::detail::MakeExprTree(), MakeGroupSettings(), MakeHash(), LC::Util::oral::detail::MakeIndexedQueryHandler(), LC::Util::oral::detail::MakeIndexedQueryHandler(), MakeLazy(), MakeLazyF(), MakeNotification(), MakePrettySize(), MakePrettySizeShort(), MakeStringHash(), MakeTimeFromLong(), LC::Util::SvcAuth::VkAuthManager::ManageQueue(), LC::Util::SvcAuth::VkAuthManager::ManageQueue(), Map(), MapAs(), LC::Util::FlatToFoldersProxyModel::MapFromSource(), LC::Util::MergeModel::mapFromSource(), LC::Util::detail::MapImpl(), LC::Util::FlatToFoldersProxyModel::MapToSource(), LC::Util::MergeModel::mapToSource(), LC::Util::RegExp::Matches(), LC::Util::RegExp::Matches(), LC::Util::oral::detail::MatchesSchema(), LC::Util::oral::detail::MemberFromVariant(), LC::Util::NetworkDiskCache::metaData(), LC::Util::oral::Migrate(), LC::Util::FlatToFoldersProxyModel::mimeData(), LC::Util::MergeModel::mimeData(), LC::Util::MergeModel::mimeTypes(), LC::Util::FlowLayout::minimumSize(), MkWaiter(), LC::Util::oral::detail::MorphFieldName(), LC::Util::CategorySelector::moveEvent(), LC::Util::InstanceMonadPlus< Lazy_t< T >, std::enable_if_t< IsMonadPlus< T >()> >::Mplus(), LC::Util::InstanceMonadPlus< std::optional< T > >::Mplus(), LC::Util::InstanceMonadPlus< Lazy_t< T >, std::enable_if_t< IsMonadPlus< T >()> >::Mzero(), LC::Util::NotificationActionHandler::notificationActionTriggered(), Nub(), OpenXSD(), LC::operator co_await(), LC::operator co_await(), LC::Util::CtString< N, Char >::operator QStringView(), LC::Util::oral::detail::operator!=(), LC::operator""_qs(), LC::Util::oral::detail::operator&&(), LC::Util::BitFlags< T >::operator&=(), LC::Util::oral::Type2Name< ImplFactory, T, typename >::operator()(), LC::Util::oral::Type2Name< ImplFactory, References< Ptr > >::operator()(), LC::Util::detail::Dropper< F >::operator()(), LC::Util::MimeDetector::operator()(), LC::Util::UrlOperator::operator()(), LC::Util::UrlOperator::operator()(), LC::Util::UrlOperator::operator()(), LC::Util::UrlOperator::operator()(), LC::Util::QStringTrimmed::operator()(), LC::Util::QStringToLower::operator()(), LC::Util::Introspectable::operator()(), LC::Util::oral::FromVariant< T, typename >::operator()(), LC::Util::oral::detail::AdaptDelete< Seq >::operator()(), LC::Util::oral::ToVariant< T, typename >::operator()(), LC::Util::Visitor< FinallyFunc, Args >::operator()(), LC::Util::Caster< To >::operator()(), LC::Util::Upcaster< To * >::operator()(), LC::Util::oral::detail::AdaptInsert< Seq >::operator()(), LC::Util::oral::detail::AdaptInsert< Seq >::operator()(), LC::Util::QStringTrimmed::operator()(), LC::Util::QStringToLower::operator()(), LC::Util::QStringTrimmed::operator()(), LC::Util::QStringToLower::operator()(), LC::Util::CurryImpl< F, PrevArgs >::operator()(), LC::Util::CurryImpl< F, PrevArgs >::operator()(), LC::Util::CurryImpl< F, PrevArgs >::operator()(), LC::Util::Views::detail::ZipIterator< PairType, I1, I2 >::operator*(), operator*(), operator*(), operator*(), LC::Util::CtString< N, Char >::operator+(), LC::Util::CtString< N, Char >::operator+(), operator+(), operator+(), operator+(), operator+(), operator+(), LC::Util::CtString< N, Char >::operator+(), LC::Util::ModelIterator::operator++(), LC::Util::Views::detail::ZipIterator< PairType, I1, I2 >::operator++(), LC::Util::ModelIterator::operator+=(), LC::Util::oral::detail::AssignList< L, R >::operator,(), LC::Util::ModelIterator::operator-(), LC::Util::ModelIterator::operator--(), LC::Util::UrlOperator::operator-=(), LC::Util::ModelIterator::operator-=(), LC::Util::oral::detail::operator<(), LC::Util::CacheStrat::operator<(), LC::Util::detail::operator<<(), LC::Util::detail::operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), LC::Util::XDG::operator<<(), LC::Util::oral::detail::ExprTree< ExprType::LeafStaticPlaceholder, MemberPtrs< Ptr >, void >::operator=(), LC::Util::LazyInitializer< Source, Object >::operator=(), LC::Util::oral::References< Ptr >::operator=(), LC::Util::Task< R, Extensions >::operator=(), LC::Util::FDGuard::operator=(), LC::Util::oral::IndirectHolderBase< T, Concrete >::operator=(), LC::Util::Task< R, Extensions >::operator=(), LC::Util::oral::AsDataStream< T >::operator=(), LC::Util::StringPathTrie< V >::FindResult::operator==(), LC::Util::Tokenize::Iterator::operator==(), LC::Util::oral::detail::operator==(), LC::Util::Views::detail::ZipIterator< PairType, I1, I2 >::operator==(), LC::Util::oral::detail::operator>(), operator>>(), LC::Util::detail::operator>>(), LC::Util::detail::operator>>(), LC::Util::AssocCache< K, V, CS >::operator[](), LC::Util::UrlAccessor::operator[](), LC::Util::CtString< N, Char >::operator[](), LC::Util::CtString< N, Char >::operator[](), LC::Util::oral::detail::operator|(), LC::Util::oral::detail::operator|(), LC::Util::BitFlags< T >::operator|=(), LC::Util::oral::detail::operator||(), ORAL_ADAPT_STRUCT(), LC::Util::TagsCompleter::OverrideModel(), LC::Util::Tags::P(), LC::Util::PlotItem::paint(), LC::Util::FlattenFilterModel::parent(), LC::Util::FlatToFoldersProxyModel::parent(), LC::Util::MergeModel::parent(), ParseJson(), ParseJson(), PartitionEithers(), LC::Util::oral::detail::PKeyIndex(), LC::Util::oral::detail::PKeyIndexUnsafe(), LC::Util::NetworkDiskCache::prepare(), LC::Util::InstanceApplicative< Either< L, R > >::Pure(), Pure(), Pure(), LC::Util::InstanceApplicative< std::optional< T > >::Pure(), LC::Util::Worker::Quit(), LC::Util::CustomNetworkReply::readData(), LC::Util::ChannelDevice::readData(), LC::Util::SvcAuth::VkAuthManager::Reauth(), LC::Util::ModelItem::RefreshIndex(), LC::Util::ShortcutManager::RegisterAction(), LC::Util::ShortcutManager::RegisterActionInfo(), LC::Util::ShortcutManager::RegisterActions(), LC::Util::NetworkDiskCacheGC::RegisterDirectory(), LC::Util::ShortcutManager::RegisterGlobalShortcut(), LC::Util::BaseHookInterconnector::RegisterHookable(), LC::Util::ShortcutManager::RegisterShortcut(), LC::Util::AddressesModelManager::RegisterTypes(), LC::Util::FindNotification::Reject(), LC::Util::NetworkDiskCache::remove(), LC::Util::FlatItemsModelTypedBase< T >::RemoveItem(), LC::Util::MergeModel::RemoveModel(), LC::Util::AddressesModelManager::removeRequested(), LC::Util::IntSeq::RepeatS< T, E, C >::RepeatImpl(), LC::Util::oral::detail::ReplaceTupleElem(), LC::Util::oral::detail::ReplaceTupleElemImpl(), LC::Util::WidthIconProvider::requestPixmap(), Return(), Reversed(), LC::Util::EitherCont< LeftSig, RightSig >::Right(), LC::Util::Either< L, R >::Right(), LC::Util::Either< L, R >::Right(), LC::Util::Either< L, R >::Right(), RightOr(), RightOr(), LC::Util::FlatTreeItem::Row(), LC::Util::MergeModel::rowCount(), LC::Util::WorkerThreadBase::run(), RunQuery(), LC::Util::oral::detail::SelectWrapperCommon::RunQuery(), RunTextQuery(), LC::Util::CustomCookieJar::Save(), Save2MimeData(), SavePassword(), LC::Util::IDPool< T >::SaveState(), LC::Util::QueueManager::Schedule(), ScreenGeometry(), LC::Util::CategorySelector::SelectorTagsModel::SelectAll(), LC::Util::CategorySelector::SelectorTagsModel::SelectNone(), SerializeJson(), SerializeJsonToFile(), LC::Util::PlotItem::SetAlpha(), LC::Util::ResourceLoader::SetAttrFilters(), LC::Util::PlotItem::SetBackground(), LC::Util::PlotItem::SetBottomAxisEnabled(), LC::Util::PlotItem::SetBottomAxisTitle(), LC::Util::CategorySelector::SetButtonsMode(), LC::Util::ResourceLoader::SetCacheParams(), LC::Util::CategorySelector::SetCaption(), LC::Util::SslCertificateInfoWidget::SetCertificate(), LC::Util::PlotItem::SetColor(), LC::Util::ColorButton::SetColor(), LC::Util::TagsLineEdit::SetCompleter(), LC::Util::CustomNetworkReply::SetContent(), LC::Util::CustomNetworkReply::SetContent(), LC::Util::CustomNetworkReply::SetContentType(), LC::Util::FancyTrayIcon::SetContextMenu(), LC::Util::SvcAuth::VkCaptchaDialog::SetContextName(), LC::Util::CustomCookieJar::setCookiesFromUrl(), LC::Util::CategorySelector::SelectorTagsModel::setData(), LC::Util::CustomCookieJar::SetEnabled(), LC::Util::ClearLineEditAddon::SetEscClearsEdit(), LC::Util::FindNotification::SetEscCloses(), LC::Util::SelectableBrowser::SetEverythingElseVisible(), LC::Util::CustomCookieJar::SetExactDomainMatch(), LC::Util::CustomCookieJar::SetFilterTrackingCookies(), LC::Util::FontChooserWidget::SetFont(), LC::Util::FlowLayout::setGeometry(), LC::Util::PlotItem::SetGridLinesColor(), LC::Util::CategorySelector::SelectorTagsModel::SetHeader(), LC::Util::MergeModel::SetHeaders(), LC::Util::SelectableBrowser::SetHtml(), LC::Util::FancyTrayIcon::SetIcon(), LC::Util::SettableIconProvider::SetIcon(), LC::Util::IDPool< T >::SetID(), LC::Util::FlatItemsModelTypedBase< T >::SetItem(), LC::Util::UnhideListViewBase::SetItems(), LC::Util::FlatItemsModelTypedBase< T >::SetItems(), SetJobHolderProgress(), SetJobHolderProgress(), LC::Util::PlotItem::SetLeftAxisEnabled(), LC::Util::PlotItem::SetLeftAxisTitle(), LC::Util::PlotItem::SetMaxXValue(), LC::Util::PlotItem::SetMaxYValue(), LC::Util::PlotItem::SetMinXValue(), LC::Util::PlotItem::SetMinYValue(), LC::Util::TagsCompleter::SetModel(), LC::Util::PlotItem::SetMultipoints(), LC::Util::ResourceLoader::SetNameFilters(), LC::Util::SelectableBrowser::SetNavBarVisible(), LC::Util::WorkerThreadBase::SetPaused(), LC::Util::PlotItem::SetPlotTitle(), LC::Util::PlotItem::SetPoints(), LC::Util::CategorySelector::SetPossibleSelections(), LC::Util::ScreensaverProhibitor::SetProhibited(), LC::Util::ScreensaverProhibitor::SetProhibitionsEnabled(), LC::Util::DefaultHookProxy::SetReturnValue(), LC::Util::CategorySelector::SetSelections(), LC::Util::CategorySelector::SetSelectionsFromString(), LC::Util::CategorySelector::SetSeparator(), LC::Util::TagsLineEdit::SetSeparator(), LC::Util::TagsFilterModel::SetSeparator(), LC::Util::ShortcutManager::SetShortcut(), LC::Util::SvcAuth::VkAuthManager::SetSilentMode(), LC::Util::FlattenFilterModel::SetSource(), LC::Util::FlatToFoldersProxyModel::SetSourceModel(), LC::Util::FancyTrayIcon::SetStatus(), LC::Util::FindNotification::SetSuccessful(), LC::Util::DndActionsMixin< Model >::setSupportedDragActions(), LC::Util::DndActionsMixin< Model >::setSupportedDropActions(), LC::Util::TagsLineEdit::setTags(), LC::Util::TagsFilterModel::SetTagsInclusionMode(), LC::Util::TagsFilterModel::SetTagsMode(), LC::Util::ToolTipItem::SetText(), LC::Util::PlotItem::SetTextColor(), LC::Util::FancyTrayIcon::SetToolTip(), SetupFullscreenView(), SetupStateSaver(), SetupStateSaver(), LC::Util::DefaultHookProxy::SetValue(), LC::Util::ResourceLoader::SetVerbose(), LC::Util::FancyTrayIcon::SetVisible(), LC::Util::PlotItem::SetYGridEnabled(), LC::Util::PlotItem::SetYMinorGridEnabled(), ShowPixmapLabel(), LC::Util::ToolTipItem::ShowToolTip(), LC::Util::XDG::SingleValue(), Sorted(), SplitInto(), LC::Util::TagsCompleter::splitPath(), SslError2TreeItem(), LC::Util::Timer::Stamp(), LC::Util::Timer::Stamp(), LC::Util::UnhoverDeleteMixin::Start(), LC::Util::ConsistencyChecker::StartCheck(), Stlize(), StlizeKeys(), StringBufSize(), LC::Util::Tags::Style(), LC::Util::Tags::TableGrid(), LC::Util::FlowLayout::takeAt(), Throttled(), TintColors(), TintPalette(), LC::Util::Tags::Title(), LC::Util::oral::AsDataStream< T >::ToBaseType(), ToByteArray(), ToByteArray(), LC::Util::NetworkResult::ToEither(), ToFlat(), LC::Util::Tag::ToHtml(), ToJson(), TokenizeFwd(), TokenizeRev(), LC::Util::XDG::ToPaths(), LC::Util::oral::detail::AssignList< L, R >::ToSql(), LC::Util::oral::detail::ExprTree< Type, L, R >::ToSql(), LC::Util::oral::detail::ExprTree< ExprType::LeafData, T, void >::ToSql(), ToString(), LC::Util::CacheStrat::LRU::Touch(), LC::Util::oral::detail::ToVariantF(), LC::Util::oral::detail::Typecheck(), LC::Util::Tags::Ul(), Unreachable(), UnsafeFromView(), LC::Util::XDG::ItemsFinder::Update(), LC::Util::FancyTrayIconFallback::UpdateIcon(), LC::Util::FancyTrayIconFreedesktop::UpdateIcon(), LC::Util::NetworkDiskCache::updateMetaData(), LC::Util::SvcAuth::VkAuthManager::UpdateScope(), LC::Util::FancyTrayIconFreedesktop::UpdateStatus(), LC::Util::TagsCompletionModel::UpdateTags(), LC::Util::FancyTrayIconFreedesktop::UpdateTooltip(), Visit(), Visit(), Visit(), Visit(), Visit(), WatchQmlErrors(), LC::Util::Tag::WithAttr(), WithHandler(), LC::Util::Tag::WithText(), LC::Util::ChannelDevice::writeData(), LC::Util::Views::Zip(), Zip(), ZipWith(), and ZipWith().

+ Here is the call graph for this function:

◆ FindInSystemPath()

UTIL_SYS_API QString LC::Util::FindInSystemPath ( const QString & name,
const QStringList & paths,
const std::function< bool(QFileInfo)> & filter = {} )

Searches for a file in system paths according to a filter.

This function searches for a file named name in system paths passed in paths and returns the full path for the first file that matches filter, or an empty string if nothing is found.

paths are most possibly obtained via GetSystemPaths(), but an arbitrary set of paths is fine too.

Parameters
[in]nameThe name of the file to search for.
[in]pathsThe paths to search in.
[in]filterThe filter function for the candidates.
Returns
The full path to the first found file or an empty string.

Definition at line 79 of file paths.cpp.

References Filter().

+ Here is the call graph for this function:

◆ First()

template<typename F >
auto LC::Util::First ( F && f)

Definition at line 223 of file prelude.h.

◆ FirstMatching()

template<typename F , typename G , typename Def , typename Head , typename... Args>
auto LC::Util::FirstMatching ( F f,
G g,
Def def,
Util::Typelist< Head, Args... >  )

Definition at line 143 of file typelist.h.

References Filter(), and FirstMatching().

Referenced by FirstMatching().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FixupTrayIcon()

UTIL_GUI_API QIcon LC::Util::FixupTrayIcon ( const QIcon & icon)

Definition at line 142 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ Fmap()

template<typename T , typename F , typename = std::enable_if_t<IsFunctor<T> ()>>
FmapResult_t< T, F > LC::Util::Fmap ( const T & functor,
const F & function )

Apply the function f to the elements in functor.

This function forwards the function f to the instance of the Functor class (namely, InstanceFunctor<T>) for the type T to do the actual function application.

Parameters
[in]functorThe functor whose values are subject to function.
[in]functionThe function that should be applied to the values in the functor.
Returns
A functor of type FmapResult_t<T, F> where each element is the result of applying the function to the corresponding element in the source functor.
Template Parameters
TThe type of the functor.
FThe type of the function to apply to the elements inside the functor.
See also
InstanceFunctor

Definition at line 128 of file functor.h.

References LC::Util::InstanceFunctor< T >::Apply(), and Filter().

Referenced by operator*(), and operator*().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FormatName()

UTIL_GUI_API QString LC::Util::FormatName ( const QString & name)

HTML-formats the name to let the user know it is not a part of the fixed dialog text.

This function is useful to format an account name, a link title and similar entities in contexts like a dialog, a label or a tooltip. Using this function ensures this formatting is done in an uniform style across the whole GUI.

Parameters
[in]nameThe source string.
Returns
HTML-formatted name.

Definition at line 105 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ GetAsBase64Src()

UTIL_API QString LC::Util::GetAsBase64Src ( const QImage & image)

Returns the given image in a Base64-encoded form.

The return result is suitable for inserting into <img>'s src attribute as is.

Parameters
[in]imageThe image to represent as Base64-encoded form.
Returns
The source string.

Definition at line 30 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ GetDataFilters()

UTIL_XPC_API QList< QObject * > LC::Util::GetDataFilters ( const QVariant & data,
IEntityManager * manager )

Returns the data filter plugins that can handle data.

This function queries all available data filters plugins if they can handle data and returns the list of object instances that can handle it. The object instances are guaranteed to implement the IDataFilter interface as well as IEntityHandler interface.

The manager is used to obtain the list of plugins. It can be obtained from the ICoreProxy_ptr object that is passed to your plugin's Init() function.

Parameters
[in]dataThe data to query.
[in]managerThe manager used to get the plugins.
Returns
The list of data filters that can handle data.

Definition at line 71 of file util.cpp.

References Filter(), and MakeEntity().

+ Here is the call graph for this function:

◆ GetDefaultTagsSeparator()

UTIL_TAGS_API QString LC::Util::GetDefaultTagsSeparator ( )

Definition at line 14 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ GetErrorString()

◆ GetInternetLocaleName()

UTIL_API QString LC::Util::GetInternetLocaleName ( const QLocale & locale)

Definition at line 182 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ GetLanguage()

UTIL_API QString LC::Util::GetLanguage ( )

Returns the current language name.

This function works as GetLocaleName() except it doesn't return (and doesn't query for) country name.

Returns
Current language name.
See also
GetLocaleName()

Definition at line 192 of file util.cpp.

References GetLocaleName().

+ Here is the call graph for this function:

◆ GetLocaleName()

UTIL_API QString LC::Util::GetLocaleName ( )

Returns the current locale name, like en_US.

First, this function checks the locale value stored in "Language" key of settings object with organizationName() and applicationName(). If it's equal to "system", this function queries the LANG environment variable, and if it is empty or in invalid format (not like en_US), it takes the value of QLocale::system().name().

Then, if the resulting name the name of the language only, GetLocaleName() tries to find any countries for that language. If any countries are found, the code of the first found country is appended, else "_00" is appended.

Returns
Current locale name.
See also
GetLanguage()

Definition at line 151 of file util.cpp.

References Filter().

Referenced by GetLanguage(), and InstallTranslator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPassword() [1/2]

UTIL_XPC_API void LC::Util::GetPassword ( const QString & key,
const QString & diaText,
const ICoreProxy_ptr & proxy,
const EitherCont< void(), void(QString)> & cont,
QObject * depender,
bool useStored )

Definition at line 74 of file passutils.cpp.

References Filter().

+ Here is the call graph for this function:

◆ GetPassword() [2/2]

UTIL_XPC_API QString LC::Util::GetPassword ( const QString & keyName,
const QString & dialogText,
const ICoreProxy_ptr & proxy,
bool useStore = true )

Returns password for the key, possibly asking the user.

This function returns password for the given keyName. The password is typically stored in a storage plugin like SecMan.

If the password isn't found in any password stores (or there are no password stores) or useStore is set to false, this function asks the user for the password instead using the dialogText for the dialog and returns the user input instead. If user has canceled the dialog it returns an null string. Otherwise, if the user has entered some text this function automatically stores the password under the keyName.

Note
Despite the name this function can be used to retrieve arbitrary string data saved via SavePassword().
Parameters
[in]keyNameThe name of the key uniquely identifying the password.
[in]dialogTextThe text of the dialog to present to the user if the password isn't found or useStore is false.
[in]proxyThe core proxy used to communicate with other plugins.
[in]useStoreWhether stored password should be used at all. Calling code may explicitly set this to false if the saved password is known to be invalid, for instance.
Returns
The password or a null string.
See also
SavePassword()

Definition at line 55 of file passutils.cpp.

References Filter(), and SavePassword().

+ Here is the call graph for this function:

◆ GetPathCandidates()

UTIL_SYS_API QStringList LC::Util::GetPathCandidates ( SysPath path,
QString subfolder )

Returns possible full paths for the path and subfolder.

This function returns a list of paths formed as the given root path identified by path plus the subfolder in it. The paths in the returned list aren't checked for existence.

For example, on Linux

const auto& paths = GetPathCandidates (SysPath::Share, "flags");
QStringList GetPathCandidates(SysPath path, QString suffix)
Returns possible full paths for the path and subfolder.
Definition paths.cpp:24
@ Share
Directory with shared data files.

will return { "/usr/share/leechcraft/flags", "/usr/local/share/leechcraft/flags" }.

The subfolder can actually be a relative path, like flags/countries, not just a single subfolder name.

This function hardly needs to be called from user code, consider using GetSysPath() instead.

Parameters
[in]pathThe root path.
[in]subfolderThe subfolder inside the root path.
Returns
The list of possible paths to the subfolder in the root path identified by path.
See also
GetSysPath()

Definition at line 24 of file paths.cpp.

References Filter(), GetPathCandidates(), QML, and Share.

Referenced by LC::Util::UnhideListViewBase::UnhideListViewBase(), GetPathCandidates(), and GetSysPath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPersistentData()

UTIL_XPC_API QVariant LC::Util::GetPersistentData ( const QByteArray & key,
const ICoreProxy_ptr & proxy )

Returns persistent data stored under given key.

The persistent data itself is stored in plugins implementing the IPersistentStoragePlugin interface. This function uses the passed proxy to get the list of those.

If no data is found under the given key, a null QVariant is returned.

Parameters
[in]keyThe key to look for.
[in]proxyThe ICoreProxy object for getting the list of persistent storage plugins.
Returns
The data stored under the given key as a QVariant, or a null QVariant of no data is found (and, particularly, if no storage plugins are available).
See also
IPersistentStoragePlugin

Definition at line 125 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ GetScreenWithFallback()

UTIL_GUI_API QScreen * LC::Util::GetScreenWithFallback ( const QPoint & p)

Definition at line 55 of file geometry.cpp.

References Filter().

Referenced by AvailableGeometry(), and ScreenGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetServiceUrl()

UTIL_NETWORK_API QString LC::Util::GetServiceUrl ( const ServiceInfo & info,
const QString & path )

Definition at line 40 of file lcserviceoverride.cpp.

References Filter().

+ Here is the call graph for this function:

◆ GetSpaceInfo()

UTIL_SYS_API SpaceInfo LC::Util::GetSpaceInfo ( const QString & path)

Returns the disk space info of the partition containing path.

Parameters
[in]pathThe path on the partition for which the space information should be returned.
Returns
The information about the disk space on the partition containing path.

Definition at line 154 of file paths.cpp.

References Filter().

+ Here is the call graph for this function:

◆ GetStdANFields()

UTIL_XPC_API QList< ANFieldData > LC::Util::GetStdANFields ( const QString & category)

◆ GetSummarySelectedRows()

UTIL_API QList< QModelIndex > LC::Util::GetSummarySelectedRows ( QObject * sender)

Definition at line 197 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ GetSysPath()

UTIL_SYS_API QString LC::Util::GetSysPath ( SysPath path,
const QString & subfolder,
const QString & filename )

Returns path to the file in the given root path and subfolder.

This function returns path to a file named filename and located in the path specified by path + subfolder. It actually checks whether the file exists and if it doesn't, returns a null string instead.

If LeechCraft is running on a system where multiple paths correspond to a single path, they are checked from more user-accessible to less user-accessible. For example, SysPath::Share corresponds to /usr/local/share/leechcraft and then /usr/share/leechcraft.

The subfolder can actually be a relative path, like flags/countries, not just a single subfolder name.

Refer to GetPathCandidates() for more information.

Parameters
[in]pathThe identifier of the root path.
[in]subfolderThe subfolder inside the path.
[in]filenameThe filename inside the path + subfolder.
Returns
Path to the filename located in path + subfolder, or an empty string if there is no such file.
See also
GetPathCandidates()
GetSysPathUrl()

Definition at line 56 of file paths.cpp.

References Filter(), and GetPathCandidates().

Referenced by LC::Util::UnhideListViewBase::UnhideListViewBase(), and GetSysPathUrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSysPathUrl()

UTIL_SYS_API QUrl LC::Util::GetSysPathUrl ( SysPath path,
const QString & subfolder,
const QString & filename )

Returns path to the file in the given root path and subfolder.

This function behaves exactly like GetSysPath(), but it returns the path as QUrl via the QUrl::fromLocalFile, so it is suitable, for example, for QML views.

Parameters
[in]pathThe identifier of the root path.
[in]subfolderThe subfolder inside the path.
[in]filenameThe filename inside the path + subfolder.
Returns
Path to the filename located in path + subfolder, or an empty URL if there is no such file.
See also
GetSysPath()

Definition at line 69 of file paths.cpp.

References Filter(), and GetSysPath().

+ Here is the call graph for this function:

◆ GetSystemPaths()

UTIL_SYS_API QStringList LC::Util::GetSystemPaths ( )

Returns the components of the system PATH variable.

This function gets the PATH variable from the environment, parses it and returns the list of the components to the caller.

Returns
System PATH components.
See also
FindInSystemPath()

Definition at line 74 of file paths.cpp.

References Filter().

+ Here is the call graph for this function:

◆ GetTaskResult()

template<typename T , template< typename > typename... Extensions>
T LC::Util::GetTaskResult ( Task< T, Extensions... > task)

Definition at line 18 of file getresult.h.

References Filter().

+ Here is the call graph for this function:

◆ GetTemporaryName()

UTIL_SYS_API QString LC::Util::GetTemporaryName ( const QString & pattern = {})

Returns a temporary filename.

This function returns a name of a temporary file that could be created, not creating the file itself.

Parameters
[in]patternPattern of the filename.
Returns
The filename.

Definition at line 143 of file paths.cpp.

References Filter().

Referenced by DownloadAsTemporary().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetUserDir()

UTIL_SYS_API QDir LC::Util::GetUserDir ( UserDir dir,
const QString & subpath )

Definition at line 97 of file paths.cpp.

References Cache, Filter(), and LC.

+ Here is the call graph for this function:

◆ GSL()

template<typename AF , typename AV >
GSLResult_t< AF, AV > LC::Util::GSL ( const AF & af,
const AV & av )

Definition at line 37 of file applicative.h.

References Filter().

Referenced by operator*().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleNetworkReply()

template<typename F >
void LC::Util::HandleNetworkReply ( QObject * context,
QNetworkReply * reply,
F f )

Definition at line 21 of file handlenetworkreply.h.

References Filter().

+ Here is the call graph for this function:

◆ HandleReply()

template<typename... Args>
auto LC::Util::HandleReply ( QNetworkReply * reply,
QObject * context )

Definition at line 59 of file handlenetworkreply.h.

References Filter().

+ Here is the call graph for this function:

◆ HandleReplySeq()

template<typename... Args>
auto LC::Util::HandleReplySeq ( QNetworkReply * reply,
QObject * context )

Definition at line 105 of file handlenetworkreply.h.

References Filter().

+ Here is the call graph for this function:

◆ HasSupportedImageExtension()

UTIL_SYS_API bool LC::Util::HasSupportedImageExtension ( const QString & filename)

Checks if the given filename has a known image extension.

This function checks if the filename has an extension matching any image format known to QImageWriter.

Parameters
[in]filenameThe name of the file, either relative or absolute.
Returns
Whether the filename has a known image suffix.

Definition at line 15 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ HasType()

template<typename Type , template< typename... > class List, typename... Args>
constexpr bool LC::Util::HasType ( List< Args... > )
constexpr

Definition at line 95 of file typelist.h.

◆ IgnoreLeft()

template<typename L , typename R >
LC::Util::IgnoreLeft ( Either< L, R > ) -> IgnoreLeft< L, R >

◆ Init()

template<template< typename... > class List, typename... Args>
constexpr auto LC::Util::Init ( List< Args... > )
constexpr

Definition at line 89 of file typelist.h.

References Filter(), and LC::Util::detail::InitImpl().

Referenced by LC::Util::detail::IsCompatibleMonadImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitJobHolderRow()

UTIL_XPC_API void LC::Util::InitJobHolderRow ( const QList< QStandardItem * > & row)

Definition at line 162 of file util.cpp.

References Filter(), LC::JobProgress, LC::ProcessProgress, LC::ProcessState, LC::RoleJobHolderRow, and LC::ProcessStateInfo::Running.

+ Here is the call graph for this function:

◆ InObjectThread()

template<typename F >
void LC::Util::InObjectThread ( QObject & object,
F && function )

Definition at line 16 of file util.h.

References Filter().

+ Here is the call graph for this function:

◆ InParallel() [1/3]

template<typename Input , typename F >
auto LC::Util::InParallel ( QVector< Input > && inputs,
F && mkTask ) -> detail::ParallelTraits<F, Input>::ResultType_t

Definition at line 38 of file inparallel.h.

References Filter().

+ Here is the call graph for this function:

◆ InParallel() [2/3]

template<typename T , template< typename > typename... Exts>
Task< QVector< T >, Exts... > LC::Util::InParallel ( QVector< Task< T, Exts... > > tasks)

Definition at line 17 of file inparallel.h.

References Filter().

+ Here is the call graph for this function:

◆ InParallel() [3/3]

template<typename... Ts, template< typename > typename... Exts>
Task< std::tuple< Ts... >, Exts... > LC::Util::InParallel ( Task< Ts, Exts... >... tasks)

Definition at line 56 of file inparallel.h.

References Filter().

+ Here is the call graph for this function:

◆ InParallelSemigroup()

template<typename Input , typename F >
auto LC::Util::InParallelSemigroup ( QVector< Input > && inputs,
F && mkTask ) -> detail::ParallelTraits<F, Input>::TaskType_t

Definition at line 47 of file inparallel.h.

References Filter().

+ Here is the call graph for this function:

◆ InstallFontSizeChanger()

UTIL_GUI_API void LC::Util::InstallFontSizeChanger ( QWidget & widget,
const FontSizeChangerParams & params )

Definition at line 35 of file fontsizescrollchanger.cpp.

References Filter(), and Visit().

+ Here is the call graph for this function:

◆ InstallTranslator()

UTIL_API QTranslator * LC::Util::InstallTranslator ( const QString & base,
const QString & prefix = LCLowercase,
const QString & appname = LCLowercase )

Loads and installs a translator.

Attempts to load and install a translator for the current locale. The name is formed like this: 'prefix_' + base + '_' + locale If base is an empty string, the second _ isn't appended.

First resources are searched (:/), then APPDIR/translations on Windows and /usr/[local/]share/appname/translations on Unix.

Parameters
[in]baseBase name of the translation file.
[in]prefixThe optional prefix of the translation (useful if it's not LC's one).
[in]appnameBase name of the application.
Returns
The translator object if loading is successful, NULL otherwise.

Definition at line 131 of file util.cpp.

References Filter(), GetLocaleName(), and LoadTranslator().

+ Here is the call graph for this function:

◆ InvokeOn()

template<typename T , typename... Args>
auto LC::Util::InvokeOn ( T && t,
Args &&... args )

Definition at line 103 of file visitor.h.

References Filter().

+ Here is the call graph for this function:

◆ IsFunctor()

template<typename T >
constexpr bool LC::Util::IsFunctor ( )
constexpr

Checks whether the given type has a Functor instance for it.

Returns
Whether type T implements the Functor class.
Template Parameters
TThe type to check.

Definition at line 92 of file functor.h.

◆ IsMonadPlus()

template<typename T >
constexpr bool LC::Util::IsMonadPlus ( )
constexpr

Definition at line 40 of file monadplus.h.

◆ IsOSXLoadFromBundle()

UTIL_SYS_API bool LC::Util::IsOSXLoadFromBundle ( )

Definition at line 27 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ Join() [1/2]

constexpr auto LC::Util::Join ( auto && )
constexprnoexcept

Definition at line 16 of file ctstringutils.h.

Referenced by LC::Util::oral::detail::ExtractConstraintFields(), LC::Util::oral::detail::ExtractConstraintFields(), and JoinTup().

+ Here is the caller graph for this function:

◆ Join() [2/2]

constexpr auto LC::Util::Join ( auto && sep,
auto && first,
auto &&... strings )
constexprnoexcept

Definition at line 21 of file ctstringutils.h.

References Filter().

+ Here is the call graph for this function:

◆ JoinTup()

constexpr auto LC::Util::JoinTup ( auto && stringsTuple,
auto && sep )
constexprnoexcept

Definition at line 29 of file ctstringutils.h.

References Filter(), and Join().

Referenced by LC::Util::oral::detail::AdaptCreateTableNamed(), LC::Util::oral::detail::PostgreSQL::ImplFactory::GetInsertSuffix(), and LC::Util::oral::Migrate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadTranslator()

UTIL_API QTranslator * LC::Util::LoadTranslator ( const QString & baseName,
const QString & localeName,
const QString & prefix,
const QString & appName )

Definition at line 91 of file util.cpp.

References Filter().

Referenced by InstallTranslator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeAN()

UTIL_XPC_API Entity LC::Util::MakeAN ( const QString & header,
const QString & text,
Priority priority,
const QString & senderID,
const QString & cat,
const QString & type,
const QString & id,
const QStringList & visualPath,
int delta = 1,
int count = 0,
const QString & fullText = QString(),
const QString & extendedText = QString() )

Creates an Advanced Notifications-enabled notify entity.

Returns an entity with the given header, text and a bunch of other parameters that can be handled by Advanced Notifications.

The returned entity will also be handled by a visual notifications plugin if AN is not present. To avoid this set the MIME type of the result to x-leechcraft/notification+advanced.

Refer to the hand-written documentation for more information about using Advanced Notifications.

Parameters
[in]headerThe header of the notification. This field will also be used if AN is not present.
[in]textThe text of the notification. This field will also be used if AN is not present.
[in]priorityThe priority of this notification.
[in]senderIDThe ID of the plugin sending this notification.
[in]catThe category of this notification (one of Cat constants in interfaces/an/constants.h).
[in]typeThe type of this notification (one of Type constants in interfaces/an/constants.h).
[in]idThe ID of this notification, used to group consecutive notifications about similar events like incoming message from the same IM contact.
[in]visualPathThe list of names for a menu-like structure wishing to show this notification.
[in]deltaThe change of count of events with this id, or 0 to use count.
[in]countThe total count of events with this id, used if delta is 0.
[in]fullTextThe full text of this notification. If null, the text parameter is used.
[in]extendedTextThe extended text of this notification. If null, the text parameter is used.
See also
MakeANCancel()
MakeANRule()

Definition at line 23 of file util.cpp.

References LC::AN::EF::Count, LC::AN::EF::DeltaCount, LC::AN::EF::EventCategory, LC::AN::EF::EventID, LC::AN::EF::EventType, LC::AN::EF::ExtendedText, Filter(), LC::AN::EF::FullText, MakeNotification(), LC::AN::EF::SenderID, and LC::AN::EF::VisualPath.

+ Here is the call graph for this function:

◆ MakeANCancel() [1/2]

UTIL_XPC_API Entity LC::Util::MakeANCancel ( const Entity & event)

Makes an event for canceling another Advanced Notifications event.

Creates an Entity that cancels a previously generated Advanced Notifications event. The returned entity can be then emitted to notify plugins that the given event has been canceled.

Parameters
[in]eventThe event to cancel.
Returns
The Entity canceling the given event.

Definition at line 107 of file util.cpp.

References LC::AN::CatEventCancel, LC::AN::EF::EventCategory, LC::AN::EF::EventID, Filter(), LC::Info, MakeNotification(), and LC::AN::EF::SenderID.

+ Here is the call graph for this function:

◆ MakeANCancel() [2/2]

UTIL_XPC_API Entity LC::Util::MakeANCancel ( const QString & senderId,
const QString & eventId )

Makes an event for canceling another Advanced Notifications event.

Creates an Entity that cancels a previously generated Advanced Notifications event. The returned entity can be then emitted to notify plugins that the given event has been canceled.

This function doesn't take a previously created entity as the other overload does. Instead, it plainly creates the required entity from the given senderId and eventId. They should match those of the event in question.

Parameters
[in]senderIdThe ID of the sender of the event that is to be canceled.
[in]eventIdThe ID of the event that is to be canceled.
Returns
The Entity canceling the given event.

Definition at line 116 of file util.cpp.

References LC::AN::CatEventCancel, LC::AN::EF::EventCategory, LC::AN::EF::EventID, Filter(), LC::Info, MakeNotification(), and LC::AN::EF::SenderID.

+ Here is the call graph for this function:

◆ MakeANRule()

UTIL_XPC_API Entity LC::Util::MakeANRule ( const QString & title,
const QString & senderID,
const QString & category,
const QStringList & types,
AN::NotifyFlags flags = AN::NotifyNone,
bool openConfiguration = false,
const QList< QPair< QString, ANFieldValue > > & fields = {} )

Creates an Entity defining an Advanced Notifications rule.

Returns an entity describing a notifications rule triggering under various conditions, defined by the parameters of this function.

Parameters
[in]titleThe human-readable title of the rule.
[in]senderIDThe plugin ID of the sender (must not be empty).
[in]categoryThe category of the event (must not be empty).
[in]typesThe types of events in the given category. If this list is empty, every event type matches.
[in]flagsThe flags describing the notification behavior for for this rule
[in]openConfigurationWhether the configuration widget for the just created rule should be opened automatically.
[in]fieldsThe list of pairs of a field ID (as in ANFieldData::ID_) and corresponding field value as ANFieldValue.
Returns
The Entity object describing a notifications rule for the passed parameters.
See also
MakeAN()

Definition at line 44 of file util.cpp.

References LC::Entity::Additional_, LC::AN::EF::EventCategory, LC::AN::EF::EventID, LC::AN::EF::EventType, Filter(), LC::AN::EF::IsSingleShot, MakeNotification(), LC::AN::NotifyAudio, LC::AN::EF::NotifyAudio, LC::AN::NotifyPersistent, LC::AN::EF::NotifyPersistent, LC::AN::NotifySingleShot, LC::AN::NotifyTransient, LC::AN::EF::NotifyTransient, LC::AN::EF::OpenConfiguration, and LC::AN::EF::SenderID.

+ Here is the call graph for this function:

◆ MakeCertificateViewerDialog()

UTIL_GUI_API QDialog * LC::Util::MakeCertificateViewerDialog ( const QSslCertificate & cert,
QWidget * parent )

Definition at line 71 of file sslcertificateinfowidget.cpp.

References Filter().

+ Here is the call graph for this function:

◆ MakeDatabase()

QSqlDatabase LC::Util::MakeDatabase ( const QString & name = ":memory:")

Definition at line 73 of file common.h.

References MakeDatabase(), and RunTextQuery().

Referenced by MakeDatabase(), and ORAL_ADAPT_STRUCT().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeEndGroupScopeGuard()

auto LC::Util::MakeEndGroupScopeGuard ( QSettings & settings)
inline

Creates a scope guard that ends the current group on settings.

Parameters
[in]settingsThe QSettings object whose current group should be ended on scope exit.
Returns
The scope guard calling QSettings::endGroup() on the settings object on scope exit.
Note
BeginGroup() is preferable for most use cases.
See also
BeginGroup()

Definition at line 27 of file scopeguards.h.

References Filter(), and MakeScopeGuard().

+ Here is the call graph for this function:

◆ MakeEntity() [1/2]

UTIL_XPC_API Entity LC::Util::MakeEntity ( const QVariant & entity,
const QString & location,
LC::TaskParameters tp,
const QString & mime = QString() )

An utility function to make a Entity.

Creates a Entity that wraps the given entity from given location with parameterrs identified by tp and given mime type (which is null by default).

This function is provided for convenience and is equivalent to manually filling the Entity.

Parameters
[in]entityThe Entity_ field of the Entity.
[in]locationThe Location_ field of the Entity.
[in]tpThe Params_ field of the Entity.
[in]mimeThe Mime_ field of the Entity.
Returns
The resulting Entity.
See also
Entity, MakeNotification()

◆ MakeEntity() [2/2]

Entity LC::Util::MakeEntity ( const QVariant & entity,
const QString & location,
TaskParameters tp,
const QString & mime )

Definition at line 82 of file util.cpp.

References LC::Entity::Entity_, and Filter().

Referenced by LC::Util::StdDataFilterMenuCreator::StdDataFilterMenuCreator(), DownloadAsTemporary(), LC::Util::XDG::Item::Execute(), GetDataFilters(), MakeNotification(), and LC::Util::ShortcutManager::RegisterGlobalShortcut().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeGroupSettings()

UTIL_XSD_API std::shared_ptr< QSettings > LC::Util::MakeGroupSettings ( const QString & suffix,
const QString & groupName )

Definition at line 57 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ MakeHash()

template<typename K , typename V , auto Hasher = DefaultHash<K>>
consteval auto LC::Util::MakeHash ( auto &&... commands)

Definition at line 58 of file statichash.h.

References Filter().

+ Here is the call graph for this function:

◆ MakeLambdaEventFilter()

template<QEvent::Type Type = QEvent::None, typename F >
auto LC::Util::MakeLambdaEventFilter ( F && f,
QObject & parent )

Definition at line 51 of file lambdaeventfilter.h.

◆ MakeLazy()

template<typename T >
Lazy_t< T > LC::Util::MakeLazy ( const T & t)

Definition at line 22 of file lazy.h.

References Filter().

+ Here is the call graph for this function:

◆ MakeLazyF()

template<typename R , typename F >
Lazy_t< R > LC::Util::MakeLazyF ( const F & l)

Definition at line 28 of file lazy.h.

References Filter().

+ Here is the call graph for this function:

◆ MakeNotification()

UTIL_XPC_API Entity LC::Util::MakeNotification ( const QString & header,
const QString & text,
Priority priority )

An utility function to make a Entity with notification.

Creates a Entity that holds information about user-visible notification. These notifications have "x-leechcraft/notification" MIME.

You can further customize the returned Entity to suit your exact needs. See the documentation for Entity about such entities.

Parameters
[in]headerThe header of the notification.
[in]textThe text of the notification.
[in]priorityThe priority level of the notification.
Returns
The Entity containing the corresponding notification.
See also
Entity, MakeEntity()

Definition at line 95 of file util.cpp.

References LC::Entity::Additional_, LC::AutoAccept, Filter(), MakeEntity(), and LC::OnlyHandle.

Referenced by MakeAN(), MakeANCancel(), MakeANCancel(), MakeANRule(), and LC::Util::SvcAuth::VkAuthManager::Reauth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakePrettySize()

UTIL_API QString LC::Util::MakePrettySize ( qint64 sourceSize)

Makes a formatted size from number.

Converts, for example, 1048576 to 1.0 MB.

Parameters
[in]sourceSizeSize in bytes.
Returns
Formatted string.
See also
MakeTimeFromLong()
MakePrettySizeShort()

Definition at line 53 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ MakePrettySizeShort()

UTIL_API QString LC::Util::MakePrettySizeShort ( qint64 size)

Converts a bytes count to a string representation with appropriately chosen units.

Converts, for example, 1048576 to 1.0 M.

As opposed to MakePrettySize(), this function tries to keep the returned string short.

Parameters
[in]sizeSize in bytes.
Returns
Formatted string in relevant units.
See also
MakeTimeFromLong()
MakePrettySize()

Definition at line 66 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ MakeScopeGuard()

template<typename F >
detail::ScopeGuard< F > LC::Util::MakeScopeGuard ( const F & f)

Returns an object performing passed function on scope exit.

The returned object performs the passed function f upon destruction (and, thus, on scope exit).

The object is not copyable and not movable, and otherwise is implementation-defined.

Typical usage:

QSettings settings { "OrgNameName", "AppName" };
settings.beginGroup ();
const auto guard = Util::MakeScopeGuard ([&settings] { settings.endGroup (); });
// ...
detail::ScopeGuard< F > MakeScopeGuard(const F &f)
Returns an object performing passed function on scope exit.
Definition util.h:155
Parameters
[in]fThe function to execute on scope exit. Should be a callable without any arguments.
Returns
An object executing f on destruction.

Definition at line 155 of file util.h.

References MakeScopeGuard().

Referenced by BeginGroup(), DownloadAsTemporary(), MakeEndGroupScopeGuard(), MakeScopeGuard(), LC::Util::SvcAuth::VkAuthManager::ManageQueue(), LC::Util::SvcAuth::VkAuthManager::ManageQueue(), LC::Util::Visitor< FinallyFunc, Args >::operator()(), LC::Util::NetworkDiskCacheGC::RegisterDirectory(), and LC::Util::CustomCookieJar::setCookiesFromUrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeStringHash()

template<typename V >
consteval auto LC::Util::MakeStringHash ( auto &&... commands)

Definition at line 79 of file statichash.h.

References Filter().

+ Here is the call graph for this function:

◆ MakeTimeFromLong()

UTIL_API QString LC::Util::MakeTimeFromLong ( ulong time)

Makes a formatted time from number.

Converts, for example 256 to 00:04:16.

Parameters
[in]timeTime interval in seconds.
Returns
DateTime object.
See also
MakePrettySize

Definition at line 79 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ Map()

template<typename Container , typename F >
auto LC::Util::Map ( Container && c,
F && f )
noexcept

Definition at line 104 of file prelude.h.

References Filter().

Referenced by AsRefs(), ConcatMap(), LC::Util::detail::IconToFrames(), LC::Util::ShortcutManager::RegisterGlobalShortcut(), LC::Util::PlotItem::SetMultipoints(), and LC::Util::ShortcutManager::SetShortcut().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MapAs()

template<template< typename... > class Fallback, typename Container , typename F >
auto LC::Util::MapAs ( Container && c,
F && f )
noexcept

Definition at line 111 of file prelude.h.

References Filter().

+ Here is the call graph for this function:

◆ MkWaiter()

auto LC::Util::MkWaiter ( )
inline

Definition at line 19 of file common.h.

References Filter().

+ Here is the call graph for this function:

◆ Mzero()

template<typename MP >
MP LC::Util::Mzero ( )

Definition at line 46 of file monadplus.h.

◆ Nub()

template<const auto & F>
constexpr auto LC::Util::Nub ( )
constexpr

Definition at line 61 of file ctstringutils.h.

References Filter(), LC::Util::detail::JMEq(), and tup.

+ Here is the call graph for this function:

◆ OpenXSD()

UTIL_XSD_API XmlSettingsDialog * LC::Util::OpenXSD ( const QString & title,
const QString & filename,
Util::BaseSettingsManager * bsm )

Opens XML settings dialog for the given XML filename.

The dialog is opened as non-modal and non-blocking and is automatically shown. The dialog is also set to be automatically deleted as soon as it is closed.

Parameters
[in]titleThe title of the dialog.
[in]filenameThe XML settings file to use to build the dialog.
[in]bsmThe instance of BaseSettingsManager to use for storing the settings.
Returns
The XML settings dialog.

Definition at line 19 of file util.cpp.

References Filter().

+ Here is the call graph for this function:

◆ operator!=()

For iterators to not be equal at least either the model, parent index, row or column should be unequal. Traversal index is not taken into account.

Parameters
[in]leftFirst iterator to check for inequality.
[in]rightSecond iterator to check for inequality.
Returns
Whether left and right are equal.

Definition at line 76 of file modeliterator.cpp.

◆ operator*() [1/3]

template<typename AF , typename AV >
auto LC::Util::operator* ( const AF & af,
const AV & av ) -> decltype (GSL (af, av))

Definition at line 43 of file applicative.h.

References Filter(), and GSL().

+ Here is the call graph for this function:

◆ operator*() [2/3]

template<typename T , typename F >
auto LC::Util::operator* ( const F & function,
const T & functor ) -> decltype (Fmap (functor, function))

An operator-style alias for Fmap().

This operator allows writing Fmap()'s in infix form. Internally, it just forwards the call to Fmap().

Parameters
[in]functorThe functor whose values are subject to function.
[in]functionThe function that should be applied to the values in the functor.
Returns
A functor of type FmapResult_t<T, F> where each element is the result of applying the function to the corresponding element in the source functor.
Template Parameters
TThe type of the functor.
FThe type of the function to apply to the elements inside the functor.
See also
InstanceFunctor
Fmap()

Definition at line 154 of file functor.h.

References Filter(), and Fmap().

+ Here is the call graph for this function:

◆ operator*() [3/3]

template<typename T , typename F >
auto LC::Util::operator* ( const T & functor,
const F & function ) -> decltype (Fmap (functor, function))

An operator-style alias for Fmap().

This operator allows writing Fmap()'s in infix form. Internally, it just forwards the call to Fmap().

Parameters
[in]functorThe functor whose values are subject to function.
[in]functionThe function that should be applied to the values in the functor.
Returns
A functor of type FmapResult_t<T, F> where each element is the result of applying the function to the corresponding element in the source functor.
Template Parameters
TThe type of the functor.
FThe type of the function to apply to the elements inside the functor.
See also
InstanceFunctor
Fmap()

Definition at line 180 of file functor.h.

References Filter(), and Fmap().

+ Here is the call graph for this function:

◆ operator+() [1/5]

template<typename MP >
auto LC::Util::operator+ ( const MP & m1,
const MP & m2 ) -> decltype (Mplus (m1) (m2))

Definition at line 61 of file monadplus.h.

References Filter(), and Mplus.

+ Here is the call graph for this function:

◆ operator+() [2/5]

UTIL_SLL_API Nodes LC::Util::operator+ ( Node && n1,
Node && n2 )

Definition at line 29 of file xmlnode.cpp.

References Filter().

+ Here is the call graph for this function:

◆ operator+() [3/5]

UTIL_SLL_API Nodes LC::Util::operator+ ( Node && node,
Nodes && nodes )

Definition at line 17 of file xmlnode.cpp.

References Filter().

+ Here is the call graph for this function:

◆ operator+() [4/5]

UTIL_SLL_API Nodes LC::Util::operator+ ( Nodes && nodes,
Node && node )

Definition at line 23 of file xmlnode.cpp.

References Filter().

+ Here is the call graph for this function:

◆ operator+() [5/5]

template<size_t N1, size_t N2, typename Char >
constexpr auto LC::Util::operator+ ( RawStr< N1, Char > s1,
CtString< N2, Char > s2 )
constexprnoexcept

Definition at line 145 of file ctstring.h.

References Filter().

+ Here is the call graph for this function:

◆ operator<<() [1/4]

template<size_t N, typename Char >
QDebug LC::Util::operator<< ( QDebug dbg,
const CtString< N, Char > & str )

Definition at line 86 of file ctstringutils.h.

References Filter().

+ Here is the call graph for this function:

◆ operator<<() [2/4]

UTIL_THREADS_API QDebug LC::Util::operator<< ( QDebug dbg,
const NetworkReplyError & error )

Definition at line 15 of file networkresult.cpp.

References LC::Util::NetworkReplyError::Error_, LC::Util::NetworkReplyError::ErrorText_, Filter(), and LC::Util::NetworkReplyError::Url_.

+ Here is the call graph for this function:

◆ operator<<() [3/4]

UTIL_THREADS_API QDebug LC::Util::operator<< ( QDebug dbg,
const NetworkReplyErrorException & exception )

Definition at line 38 of file networkresult.cpp.

References Filter(), and LC::Util::NetworkReplyErrorException::GetError().

+ Here is the call graph for this function:

◆ operator<<() [4/4]

UTIL_THREADS_API QDebug LC::Util::operator<< ( QDebug dbg,
const NetworkResult & result )

Definition at line 69 of file networkresult.cpp.

References Filter(), and Visit().

+ Here is the call graph for this function:

◆ operator==()

bool LC::Util::operator== ( const ModelIterator & left,
const ModelIterator & right )

For iterators to be equal the model, parent index, row and column should all be equal. Traversal index is not taken into account.

Parameters
[in]leftFirst iterator to check for equality.
[in]rightSecond iterator to check for equality.
Returns
Whether left and right are equal.

Definition at line 68 of file modeliterator.cpp.

◆ operator>>()

template<typename MV , typename F >
auto LC::Util::operator>> ( const MV & value,
const F & f ) -> decltype (Bind (value, f))

Definition at line 71 of file monad.h.

References Bind(), and Filter().

+ Here is the call graph for this function:

◆ ParseJson() [1/2]

QVariant LC::Util::ParseJson ( const QByteArray & bytes,
const char * context )
inline

Parses JSON content in the given bytearray.

This functions uses QJson on Qt4 (don't forget to link to it!) and Qt's native JSON parsers on Qt5.

Parameters
[in]bytesThe byte array to parse JSON from.
[in]contextThe context string to be used in logging messages.
Returns
The recursive QVariant with JSON contents.

Definition at line 31 of file parsejson.h.

References Filter().

Referenced by ParseJson().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseJson() [2/2]

QVariant LC::Util::ParseJson ( QIODevice * device,
const char * context )
inline

Utility function parsing JSON from the device.

This function reads all available data from the device and passes it to the other ParseJson() overload.

Parameters
[in]deviceThe device from which JSON-encoded data should be read.
[in]contextThe context string to be used in logging messages.
Returns
The recursive QVariant with JSON contents.

Definition at line 56 of file parsejson.h.

References Filter(), and ParseJson().

+ Here is the call graph for this function:

◆ PartitionEithers()

template<template< typename > class Cont, typename L , typename R >
std::pair< Cont< L >, Cont< R > > LC::Util::PartitionEithers ( const Cont< Either< L, R > > & eithers)

Definition at line 202 of file either.h.

References Filter().

+ Here is the call graph for this function:

◆ PrepareRecords()

template<typename T >
auto LC::Util::PrepareRecords ( QSqlDatabase db,
int count = 3 )

Definition at line 104 of file common.h.

References PrepareRecords().

Referenced by PrepareRecords().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Pure() [1/2]

template<template< typename... > class Applicative, typename... Args, typename T >
auto LC::Util::Pure ( const T & v)

Definition at line 25 of file applicative.h.

References Filter(), and Pure().

Referenced by Pure(), and Return().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Pure() [2/2]

template<typename Applicative , typename T >
auto LC::Util::Pure ( const T & v) -> decltype (InstanceApplicative<Applicative>::Pure (v))

Definition at line 31 of file applicative.h.

References Filter().

+ Here is the call graph for this function:

◆ Q_DECLARE_FLAGS()

LC::Util::Q_DECLARE_FLAGS ( FitFlags ,
FitFlag  )

◆ ReleaseInto()

template<typename T >
void LC::Util::ReleaseInto ( std::unique_ptr< T > && ptr,
QObject & parent )

Definition at line 128 of file qtutil.h.

◆ Return()

template<template< typename... > class Monad, typename... Args, typename V >
auto LC::Util::Return ( const V & v)

Definition at line 24 of file monad.h.

References Filter(), and Pure().

+ Here is the call graph for this function:

◆ Reverse() [1/2]

template<template< typename... > class List, typename Head , typename... Tail>
constexpr auto LC::Util::Reverse ( List< Head, Tail... > ) -> decltype (Concat (Reverse (List<Tail...> {}), List<Head> {}))
constexpr

Definition at line 74 of file typelist.h.

◆ Reverse() [2/2]

template<template< typename... > class List>
constexpr List LC::Util::Reverse ( List<> )
constexpr

Definition at line 68 of file typelist.h.

◆ Reversed()

auto LC::Util::Reversed ( auto container)

Definition at line 69 of file tokenizetest.cpp.

References Filter().

+ Here is the call graph for this function:

◆ RightOr() [1/2]

template<typename L , typename R >
R LC::Util::RightOr ( const Either< L, R > & either,
const R & r )

Definition at line 194 of file either.h.

References Filter().

+ Here is the call graph for this function:

◆ RightOr() [2/2]

template<typename L , typename R , typename F , typename = std::result_of_t<F ()>>
R LC::Util::RightOr ( const Either< L, R > & either,
F && f )

Definition at line 186 of file either.h.

References Filter().

Referenced by LC::Util::IgnoreLeft< L, R >::await_resume().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Save2MimeData()

template<typename T >
void LC::Util::Save2MimeData ( QMimeData * mimeData,
const QString & name,
const T & t )

Definition at line 106 of file util.h.

References Filter().

+ Here is the call graph for this function:

◆ SavePassword()

UTIL_XPC_API void LC::Util::SavePassword ( const QString & password,
const QString & keyName,
const ICoreProxy_ptr & proxy )

Saves the password to be retrieved later via GetPassword().

This function stores the password under the given keyName. The password is typically stored in a storage plugin like SecMan.

If there are no storage plugins, this function does nothing.

Note
Despite the name this function can be used to save arbitrary string data in secure storages like SecMan.
Parameters
[in]passwordThe password string to save.
[in]keyNameThe name of the key uniquely identifying the password.
[in]proxyThe core proxy used to communicate with other plugins.
See also
GetPassword()

Definition at line 117 of file passutils.cpp.

References Filter().

Referenced by GetPassword().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ScreenGeometry()

UTIL_GUI_API QRect LC::Util::ScreenGeometry ( const QPoint & p)

Definition at line 71 of file geometry.cpp.

References Filter(), and GetScreenWithFallback().

Referenced by FitRectScreen(), and SetupFullscreenView().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Second()

template<typename F >
auto LC::Util::Second ( F && f)

Definition at line 229 of file prelude.h.

◆ SerializeJson()

UTIL_SLL_API QByteArray LC::Util::SerializeJson ( const QVariant & var,
bool compact = true )

Serializes the given var to JSON representation.

This function abstracts away differences between Qt4 and Qt5. It uses QJson on Qt4 (don't forget to link to it!) and native JSON functions on Qt5.

Parameters
[in]varThe recursive variant to be serialized to JSON.
[in]compactWhether the output should be compacitified (this parameter may have no effect).
Returns
The serialized representation of var.

Definition at line 18 of file serializejson.cpp.

References Filter().

Referenced by SerializeJsonToFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SerializeJsonToFile()

UTIL_SLL_API Either< QString, Void > LC::Util::SerializeJsonToFile ( const QString & filename,
const QVariant & var,
bool compact )

Definition at line 26 of file serializejson.cpp.

References Filter(), LC::Util::Either< L, R >::Left(), LC::Util::Either< L, R >::Right(), and SerializeJson().

+ Here is the call graph for this function:

◆ SetJobHolderProgress() [1/2]

UTIL_XPC_API void LC::Util::SetJobHolderProgress ( const QList< QStandardItem * > & row,
qint64 done,
qint64 total,
const QString & text )

Sets the progress values on the given row.

This function first retrieves the QStandardItem object at the position defined by JobHolderColumn::JobProgress in the passed row and then sets its text to text and updates the ProcessStateInfo structure under the JobHolderRole::ProcessState role to have the given amount of done and total.

Parameters
[in]rowThe row to set data on.
[in]doneThe amount of work done.
[in]totalThe total amount of work.
[in]textThe text that the progress-related item should have in the row.
See also
ProcessStateInfo

Definition at line 143 of file util.cpp.

References Filter(), LC::JobProgress, and SetJobHolderProgress().

Referenced by SetJobHolderProgress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetJobHolderProgress() [2/2]

UTIL_XPC_API void LC::Util::SetJobHolderProgress ( QStandardItem * item,
qint64 done,
qint64 total )

Sets the done and total progress values on the given item.

This function updates the ProcessStateInfo structure stored under the JobHolderRole::ProcessState role in the given item.

Parameters
[in]itemThe item to set data on.
[in]doneThe amount of work done.
[in]totalThe total amount of work.
See also
ProcessStateInfo

Definition at line 154 of file util.cpp.

References LC::ProcessStateInfo::Done_, Filter(), and LC::ProcessState.

+ Here is the call graph for this function:

◆ SetupFullscreenView()

UTIL_QML_API void LC::Util::SetupFullscreenView ( QQuickWidget & widget)

Definition at line 23 of file util.cpp.

References Filter(), and ScreenGeometry().

+ Here is the call graph for this function:

◆ SetupStateSaver() [1/2]

UTIL_GUI_API void LC::Util::SetupStateSaver ( QHeaderView & header,
const StateSaverParams & params )

Definition at line 117 of file statesaver.cpp.

References Filter(), and Throttled().

+ Here is the call graph for this function:

◆ SetupStateSaver() [2/2]

UTIL_GUI_API void LC::Util::SetupStateSaver ( QSplitter & splitter,
const StateSaverParams & params )

Definition at line 96 of file statesaver.cpp.

References Filter(), and Throttled().

+ Here is the call graph for this function:

◆ Sorted()

template<typename Cont >
decltype(auto) LC::Util::Sorted ( Cont && cont)

Definition at line 196 of file prelude.h.

References Filter().

+ Here is the call graph for this function:

◆ SplitInto()

template<template< typename > class Container, typename T >
Container< Container< T > > LC::Util::SplitInto ( size_t numChunks,
const Container< T > & container )

Definition at line 174 of file prelude.h.

References Filter().

+ Here is the call graph for this function:

◆ Stlize()

template<typename Assoc >
auto LC::Util::Stlize ( Assoc && assoc)
noexcept

Converts an Qt's associative sequence assoc to an STL-like iteratable range.

This function takes an associative container assoc (one of Qt's containers like QHash and QMap) and returns a range with value_type equal to std::pair<K, V>.

This way, both the key and the value of each pair in the assoc can be accessed in a range-for loop, for example.

Example usage:

for (const auto& [key, value] : Util::Stlize (someMap))
qDebug () << key << value;
Definition anutil.h:17
auto Stlize(Assoc &&assoc) noexcept
Converts an Qt's associative sequence assoc to an STL-like iteratable range.
Definition qtutil.h:48

All kinds of accesses are supported: elements of a non-const container may be modified via the iterators in the returned range.

Parameters
[in]assocThe Qt's associative container to iterate over.
Returns
A range with iterators providing access to both the key and the value via its value_type.
Template Parameters
AssocThe type of the source Qt associative container.

Definition at line 48 of file qtutil.h.

References Filter().

Referenced by LC::Util::WkFontsWidget::WkFontsWidget(), LC::Util::WkFontsWidget::accept(), LC::Util::MassFontChangeDialog::GetFamilies(), and LC::Util::WkFontsWidget::RegisterSettable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StlizeKeys()

template<typename Assoc >
auto LC::Util::StlizeKeys ( Assoc && assoc)
noexcept

Definition at line 62 of file qtutil.h.

References Filter().

+ Here is the call graph for this function:

◆ StringBufSize()

template<typename Char >
constexpr size_t LC::Util::StringBufSize ( const Char * str)
constexprnoexcept

Definition at line 151 of file ctstring.h.

References Filter().

+ Here is the call graph for this function:

◆ swap()

void LC::Util::swap ( FDGuard & g1,
FDGuard & g2 )

Definition at line 51 of file fdguard.cpp.

Referenced by LC::Util::FDGuard::operator=().

+ Here is the caller graph for this function:

◆ Tail()

template<template< typename... > class List, typename H , typename... T>
constexpr List< T... > LC::Util::Tail ( List< H, T... > )
constexpr

Definition at line 35 of file typelist.h.

◆ Throttled()

template<typename F >
auto LC::Util::Throttled ( std::chrono::milliseconds ms,
QObject * parent,
F && f )

Definition at line 16 of file throttle.h.

References Filter().

Referenced by SetupStateSaver(), and SetupStateSaver().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToByteArray() [1/2]

template<CtString Str>
QByteArray LC::Util::ToByteArray ( )

Definition at line 115 of file ctstring.h.

References Filter().

Referenced by LC::Util::XWrapper::GetAtom().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToByteArray() [2/2]

QByteArray LC::Util::ToByteArray ( std::string_view view)
inlinenoexcept

Create a QByteArray with the data referenced by the view.

The data within view is copied into the returned QByteArray, so, unlike AsByteArray(), there are no requirements on the lifetime of view.

Parameters
viewAn std::string_view to be represented as a QByteArray.
Returns
A QByteArray with the same data as the view.
See also
AsByteArray()

Definition at line 102 of file qtutil.h.

References Filter().

+ Here is the call graph for this function:

◆ ToFlat()

FlatTreeItem * LC::Util::ToFlat ( const QModelIndex & idx)

Definition at line 50 of file flattofoldersproxymodel.cpp.

References Filter().

Referenced by LC::Util::FlatToFoldersProxyModel::data(), LC::Util::FlatToFoldersProxyModel::flags(), and LC::Util::FlatToFoldersProxyModel::MapToSource().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToJson()

UTIL_SLL_API Either< QString, QJsonDocument > LC::Util::ToJson ( const QByteArray & json)

Definition at line 16 of file json.cpp.

References Filter(), LC::Util::Either< L, R >::Left(), and LC::Util::Either< L, R >::Right().

+ Here is the call graph for this function:

◆ TokenizeFwd()

auto LC::Util::TokenizeFwd ( QStringView str)

Definition at line 19 of file tokenizetest.cpp.

References Filter().

+ Here is the call graph for this function:

◆ TokenizeRev()

auto LC::Util::TokenizeRev ( QStringView str)

Definition at line 59 of file tokenizetest.cpp.

References Filter().

+ Here is the call graph for this function:

◆ ToString()

template<CtString Str>
QString LC::Util::ToString ( )

Definition at line 130 of file ctstring.h.

References Filter().

Referenced by LC::Util::oral::detail::BindAtIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Unreachable()

void LC::Util::Unreachable ( )
inline

Definition at line 15 of file unreachable.h.

References Filter().

Referenced by LC::Util::CpuFeatures::GetFeatureName(), and LC::Util::CpuFeatures::HasFeature().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UnsafeFromView()

QString LC::Util::UnsafeFromView ( QStringView sv)
inline

Definition at line 133 of file qtutil.h.

References Filter().

+ Here is the call graph for this function:

◆ Visit() [1/5]

◆ Visit() [2/5]

template<typename... Vars, typename... Args>
decltype(auto) LC::Util::Visit ( const std::variant< Vars... > & v,
Args &&... args )

Definition at line 40 of file visitor.h.

References Filter().

+ Here is the call graph for this function:

◆ Visit() [3/5]

template<typename Left , typename Right , typename... Args>
auto LC::Util::Visit ( Either< Left, Right > && either,
Args &&... args )

Definition at line 221 of file either.h.

References Filter(), and Visit().

+ Here is the call graph for this function:

◆ Visit() [4/5]

template<typename... Vars, typename... Args>
decltype(auto) LC::Util::Visit ( std::variant< Vars... > && v,
Args &&... args )

Definition at line 52 of file visitor.h.

References Filter().

+ Here is the call graph for this function:

◆ Visit() [5/5]

template<typename... Vars, typename... Args>
decltype(auto) LC::Util::Visit ( std::variant< Vars... > & v,
Args &&... args )

Definition at line 46 of file visitor.h.

References Filter().

+ Here is the call graph for this function:

◆ Visitor()

template<typename... Args>
LC::Util::Visitor ( Args && ...) -> Visitor< Void, Args... >

◆ WithHandler()

template<typename L , typename R , typename F >
requires std::invocable<F, const L&>
Util::detail::EitherAwaiter< L, R, F > LC::Util::WithHandler ( const Util::Either< L, R > & either,
F && errorHandler )

Definition at line 95 of file either.h.

References Filter().

+ Here is the call graph for this function:

◆ Zip()

template<typename T1 , typename T2 , template< typename U > class Container, template< typename U1, typename U2 > class Pair = QPair>
auto LC::Util::Zip ( const Container< T1 > & c1,
const Container< T2 > & c2 ) -> Container<Pair<T1, T2>>

Definition at line 54 of file prelude.h.

References Filter(), and ZipWith().

+ Here is the call graph for this function:

◆ ZipWith() [1/2]

template<template< typename U > class Container, typename T1 , typename T2 , typename F >
auto LC::Util::ZipWith ( const Container< T1 > & c1,
const Container< T2 > & c2,
F f ) -> WrapType_t<Container<std::decay_t<std::result_of_t<F (T1, T2)>>>>

Definition at line 37 of file prelude.h.

References Filter().

+ Here is the call graph for this function:

◆ ZipWith() [2/2]

template<typename Tup1 , typename Tup2 , size_t Tup1Size = std::tuple_size_v<std::decay_t<Tup1>>, size_t Tup2Size = std::tuple_size_v<std::decay_t<Tup2>>>
requires (Tup1Size == Tup2Size)
constexpr auto LC::Util::ZipWith ( Tup1 && tup1,
auto && sep,
Tup2 && tup2 )
constexprnoexcept

Definition at line 40 of file ctstringutils.h.

References Filter().

Referenced by LC::Util::oral::detail::AdaptCreateTableNamed(), LC::Util::oral::detail::PostgreSQL::ImplFactory::GetInsertSuffix(), and Zip().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ AllOf

template<template< typename > class Pred, typename... Args>
constexpr auto LC::Util::AllOf = (Pred<Args> {} && ...)
constexpr

Definition at line 34 of file typelevel.h.

◆ AnyOf

template<template< typename > class Pred, typename... Args>
constexpr auto LC::Util::AnyOf = (Pred<Args> {} || ...)
constexpr

Definition at line 37 of file typelevel.h.

◆ Apply

constexpr auto LC::Util::Apply = [] (const auto& t) { return t (); }
constexpr

Definition at line 216 of file prelude.h.

◆ ArgCount_v

template<SomeInvokable F>
constexpr auto LC::Util::ArgCount_v = std::tuple_size_v<detail::CallTypeGetter_t<F>> - 1
inlineconstexpr

Definition at line 46 of file typegetter.h.

◆ Fst

constexpr auto LC::Util::Fst = [] (const auto& pair) { return pair.first; }
constexpr

Definition at line 218 of file prelude.h.

◆ Id

constexpr auto LC::Util::Id = [] (auto&& t) -> decltype (auto) { return std::forward<decltype (t)> (t); }
constexpr

Definition at line 202 of file prelude.h.

◆ IsDetected_v

template<template< typename... > class Op, typename... Args>
constexpr bool LC::Util::IsDetected_v = detail::IsDetected<void, void, Op, Args...>::value_t::value
constexpr

Definition at line 35 of file detector.h.

◆ LCLowercase

Q_DECL_IMPORT const QString LC::Util::LCLowercase = QStringLiteral ("leechcraft")

The "leechcraft" literal, with no run-time overhead.

Definition at line 28 of file util.cpp.

◆ [struct]

const struct { ... } LC::Util::Mplus

Referenced by operator+().

◆ [struct]

const struct { ... } LC::Util::Msum

◆ RoledMemberField_v

template<Literal RoleArg, auto GetterArg>
RoledMemberField<RoleArg, GetterArg> LC::Util::RoledMemberField_v

Definition at line 34 of file roleditemsmodel.h.

◆ Snd

constexpr auto LC::Util::Snd = [] (const auto& pair) { return pair.second; }
constexpr

Definition at line 220 of file prelude.h.

◆ SourcePager

◆ StateAdd

◆ StateRemove

◆ Upcast

template<typename To >
constexpr auto LC::Util::Upcast = Upcaster<To> {}
constexpr

Definition at line 73 of file functional.h.