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

master ([3ce875d]) does not compile with MSVC 19 #292

Closed
rwiesenfarth opened this Issue Aug 16, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@rwiesenfarth
Contributor

rwiesenfarth commented Aug 16, 2016

Problem:

Compiling the master branch with MSVC 19 (and Qt 5.6.0, but this is unrelated) leads to an error:

error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax

Possible Solution:

replace line 14 in src/widgets/qownnotesmarkdowntextedit.cpp with

// The initial define causes an error with MSVC 19:
// "error C4576: a parenthesized type followed by an initializer list is
// a non-standard explicit type conversion syntax"
// The replacement works, probably also on other platforms (to be tested)
//#define STY(type, format) styles->append((HighlightingStyle){type, format})
#define STY(type, format) styles->append({type, format})

and accordingly line 62 in src/libraries/qmarkdowntextedit/markdownhighlighter.cpp

// The initial define causes an error with MSVC 19:
// "error C4576: a parenthesized type followed by an initializer list is
// a non-standard explicit type conversion syntax"
// The replacement works, probably also on other platforms (to be tested)
//#define STY(type, format) styles->append((HighlightingStyle){type, format})
#define STY(type, format) styles->append({type, format})

@pbek

This comment has been minimized.

Owner

pbek commented Aug 16, 2016

Could you please make pull requests to qmarkdowntextedit and QOwnNotes, then we could see if the changes are working on other platforms.

@rwiesenfarth

This comment has been minimized.

Contributor

rwiesenfarth commented Aug 16, 2016

Am 16.08.2016 um 09:35 schrieb Patrizio Bekerle:

Could you please make pull requests to qmarkdowntextedit and QOwnNotes,
then we could see if the changes are working on other platforms.

(English version below)

Hi,

kann ich (theoretisch) machen, ist für mich aber Neuland. Der naive
Ansatz (Push Request in Atlassian SourceForge) scheitert mit:

Permission to pbek/QOwnNotes.git denied to rwiesenfarth.

Muss ich dazu zuerst Dein repository bei github clonen?

Und: Ich muss ja dann einen zweiten Push-Request für qmarkdowntextedit
machen, weil das ja nur als submodule eingebunden ist!?

Grüße Rainer

Hi,

theoretically, I can, although it'll be a new experience. The naive
approach (pull request in Atlassian SourceForge) failed with:

Permission to pbek/QOwnNotes.git denied to rwiesenfarth.

Do I have to clone your repository at GitHub first?

Furthermore, I'll have to place a second pull request for
qmarkdowntextedit, as it is linked in as a submodule!?

@pbek

This comment has been minimized.

Owner

pbek commented Aug 16, 2016

I will answer in English here:

Yes, you will have to fork both repositories.

Or, since you only change one file in each of them, you can edit them directly here and make the pull request directly:

rwiesenfarth added a commit to rwiesenfarth/QOwnNotes that referenced this issue Aug 16, 2016

pbek#292 error when compiling with MSVC 19
Compiling with MSVC19 leads to

error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax

pbek added a commit that referenced this issue Aug 16, 2016

Merge pull request #293 from rwiesenfarth/patch-1
#292 error when compiling with MSVC 19

pbek pushed a commit that referenced this issue Aug 16, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Aug 16, 2016

I merged now everything and updated the submodule. Everything is now in the develop branch.
Thank you for your modifications!

@pbek pbek closed this Aug 16, 2016

@pbek pbek added this to the 16.08.11 milestone Aug 16, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Aug 16, 2016

The changes are now in the master branch too. Does it build for you?

@rwiesenfarth

This comment has been minimized.

Contributor

rwiesenfarth commented Aug 16, 2016

Yes, builds and works, Thanks for the fast response!

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