MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / questionForPermissionType

Function questionForPermissionType

Plugins/WebBrowser/FrmWebView.cpp:99–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
99inline QString questionForPermissionType(QWebEnginePermission::PermissionType permissionType)
100{
101 switch (permissionType) {
102 case QWebEnginePermission::PermissionType::Geolocation:
103 return QObject::tr("Allow %1 to access your location information?");
104 case QWebEnginePermission::PermissionType::MediaAudioCapture:
105 return QObject::tr("Allow %1 to access your microphone?");
106 case QWebEnginePermission::PermissionType::MediaVideoCapture:
107 return QObject::tr("Allow %1 to access your webcam?");
108 case QWebEnginePermission::PermissionType::MediaAudioVideoCapture:
109 return QObject::tr("Allow %1 to access your microphone and webcam?");
110 case QWebEnginePermission::PermissionType::MouseLock:
111 return QObject::tr("Allow %1 to lock your mouse cursor?");
112 case QWebEnginePermission::PermissionType::DesktopVideoCapture:
113 return QObject::tr("Allow %1 to capture video of your desktop?");
114 case QWebEnginePermission::PermissionType::DesktopAudioVideoCapture:
115 return QObject::tr("Allow %1 to capture audio and video of your desktop?");
116 case QWebEnginePermission::PermissionType::Notifications:
117 return QObject::tr("Allow %1 to show notification on your desktop?");
118 case QWebEnginePermission::PermissionType::ClipboardReadWrite:
119 return QObject::tr("Allow %1 to read from and write to the clipboard?");
120 case QWebEnginePermission::PermissionType::LocalFontsAccess:
121 return QObject::tr("Allow %1 to access fonts stored on this machine?");
122 case QWebEnginePermission::PermissionType::Unsupported:
123 break;
124 }
125 return QString();
126}
127#endif
128
129void CFrmWebView::setPage(QWebEnginePage *page)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected