Qx v0.5.8
Qt Extensions Library
Loading...
Searching...
No Matches
Qx Namespace Reference

The Qx namespace is the main namespace through which all non-global functionality of the Qx library is accessed. More...

Classes

class  AbstractError
 The AbstractError template class completes the Error interface and acts as the base class from which specific error types are implemented. More...
 
class  ApplicationDesktopEntry
 The ApplicationDesktopEntry class represents an Application type desktop entry. More...
 
class  ApplicationLogger
 The ApplicationLogger class acts as a convenient means of producing an execution log for an application. More...
 
class  Array
 The Array class is a collection of static functions pertaining to C-style arrays. More...
 
class  AsyncDownloadManager
 The AsyncDownloadManager class is used to queue and process one or more downloads in an asynchronous manner using signals and slots. More...
 
class  Base85
 The Base85 class provides a Base85 encoded string. More...
 
class  Base85Encoding
 The Base85Encoding class provides the parameters of a particular Base85 string encoding. More...
 
class  Base85ParseError
 The Base85ParseError class is used to report errors while parsing a Base85 encoded string. More...
 
class  BitArray
 The BitArray class is a more robust variant of QBitArray, which provides an array of bits. More...
 
class  ByteArray
 The ByteArray class is a collection of static functions pertaining to QByteArray. More...
 
class  Char
 The Char class is a collection of static functions pertaining to character types. More...
 
class  Color
 The Color class is a collection of static functions pertaining to colors. More...
 
class  Cumulation
 The Cumulation template class tracks the sum of multiple key-value components that can be changed independently. More...
 
class  DateTime
 The DateTime class is a collection of static functions pertaining to date and time. More...
 
class  DesktopAction
 The DesktopAction class contains the details of a ApplicationDesktopEntry action. More...
 
class  DesktopEntry
 The DesktopEntry class provides the base functionality common to all Linux desktop entry files. More...
 
class  DirectoryDesktopEntry
 The DirectoryDesktopEntry class represents the a Directory type desktop entry. More...
 
class  DownloadManagerReport
 The DownloadManagerReport class details the outcome of processing an AsyncDownloadManager or SyncDownloadManager queue. More...
 
class  DownloadOpReport
 The DownloadOpReport class details the result of a single file download. More...
 
struct  DownloadTask
 The DownloadTask struct contains the information necessary to download a file from a URL. More...
 
class  DsvParseError
 The DsvParseError class is used to report errors while parsing an array of delimiter separated values. More...
 
class  DsvTable
 The DsvTable class provides a mutable representation of delimiter-separated values. More...
 
class  Error
 The Error class acts as an interface for an extensible variety of error objects. More...
 
class  ExclusiveAccess
 The ExclusiveAccess template class is a convenience class that simplifies access to resources secured by a mutex. More...
 
class  FileDetails
 The FileDetails class acts as a user-friendly container for holding a file's Version Info as defined by the Windows API, which largely consists of the fields within a given file's Details pane. More...
 
class  FileStreamReader
 The FileStreamReader class is a specialized wrapper for QDataStream that narrows and simplifies its usage for reading files. More...
 
class  FileStreamWriter
 The FileStreamWriter class is a specialized wrapper for QDataStream that narrows and simplifies its usage for writing files. More...
 
class  FreeIndexTracker
 The FreeIndexTracker class tracks which slots from a given range of indices are in use and which are available. More...
 
class  GenericError
 The GenericError class is multi-purpose container for storing error information. More...
 
class  GroupedProgressManager
 The GroupedProgressManager class produces an overall progress value from a collection of progress groups. More...
 
class  IError
 IError defines the baseline inheritance interface for Qx error types. More...
 
class  Index
 The Index template class provides a wrapper for integers with the notion of 'first', 'last' and 'null'. More...
 
class  Integrity
 The Integrity class is a collection of static functions pertaining to data completeness. More...
 
class  IoOpReport
 The IoOpReport class is a container for details regarding the outcome of an IO operation. More...
 
class  JsonError
 The JsonError class is used to report errors related to JSON manipulation. More...
 
class  LinkDesktopEntry
 The LinkDesktopEntry class represents the a Link type desktop entry. More...
 
class  List
 The List class is a collection of static functions pertaining to lists. More...
 
class  LoginDialog
 The LoginDialog class provides a modal dialog that prompts a user for a username and password. More...
 
class  NetworkReplyError
 The NetworkReplyError class provides a full error object for QNetworkReply, similar to other Qt classes, that can be more convenient for processing errors than just QNetworkReply::NetworkError. More...
 
class  ProcessBider
 The ProcessBider class monitors the presence of a process and signals when that process ends. More...
 
class  ProcessBiderError
 The ProcessBiderError class describes errors than can occur during process biding. More...
 
class  ProgressGroup
 The ProgressGroup class represents a distinct portion of overall progress to be mediated by GroupedProgressManager. More...
 
class  QJsonParseErrorAdapter
 Allows QJsonParseError to be used via the Qx::Error interface. More...
 
class  RegularExpression
 The RegularExpression class is a collection of convenient regular expression statements. More...
 
class  SetOnce
 The SetOnce template class acts as a container for a value that can only be set once. More...
 
struct  ShortcutProperties
 The ShortcutProperties struct acts as a user-friendly container for holding IShellLink data, which are the varies properties of a Windows .lnk shortcut. More...
 
class  StandardItemModel
 The StandardItemModel class is a more robust variant of QStandardItemModel, which is a generic model for storing custom data. More...
 
class  String
 The String class is a collection of static functions pertaining to string types. More...
 
struct  StringLiteral
 The StringLiteral template struct acts as a literal class type wrapper around a C-style string that effectively allows the string to be used as a non-type template parameter. More...
 
class  SyncDownloadManager
 The SyncDownloadManager class is used to queue and process one or more downloads in a synchronous manner. More...
 
class  SystemError
 The SystemError class encapsulates system generated errors as an Qx::Error interface compatible object. More...
 
class  Table
 The Table class is a template class that provides a dynamic two-dimensional array. More...
 
class  TaskbarButton
 The TaskbarButton class represents the Windows taskbar button for a top-level window. More...
 
class  TextPos
 The TextPos class is used to represent an offset within a text file in terms of lines and characters. More...
 
class  TextQuery
 The TextQuery class contains rules for conducting a search of text. More...
 
class  TextStream
 The TextStream class is a more robust variant of QTextStream, which provides a convenient interface for reading and writing text. More...
 
class  TextStreamReader
 The TextStreamReader class is a specialized wrapper for QTextStream that narrows and simplifies its usage for reading text files. More...
 
class  TextStreamWriter
 The TextStreamWriter class is a specialized wrapper for QTextStream that narrows and simplifies its usage for writing text files. More...
 
class  Traverser
 The Traverser template class provides a const_iterator wrapper for an alternate approach to iterating over a type. More...
 
class  TreeInputDialog
 The TreeInputDialog class provides a simple tree-based dialog from which the user can select one or more items. More...
 
class  VersionNumber
 The VersionNumber class extends QVersionNumber to include a dedicated constructor and getter for the fourth version segment. More...
 
class  WinGuiEvent
 The WinGuiEvent class encapsulates messages that are sent directly to an application window by the system on the Windows platform. More...
 
class  XmlStreamReaderError
 The XmlStreamReaderError class provides a full error object for QXmlStreamReader, similar to other Qt classes, that can be more convenient for processing errors than just QXmlStreamReader::Error. More...
 
class  XmlStreamWriterError
 The XmlStreamWriterError class provides a full error object for QXmlStreamWriterError, similar to other Qt classes. QXmlStreamWriter doesn't have an intrinsic error type, but this class can be useful for passing contextual error information when writing XML data so that intent is more clear. More...
 

Concepts

concept  error_type
 Specifies that a type is a Qx error type.
 
concept  error_adapter
 Specifies that a type is a Qx error adapter.
 
concept  error_adaptation
 Specifies that two types form a Qx error adaptation.
 
concept  json_root
 Specifies that a type is a valid analogue for a JSON document root element.
 
concept  defines_assign_for_s
 Specifies that a type defines a simple assignment operator for another type (with strict return).
 
concept  defines_assign_for
 Specifies that a type defines a simple assignment operator for another type.
 
concept  defines_assign_s
 Specifies that a type defines a simple assignment operator for itself (with strict return).
 
concept  defines_assign
 Specifies that a type defines a simple assignment operator for itself.
 
concept  defines_add_assign_for_s
 Specifies that a type defines an addition assignment operator for another type (with strict return).
 
concept  defines_add_assign_for
 Specifies that a type defines an addition assignment operator for another type.
 
concept  defines_add_assign_s
 Specifies that a type defines an addition assignment operator for itself (with strict return).
 
concept  defines_add_assign
 Specifies that a type defines an addition assignment operator for itself.
 
concept  defines_sub_assign_for_s
 Specifies that a type defines a subtraction assignment operator for another type (with strict return).
 
concept  defines_sub_assign_for
 Specifies that a type defines a subtraction assignment operator for another type.
 
concept  defines_sub_assign_s
 Specifies that a type defines a subtraction assignment operator for itself (with strict return).
 
concept  defines_sub_assign
 Specifies that a type defines a subtraction assignment operator for itself.
 
concept  defines_mult_assign_for_s
 Specifies that a type defines a multiplication assignment operator for another type (with strict return).
 
concept  defines_mult_assign_for
 Specifies that a type defines a multiplication assignment operator for another type.
 
concept  defines_mult_assign_s
 Specifies that a type defines a multiplication assignment operator for itself (with strict return).
 
concept  defines_mult_assign
 Specifies that a type defines a multiplication assignment operator for itself.
 
concept  defines_div_assign_for_s
 Specifies that a type defines a division assignment operator for another type (with strict return).
 
concept  defines_div_assign_for
 Specifies that a type defines a division assignment operator for another type.
 
concept  defines_div_assign_s
 Specifies that a type defines a division assignment operator for itself (with strict return).
 
concept  defines_div_assign
 Specifies that a type defines a division assignment operator for itself.
 
concept  defines_mod_assign_for_s
 Specifies that a type defines a modulo assignment operator for another type (with strict return).
 
concept  defines_mod_assign_for
 Specifies that a type defines a modulo assignment operator for another type.
 
concept  defines_mod_assign_s
 Specifies that a type defines a modulo assignment operator for itself (with strict return).
 
concept  defines_mod_assign
 Specifies that a type defines a modulo assignment operator for itself.
 
concept  defines_bit_and_assign_for_s
 Specifies that a type defines a bitwise AND assignment operator for another type (with strict return).
 
concept  defines_bit_and_assign_for
 Specifies that a type defines a bitwise AND assignment operator for another type.
 
concept  defines_bit_and_assign_s
 Specifies that a type defines a bitwise AND assignment operator for itself (with strict return).
 
concept  defines_bit_and_assign
 Specifies that a type defines a bitwise AND assignment operator for itself.
 
concept  defines_bit_or_assign_for_s
 Specifies that a type defines a bitwise OR assignment operator for another type (with strict return).
 
concept  defines_bit_or_assign_for
 Specifies that a type defines a bitwise OR assignment operator for another type.
 
concept  defines_bit_or_assign_s
 Specifies that a type defines a bitwise OR assignment operator for itself (with strict return).
 
concept  defines_bit_or_assign
 Specifies that a type defines a bitwise OR assignment operator for itself.
 
concept  defines_bit_xor_assign_for_s
 Specifies that a type defines a bitwise XOR assignment operator for another type (with strict return).
 
concept  defines_bit_xor_assign_for
 Specifies that a type defines a bitwise XOR assignment operator for another type.
 
concept  defines_bit_xor_assign_s
 Specifies that a type defines a bitwise XOR assignment operator for itself (with strict return).
 
concept  defines_bit_xor_assign
 Specifies that a type defines a bitwise XOR assignment operator for itself.
 
concept  defines_left_shift_assign_for_s
 Specifies that a type defines a left shift assignment operator for another type (with strict return).
 
concept  defines_left_shift_assign_for
 Specifies that a type defines a left shift assignment operator for another type.
 
concept  defines_left_shift_assign_s
 Specifies that a type defines a left shift assignment operator for itself (with strict return).
 
concept  defines_left_shift_assign
 Specifies that a type defines a left shift assignment operator for itself.
 
concept  defines_right_shift_assign_for_s
 Specifies that a type defines a right shift assignment operator for another type (with strict return).
 
concept  defines_right_shift_assign_for
 Specifies that a type defines a right shift assignment operator for another type.
 
concept  defines_right_shift_assign_s
 Specifies that a type defines a right shift assignment operator for itself (with strict return).
 
concept  defines_right_shift_assign
 Specifies that a type defines a right shift assignment operator for itself.
 
concept  defines_pre_increment_s
 Specifies that a type defines a pre-increment operator (with strict return).
 
concept  defines_pre_increment
 Specifies that a type defines a pre-increment operator.
 
concept  defines_pre_decrement_s
 Specifies that a type defines a pre-decrement operator (with strict return).
 
concept  defines_pre_decrement
 Specifies that a type defines a pre-decrement operator.
 
concept  defines_post_increment_s
 Specifies that a type defines a post-increment operator (with strict return).
 
concept  defines_post_increment
 Specifies that a type defines a post-increment operator.
 
concept  defines_post_decrement_s
 Specifies that a type defines a post-decrement operator (with strict return).
 
concept  defines_post_decrement
 Specifies that a type defines a post-decrement operator.
 
concept  defines_negation_s
 Specifies that a type defines a negation operator (with strict return).
 
concept  defines_negation
 Specifies that a type defines a negation operator.
 
concept  defines_and_for_s
 Specifies that a type defines a logical AND operator for another type (with strict return).
 
concept  defines_and_for
 Specifies that a type defines a logical AND operator for another type.
 
concept  defines_and_s
 Specifies that a type defines a logical AND operator for itself (with strict return). Satisfied if K has a logical AND operator defined for itself that returns bool.
 
concept  defines_and
 Specifies that a type defines a logical AND operator for itself.
 
concept  defines_or_for_s
 Specifies that a type defines a logical OR operator for another type (with strict return).
 
concept  defines_or_for
 Specifies that a type defines a logical OR operator for another type.
 
concept  defines_or_s
 Specifies that a type defines a logical OR operator for itself (with strict return).
 
concept  defines_or
 Specifies that a type defines a logical OR operator for itself.
 
concept  defines_subscript_for_s
 Specifies that a type defines a subscript operator for another type (with strict return).
 
concept  defines_subscript_for
 Specifies that a type defines a subscript operator for another type.
 
concept  defines_indirection_s
 Specifies that a type defines an indirection operator (with strict return).
 
concept  defines_indirection
 Specifies that a type defines an indirection operator.
 
concept  defines_address_of_s
 Specifies that a type defines an address-of operator (with strict return).
 
concept  defines_address_of
 Specifies that a type defines an address-of operator.
 
concept  defines_ptr_to_member_ptr_for_s
 Specifies that a type defines a pointer to member of pointer operator (with strict return).
 
concept  defines_ptr_to_member_ptr_for
 Specifies that a type defines a pointer to member of pointer operator.
 
concept  defines_call_for_s
 Specifies that a type defines a call operator for the specified argument types (with strict return).
 
concept  defines_call_for
 Specifies that a type defines a call operator for the specified argument types.
 
concept  defines_call_s
 Specifies that a type defines a argumentless call operator (with strict return).
 
concept  defines_call
 Specifies that a type defines a argumentless call operator.
 
concept  defines_comma_for_s
 Specifies that a type defines a comma operator for another type (with strict return).
 
concept  defines_comma_for
 Specifies that a type defines a comma operator for another type.
 
concept  defines_unary_plus_s
 Specifies that a type defines a unary plus operator (with strict return).
 
concept  defines_unary_plus
 Specifies that a type defines a unary plus operator.
 
concept  defines_unary_minus_s
 Specifies that a type defines a unary minus operator (with strict return).
 
concept  defines_unary_minus
 Specifies that a type defines a unary minus operator.
 
concept  defines_add_for_s
 Specifies that a type defines an addition operator for another type (with strict return).
 
concept  defines_add_for
 Specifies that a type defines an addition operator for another type.
 
concept  defines_add_s
 Specifies that a type defines an addition operator for itself (with strict return).
 
concept  defines_add
 Specifies that a type defines an addition operator for itself.
 
concept  defines_sub_for_s
 Specifies that a type defines a subtraction operator for another type (with strict return).
 
concept  defines_sub_for
 Specifies that a type defines a subtraction operator for another type.
 
concept  defines_sub_s
 Specifies that a type defines a subtraction operator for itself (with strict return).
 
concept  defines_sub
 Specifies that a type defines a subtraction operator for itself.
 
concept  defines_mult_for_s
 Specifies that a type defines a multiplication operator for another type (with strict return).
 
concept  defines_mult_for
 Specifies that a type defines a multiplication operator for another type.
 
concept  defines_mult_s
 Specifies that a type defines a multiplication operator for itself (with strict return).
 
concept  defines_mult
 Specifies that a type defines a multiplication operator for itself.
 
concept  defines_div_for_s
 Specifies that a type defines a division operator for another type (with strict return).
 
concept  defines_div_for
 Specifies that a type defines a division operator for another type.
 
concept  defines_div_s
 Specifies that a type defines a division operator for itself (with strict return).
 
concept  defines_div
 Specifies that a type defines a division operator for itself.
 
concept  defines_mod_for_s
 Specifies that a type defines a modulo operator for another type (with strict return).
 
concept  defines_mod_for
 Specifies that a type defines a modulo operator for another type.
 
concept  defines_mod_s
 Specifies that a type defines a modulo operator for itself (with strict return).
 
concept  defines_mod
 Specifies that a type defines a modulo operator for itself.
 
concept  defines_bit_not_s
 Specifies that a type defines a bitwise NOT operator (with strict return).
 
concept  defines_bit_not
 Specifies that a type defines a bitwise NOT operator.
 
concept  defines_bit_and_for_s
 Specifies that a type defines a bitwise AND operator for another type (with strict return).
 
concept  defines_bit_and_for
 Specifies that a type defines a bitwise AND operator for another type.
 
concept  defines_bit_and_s
 Specifies that a type defines a bitwise AND operator for itself (with strict return).
 
concept  defines_bit_and
 Specifies that a type defines a bitwise AND operator for itself.
 
concept  defines_bit_or_for_s
 Specifies that a type defines a bitwise OR operator for another type (with strict return).
 
concept  defines_bit_or_for
 Specifies that a type defines a bitwise OR operator for another type.
 
concept  defines_bit_or_s
 Specifies that a type defines a bitwise OR operator for itself (with strict return).
 
concept  defines_bit_or
 Specifies that a type defines a bitwise OR operator for itself.
 
concept  defines_bit_xor_for_s
 Specifies that a type defines a bitwise XOR operator for another type (with strict return).
 
concept  defines_bit_xor_for
 Specifies that a type defines a bitwise XOR operator for another type.
 
concept  defines_bit_xor_s
 Specifies that a type defines a bitwise XOR operator for itself (with strict return).
 
concept  defines_bit_xor
 Specifies that a type defines a bitwise XOR operator for itself.
 
concept  defines_left_shift_for_s
 Specifies that a type defines a left shift operator for another type (with strict return).
 
concept  defines_left_shift_for
 Specifies that a type defines a left shift operator for another type.
 
concept  defines_left_shift_s
 Specifies that a type defines a left shift operator for itself (with strict return).
 
concept  defines_left_shift
 Specifies that a type defines a left shift operator for itself.
 
concept  defines_right_shift_for_s
 Specifies that a type defines a right shift operator for another type (with strict return).
 
concept  defines_right_shift_for
 Specifies that a type defines a right shift operator for another type.
 
concept  defines_right_shift_s
 Specifies that a type defines a right shift operator for itself (with strict return).
 
concept  defines_right_shift
 Specifies that a type defines a right shift operator for itself.
 
concept  defines_equality_for_s
 Specifies that a type defines an equal to operator for another type (with strict return).
 
concept  defines_equality_for
 Specifies that a type defines an equal to operator for another type.
 
concept  defines_equality_s
 Specifies that a type defines an equal to operator for itself (with strict return).
 
concept  defines_equality
 Specifies that a type defines an equal to operator for itself (with strict return).
 
concept  defines_inequality_for_s
 Specifies that a type defines a not equal to operator for another type (with strict return).
 
concept  defines_inequality_for
 Specifies that a type defines a not equal to operator for another type.
 
concept  defines_inequality_s
 Specifies that a type defines a not equal to operator for itself (with strict return).
 
concept  defines_inequality
 Specifies that a type defines a not equal to operator for itself (with strict return).
 
concept  defines_less_than_for_s
 Specifies that a type defines a less than operator for another type (with strict return).
 
concept  defines_less_than_for
 Specifies that a type defines a less than operator for another type.
 
concept  defines_less_than_s
 Specifies that a type defines a less than operator for itself (with strict return).
 
concept  defines_less_than
 Specifies that a type defines a less than operator for itself.
 
concept  defines_greater_than_for_s
 Specifies that a type defines a greater than operator for another type (with strict return).
 
concept  defines_greater_than_for
 Specifies that a type defines a greater than operator for another type.
 
concept  defines_greater_than_s
 Specifies that a type defines a greater than operator for itself (with strict return).
 
concept  defines_greater_than
 Specifies that a type defines a greater than operator for itself.
 
concept  defines_less_than_equal_for_s
 Specifies that a type defines a less than or equal to operator for another type (with strict return).
 
concept  defines_less_than_equal_for
 Specifies that a type defines a less than or equal to operator for another type.
 
concept  defines_less_than_equal_s
 Specifies that a type defines a less than or equal to operator for itself (with strict return).
 
concept  defines_less_than_equal
 Specifies that a type defines a less than or equal to operator for itself.
 
concept  defines_greater_than_equal_for_s
 Specifies that a type defines a greater than or equal to operator for another type (with strict return).
 
concept  defines_greater_than_equal_for
 Specifies that a type defines a greater than or equal to operator for another type.
 
concept  defines_greater_than_equal_s
 Specifies that a type defines a greater than or equal to operator for itself (with strict return).
 
concept  defines_greater_than_equal
 Specifies that a type defines a greater than or equal to operator for itself.
 
concept  defines_three_way_comp_for_s
 Specifies that a type defines a three-way comparison operator for another type (with strict return).
 
concept  defines_three_way_comp_for
 Specifies that a type defines a three-way comparison operator for another type.
 
concept  defines_three_way_comp_s
 Specifies that a type defines a three-way comparison operator for itself (with strict return).
 
concept  defines_three_way_comp
 Specifies that a type defines a three-way comparison operator for itself.
 
concept  arithmetic
 Specifies that a type is an arithmetic type.
 
concept  fundamental
 Specifies that a type is a fundamental type.
 
concept  traverseable
 Specifies that a type is a valid type for Qx::Traverser.
 
concept  static_castable_to
 Specifies that a type can be statically cast to another type.
 
concept  any_of
 Specifies that a type is one of several types.
 
concept  specializes
 Specifies that a type is a specialization of a template.
 
concept  qassociative
 Specifies that a type is a Qt-based associative container type.
 
concept  qcollective
 Specifies that a type is a Qt-based collection type.
 

Typedefs

typedef Index< qint16 > Index16
 
typedef Index< qint32 > Index32
 
typedef Index< qint32 > Index64
 
typedef Index< qint8 > Index8
 
typedef QFlags< ReadOptionReadOptions
 
typedef Traverser< QStringStringTraverser
 
typedef QFlags< WriteOptionWriteOptions
 

Enumerations

enum  Extent {
  First ,
  Start = First ,
  Last ,
  End = Last
}
 
enum  IoOpResultType {
  IO_SUCCESS = 0 ,
  IO_ERR_UNKNOWN = 1 ,
  IO_ERR_ACCESS_DENIED = 2 ,
  IO_ERR_WRONG_TYPE = 3 ,
  IO_ERR_OUT_OF_RES = 4 ,
  IO_ERR_READ = 5 ,
  IO_ERR_WRITE = 6 ,
  IO_ERR_FATAL = 7 ,
  IO_ERR_OPEN = 8 ,
  IO_ERR_ABORT = 9 ,
  IO_ERR_TIMEOUT = 10 ,
  IO_ERR_REMOVE = 11 ,
  IO_ERR_RENAME = 12 ,
  IO_ERR_REPOSITION = 13 ,
  IO_ERR_RESIZE = 14 ,
  IO_ERR_COPY = 15 ,
  IO_ERR_DNE = 16 ,
  IO_ERR_PATH_DNE = 17 ,
  IO_ERR_NULL = 18 ,
  IO_ERR_EXISTS = 19 ,
  IO_ERR_CANT_CREATE = 20 ,
  IO_ERR_CANT_CREATE_PATH = 21 ,
  IO_ERR_FILE_SIZE_MISMATCH = 22 ,
  IO_ERR_CURSOR_OOB = 23 ,
  IO_ERR_FILE_NOT_OPEN = 24
}
 
enum  IoOpTargetType {
  IO_FILE ,
  IO_DIR
}
 
enum  IoOpType {
  IO_OP_READ ,
  IO_OP_WRITE ,
  IO_OP_ENUMERATE ,
  IO_OP_INSPECT ,
  IO_OP_MANIPULATE
}
 
enum  PathType {
  Absolute ,
  Relative
}
 
enum  ReadOption {
  NoReadOptions = 0x0 ,
  IgnoreTrailingBreak = 0x1
}
 
enum  ReplaceMode {
  Replace ,
  Skip ,
  Stop
}
 
enum  Severity {
  Warning = 1 ,
  Err = 2 ,
  Critical = 3
}
 
enum  WriteMode {
  Insert ,
  Overwrite ,
  Append ,
  Truncate
}
 
enum  WriteOption {
  NoWriteOptions = 0x0 ,
  CreatePath = 0x1 ,
  ExistingOnly = 0x2 ,
  NewOnly = 0x4 ,
  EnsureBreak = 0x8 ,
  Pad = 0x10 ,
  Unbuffered = 0x20
}
 

Functions

int abs (int n)
 
long long abs (long long n)
 
long abs (long n)
 
unsigned int abs (unsigned int n)
 
unsigned long long abs (unsigned long long n)
 
unsigned long abs (unsigned long n)
 
QString asString (const QJsonValue &value)
 
IoOpReport calculateFileChecksum (QString &returnBuffer, QFile &file, QCryptographicHash::Algorithm hashAlgorithm)
 
template<typename T >
requires std::integral<T>
ceilNearestMultiple (T num, T mult)
 
template<typename T >
requires std::integral<T>
ceilPowOfTwo (T num)
 
SystemError cleanKillProcess (HANDLE processHandle)
 
SystemError cleanKillProcess (quint32 processId)
 
template<typename T >
requires std::unsigned_integral<T>
constrainedAdd (T a, T b, T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::signed_integral<T>
constrainedAdd (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::unsigned_integral<T>
constrainedDiv (T a, T b, T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::signed_integral<T>
constrainedDiv (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::unsigned_integral<T>
constrainedMult (T a, T b, T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::signed_integral<T>
constrainedMult (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max())
 
template<typename T >
requires std::unsigned_integral<T>
constrainedSub (T a, T b, T min=0)
 
template<typename T >
requires std::signed_integral<T>
constrainedSub (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max())
 
template<class InputIt >
requires std::input_iterator<InputIt> && std::equality_comparable<InputIt>
bool containsDuplicates (InputIt begin, InputIt end)
 
IoOpReport copyDirectory (const QDir &directory, const QDir &destination, bool recursive, ReplaceMode replaceMode)
 
SystemError createShortcut (QString shortcutPath, ShortcutProperties sp)
 
IoOpReport deleteTextFromFile (QFile &textFile, TextPos startPos, TextPos endPos)
 
IoOpReport dirContainsFiles (bool &returnBuffer, const QDir &directory, QDirIterator::IteratorFlags iteratorFlags)
 
bool dirContainsFiles (const QDir &directory, QDirIterator::IteratorFlags iteratorFlags)
 
IoOpReport dirContentInfoList (QFileInfoList &returnBuffer, const QDir &directory, QStringList nameFilters, QDir::Filters filters, QDirIterator::IteratorFlags flags)
 
IoOpReport dirContentList (QStringList &returnBuffer, const QDir &directory, QStringList nameFilters, QDir::Filters filters, QDirIterator::IteratorFlags flags, PathType pathType)
 
template<typename T >
requires arithmetic<T>
distance (T x, T y)
 
bool enforceSingleInstance (QString uniqueAppId)
 
IoOpReport fileContainsString (bool &returnBuffer, QFile &textFile, const QString &query, Qt::CaseSensitivity cs, bool allowSplit)
 
IoOpReport fileIsEmpty (bool &returnBuffer, const QFile &file)
 
bool fileIsEmpty (const QFile &file)
 
IoOpReport fileMatchesChecksum (bool &returnBuffer, QFile &file, QString checksum, QCryptographicHash::Algorithm hashAlgorithm)
 
QList< QJsonValuefindAllValues (const QJsonValue &rootValue, QStringView key)
 
IoOpReport findStringInFile (QList< TextPos > &returnBuffer, QFile &textFile, const TextQuery &query, ReadOptions readOptions)
 
template<typename T >
requires std::integral<T>
floorNearestMultiple (T num, T mult)
 
template<typename T >
requires std::integral<T>
floorPowOfTwo (T num)
 
SystemError forceKillProcess (HANDLE processHandle)
 
SystemError forceKillProcess (quint32 processId)
 
SystemError getLastError ()
 
bool isDefaultProtocolHandler (const QString &scheme, const QString &path)
 
template<typename T >
requires arithmetic<T>
bool isEven (T num)
 
template<typename T >
requires arithmetic<T>
bool isOdd (T num)
 
QString kosherizeFileName (QString fileName)
 
template<typename T >
requires std::integral<T>
length (T start, T end)
 
bool operator== (const FileDetails::Translation &lhs, const FileDetails::Translation &rhs) noexcept
 
template<typename T >
requires QxJson::json_containing<T>
JsonError parseJson (T &parsed, const QJsonArray &array)
 
template<typename T >
requires json_root<T>
JsonError parseJson (T &parsed, const QJsonDocument &doc)
 
template<typename T >
requires QxJson::json_struct<T>
JsonError parseJson (T &parsed, const QJsonObject &obj)
 
template<typename T >
requires json_root<T>
JsonError parseJson (T &parsed, const QString &filePath)
 
template<typename T >
requires json_root<T>
JsonError parseJson (T &parsed, QFile &file)
 
int postBlockingError (const Error &error, QMessageBox::StandardButtons choices, QMessageBox::StandardButton defChoice)
 
void postError (const Error &error)
 
QList< quint32 > processChildren (quint32 processId, bool recursive)
 
quint32 processId (QString processName)
 
SystemError processIsElevated (bool &elevated)
 
SystemError processIsElevated (bool &elevated, DWORD processId)
 
SystemError processIsElevated (bool &elevated, HANDLE processHandle)
 
bool processIsRunning (HANDLE processHandle)
 
bool processIsRunning (QString processName)
 
bool processIsRunning (quint32 processId)
 
QString processName (quint32 processId)
 
QList< DWORDprocessThreadIds (DWORD processId)
 
size_t qHash (const DownloadTask &key, size_t seed) noexcept
 
size_t qHash (const FileDetails::Translation &key, size_t seed) noexcept
 
IoOpReport readBytesFromFile (QByteArray &returnBuffer, QFile &file, Index64 startPos, Index64 endPos)
 
IoOpReport readTextFromFile (QString &returnBuffer, QFile &textFile, TextPos startPos, int count, ReadOptions readOptions)
 
IoOpReport readTextFromFile (QString &returnBuffer, QFile &textFile, TextPos startPos, TextPos endPos, ReadOptions readOptions)
 
IoOpReport readTextFromFile (QStringList &returnBuffer, QFile &textFile, Index32 startLine, Index32 endLine, ReadOptions readOptions)
 
bool removeDefaultProtocolHandler (const QString &scheme, const QString &path)
 
template<typename T >
requires std::integral<T>
roundPowOfTwo (T num)
 
template<typename T >
requires std::integral<T>
roundToNearestMultiple (T num, T mult)
 
template<typename T >
requires json_root<T>
JsonError serializeJson (const QString &serializedPath, const T &root)
 
template<typename T >
requires json_root<T>
JsonError serializeJson (QFile &serialized, const T &root)
 
template<typename T >
requires QxJson::json_containing<T>
void serializeJson (QJsonArray &serialized, const T &container)
 
template<typename T >
requires json_root<T>
void serializeJson (QJsonDocument &serialized, const T &root)
 
template<typename T >
requires QxJson::json_struct<T>
void serializeJson (QJsonObject &serialized, const T &struc)
 
bool setDefaultProtocolHandler (const QString &scheme, const QString &name, const QString &path, const QStringList &args)
 
void setUserInputEchoEnabled (bool enabled)
 
QString severityString (Severity sv, bool uc)
 
IoOpReport textFileAbsolutePosition (TextPos &textPos, QFile &textFile, bool ignoreTrailingEmpty)
 
IoOpReport textFileEndsWithNewline (bool &returnBuffer, QFile &textFile)
 
IoOpReport textFileLayout (QList< int > &returnBuffer, QFile &textFile, bool ignoreTrailingEmpty)
 
IoOpReport textFileLineCount (int &returnBuffer, QFile &textFile, bool ignoreTrailingEmpty)
 
IoOpReport writeBytesToFile (QFile &file, const QByteArray &bytes, WriteMode writeMode, Index64 startPos, WriteOptions writeOptions)
 
IoOpReport writeBytesToFile (QSaveFile &file, const QByteArray &bytes, WriteMode writeMode, Index64 startPos, WriteOptions writeOptions)
 
IoOpReport writeStringToFile (QFile &textFile, const QString &text, WriteMode writeMode, TextPos startPos, WriteOptions writeOptions)
 
IoOpReport writeStringToFile (QSaveFile &textFile, const QString &text, WriteMode writeMode, TextPos startPos, WriteOptions writeOptions)
 
QSettings::Format xdgDesktopSettingsFormat ()
 
QSettings::Format xdgSettingsFormat ()
 
QString xmlSanitized (const QString &string)
 

Variables

QTextStream cerr = QTextStream(stderr)
 
QTextStream cin = QTextStream(stdin)
 
QTextStream cout = QTextStream(stdout)
 
const QChar ENDL = '\n'
 
const QString LIST_ITEM_PREFIX = u"- "_s
 

Detailed Description

Nearly all library features are nested within this namespace in a similar vein as std with the C++ Standard Library.

See the File Member's Index for all global library elements.

Typedef Documentation

◆ Index16

A convenience synonym for Index<qint16>

◆ Index32

A convenience synonym for Index<qint32>

◆ Index64

A convenience synonym for Index<qint64>

◆ Index8

A convenience synonym for Index<qint8>

◆ ReadOptions

The ReadOptions type is a typedef for QFlags< ReadOption>. It stores an OR combination of ReadOption values.

◆ StringTraverser

A convenience synonym for Qx::Traverser<QString>

◆ WriteOptions

The WriteOptions type is a typedef for QFlags< WriteOption>. It stores an OR combination of WriteOption values.

Enumeration Type Documentation

◆ Extent

enum Qx::Extent

Used to refer the extents of a range.

Enumerator
First 

The beginning of a range, or its first unit.

Start 

Equivalent to First.

Last 

The end of a range, or its last unit.

End 

Equivalent to Last.

◆ IoOpResultType

This defines type of an IO operation result.

Enumerator
IO_SUCCESS 

The operation was performed successfully.

IO_ERR_UNKNOWN 

An unknown error occurred.

IO_ERR_ACCESS_DENIED 

Access to the resource was denied.

IO_ERR_WRONG_TYPE 

The operation target exists, but is of the wrong type.

IO_ERR_OUT_OF_RES 

The operation failed from a lack of system resources.

IO_ERR_READ 

A general read error occurred.

IO_ERR_WRITE 

A general write error occurred.

IO_ERR_FATAL 

A fatal error occurred.

IO_ERR_OPEN 

The target resource could not be opened.

IO_ERR_ABORT 

The operation was aborted.

IO_ERR_TIMEOUT 

The operation timed out.

IO_ERR_REMOVE 

The target resource could not be removed.

IO_ERR_RENAME 

The target resource could not be renamed.

IO_ERR_REPOSITION 

A form of seeking within a resource failed.

IO_ERR_RESIZE 

The target resource could not be resized.

IO_ERR_COPY 

The target resource could not be copied.

IO_ERR_DNE 

The target does not exist.

IO_ERR_NULL 

The specified target was null.

IO_ERR_EXISTS 

The target path is already occupied.

IO_ERR_CANT_CREATE 

The target could not be created.

IO_ERR_FILE_SIZE_MISMATCH 

The expected length of a file (or portion of a file) was different than expected.

IO_ERR_CURSOR_OOB 

Access to an out-of-bounds position was attempted.

IO_ERR_FILE_NOT_OPEN 

The operation could not be performed because the target file is not open.

◆ IoOpTargetType

This defines the type of an IO operation target.

Enumerator
IO_FILE 

The target is a file.

IO_DIR 

The target is a directory.

◆ IoOpType

This defines the type of an IO operation.

Enumerator
IO_OP_READ 

Describes a read operation.

IO_OP_WRITE 

Describes a write operation.

IO_OP_ENUMERATE 

Describes an enumeration operation (e.g. counting files in a directory)

IO_OP_INSPECT 

Describes an inspection operation (e.g. querying file permissions)

◆ PathType

This denotes the type of a path in terms of relativity.

Enumerator
Absolute 

An absolute path.

Relative 

A relative path.

◆ ReadOption

This enum is used to specify various options that affect how data is read from a file.

The exact effects of each value can vary depending on the context in which they are used, with some options being completely useless in some contexts.

Enumerator
NoReadOptions 

The default.

IgnoreTrailingBreak 

When file positions are considered, do not count a trailing break as being part of the file.

For example, when requesting the last line of a text document, the second to last line will be returned instead if this option is set and the text file ends with a line break.

◆ ReplaceMode

This enum is used to describe how filename conflicts should be handled in operations that move/copy files.

Enumerator
Replace 

Existing files should be replaced with new files.

Skip 

Existing files should be kept.

Stop 

Filename conflicts should be considered an error.

◆ Severity

This enum represents the the severity of an error/outcome.

Enumerator
Warning 

A warning.

Err 

An error.

Critical 

A critical/fatal error.

◆ WriteMode

This enum is used to describe the mode with which data is written to a file.

The exact effects of its values can vary depending on the context in which they are used.

Enumerator
Insert 

Specifies that content is to be inserted into an existing file, if it already exists, preserving the file's original content, though not necessarily its location.

Overwrite 

Specifies that content is to be written on top of a file's existing content, if it already exists, replacing as much as is necessary.

Append 

Specifies that content is to be written to the end of an existing file, if it already exists, leaving the original content untouched.

Truncate 

Specifies that the destination file is to be emptied before writing, if it already exists, so that the new content entirely replaces the old.

◆ WriteOption

This enum is used to specify various options that affect how data is written to a file.

The exact effects of each value can vary depending on the context in which they are used, with some options being completely useless in some contexts.

Enumerator
NoWriteOptions 

The default.

CreatePath 

Create all directories required to write a file according to its full path.

ExistingOnly 

Only write to the target file if it already exists.

NewOnly 

Only write to the target file if doesn't already exist.

EnsureBreak 

Ensure that a contextually appropriate break is present before the position where data is to be written.

This is generally an end-of-line character when working with text, and a null byte ('\0') when working with raw data.

Pad 

Pad the target file before writing to the middle of a file if required.

This is generally done an end-of-line character and spaces when working with text, and a null bytes ('\0') when working with raw data.

Unbuffered 

Bypass any buffers involved with writing.

Generally only applies to streams.

Function Documentation

◆ abs() [1/6]

QX_CORE_EXPORT int Qx::abs ( int n)

Returns the absolute value of n; equivalent to std::abs(n) .

◆ abs() [2/6]

QX_CORE_EXPORT long long Qx::abs ( long long n)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns the absolute value of n; equivalent to std::abs(n) .

◆ abs() [3/6]

QX_CORE_EXPORT long Qx::abs ( long n)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns the absolute value of n; equivalent to std::abs(n) .

◆ abs() [4/6]

QX_CORE_EXPORT unsigned int Qx::abs ( unsigned int n)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns the absolute value of n; equivalent to n.

This overload allows abs to be used in templates without the need to specialize solely because of signedness

◆ abs() [5/6]

QX_CORE_EXPORT unsigned long long Qx::abs ( unsigned long long n)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns the absolute value of n; equivalent to n.

This overload allows abs to be used in templates without the need to specialize solely because of signedness

◆ abs() [6/6]

QX_CORE_EXPORT unsigned long Qx::abs ( unsigned long n)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns the absolute value of n; equivalent to n.

This overload allows abs to be used in templates without the need to specialize solely because of signedness

◆ asString()

QX_CORE_EXPORT QString Qx::asString ( const QJsonValue & value)

Returns the JSON string representation of value regardless of its type.

If value is an object or array, the returned string will be in the compact format.

◆ calculateFileChecksum()

QX_IO_EXPORT IoOpReport Qx::calculateFileChecksum ( QString & returnBuffer,
QFile & file,
QCryptographicHash::Algorithm hashAlgorithm )

Computes a file's checksum.

Parameters
[out]returnBufferSet to the hexadecimal string representation of the file's checksum.
[in]fileThe file to hash.
[in]hashAlgorithmThe hash algorithm to calculate the checksum with.
Returns
A report detailing operation success or failure.

◆ ceilNearestMultiple()

template<typename T >
requires std::integral<T>
T Qx::ceilNearestMultiple ( T num,
T mult )

Returns the next (i.e. higher) multiple of mult after num, or num if it is already a multiple of mult.

The sign of the result will always be the same sign as num, regardless of the sign of mult.

◆ ceilPowOfTwo()

template<typename T >
requires std::integral<T>
T Qx::ceilPowOfTwo ( T num)

Returns the next (i.e. higher) power of two after num, or num if it is already a power of two.

◆ cleanKillProcess() [1/2]

QX_WINDOWS_EXPORT SystemError Qx::cleanKillProcess ( HANDLE processHandle)

Closes the process referenced by processHandle.

Note
The handle must be valid.
See also
cleanKillProcess(quint32), forceKillProcess().

◆ cleanKillProcess() [2/2]

QX_CORE_EXPORT SystemError Qx::cleanKillProcess ( quint32 processId)

Attempts to close the process referenced by processId in a manner that allows it to shutdown gracefully.

In general this is not guaranteed to close the process as the target application ultimately decides how to handle the termination request, and may perform alternate actions such as prompting the user to save files.

Windows:

The closure is performed by signaling all top-level windows of the process to close via WM_CLOSE.

If the process has no windows (i.e. a console application), is designed to remain running with no windows open, or otherwise doesn't process the WM_CLOSE message it will remain running.

Linux:
The closure is performed by sending the SIGTERM signal to the process.

If the operation fails the returned error object will contain the cause.

Note
This function does not support a value of 0 for processId in order to kill the current process. Instead pass the result of QCoreApplication::applicationPid().
See also
forceKillProcess(), and QProcess::terminate();

◆ constrainedAdd() [1/2]

template<typename T >
requires std::unsigned_integral<T>
T Qx::constrainedAdd ( T a,
T b,
T max = std::numeric_limits<T>::max() )

Returns the result of adding unsigned integers a and b, bounded between 0 and max inclusive.

The default arguments of this function make it useful for performing addition that is safe from overflow.

◆ constrainedAdd() [2/2]

template<typename T >
requires std::signed_integral<T>
T Qx::constrainedAdd ( T a,
T b,
T min = std::numeric_limits<T>::min(),
T max = std::numeric_limits<T>::max() )

Returns the result of adding signed integers a and b, bounded between min and max inclusive.

The default arguments of this function make it useful for performing addition that is safe from underflow and overflow.

◆ constrainedDiv() [1/2]

template<typename T >
requires std::unsigned_integral<T>
T Qx::constrainedDiv ( T a,
T b,
T max = std::numeric_limits<T>::max() )

Returns the result of dividing unsigned integer a by signed integer b, bounded between 0 and max inclusive.

◆ constrainedDiv() [2/2]

template<typename T >
requires std::signed_integral<T>
T Qx::constrainedDiv ( T a,
T b,
T min = std::numeric_limits<T>::min(),
T max = std::numeric_limits<T>::max() )

Returns the result of dividing signed integer a by signed integer b, bounded between min and max inclusive.

The default arguments of this function make it useful for performing division that is safe from underflow and overflow.

◆ constrainedMult() [1/2]

template<typename T >
requires std::unsigned_integral<T>
T Qx::constrainedMult ( T a,
T b,
T max = std::numeric_limits<T>::max() )

Returns the result of multiplying unsigned integers a and b, bounded between 0 and max inclusive.

The default arguments of this function make it useful for performing multiplication that is safe from overflow.

◆ constrainedMult() [2/2]

template<typename T >
requires std::signed_integral<T>
T Qx::constrainedMult ( T a,
T b,
T min = std::numeric_limits<T>::min(),
T max = std::numeric_limits<T>::max() )

Returns the result of multiplying signed integers a and b, bounded between min and max inclusive.

The default arguments of this function make it useful for performing multiplication that is safe from underflow and overflow.

◆ constrainedSub() [1/2]

template<typename T >
requires std::unsigned_integral<T>
T Qx::constrainedSub ( T a,
T b,
T min = 0 )

Returns the result of subtracting unsigned integers a and b, bounded between min and "std::numeric_limits<T>::max()" inclusive.

The default arguments of this function make it useful for performing subtraction that is safe from underflow.

◆ constrainedSub() [2/2]

template<typename T >
requires std::signed_integral<T>
T Qx::constrainedSub ( T a,
T b,
T min = std::numeric_limits<T>::min(),
T max = std::numeric_limits<T>::max() )

Returns the result of subtracting signed integers a and b, bounded between min and max inclusive.

The default arguments of this function make it useful for performing subtraction that is safe from underflow and overflow.

◆ containsDuplicates()

template<class InputIt >
requires std::input_iterator<InputIt> && std::equality_comparable<InputIt>
bool Qx::containsDuplicates ( InputIt begin,
InputIt end )

Returns true if num is even; otherwise returns false.

◆ copyDirectory()

QX_IO_EXPORT IoOpReport Qx::copyDirectory ( const QDir & directory,
const QDir & destination,
bool recursive,
ReplaceMode replaceMode )

Copies directory to destination, recursively if recursive is true. Existing files are overwritten if overwrite is true.

◆ createShortcut()

QX_WINDOWS_EXPORT SystemError Qx::createShortcut ( QString shortcutPath,
ShortcutProperties sp )

Creates a shortcut on the user's filesystem at the path shortcutPath, with the given shortcut properties sp.

◆ deleteTextFromFile()

QX_IO_EXPORT IoOpReport Qx::deleteTextFromFile ( QFile & textFile,
TextPos startPos,
TextPos endPos )

Removes the given range of text from textFile.

Parameters
[in]textFileThe file from which text is to be removed.
[in]startPosThe first character to be removed.
[in]endPosThe last character to be removed.
Returns
A report containing details of operation success or failure.

◆ dirContainsFiles() [1/2]

QX_IO_EXPORT IoOpReport Qx::dirContainsFiles ( bool & returnBuffer,
const QDir & directory,
QDirIterator::IteratorFlags iteratorFlags )

Sets returnBuffer to true if directory contains files in accordance with iteratorFlags; otherwise sets it to false.

If the directory doesn't exist, returnBuffer will be set to false and an operation report noting the directory's absence is returned.

◆ dirContainsFiles() [2/2]

QX_IO_EXPORT bool Qx::dirContainsFiles ( const QDir & directory,
QDirIterator::IteratorFlags iteratorFlags )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns true if directory contains files in accordance with iteratorFlags; otherwise returns false.

Warning
This also returns false if the directory doesn't exist.

◆ dirContentInfoList()

QX_IO_EXPORT IoOpReport Qx::dirContentInfoList ( QFileInfoList & returnBuffer,
const QDir & directory,
QStringList nameFilters,
QDir::Filters filters,
QDirIterator::IteratorFlags flags )

Fills returnBuffer with a list of QFileInfo objects for all the files and directories in directory, limited according to the name and attribute filters previously set with QDir::setNameFilters() and QDir::setFilter(), while sort flags are ignored.

The name filter and file attribute filter can be overridden using the nameFilters and filters arguments respectively.

Directory traversal rules can be further refined via iteratorFlags.

Returns a report containing details of operation success or failure.

See also
QDir::entryInfoList

◆ dirContentList()

QX_IO_EXPORT IoOpReport Qx::dirContentList ( QStringList & returnBuffer,
const QDir & directory,
QStringList nameFilters,
QDir::Filters filters,
QDirIterator::IteratorFlags flags,
PathType pathType )

Fills returnBuffer with a list of names for all the files and directories in directory, limited according to the name and attribute filters previously set with QDir::setNameFilters() and QDir::setFilter(), while sort flags are ignored. The paths will be relative to directory if pathType is PathType::Relative.

The name filter and file attribute filter can be overridden using the nameFilters and filters arguments respectively.

Directory traversal rules can be further refined via iteratorFlags.

Returns a report containing details of operation success or failure.

See also
QDir::entryList

◆ distance()

template<typename T >
requires arithmetic<T>
T Qx::distance ( T x,
T y )

Returns the absolute distance between x and y.

◆ enforceSingleInstance()

QX_CORE_EXPORT bool Qx::enforceSingleInstance ( QString uniqueAppId)

This function is used to limit a particular application such that only one running instance is allowed at one time. Call this function at the point at which you want additional instances to terminate, and check the result:

If the calling instance is the only one running, the function will return true; otherwise it returns false.

uniqueAppId acts as a universal identifier for the application, intended to work across different versions and builds, and therefore should be a reasonably unique string that typically is never changed in future revisions once set.

◆ fileContainsString()

QX_IO_EXPORT IoOpReport Qx::fileContainsString ( bool & returnBuffer,
QFile & textFile,
const QString & query,
Qt::CaseSensitivity cs,
bool allowSplit )

Checks if textFile contains the given query.

Parameters
[out]returnBufferSet to true if the file contains the query text; otherwise set to false.
[in]textFileThe file search.
[in]queryThe text to search for.
[in]csWhether or not the search is case sensitive.
[in]allowSplitWhether or not the query text is matched if it's split across a line break.
Returns
A report containing details of operation success or failure.

◆ fileIsEmpty() [1/2]

QX_IO_EXPORT IoOpReport Qx::fileIsEmpty ( bool & returnBuffer,
const QFile & file )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Sets returnBuffer to true if the file is empty; otherwise sets it to false.

If the file doesn't exist, returnBuffer will be set to true and an operation report noting the file's absence is returned.

◆ fileIsEmpty() [2/2]

QX_IO_EXPORT bool Qx::fileIsEmpty ( const QFile & file)

Returns true if file is empty; otherwise returns false.

Warning
This also returns true if the file doesn't exist.

◆ fileMatchesChecksum()

QX_IO_EXPORT IoOpReport Qx::fileMatchesChecksum ( bool & returnBuffer,
QFile & file,
QString checksum,
QCryptographicHash::Algorithm hashAlgorithm )

Checks if a file's checksum matches a known value.

Parameters
[out]returnBufferSet to true if the file's checksum matches; otherwise returns false.
[in]fileThe file to hash.
[in]hashAlgorithmThe hash algorithm used to calculate the known checksum.
[in]checksumThe known checksum to compare against.
Returns
A report detailing operation success or failure.

◆ findAllValues()

QX_CORE_EXPORT QList< QJsonValue > Qx::findAllValues ( const QJsonValue & rootValue,
QStringView key )

Recursively searches rootValue for key and returns the associated value for all matches as a list, or an empty list if the key was not found.

If rootValue is of any type other than QJsonValue::Array or QJsonValue::Object then returned list will always be empty.

◆ findStringInFile()

QX_IO_EXPORT IoOpReport Qx::findStringInFile ( QList< TextPos > & returnBuffer,
QFile & textFile,
const TextQuery & query,
ReadOptions readOptions )

Searches for the given query within textFile and returns the result(s) if found.

Parameters
[out]returnBufferA List of positions where the query was found.
[in]textFileThe file search.
[in]queryThe text to search for.
[in]readOptionsOptions modifying how the file is parsed.
Returns
A report containing details of operation success or failure.

◆ floorNearestMultiple()

template<typename T >
requires std::integral<T>
T Qx::floorNearestMultiple ( T num,
T mult )

Returns the previous (i.e. lower) multiple of mult after num, or num if it is already a multiple of mult.

The sign of the result will always be the same sign as num, regardless of the sign of mult.

◆ floorPowOfTwo()

template<typename T >
requires std::integral<T>
T Qx::floorPowOfTwo ( T num)

Returns the previous (i.e. lower) power of two before num, or num if it is already a power of two.

◆ forceKillProcess() [1/2]

QX_WINDOWS_EXPORT SystemError Qx::forceKillProcess ( HANDLE processHandle)

Forcefully closes the process referenced by processHandle.

See also
forceKillProcess(quint32), cleanKillProcess();

◆ forceKillProcess() [2/2]

QX_CORE_EXPORT SystemError Qx::forceKillProcess ( quint32 processId)

Forcefully closes the process referenced by processId such that it exists immediately.

Windows:
The closure is performed by invoking TerminateProcess() on the process, setting its exit code to 0xFFFF.
Linux:
The closure is performed by sending the SIGKILL signal to the process.

If the operation fails the returned error object will contain the cause.

Note
This function does not support a value of 0 for processId in order to kill the current process. Instead pass the result of QCoreApplication::applicationPid().
See also
cleanKillProcess(), and QProcess::kill();

◆ getLastError()

QX_WINDOWS_EXPORT SystemError Qx::getLastError ( )

Returns the calling threads last error code value as a system error.

See also
GetLastError

◆ isDefaultProtocolHandler()

QX_CORE_EXPORT bool Qx::isDefaultProtocolHandler ( const QString & scheme,
const QString & path )

Returns true if the application at path is set as the default handler for URI requests of scheme for the current user; otherwise, returns false.

If path is left empty, it defaults to QCoreApplication::applicationFilePath().

Note
On Linux this function relies on FreeDesktop conformance.
See also
setDefaultProtocolHandler() and removeDefaultProtocolHandler().

◆ isEven()

template<typename T >
requires arithmetic<T>
bool Qx::isEven ( T num)

Returns true if there are duplicate elements in the range [first, last); otherwise returns false.

◆ isOdd()

template<typename T >
requires arithmetic<T>
bool Qx::isOdd ( T num)

Returns true if num is odd; otherwise returns false.

◆ kosherizeFileName()

QX_IO_EXPORT QString Qx::kosherizeFileName ( QString fileName)

Returns a version of fileName with all illegal filename characters replaced with similar legal characters or outright removed.

Note
The filtration is not platform specific and instead produces a name that is legal on all supported platforms.
Warning
It is possible for two very similarly named files to map to the same kosher name if you aren't careful.

◆ length()

template<typename T >
requires std::integral<T>
T Qx::length ( T start,
T end )

Computes the length of, or alternatively the number of elements in, the range [start, end].

This is equivalent to: (end - start) + 1.

◆ operator==()

bool Qx::operator== ( const FileDetails::Translation & lhs,
const FileDetails::Translation & rhs )
noexcept

Returns true if the target and destination of lhs are the same as in rhs; otherwise returns false

◆ parseJson() [1/5]

template<typename T >
requires QxJson::json_containing<T>
JsonError Qx::parseJson ( T & parsed,
const QJsonArray & array )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parses the JSON array array and stores the result in parsed. T must satisfy the QxJson::json_containing concept.

◆ parseJson() [2/5]

template<typename T >
requires json_root<T>
JsonError Qx::parseJson ( T & parsed,
const QJsonDocument & doc )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parses the entire JSON document doc and stores the result in parsed. T must satisfy the Qx::json_root concept.

◆ parseJson() [3/5]

template<typename T >
requires QxJson::json_struct<T>
JsonError Qx::parseJson ( T & parsed,
const QJsonObject & obj )

Parses the JSON object obj and stores the result in parsed. T must satisfy the QxJson::json_struct concept.

If parsing fails, a valid JsonError is returned that describes the cause; otherwise, an invalid error is returned.

◆ parseJson() [4/5]

template<typename T >
requires json_root<T>
JsonError Qx::parseJson ( T & parsed,
const QString & filePath )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parses the entire JSON document file at path filePath and stores the result in parsed. T must satisfy the Qx::json_root concept.

◆ parseJson() [5/5]

template<typename T >
requires json_root<T>
JsonError Qx::parseJson ( T & parsed,
QFile & file )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parses the entire JSON document file file and stores the result in parsed. T must satisfy the Qx::json_root concept.

◆ postBlockingError()

QX_WIDGETS_EXPORT int Qx::postBlockingError ( const Error & error,
QMessageBox::StandardButtons choices,
QMessageBox::StandardButton defChoice )

Displays error using a QMessageBox, blocks until it's closed, and finally returns the button that was selected.

Parameters
errorThe error to display.
choicesThe different option buttons to display.
defChoiceThe default button that is selected.
Returns
The value of the selected button.
Note
This function only works with QMessageBox::StandardButton, not with custom buttons.
See also
postError().

◆ postError()

QX_WIDGETS_EXPORT void Qx::postError ( const Error & error)

Displays error using a QMessageBox with an OK button.

As an example, this code:

ge.setErrorLevel(Qx::GenericError::Warning);
ge.setCaption("Warning");
ge.setPrimaryInfo("Watch out for something!");
ge.setSecondaryInfo("Oops");
ge.setDetailedInfo("Problems");

results in the following message box:

Note
This function does not block and returns immediately. The QMessageBox object is automatically deleted after it is closed.
See also
postBlockingError(), QTextStream& operator<<(QTextStream& ts, const Qx::Error& e).

◆ processChildren()

QX_CORE_EXPORT QList< quint32 > Qx::processChildren ( quint32 processId,
bool recursive )

Returns a list of process IDs for all the children of the process specified by processId, or an empty list if the process has no children or an an error occurred.

If recursive is true, the returned list will contain the process ID of every process descended from the specified process, instead of just its immediate children; in other words, the list will represent the entire process tree of processId, excluding itself.

The list is not guaranteed to be in any particular order.

◆ processId()

QX_CORE_EXPORT quint32 Qx::processId ( QString processName)

Returns the PID (process ID) of a running process with the name processName, or zero if the process could not be found.

See also
processName().

◆ processIsElevated() [1/3]

QX_WINDOWS_EXPORT SystemError Qx::processIsElevated ( bool & elevated)

Sets elevated to true if the current process is running with elevated privileges; otherwise, sets it to false.

If the operation fails the returned error object will contain the cause and elevated will be set to false.

Note
Here 'elevated' is used in the context of Windows UAC (User Account Control).
A process is considered elevated if UAC is enabled and the process was elevated by an administrator (i.e. "Run as administrator"), or if UAC is disabled and the process was started by a user who is a member of the 'Administrators' group.

◆ processIsElevated() [2/3]

QX_WINDOWS_EXPORT SystemError Qx::processIsElevated ( bool & elevated,
DWORD processId )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Sets elevated to true if the process specified by processId is running with elevated privileges; otherwise, sets it to false.

◆ processIsElevated() [3/3]

QX_WINDOWS_EXPORT SystemError Qx::processIsElevated ( bool & elevated,
HANDLE processHandle )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Sets elevated to true if the process referenced by processHandle is running with elevated privileges; otherwise, sets it to false.

Note
The handle must be valid and have been opened with the PROCESS_QUERY_LIMITED_INFORMATION access permission.

◆ processIsRunning() [1/3]

QX_WINDOWS_EXPORT bool Qx::processIsRunning ( HANDLE processHandle)

Returns true if the process referred to by processName is currently running; otherwise returns false.

Note
The handle must be valid and have been opened with the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATIONaccess right.

◆ processIsRunning() [2/3]

QX_CORE_EXPORT bool Qx::processIsRunning ( QString processName)

Returns true if the process with the name processName is currently running; otherwise returns false.

◆ processIsRunning() [3/3]

QX_CORE_EXPORT bool Qx::processIsRunning ( quint32 processId)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns true if the process with the PID processID is currently running; otherwise returns false.

◆ processName()

QX_CORE_EXPORT QString Qx::processName ( quint32 processId)

Returns the process name of a running process with the PID processId, or a null string if the process could not be found.

See also
processId().

◆ processThreadIds()

QX_WINDOWS_EXPORT QList< DWORD > Qx::processThreadIds ( DWORD processId)

Returns a list of thread IDs, sorted by creation time (oldest to newest), for all threads associated with the process specified by PID processId.

The returned list will be empty in the event of an error.

Note
While likely, it is not guaranteed that the first ID in the list is that of the process' main/original thread.
See also
processIdByName().

◆ qHash() [1/2]

size_t Qx::qHash ( const DownloadTask & key,
size_t seed )
noexcept

Hashes the download task key with the initial seed.

◆ qHash() [2/2]

size_t Qx::qHash ( const FileDetails::Translation & key,
size_t seed )
noexcept

Hashes the download task key with the initial seed.

◆ readBytesFromFile()

QX_IO_EXPORT IoOpReport Qx::readBytesFromFile ( QByteArray & returnBuffer,
QFile & file,
Index64 startPos,
Index64 endPos )

Reads the given range of bytes from file.

Parameters
[out]returnBufferThe bytes read from the file.
[in]fileThe file to read from.
[in]startPosThe position to begin reading from.
[in]endPosThe position to read until.
Returns
A report containing details of operation success or failure.

◆ readTextFromFile() [1/3]

QX_IO_EXPORT IoOpReport Qx::readTextFromFile ( QString & returnBuffer,
QFile & textFile,
TextPos startPos,
int count,
ReadOptions readOptions )

Reads the given range of text from textFile.

Parameters
[out]returnBufferThe text read from the file.
[in]textFileThe file to read from.
[in]startPosThe position to begin reading from.
[in]countThe number of characters to read.
[in]readOptionsOptions modifying how the file is parsed.
Returns
A report containing details of operation success or failure.

◆ readTextFromFile() [2/3]

QX_IO_EXPORT IoOpReport Qx::readTextFromFile ( QString & returnBuffer,
QFile & textFile,
TextPos startPos,
TextPos endPos,
ReadOptions readOptions )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reads the given range of text from textFile.

Parameters
[out]returnBufferThe text read from the file.
[in]textFileThe file to read from.
[in]startPosThe position to begin reading from.
[in]endPosThe position to read until.
[in]readOptionsOptions modifying how the file is parsed.
Returns
A report containing details of operation success or failure.

◆ readTextFromFile() [3/3]

QX_IO_EXPORT IoOpReport Qx::readTextFromFile ( QStringList & returnBuffer,
QFile & textFile,
Index32 startLine,
Index32 endLine,
ReadOptions readOptions )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reads the given range of text from textFile.

Parameters
[out]returnBufferThe text read from the file, separated by line.
[in]textFileThe file to read from.
[in]startLineThe line to begin reading from.
[in]endLineThe line to read until.
[in]readOptionsOptions modifying how the file is parsed.
Returns
A report containing details of operation success or failure.
Note
The output list will not contain any end-of-line characters.

◆ removeDefaultProtocolHandler()

QX_CORE_EXPORT bool Qx::removeDefaultProtocolHandler ( const QString & scheme,
const QString & path )

Removes the application at path as the default handler for UR requests of scheme if it is currently set as such for the current user. This function can only remove the default on a per-user basis, so it can fail if the default is set system-wide on platforms where users cannot override defaults with an unset value.

If path is left empty, it defaults to QCoreApplication::applicationFilePath().

Returns true if the operation was successful, or the application is not the default; otherwise, returns false.

Note
On Linux this function relies on FreeDesktop conformance and may require a restart of the user's desktop session to take effect.
Warning
On Linux this function causes mimeapps.list to be reordered, which can affect MIME handler priorities! It is recommended to avoid this function in its current state.
See also
isDefaultProtocolHandler() and setDefaultProtocolHandler().

◆ roundPowOfTwo()

template<typename T >
requires std::integral<T>
T Qx::roundPowOfTwo ( T num)

Returns the power of two that is closest to num.

◆ roundToNearestMultiple()

template<typename T >
requires std::integral<T>
T Qx::roundToNearestMultiple ( T num,
T mult )

Returns the multiple of mult that num is closest to.

The sign of the result will always be the same sign as num, regardless of the sign of mult.

◆ serializeJson() [1/5]

template<typename T >
requires json_root<T>
JsonError Qx::serializeJson ( const QString & filePath,
const T & root )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Serializes the entire JSON root structure root and writes the result to the file at path filePath in indented format, replacing existing contents, if any.

T must satisfy the Qx::json_root concept.

If serialization fails, a valid JsonError is returned that describes the cause; otherwise, an invalid error is returned.

◆ serializeJson() [2/5]

template<typename T >
requires json_root<T>
JsonError Qx::serializeJson ( QFile & serialized,
const T & root )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Serializes the entire JSON root structure root and writes the result to serialized in indented format, replacing existing contents, if any.

T must satisfy the Qx::json_root concept.

If serialization fails, a valid JsonError is returned that describes the cause; otherwise, an invalid error is returned.

◆ serializeJson() [3/5]

template<typename T >
requires QxJson::json_containing<T>
void Qx::serializeJson ( QJsonArray & serialized,
const T & container )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Serializes the container container and stores the result in serialized. T must satisfy the QxJson::json_containing concept.

◆ serializeJson() [4/5]

template<typename T >
requires json_root<T>
void Qx::serializeJson ( QJsonDocument & serialized,
const T & root )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Serializing the entire JSON root structure root and stores the result in serialized. T must satisfy the Qx::json_root concept.

◆ serializeJson() [5/5]

template<typename T >
requires QxJson::json_struct<T>
void Qx::serializeJson ( QJsonObject & serialized,
const T & struc )

Serializes the struct struc and stores the result in serialized. T must satisfy the QxJson::json_struct concept.

◆ setDefaultProtocolHandler()

QX_CORE_EXPORT bool Qx::setDefaultProtocolHandler ( const QString & scheme,
const QString & name,
const QString & path,
const QStringList & args )

Sets the application at path as the default handler for URI requests of scheme for the current user. The registration is configured so that when a URL that uses the protocol is followed, the program at the given path will be executed with the scheme URL as the last argument. Generally, the user is shown a prompt with the friendly name of the application name when the protocol is used.

scheme cannot contain whitespace. If path is left empty, it defaults to QCoreApplication::applicationFilePath().

Returns true if the operation was successful; otherwise, returns false.

Commonly, applications are designed to handle scheme URLs as a singular argument:

myapp myscheme://some-data-here

as most operating system facilities that allow a user to select a default protocol handler do not for adding additional arguments; however, additional arguments can be provided via args, which are placed before the scheme URL.

Note
On Linux this function relies on FreeDesktop conformance.
Warning
The provided arguments are automatically quoted, but not escaped. If the provided arguments contain reserved characters, they will need to be escaped manually.
See also
isDefaultProtocolHandler() and removeDefaultProtocolHandler().

◆ setUserInputEchoEnabled()

QX_CORE_EXPORT void Qx::setUserInputEchoEnabled ( bool enabled)

This function only pertains to console applications.

Enables or disables the echoing of user input (stdin) to the console depending on the value of enabled.

By default echoing is enabled.

Note
On Linux this function is only available on systems that utilize the 'termios' terminal interface.

◆ severityString()

QString Qx::severityString ( Severity sv,
bool uc )

Returns the string representation of sv.

If uc is set to true, the returned string is entirely in uppercase.

◆ textFileAbsolutePosition()

QX_IO_EXPORT IoOpReport Qx::textFileAbsolutePosition ( TextPos & textPos,
QFile & textFile,
bool ignoreTrailingEmpty )

Converts any relative component of textPos to an absolute one. I.e. determines the actual line and or/character that Index32(Index32::Last) references for the given textFile, if present.

If neither the line or character component of textPos contain the value Index32(Index32::Last), textPos is left unchanged.

Parameters
[in,out]textPosThe text position to translate into an absolute position.
[in]textFileThe file to evaluate the text position on.
[in]ignoreTrailingEmptyWhether or not to count the last line of the file if it is empty.
Returns
A report containing details of operation success or failure.

◆ textFileEndsWithNewline()

QX_IO_EXPORT IoOpReport Qx::textFileEndsWithNewline ( bool & returnBuffer,
QFile & textFile )

Tests if textFile has a trailing end-of-line character

Parameters
[out]returnBufferSet to true if the file's last character(s) are "\\n" or "\\r\\n"; otherwise set to false.
[in]textFileThe file to test.
Returns
A report containing details of operation success or failure.

◆ textFileLayout()

QX_IO_EXPORT IoOpReport Qx::textFileLayout ( QList< int > & returnBuffer,
QFile & textFile,
bool ignoreTrailingEmpty )

Inspects the structure of textFile in terms of lines and characters.

Parameters
[out]returnBufferA list containing the character count of all lines in the file, with its size also conveying the line count of the file.
[in]textFileThe file to inspect.
[in]ignoreTrailingEmptyWhether or not to include the last line of the file in the list if it is empty.
Returns
A report containing details of operation success or failure.

◆ textFileLineCount()

QX_IO_EXPORT IoOpReport Qx::textFileLineCount ( int & returnBuffer,
QFile & textFile,
bool ignoreTrailingEmpty )

Determines the number of lines in textFile, equivalent to the number of line breaks plus one.

Parameters
[out]returnBufferThe line count of the file.
[in]textFileThe file to inspect.
[in]ignoreTrailingEmptyWhether or not to count the last line of the file if it is empty.
Returns
A report containing details of operation success or failure.

◆ writeBytesToFile() [1/2]

QX_IO_EXPORT IoOpReport Qx::writeBytesToFile ( QFile & file,
const QByteArray & bytes,
WriteMode writeMode,
Index64 startPos,
WriteOptions writeOptions )

Writes the given bytes to file.

Parameters
[in]fileThe file to write to.
[in]bytesThe bytes to be written.
[in]writeModeThe mode to use for writing.
[in]startPosThe position from which to begin writing. This argument is ignored if writeMode is WriteMode::Append.
[in]writeOptionsOptions modifying how the file is written.
Returns
A report containing details of operation success or failure.

◆ writeBytesToFile() [2/2]

QX_IO_EXPORT IoOpReport Qx::writeBytesToFile ( QSaveFile & file,
const QByteArray & bytes,
WriteMode writeMode,
Index64 startPos,
WriteOptions writeOptions )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ writeStringToFile() [1/2]

QX_IO_EXPORT IoOpReport Qx::writeStringToFile ( QFile & textFile,
const QString & text,
WriteMode writeMode,
TextPos startPos,
WriteOptions writeOptions )

Writes the given text to textFile.

Parameters
[in]textFileThe file to write to.
[in]textThe text to be written.
[in]writeModeThe mode to use for writing.
[in]startPosThe position from which to begin writing. This argument is ignored if writeMode is WriteMode::Append.
[in]writeOptionsOptions modifying how the file is written.
Returns
A report containing details of operation success or failure.

◆ writeStringToFile() [2/2]

QX_IO_EXPORT IoOpReport Qx::writeStringToFile ( QSaveFile & textFile,
const QString & text,
WriteMode writeMode,
TextPos startPos,
WriteOptions writeOptions )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ xdgDesktopSettingsFormat()

QX_CORE_EXPORT QSettings::Format Qx::xdgDesktopSettingsFormat ( )

Same as xdgSettingsFormat() but the returned format is better suited for manipulating XDG Desktop Entries specifically. It ensures that the "Desktop Entry" section is always written first and ensures that a given file contains such an entry since it's required.

Note
This function is only available on Linux, and part of the Core component instead of the Linux component for technical reasons.
Warning
See the warning for xdgSettingsFormat().

◆ xdgSettingsFormat()

QX_CORE_EXPORT QSettings::Format Qx::xdgSettingsFormat ( )

Returns a QSettings::Format type that can be used to construct a QSettings object capable of handling several XDG file formats.

This format is utilized similarly to QSettings::Format::Ini, noteably in that the first section of a key before a separator '/' corresponds to the group within the XDG file and the rest of the key is the actual key within the file. It also allows for group names with spaces and avoids other behavior imposed by the built-in INI format that breaks XDG file formats.

Note
This function is only available on Linux, and part of the Core component instead of the Linux component for technical reasons.
Warning

This format handler is fairly primitive, only being slightly more competant that straight bodge and should be used with caution. Basic checking of key/group name validity is performed and file output is largely conformant by default; however, any escaping and unescaping of parameters must be handled manually, multi-element values are not automatically seperated into a list, comment and blank lines in the original file are not preserved, nor is key order. Generally any value that cannot be converted to another type 'as is' (e.g. true and false clearly are booleans) are parsed as plain strings.

Eventually a dedicated and fully conformant parser will be added.

◆ xmlSanitized()

QX_XML_EXPORT QString Qx::xmlSanitized ( const QString & string)

Returns a copy of string with all non-legal XML characters removed

Variable Documentation

◆ cerr

QTextStream Qx::cerr = QTextStream(stderr)
inline

QTextStream equivalent of std::cerr.

◆ cin

QTextStream Qx::cin = QTextStream(stdin)
inline

QTextStream equivalent of std::cin.

◆ cout

QTextStream Qx::cout = QTextStream(stdout)
inline

QTextStream equivalent of std::cout.

◆ ENDL

QChar Qx::ENDL = '\n'

An alias for the line break character, '\n'.

Note
This is distinct from std::endl and Qt::endl as this value actually contains the character for line feed, instead of acting as a macro that instructs a stream to insert a line break and then flush its buffer.

◆ LIST_ITEM_PREFIX

QString Qx::LIST_ITEM_PREFIX = u"- "_s

Equivalent to "- "

Perhaps you want to use this as a marker for a list item, perhaps you don't.