mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2025-04-20 19:46:19 +08:00
Use QString::contains()
This commit is contained in:
parent
e6be456cfa
commit
0634e530b6
@ -35,7 +35,7 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
|||||||
waitForReadyRead(10000);
|
waitForReadyRead(10000);
|
||||||
setRequiringOutput(false);
|
setRequiringOutput(false);
|
||||||
result = *requiredOutput;
|
result = *requiredOutput;
|
||||||
if(result.indexOf("[=]") != -1)
|
if(result.contains("[=]"))
|
||||||
{
|
{
|
||||||
clientType = Util::CLIENTTYPE_ICEMAN;
|
clientType = Util::CLIENTTYPE_ICEMAN;
|
||||||
setRequiringOutput(true);
|
setRequiringOutput(true);
|
||||||
@ -44,7 +44,7 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
|||||||
{
|
{
|
||||||
waitForReadyRead(200);
|
waitForReadyRead(200);
|
||||||
result += *requiredOutput;
|
result += *requiredOutput;
|
||||||
if(result.indexOf("os: ") != -1)
|
if(result.contains("os: "))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
setRequiringOutput(false);
|
setRequiringOutput(false);
|
||||||
@ -53,7 +53,7 @@ void PM3Process::connectPM3(const QString& path, const QStringList args)
|
|||||||
{
|
{
|
||||||
clientType = Util::CLIENTTYPE_OFFICIAL;
|
clientType = Util::CLIENTTYPE_OFFICIAL;
|
||||||
}
|
}
|
||||||
if(result.indexOf("os: ") != -1) // make sure the PM3 is connected
|
if(result.contains("os: ")) // make sure the PM3 is connected
|
||||||
{
|
{
|
||||||
emit changeClientType(clientType);
|
emit changeClientType(clientType);
|
||||||
result = result.mid(result.indexOf("os: "));
|
result = result.mid(result.indexOf("os: "));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user