Showing the changes to libraries/script-engine/src/ScriptsModel.cpp (1 of 1 file). Show all
Unified · Split
| @@ -163,6 +163,10 @@ void ScriptsModel::requestDefaultFiles(QString marker) { · 162 unmodified lines | ||
| 163 | 163 | while (it.hasNext()) { |
| 164 | 164 | QString jsFullPath = it.next(); |
| 165 | 165 | QString jsPartialPath = jsFullPath.mid(localDir.length() + 1); // + 1 to skip a separator |
| 166 | + #if defined(Q_OS_WIN) || defined(Q_OS_OSX) | |
| 167 | + jsFullPath = jsFullPath.toLower(); | |
| 168 | + jsPartialPath = jsPartialPath.toLower(); | |
| 169 | + #endif | |
| 166 | 170 | _treeNodes.append(new TreeNodeScript(jsPartialPath, jsFullPath, SCRIPT_ORIGIN_DEFAULT)); |
| 167 | 171 | } |
| 168 | 172 | } else { |
| @@ -274,7 +278,13 @@ void ScriptsModel::reloadLocalFiles() { · 105 unmodified lines | ||
| 274 | 278 | const QFileInfoList localFiles = _localDirectory.entryInfoList(); |
| 275 | 279 | for (int i = 0; i < localFiles.size(); i++) { |
| 276 | 280 | QFileInfo file = localFiles[i]; |
| 277 | − _treeNodes.append(new TreeNodeScript(file.fileName(), file.absoluteFilePath(), SCRIPT_ORIGIN_LOCAL)); | |
| 281 | + QString fileName = file.fileName(); | |
| 282 | + QString absPath = file.absoluteFilePath(); | |
| 283 | + #if defined(Q_OS_WIN) || defined(Q_OS_OSX) | |
| 284 | + fileName = fileName.toLower(); | |
| 285 | + absPath = absPath.toLower(); | |
| 286 | + #endif | |
| 287 | + _treeNodes.append(new TreeNodeScript(fileName, absPath, SCRIPT_ORIGIN_LOCAL)); | |
| 278 | 288 | } |
| 279 | 289 | rebuildTree(); |
| 280 | 290 | endResetModel(); |