Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions dde-bluetooth-dialog/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2016 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand All @@ -19,6 +19,7 @@ DCORE_USE_NAMESPACE
const int PingCode = 1;
const int DevicePath = 2;
const int PingTime = 3;
const int CancelBtnState = 4;

int main(int argc, char *argv[])
{
Expand All @@ -35,9 +36,14 @@ int main(int argc, char *argv[])
qDebug() << "number of parameters must be greater than 3";
return -1;
}
qDebug() << "PingCode:" << arguslist[PingCode] << " Device Path:" << arguslist[DevicePath] << "Ping Time:" + arguslist[PingTime];
auto cancelable = true;
if (arguslist.size() >= 5) {
cancelable = arguslist[CancelBtnState] == "true";
}
qDebug() << "PingCode:" << arguslist[PingCode] << " Device Path:" << arguslist[DevicePath] << "Ping Time:" + arguslist[PingTime]
<< "isCancelBtnShown:" << cancelable;

PinCodeDialog dialog(arguslist[PingCode], arguslist[DevicePath], arguslist[PingTime], true);
PinCodeDialog dialog(arguslist[PingCode], arguslist[DevicePath], arguslist[PingTime], cancelable);
#if (defined QT_DEBUG) && (defined CHECK_ACCESSIBLENAME)
AccessibilityCheckerEx checker;
checker.setOutputFormat(DAccessibilityChecker::FullFormat);
Expand Down
Loading