restructure, change onDataDecode signal and succesfully parsing http request
This commit is contained in:
@@ -41,7 +41,13 @@ void AdjustPictureDialog::accept() {
|
||||
infoDialog.setWindowTitle(tr("No QR code"));
|
||||
infoDialog.exec();
|
||||
} else {
|
||||
emit decodedData(result);
|
||||
std::map<std::string, std::string> paramsMap;
|
||||
std::vector<std::string> dataSplit = split(result, "&");
|
||||
for (std::string &pair : dataSplit) {
|
||||
std::vector<std::string> values = split(pair, "=");
|
||||
paramsMap.insert(std::pair<std::string, std::string>(values[0], values[1]));
|
||||
}
|
||||
emit decodedData(paramsMap);
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user