Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not open recent files (KDE) #3741

Closed
gi0e5b06 opened this issue Jul 31, 2017 · 6 comments
Closed

Can not open recent files (KDE) #3741

gi0e5b06 opened this issue Jul 31, 2017 · 6 comments

Comments

@gi0e5b06
Copy link

Qt can add automatically accelarators for each menu entries and KDE does that by default. So a recent file like myproject.mmp becomes mypr&oject.mmp and can not be opened.
As a workaround, if a file is missing and contains an ampersand, the ampersand is removed and the file is tried again. Implemented. Works. May not work if your original filename contains one or more '&'.

PS: implementing a clean solution would require 30-40 lines of code, so way over the allowed PR size limit.

@Spekular
Copy link
Member

Spekular commented Jul 31, 2017 via email

@zonkmachine
Copy link
Member

would require 30-40 lines of code, so way over the allowed PR size limit.

What size limit? where did you see this?

@gi0e5b06
Copy link
Author

gi0e5b06 commented Aug 2, 2017

BTW, that should go into stable-1.2 too.
https://github.com/gi0e5b06/lmms/blob/ab1b45a32a6213ebbe09bda8c809380404c5ae4e/src/gui/MainWindow.cpp#L907

void MainWindow::openRecentlyOpenedProject( QAction * _action )
{
	if ( mayChangeProject(true) )
	{
		QString f = _action->text();
		// workaround for KDE
		QFileInfo recentFile(f);
		if(!recentFile.exists()&&(f.indexOf('&')>=0))
		{
			f=f.replace("&","");
		}
		//end
		setCursor( Qt::WaitCursor );
		Engine::getSong()->loadProject( f );
		setCursor( Qt::ArrowCursor );
	}
}

@irrenhaus3
Copy link
Contributor

@gi0e5b06 If you have a clean solution to the problem, please follow these steps:

  • Create a new git branch in your fork, based on this repo's stable-1.2 branch
  • Implement your solution on that branch
  • Create a new Pull Request of your branch into stable-1.2 of this repo.

There are no size restrictions on PRs, although complex or large changes may take longer to review. See also: https://github.com/LMMS/lmms/wiki/Submitting-a-patch
Also, could you explain where you saw the stuff about PR size limitations? If that's in the wiki somewhere, it needs to be taken out.

@gi0e5b06
Copy link
Author

gi0e5b06 commented Sep 9, 2017

@irrenhaus3 I posted the code. Feel free to go from there.

@zonkmachine
Copy link
Member

Closed in #3872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants