@@ -164,9 +164,10 @@ QString ChatRootView::getChatsHistoryDir() const
164
164
165
165
if (auto project = ProjectExplorer::ProjectManager::startupProject ()) {
166
166
Settings::ProjectSettings projectSettings (project);
167
- path = projectSettings.chatHistoryPath ().toString ();
167
+ path = projectSettings.chatHistoryPath ().toFSPathString ();
168
168
} else {
169
- path = QString (" %1/qodeassist/chat_history" ).arg (Core::ICore::userResourcePath ().toString ());
169
+ path = QString (" %1/qodeassist/chat_history" )
170
+ .arg (Core::ICore::userResourcePath ().toFSPathString ());
170
171
}
171
172
172
173
QDir dir (path);
@@ -350,7 +351,7 @@ void ChatRootView::showAttachFilesDialog()
350
351
dialog.setFileMode (QFileDialog::ExistingFiles);
351
352
352
353
if (auto project = ProjectExplorer::ProjectManager::startupProject ()) {
353
- dialog.setDirectory (project->projectDirectory ().toString ());
354
+ dialog.setDirectory (project->projectDirectory ().toFSPathString ());
354
355
}
355
356
356
357
if (dialog.exec () == QDialog::Accepted) {
@@ -384,7 +385,7 @@ void ChatRootView::showLinkFilesDialog()
384
385
dialog.setFileMode (QFileDialog::ExistingFiles);
385
386
386
387
if (auto project = ProjectExplorer::ProjectManager::startupProject ()) {
387
- dialog.setDirectory (project->projectDirectory ().toString ());
388
+ dialog.setDirectory (project->projectDirectory ().toFSPathString ());
388
389
}
389
390
390
391
if (dialog.exec () == QDialog::Accepted) {
@@ -437,9 +438,10 @@ void ChatRootView::openChatHistoryFolder()
437
438
QString path;
438
439
if (auto project = ProjectExplorer::ProjectManager::startupProject ()) {
439
440
Settings::ProjectSettings projectSettings (project);
440
- path = projectSettings.chatHistoryPath ().toString ();
441
+ path = projectSettings.chatHistoryPath ().toFSPathString ();
441
442
} else {
442
- path = QString (" %1/qodeassist/chat_history" ).arg (Core::ICore::userResourcePath ().toString ());
443
+ path = QString (" %1/qodeassist/chat_history" )
444
+ .arg (Core::ICore::userResourcePath ().toFSPathString ());
443
445
}
444
446
445
447
QDir dir (path);
@@ -493,7 +495,7 @@ bool ChatRootView::isSyncOpenFiles() const
493
495
void ChatRootView::onEditorAboutToClose (Core::IEditor *editor)
494
496
{
495
497
if (auto document = editor->document (); document && isSyncOpenFiles ()) {
496
- QString filePath = document->filePath ().toString ();
498
+ QString filePath = document->filePath ().toFSPathString ();
497
499
m_linkedFiles.removeOne (filePath);
498
500
emit linkedFilesChanged ();
499
501
}
@@ -506,7 +508,7 @@ void ChatRootView::onEditorAboutToClose(Core::IEditor *editor)
506
508
void ChatRootView::onAppendLinkFileFromEditor (Core::IEditor *editor)
507
509
{
508
510
if (auto document = editor->document (); document && isSyncOpenFiles ()) {
509
- QString filePath = document->filePath ().toString ();
511
+ QString filePath = document->filePath ().toFSPathString ();
510
512
if (!m_linkedFiles.contains (filePath)) {
511
513
m_linkedFiles.append (filePath);
512
514
emit linkedFilesChanged ();
0 commit comments