give a default value when ok & cancel label empty
This commit is contained in:
parent
394cbe5962
commit
b49140201d
@ -207,8 +207,17 @@ void DoricModalPlugin::prompt(QString jsValueString, QString callbackId) {
|
|||||||
|
|
||||||
window->setProperty("title", titleVal.toString());
|
window->setProperty("title", titleVal.toString());
|
||||||
window->setProperty("msg", msgVal.toString());
|
window->setProperty("msg", msgVal.toString());
|
||||||
|
if (okBtn.isString()) {
|
||||||
window->setProperty("okLabel", okBtn.toString());
|
window->setProperty("okLabel", okBtn.toString());
|
||||||
|
} else {
|
||||||
|
window->setProperty("okLabel", "ok");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cancelBtn.isString()) {
|
||||||
window->setProperty("cancelLabel", cancelBtn.toString());
|
window->setProperty("cancelLabel", cancelBtn.toString());
|
||||||
|
} else {
|
||||||
|
window->setProperty("cancelLabel", "cancel");
|
||||||
|
}
|
||||||
|
|
||||||
QQuickWindow *parentWindow =
|
QQuickWindow *parentWindow =
|
||||||
getContext()->getRootNode()->getRootView()->window();
|
getContext()->getRootNode()->getRootView()->window();
|
||||||
|
Reference in New Issue
Block a user