diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2019-02-20 13:38:24 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2019-02-23 07:38:42 +0000 |
commit | e160b26d8c7476c63f6220ac69d1d6405e8ce3aa (patch) | |
tree | a63896f1b3d74ab9b50d45070213d6897a8d7248 /src/lib | |
parent | 6615e52e4308962a7d10d606eead188fbfe198f3 (diff) | |
download | qbs-e160b26d8c7476c63f6220ac69d1d6405e8ce3aa.tar.gz |
Replace 'typedef' with 'using' where it is possible
One exception is that the 'typedef' for function pointers
were skipped due to an additional work is required.
Change-Id: I2112fded3abeaee1d1f49f56adfd2914d5db0324
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib')
25 files changed, 86 insertions, 86 deletions
diff --git a/src/lib/corelib/api/qmljsrewriter.h b/src/lib/corelib/api/qmljsrewriter.h index 0a575496c..797b05459 100644 --- a/src/lib/corelib/api/qmljsrewriter.h +++ b/src/lib/corelib/api/qmljsrewriter.h @@ -57,7 +57,7 @@ public: ArrayBinding }; - typedef ChangeSet::Range Range; + using Range = ChangeSet::Range; public: Rewriter(const QString &originalText, diff --git a/src/lib/corelib/api/rulecommand.h b/src/lib/corelib/api/rulecommand.h index 172e1ad51..438849604 100644 --- a/src/lib/corelib/api/rulecommand.h +++ b/src/lib/corelib/api/rulecommand.h @@ -83,7 +83,7 @@ private: }; -typedef QList<RuleCommand> RuleCommandList; +using RuleCommandList = QList<RuleCommand>; } // namespace qbs diff --git a/src/lib/corelib/buildgraph/buildgraphloader.h b/src/lib/corelib/buildgraph/buildgraphloader.h index 761c80603..94eb01c5d 100644 --- a/src/lib/corelib/buildgraph/buildgraphloader.h +++ b/src/lib/corelib/buildgraph/buildgraphloader.h @@ -127,7 +127,7 @@ private: ArtifactSet children; ArtifactSet childrenAddedByScanner; }; - typedef QHash<const Artifact *, ChildrenInfo> ChildListHash; + using ChildListHash = QHash<const Artifact *, ChildrenInfo>; void rescueOldBuildData(const ResolvedProductConstPtr &restoredProduct, const ResolvedProductPtr &newlyResolvedProduct, const ChildListHash &childLists, diff --git a/src/lib/corelib/buildgraph/executor.h b/src/lib/corelib/buildgraph/executor.h index 2756a7120..003ba9a22 100644 --- a/src/lib/corelib/buildgraph/executor.h +++ b/src/lib/corelib/buildgraph/executor.h @@ -109,8 +109,8 @@ private: bool operator() (const BuildGraphNode *x, const BuildGraphNode *y) const; }; - typedef std::priority_queue<BuildGraphNode *, std::vector<BuildGraphNode *>, - ComparePriority> Leaves; + using Leaves = std::priority_queue<BuildGraphNode *, std::vector<BuildGraphNode *>, + ComparePriority>; void doBuild(); void prepareAllNodes(); @@ -158,7 +158,7 @@ private: void updateJobCounts(const Transformer *transformer, int diff); bool schedulingBlockedByJobLimit(const BuildGraphNode *node); - typedef QHash<ExecutorJob *, TransformerPtr> JobMap; + using JobMap = QHash<ExecutorJob *, TransformerPtr>; JobMap m_processingJobs; ProductInstaller *m_productInstaller; diff --git a/src/lib/corelib/buildgraph/forward_decls.h b/src/lib/corelib/buildgraph/forward_decls.h index f39c9eb6f..a76272288 100644 --- a/src/lib/corelib/buildgraph/forward_decls.h +++ b/src/lib/corelib/buildgraph/forward_decls.h @@ -51,20 +51,20 @@ class ProductBuildData; class RuleNode; class Transformer; -typedef std::shared_ptr<Transformer> TransformerPtr; -typedef std::shared_ptr<const Transformer> TransformerConstPtr; +using TransformerPtr = std::shared_ptr<Transformer>; +using TransformerConstPtr = std::shared_ptr<const Transformer>; class RulesEvaluationContext; -typedef std::shared_ptr<RulesEvaluationContext> RulesEvaluationContextPtr; +using RulesEvaluationContextPtr = std::shared_ptr<RulesEvaluationContext>; class AbstractCommand; -typedef std::shared_ptr<AbstractCommand> AbstractCommandPtr; +using AbstractCommandPtr = std::shared_ptr<AbstractCommand>; class ProcessCommand; -typedef std::shared_ptr<ProcessCommand> ProcessCommandPtr; +using ProcessCommandPtr = std::shared_ptr<ProcessCommand>; class JavaScriptCommand; -typedef std::shared_ptr<JavaScriptCommand> JavaScriptCommandPtr; +using JavaScriptCommandPtr = std::shared_ptr<JavaScriptCommand>; template<typename T> class Set; using ArtifactSet = Set<Artifact *>; diff --git a/src/lib/corelib/buildgraph/inputartifactscanner.h b/src/lib/corelib/buildgraph/inputartifactscanner.h index c88f9fd96..92d5f516f 100644 --- a/src/lib/corelib/buildgraph/inputartifactscanner.h +++ b/src/lib/corelib/buildgraph/inputartifactscanner.h @@ -60,7 +60,7 @@ class RawScanResults; class PropertyMapInternal; class DependencyScanner; -typedef std::shared_ptr<DependencyScanner> DependencyScannerPtr; +using DependencyScannerPtr = std::shared_ptr<DependencyScanner>; class ResolvedDependency { @@ -83,7 +83,7 @@ class InputArtifactScannerContext ResolvedDependency resolvedDependency; }; - typedef QHash<QString, QHash<QString, ResolvedDependencyCacheItem> > ResolvedDependenciesCache; + using ResolvedDependenciesCache = QHash<QString, QHash<QString, ResolvedDependencyCacheItem>>; struct ScannerResolvedDependenciesCache { @@ -105,11 +105,11 @@ class InputArtifactScannerContext QList<DependencyScannerPtr> scanners; }; - typedef QHash<const void *, ScannerResolvedDependenciesCache> CacheItem; + using CacheItem = QHash<const void *, ScannerResolvedDependenciesCache>; QHash<PropertyMapConstPtr, CacheItem> cachePerProperties; QHash<Artifact *, CacheItem> cachePerFile; - QHash<ResolvedProduct*, QHash<FileTag, DependencyScannerCacheItem> > scannersCache; + QHash<ResolvedProduct*, QHash<FileTag, DependencyScannerCacheItem>> scannersCache; friend class InputArtifactScanner; }; diff --git a/src/lib/corelib/buildgraph/projectbuilddata.h b/src/lib/corelib/buildgraph/projectbuilddata.h index 0df303c0b..785a86cbb 100644 --- a/src/lib/corelib/buildgraph/projectbuilddata.h +++ b/src/lib/corelib/buildgraph/projectbuilddata.h @@ -99,8 +99,8 @@ private: pool.serializationOp<opType>(fileDependencies, rawScanResults); } - typedef QHash<QString, QList<FileResourceBase *> > ResultsPerDirectory; - typedef QHash<QString, ResultsPerDirectory> ArtifactLookupTable; + using ResultsPerDirectory = QHash<QString, QList<FileResourceBase *>>; + using ArtifactLookupTable = QHash<QString, ResultsPerDirectory>; ArtifactLookupTable m_artifactLookupTable; bool m_doCleanupInDestructor = true; bool m_isDirty = true; diff --git a/src/lib/corelib/buildgraph/rescuableartifactdata.h b/src/lib/corelib/buildgraph/rescuableartifactdata.h index 068c543ed..3e4d6e25f 100644 --- a/src/lib/corelib/buildgraph/rescuableartifactdata.h +++ b/src/lib/corelib/buildgraph/rescuableartifactdata.h @@ -128,7 +128,7 @@ public: PropertyMapPtr properties; }; -typedef QHash<QString, RescuableArtifactData> AllRescuableArtifactData; +using AllRescuableArtifactData = QHash<QString, RescuableArtifactData>; } // namespace Internal } // namespace qbs diff --git a/src/lib/corelib/buildgraph/transformer.cpp b/src/lib/corelib/buildgraph/transformer.cpp index ccde486ab..e828260c1 100644 --- a/src/lib/corelib/buildgraph/transformer.cpp +++ b/src/lib/corelib/buildgraph/transformer.cpp @@ -149,7 +149,7 @@ QScriptValue Transformer::translateInOutputs(ScriptEngine *scriptEngine, const ArtifactSet &artifacts, const QString &defaultModuleName) { - typedef QMap<QString, QList<Artifact*> > TagArtifactsMap; + using TagArtifactsMap = QMap<QString, QList<Artifact*>>; TagArtifactsMap tagArtifactsMap; for (Artifact *artifact : artifacts) for (const FileTag &fileTag : artifact->fileTags()) diff --git a/src/lib/corelib/generators/generatordata.h b/src/lib/corelib/generators/generatordata.h index fcf4c0368..b6200339e 100644 --- a/src/lib/corelib/generators/generatordata.h +++ b/src/lib/corelib/generators/generatordata.h @@ -50,7 +50,7 @@ namespace qbs { -typedef QMap<QString, Project> GeneratableProjectMap; +using GeneratableProjectMap = QMap<QString, Project>; template <typename U> struct IMultiplexableContainer { QMap<QString, U> data; diff --git a/src/lib/corelib/language/forward_decls.h b/src/lib/corelib/language/forward_decls.h index 5ce333ce9..6697ac8c9 100644 --- a/src/lib/corelib/language/forward_decls.h +++ b/src/lib/corelib/language/forward_decls.h @@ -47,89 +47,89 @@ namespace Internal { enum class ObserveMode; class Value; -typedef std::shared_ptr<Value> ValuePtr; -typedef std::shared_ptr<const Value> ValueConstPtr; +using ValuePtr = std::shared_ptr<Value>; +using ValueConstPtr = std::shared_ptr<const Value>; class ItemValue; -typedef std::shared_ptr<ItemValue> ItemValuePtr; -typedef std::shared_ptr<const ItemValue> ItemValueConstPtr; +using ItemValuePtr = std::shared_ptr<ItemValue>; +using ItemValueConstPtr = std::shared_ptr<const ItemValue>; class JSSourceValue; -typedef std::shared_ptr<JSSourceValue> JSSourceValuePtr; -typedef std::shared_ptr<const JSSourceValue> JSSourceValueConstPtr; +using JSSourceValuePtr = std::shared_ptr<JSSourceValue>; +using JSSourceValueConstPtr = std::shared_ptr<const JSSourceValue>; class VariantValue; -typedef std::shared_ptr<VariantValue> VariantValuePtr; -typedef std::shared_ptr<const VariantValue> VariantValueConstPtr; +using VariantValuePtr = std::shared_ptr<VariantValue>; +using VariantValueConstPtr = std::shared_ptr<const VariantValue>; class FileContext; -typedef std::shared_ptr<FileContext> FileContextPtr; -typedef std::shared_ptr<const FileContext> FileContextConstPtr; +using FileContextPtr = std::shared_ptr<FileContext>; +using FileContextConstPtr = std::shared_ptr<const FileContext>; class FileContextBase; -typedef std::shared_ptr<FileContextBase> FileContextBasePtr; -typedef std::shared_ptr<const FileContextBase> FileContextBaseConstPtr; +using FileContextBasePtr = std::shared_ptr<FileContextBase>; +using FileContextBaseConstPtr = std::shared_ptr<const FileContextBase>; class Probe; -typedef std::shared_ptr<Probe> ProbePtr; -typedef std::shared_ptr<const Probe> ProbeConstPtr; +using ProbePtr = std::shared_ptr<Probe>; +using ProbeConstPtr = std::shared_ptr<const Probe>; class PropertyMapInternal; -typedef std::shared_ptr<PropertyMapInternal> PropertyMapPtr; -typedef std::shared_ptr<const PropertyMapInternal> PropertyMapConstPtr; +using PropertyMapPtr = std::shared_ptr<PropertyMapInternal>; +using PropertyMapConstPtr = std::shared_ptr<const PropertyMapInternal>; class FileTagger; -typedef std::shared_ptr<FileTagger> FileTaggerPtr; -typedef std::shared_ptr<const FileTagger> FileTaggerConstPtr; +using FileTaggerPtr = std::shared_ptr<FileTagger>; +using FileTaggerConstPtr = std::shared_ptr<const FileTagger>; class ResolvedProduct; -typedef std::shared_ptr<ResolvedProduct> ResolvedProductPtr; -typedef std::shared_ptr<const ResolvedProduct> ResolvedProductConstPtr; +using ResolvedProductPtr = std::shared_ptr<ResolvedProduct>; +using ResolvedProductConstPtr = std::shared_ptr<const ResolvedProduct>; class ResolvedProject; -typedef std::shared_ptr<ResolvedProject> ResolvedProjectPtr; -typedef std::shared_ptr<const ResolvedProject> ResolvedProjectConstPtr; +using ResolvedProjectPtr = std::shared_ptr<ResolvedProject>; +using ResolvedProjectConstPtr = std::shared_ptr<const ResolvedProject>; class TopLevelProject; -typedef std::shared_ptr<TopLevelProject> TopLevelProjectPtr; -typedef std::shared_ptr<const TopLevelProject> TopLevelProjectConstPtr; +using TopLevelProjectPtr = std::shared_ptr<TopLevelProject>; +using TopLevelProjectConstPtr = std::shared_ptr<const TopLevelProject>; class ResolvedFileContext; -typedef std::shared_ptr<ResolvedFileContext> ResolvedFileContextPtr; -typedef std::shared_ptr<const ResolvedFileContext> ResolvedFileContextConstPtr; +using ResolvedFileContextPtr = std::shared_ptr<ResolvedFileContext>; +using ResolvedFileContextConstPtr = std::shared_ptr<const ResolvedFileContext>; class Rule; -typedef std::shared_ptr<Rule> RulePtr; -typedef std::shared_ptr<const Rule> RuleConstPtr; +using RulePtr = std::shared_ptr<Rule>; +using RuleConstPtr = std::shared_ptr<const Rule>; class ResolvedScanner; -typedef std::shared_ptr<ResolvedScanner> ResolvedScannerPtr; -typedef std::shared_ptr<const ResolvedScanner> ResolvedScannerConstPtr; +using ResolvedScannerPtr = std::shared_ptr<ResolvedScanner>; +using ResolvedScannerConstPtr = std::shared_ptr<const ResolvedScanner>; class SourceArtifactInternal; -typedef std::shared_ptr<SourceArtifactInternal> SourceArtifactPtr; -typedef std::shared_ptr<const SourceArtifactInternal> SourceArtifactConstPtr; +using SourceArtifactPtr = std::shared_ptr<SourceArtifactInternal>; +using SourceArtifactConstPtr = std::shared_ptr<const SourceArtifactInternal>; class ScriptFunction; -typedef std::shared_ptr<ScriptFunction> ScriptFunctionPtr; -typedef std::shared_ptr<const ScriptFunction> ScriptFunctionConstPtr; +using ScriptFunctionPtr = std::shared_ptr<ScriptFunction>; +using ScriptFunctionConstPtr = std::shared_ptr<const ScriptFunction>; class PrivateScriptFunction; class RuleArtifact; -typedef std::shared_ptr<RuleArtifact> RuleArtifactPtr; -typedef std::shared_ptr<const RuleArtifact> RuleArtifactConstPtr; +using RuleArtifactPtr = std::shared_ptr<RuleArtifact>; +using RuleArtifactConstPtr = std::shared_ptr<const RuleArtifact>; class ResolvedModule; -typedef std::shared_ptr<ResolvedModule> ResolvedModulePtr; -typedef std::shared_ptr<const ResolvedModule> ResolvedModuleConstPtr; +using ResolvedModulePtr = std::shared_ptr<ResolvedModule>; +using ResolvedModuleConstPtr = std::shared_ptr<const ResolvedModule>; class ResolvedGroup; -typedef std::shared_ptr<ResolvedGroup> GroupPtr; -typedef std::shared_ptr<const ResolvedGroup> GroupConstPtr; +using GroupPtr = std::shared_ptr<ResolvedGroup>; +using GroupConstPtr = std::shared_ptr<const ResolvedGroup>; class ArtifactProperties; -typedef std::shared_ptr<ArtifactProperties> ArtifactPropertiesPtr; -typedef std::shared_ptr<const ArtifactProperties> ArtifactPropertiesConstPtr; +using ArtifactPropertiesPtr = std::shared_ptr<ArtifactProperties>; +using ArtifactPropertiesConstPtr = std::shared_ptr<const ArtifactProperties>; class ExportedItem; using ExportedItemPtr = std::shared_ptr<ExportedItem>; diff --git a/src/lib/corelib/language/item.h b/src/lib/corelib/language/item.h index 2dafaa774..c5d8ef980 100644 --- a/src/lib/corelib/language/item.h +++ b/src/lib/corelib/language/item.h @@ -82,9 +82,9 @@ public: QVariantMap parameters; VersionRange versionRange; }; - typedef std::vector<Module> Modules; - typedef QMap<QString, PropertyDeclaration> PropertyDeclarationMap; - typedef QMap<QString, ValuePtr> PropertyMap; + using Modules = std::vector<Module>; + using PropertyDeclarationMap = QMap<QString, PropertyDeclaration>; + using PropertyMap = QMap<QString, ValuePtr>; static Item *create(ItemPool *pool, ItemType type); Item *clone() const; diff --git a/src/lib/corelib/language/itemdeclaration.h b/src/lib/corelib/language/itemdeclaration.h index f637e6bbb..6da699d28 100644 --- a/src/lib/corelib/language/itemdeclaration.h +++ b/src/lib/corelib/language/itemdeclaration.h @@ -57,7 +57,7 @@ public: ItemType type() const { return m_type; } - typedef QList<PropertyDeclaration> Properties; + using Properties = QList<PropertyDeclaration>; void setProperties(const Properties &props) { m_properties = props; } Properties properties() const { return m_properties; } @@ -66,7 +66,7 @@ public: ItemDeclaration &operator<<(const PropertyDeclaration &decl); - typedef Set<ItemType> TypeNames; + using TypeNames = Set<ItemType>; void setAllowedChildTypes(const TypeNames &typeNames) { m_allowedChildTypes = typeNames; } const TypeNames &allowedChildTypes() const { return m_allowedChildTypes; } bool isChildTypeAllowed(ItemType type) const; diff --git a/src/lib/corelib/language/itempool.h b/src/lib/corelib/language/itempool.h index a4837a057..8ee8562d7 100644 --- a/src/lib/corelib/language/itempool.h +++ b/src/lib/corelib/language/itempool.h @@ -62,7 +62,7 @@ public: private: QbsQmlJS::MemoryPool m_pool; - typedef QList<Item *> ItemVector; + using ItemVector = QList<Item *>; ItemVector m_items; }; diff --git a/src/lib/corelib/language/jsimports.h b/src/lib/corelib/language/jsimports.h index c4d5ac30e..ebde70b7b 100644 --- a/src/lib/corelib/language/jsimports.h +++ b/src/lib/corelib/language/jsimports.h @@ -82,7 +82,7 @@ inline bool operator==(const JsImport &jsi1, const JsImport &jsi2) return jsi1.scopeName == jsi2.scopeName && jsi1.filePaths.toSet() == jsi2.filePaths.toSet(); } -typedef std::vector<JsImport> JsImports; +using JsImports = std::vector<JsImport>; } // namespace Internal } // namespace qbs diff --git a/src/lib/corelib/language/moduleloader.cpp b/src/lib/corelib/language/moduleloader.cpp index 882ac7061..e6ef0eac4 100644 --- a/src/lib/corelib/language/moduleloader.cpp +++ b/src/lib/corelib/language/moduleloader.cpp @@ -3493,7 +3493,7 @@ void ModuleLoader::resolveProbe(ProductContext *productContext, Item *parent, It QBS_CHECK(configureScript); if (Q_UNLIKELY(configureScript->sourceCode() == StringConstants::undefinedValue())) throw ErrorInfo(Tr::tr("Probe.configure must be set."), probe->location()); - typedef std::pair<QString, QScriptValue> ProbeProperty; + using ProbeProperty = std::pair<QString, QScriptValue>; QList<ProbeProperty> probeBindings; QVariantMap initialProperties; for (Item *obj = probe; obj; obj = obj->prototype()) { diff --git a/src/lib/corelib/language/moduleloader.h b/src/lib/corelib/language/moduleloader.h index a0a555748..a8190596d 100644 --- a/src/lib/corelib/language/moduleloader.h +++ b/src/lib/corelib/language/moduleloader.h @@ -152,7 +152,7 @@ private: class ProjectContext; - typedef std::vector<ModuleLoaderResult::ProductInfo::Dependency> ProductDependencies; + using ProductDependencies = std::vector<ModuleLoaderResult::ProductInfo::Dependency>; // This is the data we need to store at the point where a dependency is deferred // in order to properly resolve the dependency in pass 2. @@ -241,8 +241,8 @@ private: TopLevelProjectContext *topLevelProjectContext, Item *projectItem, const Set<QString> &referencedFilePaths); - typedef std::vector<VariantValuePtr> MultiplexRow; - typedef std::vector<MultiplexRow> MultiplexTable; + using MultiplexRow = std::vector<VariantValuePtr>; + using MultiplexTable = std::vector<MultiplexRow>; struct MultiplexInfo { diff --git a/src/lib/corelib/language/projectresolver.cpp b/src/lib/corelib/language/projectresolver.cpp index d0af0b7ed..9e9befbf3 100644 --- a/src/lib/corelib/language/projectresolver.cpp +++ b/src/lib/corelib/language/projectresolver.cpp @@ -99,7 +99,7 @@ struct ProjectResolver::ProductContext ResolvedProductPtr product; QString buildDirectory; Item *item; - typedef std::pair<ArtifactPropertiesPtr, std::vector<CodeLocation>> ArtifactPropertiesInfo; + using ArtifactPropertiesInfo = std::pair<ArtifactPropertiesPtr, std::vector<CodeLocation>>; QHash<QStringList, ArtifactPropertiesInfo> artifactPropertiesPerFilter; ProjectResolver::FileLocations sourceArtifactLocations; GroupConstPtr currentGroup; diff --git a/src/lib/corelib/language/projectresolver.h b/src/lib/corelib/language/projectresolver.h index 777451fa6..0732b1c9b 100644 --- a/src/lib/corelib/language/projectresolver.h +++ b/src/lib/corelib/language/projectresolver.h @@ -195,7 +195,7 @@ private: qint64 m_elapsedTimeGroups; typedef void (ProjectResolver::*ItemFuncPtr)(Item *item, ProjectContext *projectContext); - typedef QMap<ItemType, ItemFuncPtr> ItemFuncMap; + using ItemFuncMap = QMap<ItemType, ItemFuncPtr>; void callItemFunction(const ItemFuncMap &mappings, Item *item, ProjectContext *projectContext); }; diff --git a/src/lib/corelib/language/property.h b/src/lib/corelib/language/property.h index 8ad992bdb..204704672 100644 --- a/src/lib/corelib/language/property.h +++ b/src/lib/corelib/language/property.h @@ -95,8 +95,8 @@ inline uint qHash(const Property &p) return QT_PREPEND_NAMESPACE(qHash)(p.productName + p.moduleName + p.propertyName); } -typedef Set<Property> PropertySet; -typedef QHash<QString, PropertySet> PropertyHash; +using PropertySet = Set<Property>; +using PropertyHash = QHash<QString, PropertySet>; } // namespace Internal } // namespace qbs diff --git a/src/lib/corelib/tools/fileinfo.h b/src/lib/corelib/tools/fileinfo.h index fa101fff9..723d83424 100644 --- a/src/lib/corelib/tools/fileinfo.h +++ b/src/lib/corelib/tools/fileinfo.h @@ -92,7 +92,7 @@ private: quint8 z[36]; }; #elif defined(Q_OS_UNIX) - typedef struct stat InternalStatType; + using InternalStatType = struct stat; #else # error unknown platform #endif diff --git a/src/lib/corelib/tools/filetime.h b/src/lib/corelib/tools/filetime.h index 73e9d4544..7daec6415 100644 --- a/src/lib/corelib/tools/filetime.h +++ b/src/lib/corelib/tools/filetime.h @@ -75,12 +75,12 @@ class QBS_AUTOTEST_EXPORT FileTime public: #if defined(Q_OS_UNIX) #if HAS_CLOCK_GETTIME - typedef timespec InternalType; + using InternalType = timespec; #else - typedef time_t InternalType; + using InternalType = time_t; #endif // HAS_CLOCK_GETTIME #elif defined(Q_OS_WIN) - typedef quint64 InternalType; + using InternalType = quint64; #else # error unknown platform #endif diff --git a/src/lib/corelib/tools/iosutils.h b/src/lib/corelib/tools/iosutils.h index 9374b24b1..1a5faf3c3 100644 --- a/src/lib/corelib/tools/iosutils.h +++ b/src/lib/corelib/tools/iosutils.h @@ -49,12 +49,12 @@ #include <locale> #define QBS_RENAME_IMPL ::_wrename #define QBS_UNLINK_IMPL ::_wunlink -typedef std::wstring qbs_filesystem_path_string_type; +using qbs_filesystem_path_string_type = std::wstring; #else #include <unistd.h> #define QBS_RENAME_IMPL ::rename #define QBS_UNLINK_IMPL ::unlink -typedef std::string qbs_filesystem_path_string_type; +using qbs_filesystem_path_string_type = std::string; #endif namespace qbs { diff --git a/src/lib/corelib/tools/persistence.h b/src/lib/corelib/tools/persistence.h index 83209113d..6be0ae8e4 100644 --- a/src/lib/corelib/tools/persistence.h +++ b/src/lib/corelib/tools/persistence.h @@ -135,7 +135,7 @@ public: void setHeadData(const HeadData &hd) { m_headData = hd; } private: - typedef int PersistentObjectId; + using PersistentObjectId = int; template <typename T> T *idLoad(); template <class T> std::shared_ptr<T> idLoadS(); diff --git a/src/lib/corelib/tools/setupprojectparameters.h b/src/lib/corelib/tools/setupprojectparameters.h index 10e4310cd..c462ca212 100644 --- a/src/lib/corelib/tools/setupprojectparameters.h +++ b/src/lib/corelib/tools/setupprojectparameters.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE class QProcessEnvironment; class QStringList; -typedef QMap<QString, QVariant> QVariantMap; +using QVariantMap = QMap<QString, QVariant>; QT_END_NAMESPACE namespace qbs { |