forked from qt-creator/qt-creator
VCS: Prompt to add file when creating from locator
Fixes: QTCREATORBUG-24168 Change-Id: I797f55935a8023c38bb7a57f3b2e015ea2895659 Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
bbe95b5733
commit
91d3800ec3
@@ -33,6 +33,7 @@
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
#include <utils/checkablemessagebox.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
@@ -199,6 +200,7 @@ void FileSystemFilter::accept(LocatorFilterEntry selection,
|
||||
QFile file(targetFile);
|
||||
file.open(QFile::WriteOnly);
|
||||
file.close();
|
||||
VcsManager::promptToAdd(QFileInfo(targetFile).absolutePath(), { targetFile });
|
||||
}
|
||||
const QFileInfo fileInfo(targetFile);
|
||||
const QString cleanedFilePath = QDir::cleanPath(fileInfo.absoluteFilePath());
|
||||
|
Reference in New Issue
Block a user