207
207
// "detailstr": qsTr("Clean up automatically saved logon information by Chromium browser(Cookies)")})
210
// //获取firefox的cookies
211
// function getDataOfFirefox() {
212
// var cookies_data = sessiondispatcher.cookies_scan_function_qt("firefox");
213
// if(cookies_data == "None") {//没有安装Firefox
215
// sessiondispatcher.showWarningDialog(qsTr("Tips:"), qsTr("No Firefox browser installed!"), mainwindow.pos.x, mainwindow.pos.y);
218
// if (cookies_data.length == 0) {
219
// root.firefoxResultFlag = false;//扫描内容不存在
222
// root.firefoxNum = cookies_data.length;//001
223
//// systemdispatcher.clear_cookies_args();
224
// firefoxsubModel.clear();
226
// for (var i=0; i< cookies_data.length; i++) {
227
// //sina.com.cn<2_2>10
228
// var splitlist = cookies_data[i].split("<2_2>");
229
// if (splitlist[0] == "") {
233
// firefoxsubModel.append({"itemTitle": splitlist[0], "desc": "","number": splitlist[1]});
234
//// systemdispatcher.set_cookies_args(splitlist[0]);
237
// root.firefoxNum -= num;//001
238
// console.log("firefoxNum:");
239
// console.log(root.firefoxNum);
240
// if(root.firefoxNum != 0) {
241
// root.firefoxResultFlag = true;//扫描的实际有效内容存在
242
// firefoxmainModel.clear();
243
// firefoxmainModel.append({
244
// "itemTitle": qsTr("Clean Firefox's Cookies"),
245
// "picture": "../../img/toolWidget/firefox.png",
246
// "detailstr": qsTr("Clean up automatically saved logon information by Firefox browser(Cookies)")})
249
// root.firefoxResultFlag = false;//扫描的实际有效内容不存在
252
// if(root.firefoxResultFlag == false) {
253
// root.firefox_expanded = false;//伸缩箭头不扩展
254
// root.firefox_arrow_show = 0;//伸缩箭头不显示
255
// root.firefox_showNum = false;
256
// if(root.flag == false) {//点击扫描时的获取数据,此时显示该对话框
257
// //友情提示: 扫描内容为空,不再执行清理!
258
// sessiondispatcher.showWarningDialog(qsTr("Tips:"), qsTr("Scanning content is empty, no longer to perform cleanup!"), mainwindow.pos.x, mainwindow.pos.y);
260
// else {//清理apt后的重新获取数据,此时不需要显示对话框
261
// root.flag = false;
263
// root.firefox_btn_flag = "cookies_scan";//1206
264
// root.firefox_btn_text = qsTr("Start scanning")//开始扫描//1206
265
// root.firefox_reset = false;//1206
266
// if(root.chromium_expanded) {
267
// scrollItem.height = 40 + (root.chromiumNum + 1) * 40 + root.spaceValue*2;
270
// scrollItem.height = 2 * 40 + root.spaceValue*2;
273
// else if(root.firefoxResultFlag == true) {
274
// root.firefox_expanded = true;//伸缩箭头扩展
275
// root.firefox_arrow_show = 1;//伸缩箭头显示
276
// root.firefox_showNum = true;
277
// if(root.flag == false) {//点击扫描时的获取数据,此时显示该对话框
278
// toolkits.alertMSG(qsTr("Scan completed!"), mainwindow.pos.x, mainwindow.pos.y);//扫描完成!
280
// else {//清理software后的重新获取数据,此时不需要显示对话框
281
// root.flag = false;
284
// //当真正扫描到内容时:按钮状态改变、显示文字改变、重置按钮显示
285
// root.firefox_btn_flag = "cookies_work";//1206
286
// root.firefox_btn_text = qsTr("All clean");//全部清理//1206
287
// root.firefox_reset = true;//1206
288
// if(root.chromium_expanded) {
289
// scrollItem.height = (root.firefoxNum + 1) * 40 + (root.chromiumNum + 1) * 40 + root.spaceValue*2;
292
// scrollItem.height = (root.firefoxNum + 1) * 40 + 40 + root.spaceValue*2;
298
// //获取chromium的cookies
299
// function getDataOfChromium() {
300
// var cookies_data = sessiondispatcher.cookies_scan_function_qt("chromium");
301
// if(cookies_data == "None") {//没有安装Chromium
303
// sessiondispatcher.showWarningDialog(qsTr("Tips:"), qsTr("No Chromium browser installed!"), mainwindow.pos.x, mainwindow.pos.y);
306
// root.chromiumNum = cookies_data.length;//001
307
//// systemdispatcher.clear_chromium_cookies_args();
308
// chromiumsubModel.clear();
310
// for (var i=0; i< cookies_data.length; i++) {
311
// // /home/kobe/.cache/software-center/piston-helper<2_2>3026257
312
// var splitlist = cookies_data[i].split("<2_2>");
313
// if (splitlist[0] == "") {
317
// chromiumsubModel.append({"itemTitle": splitlist[0], "desc": "","number": splitlist[1]});
318
//// systemdispatcher.set_chromium_cookies_args(splitlist[0]);
321
// root.chromiumNum -= num;//001
322
// console.log("chromiumNum:");
323
// console.log(root.chromiumNum);
324
// if(root.chromiumNum != 0) {
325
// root.chromiumResultFlag = true;//扫描的实际有效内容存在
326
// chromiummainModel.clear();
327
// chromiummainModel.append({
328
// "itemTitle": qsTr("Clean Chromium's Cookies"),
329
// "picture": "../../img/toolWidget/chromium.png",
330
// "detailstr": qsTr("Clean up automatically saved logon information by Chromium browser(Cookies)")})
333
// root.chromiumResultFlag = false;//扫描的实际有效内容不存在
336
// if(root.chromiumResultFlag == false) {
337
// root.chromium_expanded = false;//伸缩箭头不扩展
338
// root.chromium_arrow_show = 0;//伸缩箭头不显示
339
// root.chromium_showNum = false;
341
// if(root.flag == false) {//点击扫描时的获取数据,此时显示该对话框
342
// //友情提示: 扫描内容为空,不再执行清理!
343
// sessiondispatcher.showWarningDialog(qsTr("Tips:"), qsTr("Scanning content is empty, no longer to perform cleanup!"), mainwindow.pos.x, mainwindow.pos.y);
345
// else {//清理apt后的重新获取数据,此时不需要显示对话框
346
// root.flag = false;
349
// root.chromium_btn_flag = "cookies_scanc";//1206
350
// root.chromium_btn_text = qsTr("Start scanning")//开始扫描//1206
351
// root.chromium_reset = false;//1206
352
// if(root.firefox_expanded) {
353
// scrollItem.height = 40 + (root.firefoxNum + 1) * 40 + root.spaceValue*2;
356
// scrollItem.height = 2 * 40 + root.spaceValue*2;
359
// else if(root.chromiumResultFlag == true) {
360
// root.chromium_expanded = true;//伸缩箭头扩展
361
// root.chromium_arrow_show = 1;//伸缩箭头显示
362
// root.chromium_showNum = true;
364
// if(root.flag == false) {//点击扫描时的获取数据,此时显示该对话框
365
// toolkits.alertMSG(qsTr("Scan completed!"), mainwindow.pos.x, mainwindow.pos.y);//扫描完成!
367
// else {//清理software后的重新获取数据,此时不需要显示对话框
368
// root.flag = false;
371
// //当真正扫描到内容时:按钮状态改变、显示文字改变、重置按钮显示
372
// root.chromium_btn_flag = "cookies_workc";//1206
373
// root.chromium_btn_text = qsTr("All clean");//全部清理//1206
374
// root.chromium_reset = true;//1206
375
// if(root.firefox_expanded) {
376
// scrollItem.height = (root.firefoxNum + 1) * 40 + (root.chromiumNum + 1) * 40 + root.spaceValue*2;
379
// scrollItem.height = (root.chromiumNum + 1) * 40 + 40 + root.spaceValue*2;
384
210
//信号绑定,绑定qt的信号finishCleanWork,该信号emit时触发onFinishCleanWork