forked from qt-creator/qt-creator
Bookmarks: Make sure we do not end up with empty filenames
... in the bookmarks. The actions should all be disabled if that is the case, but better safe than sorry (e.g. when a temporary document is not marked up as such). Change-Id: I131a870dc30258a8bca3fc57edb4692292ccb2de Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -438,7 +438,7 @@ QMimeData *BookmarkManager::mimeData(const QModelIndexList &indexes) const
|
|||||||
|
|
||||||
void BookmarkManager::toggleBookmark(const QString &fileName, int lineNumber)
|
void BookmarkManager::toggleBookmark(const QString &fileName, int lineNumber)
|
||||||
{
|
{
|
||||||
if (lineNumber <= 0)
|
if (lineNumber <= 0 || fileName.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Remove any existing bookmark on this line
|
// Remove any existing bookmark on this line
|
||||||
|
Reference in New Issue
Block a user