comparison mainwindow.cpp @ 63:2340b00561d2

* Add (but don't yet use) RecentFiles class to replace inline MRU logic
author Chris Cannam
date Wed, 17 Nov 2010 14:26:27 +0000
parents 68aebc316898
children 794db9353c7f
comparison
equal deleted inserted replaced
62:68aebc316898 63:2340b00561d2
1452 if (!workFolder.exists(workFolderPath)) 1452 if (!workFolder.exists(workFolderPath))
1453 { 1453 {
1454 workFolderPath = ""; 1454 workFolderPath = "";
1455 } 1455 }
1456 1456
1457 for(int i = 0; i < NUM_PATHS_IN_MRU_LIST; i++)
1458 {
1459 QString tmp;
1460
1461 tmp.sprintf("remoterepomrupath%d", i);
1462 remoteRepoMruList[i] = settings.value(tmp, "").toString();
1463
1464 tmp.sprintf("workfoldermrupath%d", i);
1465 workFolderMruList[i] = settings.value(tmp, "").toString();
1466 }
1467
1468 userInfo = settings.value("userinfo", "").toString(); 1457 userInfo = settings.value("userinfo", "").toString();
1469 1458
1470 QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint(); 1459 QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
1471 QSize size = settings.value("size", QSize(400, 400)).toSize(); 1460 QSize size = settings.value("size", QSize(400, 400)).toSize();
1472 firstStart = settings.value("firststart", QVariant(true)).toBool(); 1461 firstStart = settings.value("firststart", QVariant(true)).toBool();
1488 QSettings settings; 1477 QSettings settings;
1489 settings.setValue("pos", pos()); 1478 settings.setValue("pos", pos());
1490 settings.setValue("size", size()); 1479 settings.setValue("size", size());
1491 settings.setValue("remoterepopath", remoteRepoPath); 1480 settings.setValue("remoterepopath", remoteRepoPath);
1492 settings.setValue("workfolderpath", workFolderPath); 1481 settings.setValue("workfolderpath", workFolderPath);
1493
1494 for(int i = 0; i < NUM_PATHS_IN_MRU_LIST; i++)
1495 {
1496 QString tmp;
1497
1498 tmp.sprintf("remoterepomrupath%d", i);
1499 settings.setValue(tmp, remoteRepoMruList[i]);
1500
1501 tmp.sprintf("workfoldermrupath%d", i);
1502 settings.setValue(tmp, workFolderMruList[i]);
1503 }
1504
1505 settings.setValue("userinfo", userInfo); 1482 settings.setValue("userinfo", userInfo);
1506 settings.setValue("firststart", firstStart); 1483 settings.setValue("firststart", firstStart);
1507 settings.setValue("viewFileTypes", hgExp -> getFileTypesBits()); 1484 settings.setValue("viewFileTypes", hgExp -> getFileTypesBits());
1508 } 1485 }
1509 1486