From 31db9ab775d13eeafa399dc9b1714d703a2e8621 Mon Sep 17 00:00:00 2001 From: DuckSoft Date: Sun, 12 Jan 2020 17:02:18 +0800 Subject: [PATCH] cancel c++17 adoption to avoid ambiguous method reference --- Qv2ray.pro | 2 +- src/main.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Qv2ray.pro b/Qv2ray.pro index 789bb7a0..44b37a39 100644 --- a/Qv2ray.pro +++ b/Qv2ray.pro @@ -23,7 +23,7 @@ no_increase_build_number { DEFINES += QT_DEPRECATED_WARNINGS QV2RAY_VERSION_STRING=\"\\\"v$${VERSION}\\\"\" QAPPLICATION_CLASS=QApplication # Don't merge those configs with below. -CONFIG += enable_decoder_qr_code enable_encoder_qr_code qt c++17 openssl-linked +CONFIG += enable_decoder_qr_code enable_encoder_qr_code qt c++11 openssl-linked include(3rdparty/qzxing/src/QZXing-components.pri) include(3rdparty/SingleApplication/singleapplication.pri) diff --git a/src/main.cpp b/src/main.cpp index bc856d4e..707fccd7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -186,8 +186,9 @@ int main(int argc, char *argv[]) { std::unique_ptr consoleApp(new QCoreApplication(argc, argv)); QvCommandArgParser parser; - - switch (QString errorMessage; parser.ParseCommandLine(&errorMessage)) { + QString errorMessage; + + switch (parser.ParseCommandLine(&errorMessage)) { case CommandLineOk: break;