Commit aa80b23f authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

ProjectExplorer: Replace hard assertions with soft ones



Task-number: QTCREATORBUG-17961
Change-Id: I8f0aa0382b21ea7923cb1d4396833b33b226a247
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 173cb9f2
......@@ -3184,7 +3184,7 @@ void ProjectExplorerPluginPrivate::removeFile()
// remove from project
FolderNode *folderNode = fileNode->parentFolderNode();
Q_ASSERT(folderNode);
QTC_ASSERT(folderNode, return);
if (!folderNode->removeFiles(QStringList(filePath))) {
QMessageBox::warning(ICore::mainWindow(), tr("Removing File Failed"),
......@@ -3223,7 +3223,7 @@ void ProjectExplorerPluginPrivate::duplicateFile()
// Create a copy and add the file to the parent folder node.
FolderNode *folderNode = fileNode->parentFolderNode();
Q_ASSERT(folderNode);
QTC_ASSERT(folderNode, return);
if (!(QFile::copy(filePath, newFilePath) && folderNode->addFiles(QStringList(newFilePath)))) {
QMessageBox::warning(ICore::mainWindow(), tr("Duplicating File Failed"),
tr("Could not duplicate the file %1.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment