diff --git a/src/libs/qmuparser/qmuparserbase.h b/src/libs/qmuparser/qmuparserbase.h index 4e250100d..39fe51a3e 100644 --- a/src/libs/qmuparser/qmuparserbase.h +++ b/src/libs/qmuparser/qmuparserbase.h @@ -141,7 +141,7 @@ protected: /** * @brief Typedef for the token reader. */ - typedef QmuParserTokenReader token_reader_type; + using token_reader_type = QmuParserTokenReader; QLocale m_locale; ///< The locale used by the parser QChar m_decimalPoint; @@ -202,22 +202,22 @@ private: * the function pointer to the parser function depending on * which state it is in. (i.e. bytecode parser vs. string parser) */ - typedef qreal (QmuParserBase::*ParseFunction)() const; + using ParseFunction = qreal (QmuParserBase::*)() const; /** * @brief Type used for storing an array of values. */ - typedef QVector valbuf_type; + using valbuf_type = QVector; /** * @brief Type for a vector of strings. */ - typedef QVector stringbuf_type; + using stringbuf_type = QVector; /** * @brief Type used for parser tokens. */ - typedef QmuParserToken token_type; + using token_type = QmuParserToken; /** * @brief Maximum number of threads spawned by OpenMP when using the bulk mode. diff --git a/src/libs/qmuparser/qmuparserdef.h b/src/libs/qmuparser/qmuparserdef.h index 8609e9de2..ce0338bb1 100644 --- a/src/libs/qmuparser/qmuparserdef.h +++ b/src/libs/qmuparser/qmuparserdef.h @@ -189,117 +189,117 @@ enum EOprtPrecedence Depends on wether UNICODE is used or not. */ -typedef QMUP_STRING_TYPE string_type; +using string_type = std::wstring; /** @brief The character type used by the parser. Depends on wether UNICODE is used or not. */ -typedef string_type::value_type char_type; +using char_type = string_type::value_type; /** @brief Typedef for easily using stringstream that respect the parser stringtype. */ -typedef std::basic_stringstream, std::allocator> stringstream_type; +using stringstream_type = std::basic_stringstream, std::allocator>; // Data container types /** @brief Type used for storing variables. */ -typedef std::map varmap_type; +using varmap_type = std::map; /** @brief Type used for storing constants. */ -typedef std::map valmap_type; +using valmap_type = std::map; /** @brief Type for assigning a string name to an index in the internal string table. */ -typedef std::map strmap_type; +using strmap_type = std::map; // Parser callbacks /** @brief Callback type used for functions without arguments. */ -typedef qreal (*generic_fun_type)(); +using generic_fun_type = qreal (*)(); /** @brief Callback type used for functions without arguments. */ -typedef qreal (*fun_type0)(); +using fun_type0 = qreal (*)(); /** @brief Callback type used for functions with a single arguments. */ -typedef qreal (*fun_type1)(qreal); +using fun_type1 = qreal (*)(qreal); /** @brief Callback type used for functions with two arguments. */ -typedef qreal (*fun_type2)(qreal, qreal); +using fun_type2 = qreal (*)(qreal, qreal); /** @brief Callback type used for functions with three arguments. */ -typedef qreal (*fun_type3)(qreal, qreal, qreal); +using fun_type3 = qreal (*)(qreal, qreal, qreal); /** @brief Callback type used for functions with four arguments. */ -typedef qreal (*fun_type4)(qreal, qreal, qreal, qreal); +using fun_type4 = qreal (*)(qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*fun_type5)(qreal, qreal, qreal, qreal, qreal); +using fun_type5 = qreal (*)(qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*fun_type6)(qreal, qreal, qreal, qreal, qreal, qreal); +using fun_type6 = qreal (*)(qreal, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*fun_type7)(qreal, qreal, qreal, qreal, qreal, qreal, qreal); +using fun_type7 = qreal (*)(qreal, qreal, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*fun_type8)(qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); +using fun_type8 = qreal (*)(qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*fun_type9)(qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); +using fun_type9 = qreal (*)(qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*fun_type10)(qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); +using fun_type10 = qreal (*)(qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions without arguments. */ -typedef qreal (*bulkfun_type0)(int, int); +using bulkfun_type0 = qreal (*)(int, int); /** @brief Callback type used for functions with a single arguments. */ -typedef qreal (*bulkfun_type1)(int, int, qreal); +using bulkfun_type1 = qreal (*)(int, int, qreal); /** @brief Callback type used for functions with two arguments. */ -typedef qreal (*bulkfun_type2)(int, int, qreal, qreal); +using bulkfun_type2 = qreal (*)(int, int, qreal, qreal); /** @brief Callback type used for functions with three arguments. */ -typedef qreal (*bulkfun_type3)(int, int, qreal, qreal, qreal); +using bulkfun_type3 = qreal (*)(int, int, qreal, qreal, qreal); /** @brief Callback type used for functions with four arguments. */ -typedef qreal (*bulkfun_type4)(int, int, qreal, qreal, qreal, qreal); +using bulkfun_type4 = qreal (*)(int, int, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*bulkfun_type5)(int, int, qreal, qreal, qreal, qreal, qreal); +using bulkfun_type5 = qreal (*)(int, int, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*bulkfun_type6)(int, int, qreal, qreal, qreal, qreal, qreal, qreal); +using bulkfun_type6 = qreal (*)(int, int, qreal, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*bulkfun_type7)(int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal); +using bulkfun_type7 = qreal (*)(int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*bulkfun_type8)(int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); +using bulkfun_type8 = qreal (*)(int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*bulkfun_type9)(int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); +using bulkfun_type9 = qreal (*)(int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with five arguments. */ -typedef qreal (*bulkfun_type10)(int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); +using bulkfun_type10 = qreal (*)(int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal); /** @brief Callback type used for functions with a variable argument list. */ -typedef qreal (*multfun_type)(const qreal *, qmusizetype); +using multfun_type = qreal (*)(const qreal *, qmusizetype); /** @brief Callback type used for functions taking a string as an argument. */ -typedef qreal (*strfun_type1)(const QString &); +using strfun_type1 = qreal (*)(const QString &); /** @brief Callback type used for functions taking a string and a value as arguments. */ -typedef qreal (*strfun_type2)(const QString &, qreal); +using strfun_type2 = qreal (*)(const QString &, qreal); /** @brief Callback type used for functions taking a string and two values as arguments. */ -typedef qreal (*strfun_type3)(const QString &, qreal, qreal); +using strfun_type3 = qreal (*)(const QString &, qreal, qreal); /** @brief Callback used for functions that identify values in a string. */ -typedef int (*identfun_type)(const QString &sExpr, qmusizetype *nPos, qreal *fVal, const QLocale &locale, bool cNumbers, - const QChar &decimal, const QChar &thousand); +using identfun_type = int (*)(const QString &, qmusizetype *, qreal *, const QLocale &, bool, const QChar &, + const QChar &); /** @brief Callback used for variable creation factory functions. */ -typedef qreal *(*facfun_type)(const QString &, void *); +using facfun_type = qreal *(*)(const QString &, void *); } // namespace qmu #endif diff --git a/src/libs/qmuparser/qmuparsertest.h b/src/libs/qmuparser/qmuparsertest.h index fae845ac0..f9392a939 100644 --- a/src/libs/qmuparser/qmuparsertest.h +++ b/src/libs/qmuparser/qmuparsertest.h @@ -59,7 +59,7 @@ class QMUPARSERSHARED_EXPORT QmuParserTester : public QObject // final Q_OBJECT // NOLINT public: - typedef int (QmuParserTester::*testfun_type)(); + using testfun_type = int (QmuParserTester::*)(); explicit QmuParserTester(QObject *parent = nullptr); diff --git a/src/libs/vdxf/libdxfrw/drw_base.h b/src/libs/vdxf/libdxfrw/drw_base.h index b1626a3bb..344ab902d 100644 --- a/src/libs/vdxf/libdxfrw/drw_base.h +++ b/src/libs/vdxf/libdxfrw/drw_base.h @@ -65,19 +65,19 @@ Class &operator=(Class &&) = delete; #endif -typedef signed char dint8; /* 8 bit signed */ -typedef signed short dint16; /* 16 bit signed */ -typedef signed int dint32; /* 32 bit signed */ -typedef long long int dint64; /* 64 bit signed */ +using dint8 = signed char; /* 8 bit signed */ +using dint16 = short; /* 16 bit signed */ +using dint32 = int; /* 32 bit signed */ +using dint64 = long long; /* 64 bit signed */ -typedef unsigned char duint8; /* 8 bit unsigned */ -typedef unsigned short duint16; /* 16 bit unsigned */ -typedef unsigned int duint32; /* 32 bit unsigned */ -typedef unsigned long long int duint64; /* 64 bit unsigned */ +using duint8 = unsigned char; /* 8 bit unsigned */ +using duint16 = unsigned short; /* 16 bit unsigned */ +using duint32 = unsigned int; /* 32 bit unsigned */ +using duint64 = unsigned long long; /* 64 bit unsigned */ -typedef float dfloat32; /* 32 bit floating point */ -typedef double ddouble64; /* 64 bit floating point */ -typedef long double ddouble80; /* 80 bit floating point */ +using dfloat32 = float; /* 32 bit floating point */ +using ddouble64 = double; /* 64 bit floating point */ +using ddouble80 = long double; /* 80 bit floating point */ namespace DRW { @@ -493,13 +493,13 @@ public: } private: - typedef union + using DRW_VarContent = union { UTF8STRING *s; dint32 i; double d; DRW_Coord *v; - } DRW_VarContent; + }; public: DRW_VarContent content; diff --git a/src/libs/vlayout/dialogs/vabstractlayoutdialog.h b/src/libs/vlayout/dialogs/vabstractlayoutdialog.h index 13483425a..cbda557a4 100644 --- a/src/libs/vlayout/dialogs/vabstractlayoutdialog.h +++ b/src/libs/vlayout/dialogs/vabstractlayoutdialog.h @@ -66,8 +66,8 @@ public: static void InitTileTemplates(QComboBox *comboBoxTemplates, bool keepCustom = false); protected: - typedef QStringList FormatsVector; - typedef int VIndexType; + using FormatsVector = QStringList; + using VIndexType = int; static auto PageFormatNames() -> const FormatsVector &; static auto RoundTemplateSize(qreal width, qreal height, Unit unit) -> QSizeF; diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index 7ab44706e..66561f916 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -219,7 +219,7 @@ enum class PiecePathType : quint8 Unknown = 3 }; -typedef int ToolVisHolderType; +using ToolVisHolderType = int; enum class Tool : ToolVisHolderType { Arrow, diff --git a/src/test/ValentinaTest/tst_vtooluniondetails.cpp b/src/test/ValentinaTest/tst_vtooluniondetails.cpp index e414d7ee7..6ae1c33c9 100644 --- a/src/test/ValentinaTest/tst_vtooluniondetails.cpp +++ b/src/test/ValentinaTest/tst_vtooluniondetails.cpp @@ -39,7 +39,7 @@ using namespace Qt::Literals::StringLiterals; -typedef QPair UnitedPathNode; +using UnitedPathNode = QPair; Q_DECLARE_METATYPE(UnitedPathNode)