Index: sources/ApplicationPost.cpp =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r57ea732311e6f4c746974f5a52316f63dec23ca8 --- sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/ApplicationPost.cpp (.../ApplicationPost.cpp) (revision 57ea732311e6f4c746974f5a52316f63dec23ca8) @@ -17,6 +17,7 @@ #include #include #include +#include // Project #include "Logger.h" @@ -92,8 +93,8 @@ QString exrVer("%1\\s*\"\\d+\\.\\d+\\.\\d+\""); QString exrBld("%1\\s*\"\\d+\""); - QRegExp regVer(exrVer.arg(_postmsg_osversion)); - QRegExp regBld(exrBld.arg(_postmsg_osbuild )); + QRegularExpression regVer(exrVer.arg(_postmsg_osversion)); + QRegularExpression regBld(exrBld.arg(_postmsg_osbuild )); QString version; QString build; QStringList versions; @@ -108,8 +109,8 @@ if ( ! ok ) goto lOut; // check the Os version is compatible - version = regVer.cap(0).replace(_postmsg_osversion,"").replace("\"",""); // 0 is the first captured and next if any are the subsets. - build = regBld.cap(0).replace(_postmsg_osbuild ,"").replace("\"",""); // 0 is the first captured and next if any are the subsets. + // TODO: fix using match.captured // version = regVer.captured(0).replace(_postmsg_osversion,"").replace("\"",""); // 0 is the first captured and next if any are the subsets. + // TODO: fix using match.captured // build = regBld.captured(0).replace(_postmsg_osbuild ,"").replace("\"",""); // 0 is the first captured and next if any are the subsets. versions = version.split("."); major = versions[0].toUInt(); // type, existance, count has been already tested by regex, and was rejected in first check section. minor = versions[1].toUInt(); // type, existance, count has been already tested by regex, and was rejected in first check section.