void CdbSymbolPathListEditor::setupSymbolPaths() { const QStringList ¤tPaths = pathList(); const int indexOfSymbolServer = indexOfSymbolPath(currentPaths, SymbolServerPath); const int indexOfSymbolCache = indexOfSymbolPath(currentPaths, SymbolCachePath); QString path; if (indexOfSymbolServer != -1) path = currentPaths.at(indexOfSymbolServer); if (path.isEmpty() && indexOfSymbolCache != -1) path = currentPaths.at(indexOfSymbolCache); if (path.isEmpty()) path = Utils::TemporaryDirectory::masterDirectoryPath() + "/symbolcache"; bool useSymbolServer = true; bool useSymbolCache = true; bool addSymbolPaths = SymbolPathsDialog::useCommonSymbolPaths(useSymbolCache, useSymbolServer, path); if (!addSymbolPaths) return; if (useSymbolCache) { insertPathAtCursor(CdbSymbolPathListEditor::symbolPath(path, SymbolCachePath)); if (useSymbolServer) insertPathAtCursor(CdbSymbolPathListEditor::symbolPath(QString(), SymbolServerPath)); } else if (useSymbolServer) { insertPathAtCursor(CdbSymbolPathListEditor::symbolPath(path, SymbolServerPath)); } }
void CdbSymbolPathListEditor::addSymbolServer() { const QString cacheDir = promptCacheDirectory(this); if (!cacheDir.isEmpty()) insertPathAtCursor(CdbSymbolPathListEditor::symbolServerPath(cacheDir)); }
void CdbSymbolPathListEditor::addSymbolPath(CdbSymbolPathListEditor::SymbolPathMode mode) { QString cacheDir; if (promptCacheDirectory(this, &cacheDir)) insertPathAtCursor(CdbSymbolPathListEditor::symbolPath(cacheDir, mode)); }
void PathListEditor::slotInsert() { const QString dir = QFileDialog::getExistingDirectory(this, d->fileDialogTitle); if (!dir.isEmpty()) insertPathAtCursor(QDir::toNativeSeparators(dir)); }