| 119 | } |
| 120 | |
| 121 | void RecentFileManager::removeRecentSoundfontFile(QString filePath) |
| 122 | { |
| 123 | filePath = filePath.replace("\\", "/"); |
| 124 | int position = _listFiles.indexOf(filePath); |
| 125 | if (position != -1) |
| 126 | { |
| 127 | for (int i = position; i < MAX_SF2_FILES - 1; i++) |
| 128 | { |
| 129 | _listFiles[i] = _listFiles.at(i + 1); |
| 130 | _listDateTimes[i] = _listDateTimes.at(i + 1); |
| 131 | } |
| 132 | _listFiles[MAX_SF2_FILES - 1] = ""; |
| 133 | _listDateTimes[0] = QDateTime::currentDateTime(); |
| 134 | |
| 135 | for (int i = 0; i < MAX_SF2_FILES; i++) |
| 136 | { |
| 137 | _configuration->setValue(ConfManager::SECTION_RECENT_FILES, "file_" + QString::number(i), _listFiles.at(i)); |
| 138 | _configuration->setValue(ConfManager::SECTION_RECENT_FILES, "file_time_" + QString::number(i), |
| 139 | _listDateTimes.at(i).toString("yyyy/MM/dd HH:mm:ss")); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | emit recentSf2Changed(); |
| 144 | } |
| 145 | |
| 146 | QString RecentFileManager::getLastFile(FileType fileType, int num) |
| 147 | { |
no test coverage detected