@@ -58,7 +58,7 @@ void RemoteWipe::startCheckJobWithAppPassword(QString pwd){
58
58
request.setUrl (requestUrl);
59
59
request.setSslConfiguration (_account->getOrCreateSslConfig ());
60
60
auto requestBody = new QBuffer;
61
- QUrlQuery arguments (QString (" token=%1" ).arg (_appPassword));
61
+ QUrlQuery arguments (QStringLiteral (" token=%1" ).arg (_appPassword));
62
62
requestBody->setData (arguments.query (QUrl::FullyEncoded).toLatin1 ());
63
63
_networkReplyCheck = _networkManager.post (request, requestBody);
64
64
QObject::connect (&_networkManager, &QNetworkAccessManager::sslErrors,
@@ -79,16 +79,16 @@ void RemoteWipe::checkJobSlot()
79
79
jsonParseError.error != QJsonParseError::NoError) {
80
80
QString errorFromJson = json[" error" ].toString ();
81
81
if (!errorFromJson.isEmpty ()) {
82
- qCWarning (lcRemoteWipe) << QString (" Error returned from the server: <em>%1<em>" )
82
+ qCWarning (lcRemoteWipe) << QStringLiteral (" Error returned from the server: <em>%1<em>" )
83
83
.arg (errorFromJson.toHtmlEscaped ());
84
84
} else if (_networkReplyCheck->error () != QNetworkReply::NoError) {
85
- qCWarning (lcRemoteWipe) << QString (" There was an error accessing the 'token' endpoint: <br><em>%1</em>" )
85
+ qCWarning (lcRemoteWipe) << QStringLiteral (" There was an error accessing the 'token' endpoint: <br><em>%1</em>" )
86
86
.arg (_networkReplyCheck->errorString ().toHtmlEscaped ());
87
87
} else if (jsonParseError.error != QJsonParseError::NoError) {
88
- qCWarning (lcRemoteWipe) << QString (" Could not parse the JSON returned from the server: <br><em>%1</em>" )
88
+ qCWarning (lcRemoteWipe) << QStringLiteral (" Could not parse the JSON returned from the server: <br><em>%1</em>" )
89
89
.arg (jsonParseError.errorString ());
90
90
} else {
91
- qCWarning (lcRemoteWipe) << QString (" The reply from the server did not contain all expected fields" );
91
+ qCWarning (lcRemoteWipe) << QStringLiteral (" The reply from the server did not contain all expected fields" );
92
92
}
93
93
94
94
// check for wipe request
@@ -136,7 +136,7 @@ void RemoteWipe::notifyServerSuccessJob(AccountState *accountState, bool dataWip
136
136
request.setUrl (requestUrl);
137
137
request.setSslConfiguration (_account->getOrCreateSslConfig ());
138
138
auto requestBody = new QBuffer;
139
- QUrlQuery arguments (QString (" token=%1" ).arg (_appPassword));
139
+ QUrlQuery arguments (QStringLiteral (" token=%1" ).arg (_appPassword));
140
140
requestBody->setData (arguments.query (QUrl::FullyEncoded).toLatin1 ());
141
141
_networkReplySuccess = _networkManager.post (request, requestBody);
142
142
QObject::connect (_networkReplySuccess, &QNetworkReply::finished, this ,
@@ -153,16 +153,16 @@ void RemoteWipe::notifyServerSuccessJobSlot()
153
153
jsonParseError.error != QJsonParseError::NoError) {
154
154
QString errorFromJson = json[" error" ].toString ();
155
155
if (!errorFromJson.isEmpty ()) {
156
- qCWarning (lcRemoteWipe) << QString (" Error returned from the server: <em>%1</em>" )
156
+ qCWarning (lcRemoteWipe) << QStringLiteral (" Error returned from the server: <em>%1</em>" )
157
157
.arg (errorFromJson.toHtmlEscaped ());
158
158
} else if (_networkReplySuccess->error () != QNetworkReply::NoError) {
159
- qCWarning (lcRemoteWipe) << QString (" There was an error accessing the 'success' endpoint: <br><em>%1</em>" )
159
+ qCWarning (lcRemoteWipe) << QStringLiteral (" There was an error accessing the 'success' endpoint: <br><em>%1</em>" )
160
160
.arg (_networkReplySuccess->errorString ().toHtmlEscaped ());
161
161
} else if (jsonParseError.error != QJsonParseError::NoError) {
162
- qCWarning (lcRemoteWipe) << QString (" Could not parse the JSON returned from the server: <br><em>%1</em>" )
162
+ qCWarning (lcRemoteWipe) << QStringLiteral (" Could not parse the JSON returned from the server: <br><em>%1</em>" )
163
163
.arg (jsonParseError.errorString ());
164
164
} else {
165
- qCWarning (lcRemoteWipe) << QString (" The reply from the server did not contain all expected fields." );
165
+ qCWarning (lcRemoteWipe) << QStringLiteral (" The reply from the server did not contain all expected fields." );
166
166
}
167
167
}
168
168
0 commit comments