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

Open file button added when no file opened #1818

Merged
merged 11 commits into from Nov 15, 2017

Conversation

Projects
None yet
2 participants
@RhenaudTheLukark
Contributor

RhenaudTheLukark commented Nov 15, 2017

I created the missing "Open File..." button in the view when no file is opened.

Result in QtCreator:

Result in Tiled:

@bjorn

Great addition!

Please see my inline comments, and also please try to clean up the commits on your branch (look into rebasing and rebase your branch to my latest master branch).

Show outdated Hide outdated src/tiled/noeditorwidget.cpp Outdated
Show outdated Hide outdated src/tiled/noeditorwidget.cpp Outdated
RhenaudTheLukark RhenaudTheLukark

@bjorn bjorn merged commit 26f8d83 into bjorn:master Nov 15, 2017

0 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Nov 15, 2017

Owner

Whoops! I didn't notice the failing autobuilds and the change was looking good to me, but actually it didn't compile. Fixed now with change 6fe30ec. :-/

Owner

bjorn commented Nov 15, 2017

Whoops! I didn't notice the failing autobuilds and the change was looking good to me, but actually it didn't compile. Fixed now with change 6fe30ec. :-/

@RhenaudTheLukark

This comment has been minimized.

Show comment
Hide comment
@RhenaudTheLukark

RhenaudTheLukark Nov 15, 2017

Contributor

Okay, will update again

Contributor

RhenaudTheLukark commented Nov 15, 2017

Okay, will update again

@RhenaudTheLukark

This comment has been minimized.

Show comment
Hide comment
@RhenaudTheLukark

RhenaudTheLukark Nov 15, 2017

Contributor

Actually one of the lines I added doesn't work for some reason, specifically the one you told me to add.

It's weird, I swear it used to work before moving to Qt 5.9...

Contributor

RhenaudTheLukark commented Nov 15, 2017

Actually one of the lines I added doesn't work for some reason, specifically the one you told me to add.

It's weird, I swear it used to work before moving to Qt 5.9...

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Nov 15, 2017

Owner

It's weird, I swear it used to work before moving to Qt 5.9...

No, it can't have worked. I wrote that line on GitHub so I hadn't tried to compile it either, but it couldn't work because there are two overloads of DocumentManager::openFile. Hence the cast is required for the connect call to know which one is meant. See the fix I referenced.

Owner

bjorn commented Nov 15, 2017

It's weird, I swear it used to work before moving to Qt 5.9...

No, it can't have worked. I wrote that line on GitHub so I hadn't tried to compile it either, but it couldn't work because there are two overloads of DocumentManager::openFile. Hence the cast is required for the connect call to know which one is meant. See the fix I referenced.

@RhenaudTheLukark

This comment has been minimized.

Show comment
Hide comment
@RhenaudTheLukark

RhenaudTheLukark Nov 15, 2017

Contributor

I see now, thank you for the enlightenment. It's the first time I see such construction, it seems I still have a lot to learn on C++.

Contributor

RhenaudTheLukark commented Nov 15, 2017

I see now, thank you for the enlightenment. It's the first time I see such construction, it seems I still have a lot to learn on C++.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Nov 15, 2017

Owner

I see now, thank you for the enlightenment. It's the first time I see such construction, it seems I still have a lot to learn on C++.

It's casting to a certain member function signature (a member function of DocumentManager that returns void and takes no arguments). Anyway, even after coding C++ for almost 20 years I too need to look up the syntax for this... It's a lot easier with qOverload (if you ignore its template magic), but that's only available in Qt 5.7 and Tiled's minimum Qt version currently sits at Qt 5.6 (the last Qt version that supports Windows XP).

Owner

bjorn commented Nov 15, 2017

I see now, thank you for the enlightenment. It's the first time I see such construction, it seems I still have a lot to learn on C++.

It's casting to a certain member function signature (a member function of DocumentManager that returns void and takes no arguments). Anyway, even after coding C++ for almost 20 years I too need to look up the syntax for this... It's a lot easier with qOverload (if you ignore its template magic), but that's only available in Qt 5.7 and Tiled's minimum Qt version currently sits at Qt 5.6 (the last Qt version that supports Windows XP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment