mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
reset files
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QUuid>
|
||||
#include <QUrl>
|
||||
|
||||
#include "core/utils/errorCodes.h"
|
||||
#include "core/utils/routeModes.h"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef APIUTILS_H
|
||||
#define APIUTILS_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QNetworkReply>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <QIODevice>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
QList<QString> qrCodeUtils::generateQrCodeImageSeriesPlainText(const QByteArray &utf8Text)
|
||||
{
|
||||
|
||||
@@ -139,11 +139,6 @@ static UIWindow *amneziaKeyWindowForQrCamera(void)
|
||||
AVCaptureSession *session = self.captureSession;
|
||||
self.captureSession = nil;
|
||||
|
||||
/**
|
||||
* Must run stopRunning on the same serial queue as startRunning, synchronously before tearing down.
|
||||
* Async stop + immediate start (e.g. foreground resume calling restartPairingIosCamera) left stopRunning
|
||||
* racing startRunning's internal beginConfiguration/commitConfiguration → NSGenericException crash.
|
||||
*/
|
||||
if (session) {
|
||||
if (!_sessionQueue) {
|
||||
_sessionQueue = dispatch_queue_create("org.amnezia.qr.session", DISPATCH_QUEUE_SERIAL);
|
||||
@@ -175,14 +170,12 @@ static UIWindow *amneziaKeyWindowForQrCamera(void)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)captureOutput:(AVCaptureOutput *)output
|
||||
didOutputMetadataObjects:(NSArray<__kindof AVMetadataObject *> *)metadataObjects
|
||||
fromConnection:(AVCaptureConnection *)connection {
|
||||
- (void)captureOutput:(AVCaptureOutput *)output didOutputMetadataObjects:(NSArray<__kindof AVMetadataObject *> *)metadataObjects fromConnection:(AVCaptureConnection *)connection {
|
||||
|
||||
if (metadataObjects != nil && metadataObjects.count > 0) {
|
||||
AVMetadataMachineReadableCodeObject *metadataObject = [metadataObjects objectAtIndex:0];
|
||||
|
||||
if ([[metadataObject type] isEqualToString:AVMetadataObjectTypeQRCode]) {
|
||||
if ([[metadataObject type] isEqualToString: AVMetadataObjectTypeQRCode]) {
|
||||
NSString *value = [metadataObject stringValue];
|
||||
if (value.length == 0) {
|
||||
return;
|
||||
@@ -200,7 +193,7 @@ static UIWindow *amneziaKeyWindowForQrCamera(void)
|
||||
|
||||
QRCodeReader::QRCodeReader() {
|
||||
m_qrCodeReader = [[QRCodeReaderImpl alloc] init];
|
||||
[m_qrCodeReader setQrCodeReader:this];
|
||||
[m_qrCodeReader setQrCodeReader: this];
|
||||
}
|
||||
|
||||
QRect QRCodeReader::cameraSize() {
|
||||
|
||||
@@ -92,7 +92,7 @@ PageType {
|
||||
|
||||
SwitcherType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
Layout.topMargin: 24
|
||||
Layout.rightMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@ Window {
|
||||
id: root
|
||||
objectName: "mainWindow"
|
||||
|
||||
color: AmneziaStyle.color.midnightBlack
|
||||
|
||||
Connections {
|
||||
target: Qt.application
|
||||
function onStateChanged() {
|
||||
@@ -63,6 +61,8 @@ Window {
|
||||
maximumWidth: 600
|
||||
maximumHeight: 800
|
||||
|
||||
color: AmneziaStyle.color.midnightBlack
|
||||
|
||||
onClosing: function(close) {
|
||||
close.accepted = false
|
||||
PageController.closeWindow()
|
||||
|
||||
Reference in New Issue
Block a user