Commit 58578565 authored by JanKusanagi's avatar JanKusanagi

Set the recent projects path as QAction data

The visible text might be changed by the environment,
to auto-add keyboard accelerators (as in Plasma 5.x)
parent 6a7c1b03
......@@ -297,8 +297,10 @@ void MainWindow::createOpenRecentMenu()
foreach (QString recentProjectPath, this->recentlyOpenedFiles)
{
QAction *openRecentAction;
openRecentAction = new QAction(recentProjectPath, this);
QAction *openRecentAction = new QAction(recentProjectPath, this);
// Set the path as QAction data, since the visible text might be changed
// by the environment, to auto-add keyboard accelerators
openRecentAction->setData(recentProjectPath);
connect(openRecentAction, SIGNAL(triggered()),
this, SLOT(openRecentProject()));
......@@ -603,7 +605,7 @@ void MainWindow::openRecentProject()
{
if (!action->text().isEmpty())
{
projectPath = action->text();
projectPath = action->data().toString();
loadProjectFiles(projectPath);
}
}
......
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