Skip to content

Conversation

curlymorphic
Copy link
Contributor

a Resubmission of #1782

@tresf
Copy link
Member

tresf commented Mar 8, 2015

/home/travis/build/LMMS/lmms/src/core/Song.cpp:945:25: 

error: ‘_file_name’ was not declared in this scope

@curlymorphic
Copy link
Contributor Author

hmmm....... maybe pushing the same branch again wont work.

/home/travis/build/LMMS/lmms/src/core/Song.cpp:945:25: error: ‘_file_name’ was not declared in this scope

yeah, this is really confusing me. It builds and runs fine on my pc. builds and runs fine on my fork of travis. Ive just tried rebasting lets see if that helps,

@curlymorphic
Copy link
Contributor Author

Ok, wip :(

@curlymorphic
Copy link
Contributor Author

/home/travis/build/LMMS/lmms/src/core/Song.cpp:945:25:

error: ‘_file_name’ was not declared in this scope

listen next time Dave.

tresf added a commit that referenced this pull request Mar 8, 2015
@tresf tresf merged commit c540207 into LMMS:master Mar 8, 2015
}
break;
case Type::UnknownType:
if (! ( extension == "mmp" || extension == "mpt" || extension == "mmpz" ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit late in response to this but we can get back to the pretty select/case statements by creating a FileType enum down the road. I think it will have an added benefit by finally allowing us to remove the mmpz, mpt, xpf hard coded all over the place. 👍 Probably worth an enhancement request.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At second glance Dave's logic looks OK.

It appears we register our plugins as having an extension associated... and I'm guessing the Engine::pluginFileHandling().contains() doesn't actually contain xiz for some reason. I'd guess this is actually an existing bug that surfaced with this code... but that is just a hunch.... still investigating...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can get back to the pretty select/case statements by creating a FileType enum down the road. I think it will have an added benefit by finally allowing us to remove the mmpz, mpt, xpf hard coded all over the place.

Im not sure I understand the requirements, This code is checking the string of the file extension. Are you suggesting something like the following

enum { mmpz, mpt, xpf };
const char *types[] = { "mmpz", "mpt", "xpf" };
.....
.....
.....
if (extension == types[mpt]) .....

It appears we register our plugins as having an extension associated... and I'm guessing the Engine::pluginFileHandling().contains() doesn't actually contain xiz for some reason. I'd guess this is actually an existing bug that surfaced with this code...

The problem with this code as it stands is xiz, are not of Type::UnknownType, the returned enum is undefined. This should not be too hard for me to get sorted :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting something like the following

Yeah, similar. It would be more like this:

switch (type) {
    case Project:
    case ProjectCompressed:
    case ProjectTemplate:
    case ZynPreset:
    // etc
}

@tresf
Copy link
Member

tresf commented Mar 8, 2015

Thanks for the careful time and consideration that went into this request.

Closes #1404.

@curlymorphic
Copy link
Contributor Author

:) sorry for the mess at the end

return true;
}
break;
case Type::InstrumentTrackSettings:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@softrabbit @Spekular @curlymorphic Per #1880 I think we need a better XIZ check in here somewhere... :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confusing with these line notes not being sequential, I believe this is covered by the above line notes.

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

Successfully merging this pull request may close these issues.

2 participants