Skip to content
Snippets Groups Projects
Commit 7a286a50 authored by hjk's avatar hjk
Browse files

CppRewriter: Handle std::ifstream in simplifySTLType


Change-Id: I1cdb193ac4a4a3ad9005c4445cd38406412cb058
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
parent cb53e38a
No related branches found
No related tags found
No related merge requests found
......@@ -527,6 +527,14 @@ CPLUSPLUS_EXPORT QString simplifySTLType(const QString &typeIn)
type.replace(QLatin1Char('*'), QLatin1Char('@'));
for (int i = 0; i < 10; ++i) {
// std::ifstream
QRegExp ifstreamRE(QLatin1String("std::basic_ifstream<char,\\s*std::char_traits<char>\\s*>"));
ifstreamRE.setMinimal(true);
QTC_ASSERT(ifstreamRE.isValid(), return typeIn);
if (ifstreamRE.indexIn(type) != -1)
type.replace(ifstreamRE.cap(0), QLatin1String("std::ifstream"));
// Anything with a std::allocator
int start = type.indexOf(QLatin1String("std::allocator<"));
if (start == -1)
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment