Skip to content
Browse files

Fix crash on "Open Directory" entry of contextual menu of recent proj…


Fixes #31630

I couldn't reproduce a crash on my platform (Linux, Ubuntu 16.04, gnome classic),
but this smells pretty much like the issue of #30210 fixed per PR #30210

So using QgsFocusKeeper hoping that it would solve the issue for people affected
  • Loading branch information
rouault authored and nyalldawson committed May 26, 2020
1 parent f393b13 commit 0d6d626ec1ba8eb8a2d3495c8cddf7fb31925acc
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/app/qgswelcomepage.cpp
@@ -18,6 +18,7 @@
#include "qgisapp.h"
#include "qgsversioninfo.h"
#include "qgsapplication.h"
#include "qgsfocuskeeper.h"
#include "qgssettings.h"
#include "qgsgui.h"
#include "qgsnative.h"
@@ -291,6 +292,7 @@ void QgsWelcomePage::showContextMenuForProjects( QPoint point )
QAction *openFolderAction = new QAction( tr( "Open Directory…" ), menu );
connect( openFolderAction, &QAction::triggered, this, [path]
QgsFocusKeeper focusKeeper;
QgsGui::instance()->nativePlatformInterface()->openFileExplorerAndSelectFile( path );
} );
menu->addAction( openFolderAction );

0 comments on commit 0d6d626

Please sign in to comment.
You can’t perform that action at this time.